/* =========================================================
   DATABASE LKSA — PRODUCTION EXPERIENCE
   MPKS MUHAMMADIYAH
   Visual layer only: no application/security logic changed.
   ========================================================= */

:root {
  --brand-green-950: #063d32;
  --brand-green-900: #075746;
  --brand-green-800: #08705a;
  --brand-green-700: #0a876c;
  --brand-green-600: #139779;
  --brand-green-500: #24aa88;
  --brand-green-100: #dff5ed;
  --brand-green-50: #f2fbf7;

  --ink-950: #13251f;
  --ink-800: #263d35;
  --ink-600: #5b7169;
  --ink-500: #71857e;

  --gold: #e3ad42;
  --gold-soft: #fff5d9;

  --page: #f5f9f7;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --line: #dce9e4;

  --theme-shadow-sm: 0 8px 24px rgba(7, 87, 70, 0.07);
  --theme-shadow-md: 0 18px 45px rgba(7, 87, 70, 0.11);
  --theme-shadow-lg: 0 30px 80px rgba(5, 65, 52, 0.16);

  --theme-radius-sm: 12px;
  --theme-radius: 18px;
  --theme-radius-lg: 28px;

  --navy: var(--brand-green-950);
  --blue: var(--brand-green-700);
  --blue-soft: var(--brand-green-50);
  --teal: var(--brand-green-700);
  --teal-soft: var(--brand-green-100);
  --green: var(--brand-green-700);
  --cream: #fffdf8;
  --surface-alt: var(--page);
  --text: var(--ink-950);
  --muted: var(--ink-600);
  --border: var(--line);
  --shadow: var(--theme-shadow-md);
  --radius: var(--theme-radius);
  --radius-small: var(--theme-radius-sm);
  --focus: 3px solid #f0b84c;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  color: var(--ink-950);
  background:
    radial-gradient(circle at 4% 0%, rgba(36, 170, 136, 0.08), transparent 27rem),
    radial-gradient(circle at 96% 28%, rgba(227, 173, 66, 0.06), transparent 24rem),
    var(--page);
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 78px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(220, 233, 228, 0.9);
  box-shadow: 0 6px 26px rgba(7, 87, 70, 0.045);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  padding-left: 18px;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--brand-green-500),
    var(--brand-green-800)
  );
}

.brand-context {
  color: var(--brand-green-700);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.brand-name {
  color: var(--brand-green-950);
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.primary-nav {
  gap: 4px;
}

.primary-nav > a {
  position: relative;
  padding: 9px 12px;
  color: var(--ink-800);
  border-radius: 11px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.primary-nav > a:hover {
  color: var(--brand-green-900);
  background: var(--brand-green-50);
  transform: translateY(-1px);
}

.logout-form .button {
  margin-left: 6px;
}

.identity-strip {
  min-height: 38px;
  padding: 8px clamp(18px, 4vw, 58px);
  align-items: center;
  background:
    radial-gradient(circle at 92% 50%, rgba(255,255,255,.1), transparent 18rem),
    linear-gradient(110deg, var(--brand-green-950), var(--brand-green-700));
  color: rgba(255,255,255,.94);
  border: 0;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

/* ---------- Main canvas ---------- */

.main-content {
  width: min(1440px, calc(100% - 38px));
  min-height: calc(100vh - 210px);
  padding: 32px 0 64px;
}

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  background:
    linear-gradient(
      125deg,
      rgba(255,255,255,.98) 0%,
      rgba(244,251,248,.98) 58%,
      rgba(229,247,239,.98) 100%
    );
  border: 1px solid rgba(201, 226, 216, 0.9);
  border-radius: 30px;
  box-shadow: var(--theme-shadow-sm);
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  right: -100px;
  top: -180px;
  border-radius: 50%;
  background: rgba(36, 170, 136, 0.12);
}

.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  right: 150px;
  bottom: -120px;
  border-radius: 50%;
  background: rgba(227, 173, 66, 0.11);
}

.page-hero.compact {
  margin-bottom: 28px;
}

.page-hero h1,
.error-page h1,
.login-card h2,
.welcome-copy h1 {
  color: var(--brand-green-950);
  letter-spacing: -0.035em;
}

.page-hero h1 {
  max-width: 850px;
  font-size: clamp(2rem, 4vw, 3.55rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: 1.03rem;
}

.eyebrow {
  color: var(--brand-green-700);
  font-size: 0.73rem;
  letter-spacing: 0.14em;
}

/* ---------- Section titles ---------- */

.section-heading {
  margin: 34px 0 18px;
}

.section-heading h2,
.panel h2 {
  color: var(--brand-green-950);
  letter-spacing: -0.02em;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

/* ---------- Cards ---------- */

.card-grid,
.action-grid,
.run-grid {
  gap: 18px;
}

.module-card,
.action-card,
.run-card,
.panel {
  border: 1px solid rgba(214, 231, 224, 0.95);
  background: rgba(255,255,255,.95);
  box-shadow: var(--theme-shadow-sm);
}

.module-card,
.action-card,
.run-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.module-card::after,
.action-card::after,
.run-card::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -42px;
  bottom: -42px;
  border-radius: 50%;
  background: var(--brand-green-100);
  opacity: .55;
  transition: transform 220ms ease;
}

.module-card:hover,
.action-card:hover,
.run-card:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 170, 136, .42);
  box-shadow: var(--theme-shadow-md);
}

.module-card:hover::after,
.action-card:hover::after,
.run-card:hover::after {
  transform: scale(1.35);
}

.module-card {
  min-height: 190px;
  padding: 25px;
  border-radius: 22px;
}

.module-index {
  width: 39px;
  height: 39px;
  background:
    linear-gradient(145deg, var(--brand-green-100), #f2fbf7);
  color: var(--brand-green-800);
  box-shadow: inset 0 0 0 1px rgba(36,170,136,.12);
}

.module-card h3 {
  margin-top: 18px;
  color: var(--brand-green-950);
  font-size: 1.08rem;
}

.module-card p {
  color: var(--ink-600);
}

.action-card,
.run-card {
  min-height: 132px;
  padding: 22px 24px;
  border-radius: 20px;
}

.action-card strong,
.run-card strong {
  color: var(--brand-green-950);
}

.action-card span,
.run-card span {
  position: relative;
  z-index: 1;
  color: var(--ink-600);
}

/* ---------- Panels ---------- */

.panel {
  position: relative;
  margin: 22px 0;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 24px;
}

.panel > h2:first-child {
  margin-top: 0;
}

.status-badge {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--brand-green-800);
  background: linear-gradient(135deg, var(--brand-green-100), #f4fbf8);
  border: 1px solid rgba(36,170,136,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

/* ---------- Summary / KPI ---------- */

.summary-grid {
  gap: 14px;
}

.summary-grid div {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  padding: 18px;
  background:
    linear-gradient(145deg, #fbfefd, #f2f9f6);
  border: 1px solid rgba(216, 234, 226, .9);
  border-radius: 17px;
}

.summary-grid div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  bottom: 15px;
  width: 4px;
  border-radius: 999px;
  background: var(--brand-green-500);
}

.summary-grid dt {
  padding-left: 3px;
  color: var(--ink-500);
  font-size: .73rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.summary-grid dd {
  padding-left: 3px;
  color: var(--brand-green-950);
  font-size: 1.04rem;
}

/* ---------- Tables ---------- */

.table-wrap {
  margin-top: 18px;
  border: 1px solid rgba(211, 230, 222, .95);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(7,87,70,.045);
  background: #fff;
}

table {
  font-size: .87rem;
}

th,
td {
  padding: 13px 14px;
  border-bottom-color: #e7f0ec;
}

th {
  z-index: 2;
  color: var(--brand-green-950);
  background:
    linear-gradient(180deg, #f3faf7, #edf7f2);
  font-size: .7rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:nth-child(even) {
  background: #fbfdfc;
}

tbody tr:hover {
  background: #f0f9f5;
}

.suppressed-value {
  display: inline-grid;
  min-width: 30px;
  min-height: 28px;
  place-items: center;
  color: var(--ink-500);
  background: #eef3f1;
  border-radius: 8px;
}

/* ---------- Forms ---------- */

.form-field label {
  color: var(--ink-800);
  font-size: .84rem;
}

.form-field input {
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink-950);
  background: #fff;
  border: 1px solid #c8d9d2;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(12,71,57,.025);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.form-field input:hover {
  border-color: #accbc0;
}

.form-field input:focus {
  border-color: var(--brand-green-600);
  box-shadow: 0 0 0 4px rgba(36,170,136,.1);
  outline: none;
}

.button {
  border-radius: 12px;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background:
    linear-gradient(135deg, var(--brand-green-700), var(--brand-green-900));
  box-shadow: 0 9px 22px rgba(8,112,90,.18);
}

.button-primary:hover {
  box-shadow: 0 12px 28px rgba(8,112,90,.24);
}

.button-secondary {
  color: var(--brand-green-900);
  background: var(--brand-green-50);
  border-color: #cce5db;
}

.button-quiet {
  color: var(--brand-green-900);
  background: #fff;
  border-color: #d2e3dc;
}

/* ---------- Run selector ---------- */

.quick-runs {
  margin-top: 18px;
  gap: 9px;
}

.quick-runs > span {
  color: var(--ink-600);
  font-size: .82rem;
  font-weight: 700;
}

.quick-runs a {
  min-height: 38px;
  padding: 7px 12px;
  color: var(--brand-green-800);
  background: #f0f9f5;
  border: 1px solid #d4e9e0;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.quick-runs a:hover {
  background: var(--brand-green-100);
  transform: translateY(-1px);
}

/* ---------- Empty / alerts ---------- */

.empty-state {
  padding: 28px;
  background:
    linear-gradient(135deg, #f8fcfa, #f2f8f5);
  border: 1px dashed #b9d8cc;
  border-radius: 18px;
}

.empty-state strong {
  color: var(--brand-green-950);
}

.alert {
  border: 1px solid #cbe6dc;
  background: #eff9f5;
  color: var(--brand-green-950);
}

.form-error {
  background: #fff4f3;
  border-color: #efc8c3;
  border-left: 4px solid var(--danger);
}

/* ---------- Footer ---------- */

.site-footer,
.login-footer {
  color: var(--ink-600);
  background: rgba(255,255,255,.92);
  border-top-color: #e1ece7;
}

/* =========================================================
   LOGIN EXPERIENCE
   ========================================================= */

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(42,177,142,.22), transparent 29rem),
    radial-gradient(circle at 52% 95%, rgba(227,173,66,.12), transparent 25rem),
    linear-gradient(135deg, #eff9f5 0%, #f8fbfa 55%, #edf7f3 100%);
}

.login-layout {
  position: relative;
  min-height: calc(100vh - 70px);
  grid-template-columns: minmax(0, 1.18fr) minmax(410px, .82fr);
}

.login-visual {
  isolation: isolate;
  min-height: 720px;
  padding: clamp(38px, 6vw, 82px);
}

.login-visual::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 470px;
  height: 470px;
  left: -180px;
  bottom: -200px;
  border-radius: 50%;
  background: rgba(36,170,136,.12);
}

.login-visual::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: 240px;
  height: 240px;
  right: 8%;
  top: 10%;
  border: 1px solid rgba(8,112,90,.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(36,170,136,.025),
    0 0 0 70px rgba(36,170,136,.018);
}

.login-brand {
  position: relative;
  z-index: 4;
  padding-left: 18px;
}

.login-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--brand-green-500),
    var(--brand-green-900)
  );
}

.welcome-copy {
  max-width: 720px;
}

.welcome-copy h1 {
  max-width: 680px;
  font-size: clamp(2.7rem, 5.5vw, 5.15rem);
  line-height: .99;
  letter-spacing: -.055em;
}

.welcome-copy > p:last-child {
  max-width: 590px;
  color: var(--ink-600);
  font-size: 1.08rem;
  line-height: 1.72;
}

/* Existing caregiver illustration, made richer */
.care-illustration {
  width: 430px;
  height: 330px;
  right: 2%;
  bottom: 17%;
  filter: drop-shadow(0 20px 28px rgba(7,87,70,.08));
}

.care-sun {
  width: 104px;
  height: 104px;
  background:
    radial-gradient(circle at 38% 35%, #ffe8a6, #efbc4e);
  box-shadow: 0 0 0 18px rgba(239,188,78,.08);
}

.care-house {
  background:
    linear-gradient(145deg, #d8f1e7, #bfe5d7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.care-house::before {
  background:
    linear-gradient(145deg, #cbeadd, #a9d9c7);
}

.care-person-adult {
  background:
    linear-gradient(180deg, #08705a, #075746);
}

.care-person-child-one {
  background:
    linear-gradient(180deg, #42af8b, #21886c);
}

.care-person-child-two {
  background:
    linear-gradient(180deg, #efc763, #dda43a);
}

.care-ground {
  background: rgba(8,112,90,.13);
  filter: blur(.3px);
}

.trust-list {
  gap: 12px;
}

.trust-list li {
  padding: 16px;
  background: rgba(255,255,255,.73);
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(7,87,70,.055);
  backdrop-filter: blur(15px);
}

.trust-list strong {
  color: var(--brand-green-950);
}

.login-panel {
  position: relative;
  padding: clamp(28px, 5vw, 72px);
}

.login-panel::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: 0;
  bottom: 2%;
  border-radius: 50%;
  background: rgba(36,170,136,.055);
  filter: blur(2px);
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 480px);
  padding: clamp(30px, 4vw, 46px);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 28px;
  box-shadow: var(--theme-shadow-lg);
  backdrop-filter: blur(20px);
}

.login-card::before {
  content: "";
  position: absolute;
  left: 44px;
  right: 44px;
  top: 0;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background:
    linear-gradient(90deg, var(--brand-green-500), var(--gold));
}

.login-card h2 {
  margin-top: 6px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.login-card .muted {
  line-height: 1.65;
}

.password-toggle {
  color: var(--brand-green-800);
  border-left-color: #d8e6e0;
}

.privacy-note {
  padding-top: 16px;
  border-top: 1px solid #e4eeea;
  line-height: 1.55;
}

.login-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-panel {
    order: -1;
    padding-bottom: 22px;
  }

  .login-visual {
    min-height: 620px;
  }
}

@media (max-width: 760px) {
  .main-content {
    width: min(100% - 24px, 1440px);
    padding-top: 18px;
  }

  .site-header {
    min-height: 70px;
    padding-inline: 16px;
  }

  .primary-nav {
    top: 70px;
    border-bottom-color: #dfece6;
  }

  .page-hero {
    padding: 26px 22px;
    border-radius: 22px;
  }

  .page-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .panel {
    padding: 20px 17px;
    border-radius: 20px;
  }

  .module-card,
  .action-card,
  .run-card {
    border-radius: 18px;
  }

  .login-visual {
    min-height: 690px;
    padding: 34px 22px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
  }

  .login-card {
    padding: 30px 23px;
    border-radius: 23px;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   PRODUCTION LOGIN — HERO IMAGE INTEGRATION
   ========================================================= */

.login-visual-production {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  gap: 24px;
  align-content: stretch;
}

.login-brand-production .brand-context {
  display: block;
}

.brand-context-secondary {
  margin-top: 2px;
  font-size: 0.62rem;
  opacity: 0.82;
}

.login-brand-production .brand-name {
  display: block;
  margin-top: 7px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.production-welcome {
  margin-top: 6px;
}

.production-welcome h1 {
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 4.5vw, 4.5rem);
}

.login-photo-frame {
  position: relative;
  width: min(100%, 760px);
  height: clamp(260px, 32vw, 420px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 24px 55px rgba(7, 87, 70, 0.16);
  background: #dfeee8;
}

.login-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      transparent 52%,
      rgba(5, 54, 43, 0.48) 100%
    );
}

.login-photo-frame img {
  position: absolute;
  width: 158%;
  max-width: none;
  height: auto;
  left: -29%;
  top: -36%;
  transform: scale(1.18);
  transform-origin: center;
  filter: saturate(0.94) contrast(1.02);
}

.login-photo-frame figcaption {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 20px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.production-trust-list {
  max-width: 760px;
}

.login-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-card-heading h2 {
  margin: 2px 0 0;
}

.login-card-mark {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background:
    linear-gradient(145deg, var(--brand-green-600), var(--brand-green-900));
  box-shadow: 0 10px 24px rgba(8, 112, 90, 0.22);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.login-submit {
  min-height: 52px;
  margin-top: 4px;
}

.login-security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  padding: 15px 16px;
  color: var(--ink-600);
  background: var(--brand-green-50);
  border: 1px solid #d7ebe3;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.login-security-note p {
  margin: 0;
}

.security-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand-green-600);
  box-shadow: 0 0 0 4px rgba(36, 170, 136, 0.12);
}

@media (max-width: 1080px) {
  .login-visual-production {
    grid-template-rows: auto auto auto auto;
  }

  .login-photo-frame {
    width: min(100%, 820px);
    height: 390px;
  }
}

@media (max-width: 760px) {
  .login-photo-frame {
    height: 300px;
    border-radius: 22px;
  }

  .login-photo-frame img {
    width: 190%;
    left: -45%;
    top: -27%;
  }

  .production-trust-list {
    margin-top: 0;
  }

  .login-card-heading {
    align-items: flex-start;
  }
}

/* Final hero crop: show the caregiving scene only, never the baked-in login UI */
.login-photo-frame {
  height: clamp(300px, 27vw, 390px);
}

.login-photo-frame img {
  width: 220%;
  max-width: none;
  height: auto;
  left: -40%;
  top: -250px;
  transform: none;
  transform-origin: center;
}

@media (max-width: 1080px) {
  .login-photo-frame img {
    width: 215%;
    left: -38%;
    top: -245px;
  }
}

@media (max-width: 760px) {
  .login-photo-frame {
    height: 290px;
  }

  .login-photo-frame img {
    width: 235%;
    left: -45%;
    top: -190px;
  }
}

/* =========================================================
   FINAL MPKS BRAND + CLEAN HERO
   ========================================================= */

.login-brand-production {
  padding-left: 0;
}

.login-brand-production::before {
  display: none;
}

.mpks-brand-image {
  display: block;
  width: min(100%, 390px);
  height: auto;
  object-fit: contain;
  object-position: left center;
  border-radius: 4px;
}

.login-photo-frame {
  width: min(100%, 760px);
  height: clamp(300px, 29vw, 405px);
  background: #eef7f3;
}

.login-photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: none;
  filter: saturate(.97) contrast(1.015);
}

@media (max-width: 1080px) {
  .mpks-brand-image {
    width: min(100%, 420px);
  }

  .login-photo-frame {
    height: 390px;
  }

  .login-photo-frame img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
    object-position: center center;
  }
}

@media (max-width: 760px) {
  .mpks-brand-image {
    width: min(100%, 340px);
  }

  .login-photo-frame {
    height: 300px;
  }

  .login-photo-frame img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
    object-position: center center;
  }
}

/* =========================================================
   OFFICIAL MPKS HEADER
   ========================================================= */

.login-institution-header {
  width: 100%;
  min-height: 118px;
  display: flex;
  align-items: center;
  padding: 18px clamp(28px, 5vw, 82px) 14px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e3ece8;
  box-shadow: 0 5px 22px rgba(7, 87, 70, 0.045);
}

.login-institution-logo {
  display: block;
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.login-layout-production {
  min-height: calc(100vh - 188px);
}

@media (max-width: 760px) {
  .login-institution-header {
    min-height: 94px;
    padding: 14px 20px 12px;
  }

  .login-institution-logo {
    width: min(100%, 350px);
  }

  .login-layout-production {
    min-height: auto;
  }
}


/* =========================================================
   FINAL SINGLE-SCREEN LOGIN
   Desktop / laptop / tablet = one viewport
   Hero = MUhammadiyahhero.png
   Phone = natural scrolling
   ========================================================= */

@media (min-width: 761px) {
  html,
  body.login-body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  body.login-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .login-institution-header {
    min-height: 82px;
    padding: 10px clamp(24px, 4vw, 64px);
  }

  .login-institution-logo {
    width: min(100%, 380px);
    max-height: 62px;
    object-fit: contain;
    object-position: left center;
  }

  .login-layout-production {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
  }

  .login-visual-production {
    min-height: 0;
    height: 100%;
    padding: clamp(16px, 2.3vh, 28px) clamp(26px, 4vw, 64px);
    gap: clamp(9px, 1.5vh, 16px);
    grid-template-rows: auto minmax(170px, 1fr) auto;
  }

  .production-welcome {
    margin: 0;
  }

  .production-welcome h1 {
    margin: 4px 0 7px;
    font-size: clamp(1.9rem, 3.4vw, 3.45rem);
    line-height: 1;
  }

  .production-welcome > p:last-child {
    margin: 0;
    max-width: 680px;
    font-size: clamp(.82rem, .95vw, .96rem);
    line-height: 1.42;
  }

  .login-photo-frame {
    width: min(100%, 760px);
    height: 100%;
    min-height: 170px;
    max-height: 300px;
    border-radius: 20px;
  }

  .login-photo-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: none;
  }

  .login-photo-frame figcaption {
    left: 17px;
    right: 17px;
    bottom: 13px;
    font-size: .76rem;
  }

  .production-trust-list {
    width: min(100%, 760px);
    gap: 8px;
  }

  .production-trust-list li {
    padding: 9px 11px;
  }

  .production-trust-list strong {
    font-size: .82rem;
  }

  .production-trust-list span {
    font-size: .68rem;
    line-height: 1.3;
  }

  .login-panel {
    min-height: 0;
    height: 100%;
    padding: clamp(16px, 2.6vh, 30px) clamp(24px, 4vw, 56px);
  }

  .login-card {
    width: min(100%, 450px);
    max-height: 100%;
    padding: clamp(20px, 2.8vh, 32px);
    border-radius: 23px;
  }

  .login-card-heading {
    margin-bottom: 9px;
  }

  .login-card h2 {
    font-size: clamp(1.5rem, 2vw, 1.9rem);
  }

  .login-card .muted {
    margin: 5px 0 12px;
    font-size: .83rem;
  }

  .login-card .form-field {
    margin-bottom: 9px;
  }

  .login-card .form-field input {
    min-height: 42px;
  }

  .login-submit {
    min-height: 45px;
  }

  .login-security-note {
    margin-top: 12px;
    padding: 9px 11px;
    font-size: .7rem;
  }

  .login-footer {
    min-height: 38px;
    padding: 7px 24px;
    font-size: .68rem;
  }
}

@media (max-width: 760px) {
  html,
  body.login-body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.login-body {
    display: block;
  }

  .login-layout-production {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .login-panel,
  .login-visual-production {
    height: auto;
    overflow: visible;
  }
}

/* FINAL — larger official Muhammadiyah / MPKS branding */
@media (min-width: 761px) {
  .login-institution-header {
    min-height: 96px;
    padding: 8px clamp(28px, 4vw, 64px);
  }

  .login-institution-logo {
    width: min(100%, 520px);
    max-height: 80px;
    object-fit: contain;
    object-position: left center;
  }
}

@media (max-width: 760px) {
  .login-institution-logo {
    width: min(100%, 390px);
    max-height: none;
  }
}
