.id-card-print-wrap {
  display: inline-block;
  padding: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(255,255,255,0.02));
  border-radius: 6px;
}

.id-card-realistic {
  width: 106mm;
  height: 68mm;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 28px rgba(3, 25, 45, 0.35);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(10,40,80,0.12);
  transform: translateZ(0);
}

.id-card-realistic,
.id-card-realistic * {
  box-sizing: border-box;
}

.id-card-header-redesign {
  width: 100%;
  background: var(--id-accent, #2176c7);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4mm 0 3mm;
  letter-spacing: 0.2mm;
  line-height: 1.05;
}

.id-card-header-redesign img {
  position: absolute;
  left: 6mm;
  top: 50%;
  transform: translateY(-50%);
  height: 14mm;
  width: 14mm;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.4);
}

.id-card-header-redesign div {
  margin: 0;
  text-align: center;
}

.id-card-header-redesign div div {
  font-size: 3.5mm;
}

.id-card-body-redesign {
  display: grid;
  grid-template-columns: 1fr 35mm;
  flex: 1;
  background: #fff !important;
  padding: 4.8mm 4.4mm 3.4mm 4.8mm;
  column-gap: 3.1mm;
}

.id-card-fields-redesign {
  display: flex;
  flex-direction: column;
  gap: 2.35mm;
}

.id-line-redesign {
  display: grid;
  grid-template-columns: 25.2mm 1fr;
  align-items: end;
  column-gap: 1.25mm;
}

.id-label-redesign {
  font-weight: 700;
  color: #111 !important;
  font-size: 2.8mm;
  letter-spacing: 0.03mm;
  line-height: 1.05;
  white-space: nowrap;
}

.id-value-redesign {
  position: relative;
  min-height: 4.25mm;
  border-bottom: 0.38mm solid #222;
  display: flex;
  align-items: flex-end;
}

.id-underline {
  display: none;
}

.id-value-text {
  position: static;
  max-width: 100%;
  font-size: 2.35mm;
  color: #111 !important;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  padding-right: 0.25mm;
}

.id-line-redesign:nth-child(4) .id-value-text {
  font-size: 2.05mm;
}

.id-card-photo-signature {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 30mm;
}

.id-photo-redesign {
  width: 30mm;
  height: 34mm;
  border: 1px solid #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.0mm;
  color: #666 !important;
  font-style: italic;
  background: #fff !important;
  overflow: hidden;
}

.id-photo-image-redesign {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-signature-redesign {
  width: 30mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35mm;
  color: #111 !important;
  font-weight: 700;
  letter-spacing: 0.03mm;
  min-height: 13mm;
  display: flex;
  overflow: hidden;
}

.id-signature-image-slot-redesign {
  width: 100%;
  min-height: 6.5mm;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.id-signature-image-redesign {
  width: 96%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.08);
  transform-origin: center center;
}

.id-signature-placeholder-redesign {
  font-size: 2.55mm;
  font-style: italic;
  color: #666 !important;
  line-height: 1;
}

.id-signature-line-redesign {
  width: 100%;
  border-top: 0.35mm solid #222;
}

.id-signature-label-redesign {
  width: 100%;
  text-align: center;
  font-size: 2.15mm;
  line-height: 1;
}

.id-card-photo-signature {
  display: flex;
  flex-direction: column;
  gap: 2.2mm; /* tighter spacing so the signature line sits closer */
  align-items: center;
  justify-content: flex-start; /* keep photo at top */
  min-height: 40mm; /* reduce container so signature isn't forced too far down */
  width: 30mm;
}
.id-photo-redesign {
  overflow: hidden !important;
  flex: 0 0 auto !important;
}
.id-photo-image-redesign {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.id-signature-redesign {
  z-index: 2 !important;
  background: transparent !important;
  flex: 0 0 auto !important;
  min-height: 14mm !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding-top: 0 !important;
  margin-top: 0.2mm !important; /* keep signature closer to the photo */
}
.id-signature-image-slot-redesign {
  width: 100% !important;
  min-height: 6.4mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
.id-signature-image-redesign {
  width: 96% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transform: scale(1.08) !important;
  transform-origin: center center !important;
}
.id-signature-placeholder-redesign {
  font-size: 2.3mm !important;
  font-style: italic !important;
  color: #666666 !important;
  line-height: 1 !important;
}
.id-signature-line-redesign {
  width: 100% !important;
  border-top: 0.35mm solid #222222 !important;
  margin-top: 0.25mm !important;
}
.id-signature-label-redesign {
  width: 100% !important;
  text-align: center !important;
  font-size: 2.35mm !important;
  font-weight: 800 !important;
  letter-spacing: 0.05mm !important;
  line-height: 1 !important;
  margin-top: 0.15mm !important;
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
}

/* Realistic card visual details confined to the realistic wrapper */
.id-card-realistic .id-card-redesign {
  width: 100%;
  height: 100%;
  border: none;
  background: linear-gradient(180deg, #eaf6ff 0%, #ffffff 35%);
  padding: 6px;
  box-shadow: none;
}

.id-card-realistic .id-card-header-redesign {
  padding: 4px 0 3px;
  font-weight: 800;
  color: var(--card-header-ink, #ffffff);
  letter-spacing: 0.4px;
  box-shadow: inset 0 -6px 18px rgba(255,255,255,0.06);
}

.id-card-realistic .id-card-body-redesign {
  padding: 6px 10px;
  gap: 8px;
}

/* left accent strip (like an ID badge spine) */
.id-card-realistic .id-card-redesign::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.06));
  border-radius: 4px;
  pointer-events: none;
}

/* subtle holographic stripe on top-right for authenticity */
.id-card-realistic .id-card-redesign::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 10px;
  width: 60px;
  height: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
  transform: rotate(12deg);
  opacity: 0.75;
  pointer-events: none;
}

/* confine any motion to the card only; use a modest lift for hover/active */
.id-card-realistic .id-card-redesign {
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease;
}
.id-card-realistic .id-card-redesign.animate {
  transform: translateY(-8px) rotateX(1deg);
  box-shadow: 0 18px 42px rgba(2, 24, 40, 0.42);
}

/* Ensure we never apply transforms to parent panels */
.admin-register-panel .id-card-realistic { will-change: transform; }

/* Also offer a safe hover-only lift so only the card moves when hovered */
.id-card-realistic:hover .id-card-redesign {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(2,24,40,0.32);
}

:root {
      --bg: #0a1e2b;
      --panel: #123247;
      --ink: #eaeafb;
      --muted: #a9c7d4;
      --line: #2d5568;
      --line-strong: #3f6e83;
      --accent: #35a7b8;
  --brand-1: #0e4d64;
  --brand-2: #137177;
  --brand-soft: rgba(19, 113, 119, 0.18);
  --brand-glow: rgba(53, 167, 184, 0.24);
  --success: #2bae66;
  --success-soft: rgba(43, 174, 102, 0.14);
  --warning: #dc3545;
  --warning-soft: rgba(220, 53, 69, 0.16);
  --danger: #d9534f;
  --danger-soft: rgba(217, 83, 79, 0.16);
  --sea-1: #123247;
  --sea-2: #1a4053;
  --sea-3: #255a71;
  --sea-line: rgba(53, 167, 184, 0.22);
  --foam: rgba(234, 246, 251, 0.28);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: "Manrope", "Trebuchet MS", sans-serif;
      background: #FFFFFF;
      color: #212529;
      min-height: 100vh;
      padding: clamp(10px, 1.2vw, 18px);
      position: relative;
      overflow-x: hidden;
    }

    body::before,
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      border-radius: 0;
      filter: none;
      pointer-events: none;
      opacity: 1;
      z-index: -1;
    }

    body::before {
      background:
        repeating-linear-gradient(62deg, rgba(28, 72, 116, 0.10) 0 1px, transparent 1px 74px),
        repeating-linear-gradient(-62deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 74px),
        repeating-linear-gradient(155deg, rgba(41, 88, 134, 0.10) 0 1px, transparent 1px 92px),
        repeating-linear-gradient(-155deg, rgba(255, 255, 255, 0.30) 0 1px, transparent 1px 92px);
      opacity: 0.64;
    }

    body::after {
      background:
        radial-gradient(150% 100% at 0% 110%, transparent 0 56%, rgba(36, 88, 138, 0.24) 56.2% 56.8%, transparent 57% 100%),
        radial-gradient(150% 100% at 0% 110%, transparent 0 62%, rgba(36, 88, 138, 0.20) 62.2% 62.8%, transparent 63% 100%),
        radial-gradient(150% 100% at 0% 110%, transparent 0 68%, rgba(36, 88, 138, 0.16) 68.2% 68.8%, transparent 69% 100%);
      opacity: 0.8;
    }

    .canvas {
      width: 100%;
      max-width: none;
      margin: 0;
      border: 1px solid rgba(0,0,0,0.1);
      background: #f8f9fa;
      box-shadow: 0 24px 70px rgba(19, 32, 43, 0.14);
      display: grid;
      grid-template-columns: 280px 1fr;
      min-height: 860px;
      overflow: hidden;
      border-radius: 22px;
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }

    .hidden {
      display: none !important;
    }

    .login-wireframe.shell-enter,
    .app-shell.shell-enter .canvas {
      animation: shellFadeIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .login-wireframe.shell-exit,
    .app-shell.shell-exit .canvas {
      animation: shellFadeOut 220ms ease both;
    }

    @keyframes shellFadeIn {
      from {
        opacity: 0;
        transform: translateY(10px) scale(0.992);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }

    @keyframes shellFadeOut {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      to {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
      }
    }

    .login-wireframe {
      width: min(1080px, calc(100vw - 24px));
      margin: 22px auto;
      border: 1px solid rgba(22, 49, 76, 0.14);
      background: #0a1e2b;
      color: #0af0ff;
      box-shadow: 0 28px 70px rgba(12, 28, 45, 0.16);
      padding: 12px;
      display: grid;
      grid-template-columns: 0.86fr 1.14fr;
      gap: 0;
      border-radius: 24px;
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      color: #1f2d3a;
      position: relative;
      overflow: hidden;
    }

    .book-cover {
      border-radius: 18px 0 0 18px;
      padding: 34px 30px;
      display: grid;
      align-content: space-between;
      gap: 28px;
      min-height: 640px;
      background:
        radial-gradient(circle at 0% 0%, rgba(115, 184, 255, 0.16), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(35, 85, 136, 0.18), transparent 40%),
        linear-gradient(165deg, #14263a 0%, #0f1d30 55%, #0d1727 100%);
      color: #edf4fb;
      position: relative;
      overflow: hidden;
    }

    .book-cover::before {
      content: '';
      position: absolute;
      width: 320px;
      height: 320px;
      left: -170px;
      bottom: -180px;
      border-radius: 999px;
      background: rgba(115, 184, 255, 0.12);
    }

    .book-cover::after {
      content: '';
      position: absolute;
      width: 2px;
      height: 100%;
      right: 0;
      top: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    }

    .cover-head {
      position: relative;
      z-index: 1;
    }

    .brand-row {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .brand-logo {
      width: 60px;
      height: 60px;
      border-radius: 12px;
      object-fit: cover;
      border: 1px solid rgba(255, 255, 255, 0.35);
      background: rgba(255, 255, 255, 0.12);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
    }

    .brand-name {
      font-size: 13px;
      letter-spacing: 1.1px;
      text-transform: uppercase;
      font-weight: 700;
      opacity: 0.9;
      color: #8fb9e6;
    }

    .cover-title {
      margin: 0;
      font-family: "Fraunces", Georgia, serif;
      font-size: 40px;
      line-height: 1.02;
      letter-spacing: 0.3px;
    }

    .cover-copy {
      margin: 14px 0 0;
      font-size: 16px;
      line-height: 1.65;
      max-width: 30ch;
      color: rgba(237, 244, 251, 0.9);
    }

    .cover-note {
      position: relative;
      z-index: 1;
      margin: 0;
      max-width: 34ch;
      font-size: 13px;
      line-height: 1.6;
      color: rgba(237, 244, 251, 0.82);
    }

    .cover-points {
      margin: 14px 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 10px;
    }

    .cover-points li {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      color: rgba(227, 239, 251, 0.9);
    }

    .cover-points li::before {
      content: '';
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #63bbff;
      box-shadow: 0 0 0 5px rgba(99, 187, 255, 0.16);
    }

    .book-pages {
      border-radius: 0 18px 18px 0;
      border: 1px solid rgba(19, 49, 78, 0.11);
      border-left: 0;
      background: linear-gradient(180deg, #0a56a2 0%, #0a1e2b 100%);
      padding: 28px;
      display: grid;
      gap: 16px;
      align-content: start;
      min-height: 640px;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
    }

    .auth-title {
      margin: 0;
      font-family: "Fraunces", Georgia, serif;
      font-size: 34px;
      line-height: 1;
      color: #183650;
    }

    .auth-subtitle {
      margin: 6px 0 0;
      color: #6d7f8f;
      font-size: 14px;
      line-height: 1.5;
    }

    .login-wireframe .login-helper {
      margin: 0;
      color: #5b6874;
      font-size: 13px;
      line-height: 1.5;
    }

    .login-header {
      border-left: 4px solid #256054;
      padding-left: 10px;
      font-size: 26px;
      font-weight: 700;
      font-family: "Fraunces", Georgia, serif;
      color: #1f2b34;
    }

    .login-header .subhead {
      display: block;
      margin-top: 4px;
      color: #63717f;
      font-family: "Manrope", sans-serif;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }

    .login-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .portal-switch {
      display: inline-flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 2px;
      position: relative;
      z-index: 1;
      justify-content: flex-start;
      padding: 5px;
      border: 1px solid rgba(19, 49, 78, 0.12);
      border-radius: 14px;
      background: #f5f9fc;
    }

    .portal-tab {
      border: 1px solid transparent;
      background: transparent;
      color: #5c7081;
      border-radius: 999px;
      padding: 9px 14px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: none;
    }

    .portal-tab.active {
      color: #ffffff;
      border-color: #1b4e7e;
      background: linear-gradient(135deg, #285f95, #1e4f80);
      box-shadow: 0 8px 16px rgba(30, 79, 128, 0.28);
    }

    .portal-view {
      display: none;
      margin-top: 2px;
      position: relative;
      z-index: 1;
      animation: revealPage 220ms ease;
    }

    .portal-view.active {
      display: block;
    }

    .auth-switch {
      display: inline-flex;
      gap: 6px;
      border: 1px solid rgba(19, 49, 78, 0.12);
      background: #f4f8fc;
      padding: 5px;
      border-radius: 12px;
      margin-bottom: 10px;
    }

    .auth-tab {
      border: 0;
      background: transparent;
      color: #647a8d;
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .auth-tab.active {
      color: #ffffff;
      background: linear-gradient(135deg, #285f95, #1e4f80);
      box-shadow: 0 6px 14px rgba(30, 79, 128, 0.28);
    }

    .auth-view {
      display: none;
      gap: 8px;
    }

    .auth-view.active {
      display: grid;
    }

    .login-card {
      border: 1.5px solid rgba(19, 49, 78, 0.13);
      background: #0a1e2b;
      min-height: 0;
      display: flex;
      flex-direction: column;
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 16px 32px rgba(18, 35, 56, 0.10);
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .login-card:hover {
      border-color: rgba(30, 79, 128, 0.28);
      transform: translateY(-2px);
      box-shadow: 0 20px 40px rgba(18, 35, 56, 0.14);
    }

    .login-card-head {
      border-bottom: 1px solid rgba(19, 49, 78, 0.11);
      padding: 14px 16px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      font-size: 13px;
      background: linear-gradient(90deg, rgba(30, 79, 128, 0.08), rgba(30, 79, 128, 0));
      color: #224260;
      font-family: "Fraunces", Georgia, serif;
    }

    .login-footer-note {
      border-top: 1px solid rgba(19, 49, 78, 0.10);
      padding: 10px 14px 14px;
      color: #657584;
      font-size: 12px;
      line-height: 1.5;
      background: rgba(245, 249, 251, 0.95);
    }

    .login-body {
      padding: 14px;
      display: grid;
      gap: 8px;
      flex: 1;
    }

    .input-field {
      width: 100%;
      border: 1.5px solid #ced4da;
      min-height: 42px;
      background: #FFFFFF;
      padding: 11px 13px;
      font: inherit;
      color: #212529;
      border-radius: 12px;
      transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
      box-shadow: none;
    }

    .input-field:focus {
      outline: none;
      border-color: #35a7b8;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.18);
      transform: translateY(-1px);
    }

    .input-field::placeholder {
      color: #6c757d;
    }

    .field-group {
      display: grid;
      gap: 4px;
    }

    .form-grid .field-group.full {
      grid-column: 1 / -1;
    }

    .field-label {
      font-size: 12px;
      color: #b3d9f2;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      font-weight: 600;
    }

    .helper-text {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
    }

    .notice {
      border: 1px solid rgba(19, 49, 78, 0.12);
      background: linear-gradient(135deg, #0a56a2 0%, #0a1e2b 100%);
      padding: 12px 14px;
      font-size: 13px;
      color: #e9f7ff;
      line-height: 1.6;
      border-radius: 12px;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
    }

    .alert {
      border: 1px solid rgba(30, 79, 128, 0.28);
      background: rgba(30, 79, 128, 0.10);
      color: #1f4f80;
      padding: 10px 12px;
      font-size: 13px;
      font-weight: 700;
      border-radius: 12px;
    }

    .filter-pill {
      padding: 6px 14px;
      border: 1.5px solid rgba(30, 79, 128, 0.2);
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      color: #1e4f80;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
      white-space: nowrap;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      box-sizing: border-box;
      font-family: inherit;
    }

    .filter-pill:hover {
      border-color: #1e4f80;
      background: linear-gradient(180deg, #f0f6ff, #e8efff);
    }

    .filter-pill.active {
      background: linear-gradient(135deg, #1e4f80, #2c6aa2);
      color: #ffffff;
      border-color: #1e4f80;
    }

    .input-field:invalid:not(.neon-input),
    .neon-input:invalid,
    select:invalid {
      border-color: var(--read-border) !important;
      background: linear-gradient(180deg, var(--read-bg-control), var(--read-bg-control-2)) !important;
      color: var(--read-text-strong) !important;
      -webkit-text-fill-color: var(--read-text-strong) !important;
    }

    .input-field:valid:not(:placeholder-shown):not(.neon-input) {
      border-color: #10a981 !important;
    }

    .app-shell {
      margin: 0;
      width: 100%;
      max-width: none;
      position: relative;
    }

    .app-shell .canvas {
      max-width: none;
      margin: 0;
      border: 1px solid rgba(19, 49, 78, 0.14);
      background: #FFFFFF;
      box-shadow: 0 26px 70px rgba(18, 35, 56, 0.13);
    }

    .meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .profile-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, #2f6ba4, #24598e);
      color: #fff;
      font-weight: 800;
      flex: 0 0 auto;
      box-shadow: 0 6px 12px rgba(30, 79, 128, 0.25);
    }

    .profile-meta {
      display: grid;
      gap: 2px;
      line-height: 1.2;
    }

    .profile-meta strong {
      font-size: 15px;
      color: #2a4f71;
      font-weight: 700;
    }

    .profile-meta span {
      font-size: 12px;
      color: #688095;
    }

    .role-badge {
      border: 1px solid rgba(30, 79, 128, 0.24);
      color: #2a5c8c;
      background: rgba(30, 79, 128, 0.08);
      padding: 5px 8px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      border-radius: 999px;
    }

    .link-button {
      border: 1px solid rgba(30, 79, 128, 0.24);
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      color: #2a5c8c;
      text-decoration: none;
      cursor: pointer;
      font: inherit;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      transition: all 180ms ease;
    }

    .link-button:hover {
      border-color: rgba(30, 79, 128, 0.36);
      background: linear-gradient(180deg, #ebf4fc, #e2eef9);
      color: #1f4f80;
    }

    /* Modal styles moved to design-system.css */




    .success-modal-card {
      width: min(420px, 100%);
      text-align: center;
      justify-items: center;
      animation: successModalPop 240ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
    }

    .success-modal-icon {
      width: 72px;
      height: 72px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: rgba(46, 170, 89, 0.08);
      border: 1px solid rgba(46, 170, 89, 0.26);
      margin: 2px auto 6px;
      animation: successIconPop 260ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
      position: relative;
      overflow: hidden;
    }

    .success-modal-check {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: #2ea959;
      font-size: 34px;
      font-weight: 900;
      line-height: 1;
      text-shadow: 0 0 0 transparent;
    }

    .success-modal-icon svg {
      width: 42px;
      height: 42px;
      fill: none;
      stroke: #2ea959;
      stroke-width: 2.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      animation: successCheckPulse 900ms ease-out 180ms 1 both;
      transform-origin: center;
      position: relative;
      z-index: 1;
    }

    .success-modal-card h3 {
      color: #ecfbff;
      font-size: 24px;
      margin-top: 2px;
    }

    .success-modal-card p {
      color: #b9d0df;
      font-size: 15px;
    }

    .success-modal-actions {
      width: 100%;
      justify-content: center;
    }

    .modal-actions {
      justify-content: flex-end;
      margin-top: 4px;
    }

    @keyframes successModalPop {
      from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes successIconPop {
      0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
      }
      70% {
        opacity: 1;
        transform: scale(1.08) rotate(0deg);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes successCheckPulse {
      0% {
        transform: scale(0.35);
        opacity: 0;
      }
      45% {
        transform: scale(1.12);
        opacity: 1;
      }
      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .table-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .table-tools .input-field {
      min-height: 42px;
      width: 320px;
    }

    .record-list {
      display: grid;
      gap: 8px;
    }

    .scrollable-form {
      max-height: calc(100vh - 360px);
      overflow-y: auto;
      padding-right: 4px;
    }

    .id-design-form {
      gap: 10px;
    }

    .scrollable-list {
      max-height: 420px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .queue-scroll {
      max-height: 560px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .subsidy-admin-list {
      max-height: 620px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .record-card {
      border: 1px solid rgba(19, 49, 78, 0.12);
      padding: 12px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      display: grid;
      gap: 6px;
      font-size: 14px;
      border-radius: 12px;
    }

    .status-badge {
      width: fit-content;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .status-badge.badge-success {
      background: rgba(16, 169, 129, 0.14);
      color: #0d8a66;
    }

    .status-badge.badge-warning {
      background: rgba(220, 53, 69, 0.16);
      color: #dc3545;
    }

    .status-badge.badge-danger {
      background: rgba(201, 60, 60, 0.14);
      color: #a83030;
    }

    .status-badge.badge-muted {
      background: rgba(96, 114, 132, 0.12);
      color: #5a6d7f;
    }

    .record-card strong {
      font-size: 15px;
    }

    .stats-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid rgba(30, 79, 128, 0.2);
      background: rgba(30, 79, 128, 0.08);
      color: #2a5c8c;
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .panel-scroll {
      overflow: auto;
    }

    .login-helper {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .sidebar {
      border-right: 1px solid rgba(19, 49, 78, 0.12);
      background: linear-gradient(180deg, #0a56a2 0%, #0a1e2b 100%);
      padding: 22px;
      position: relative;
    }

    .sidebar::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 120px;
      background: radial-gradient(circle at 20% 120%, rgba(60, 138, 219, 0.10), transparent 70%);
      pointer-events: none;
        }

    .sidebar-logo-section {
      display: flex;
      justify-content: center;
      margin-bottom: 16px;
      padding: 10px 0;
    }

    .sidebar-logo {
      width: 100px;
      height: 100px;
      border-radius: 14px;
      object-fit: cover;
      border: 2px solid rgba(30, 79, 128, 0.3);
      box-shadow: 0 10px 30px rgba(18, 35, 56, 0.15);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .sidebar-logo:hover {
      transform: scale(1.08) rotateY(5deg);
      box-shadow: 0 15px 40px rgba(18, 35, 56, 0.25);
    }

    .logo {
      border: 1px solid rgba(19, 49, 78, 0.12);
      padding: 18px;
      text-align: center;
      font-weight: 700;
      margin-bottom: 16px;
      letter-spacing: 0.4px;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(30, 79, 128, 0.06), rgba(61, 110, 155, 0.03));
      box-shadow: 0 8px 20px rgba(18, 35, 56, 0.07), inset 0 1px 1px rgba(255, 255, 255, 0.8);
      font-family: "Fraunces", Georgia, serif;
    }

    .logo .system-tag {
      display: block;
      margin-top: 6px;
      color: #6e7f8e;
      font-family: "Manrope", sans-serif;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.7px;
    }

    .title-small {
      margin: 0 0 10px;
      color: #6c7f90;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .nav-item {
      border: 1px solid rgba(19, 49, 78, 0.12);
      width: 100%;
      text-align: left;
      font: inherit;
      padding: 10px 12px;
      margin-bottom: 8px;
      background: #FFFFFF;
      font-size: 14px;
      border-radius: 12px;
      color: #2a3e52;
      transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

.nav-badge {
      min-width: 20px;
      height: 20px;
      padding: 0 6px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 800;
      color: #ffffff;
      background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
      box-shadow: 0 5px 10px rgba(30, 79, 128, 0.25);
    }

    .nav-item:hover {
      transform: translateX(3px);
      border-color: rgba(30, 79, 128, 0.26);
      box-shadow: 0 8px 18px rgba(18, 35, 56, 0.08);
        }

    .nav-item.active {
      border: 1px solid rgba(30, 79, 128, 0.36);
      font-weight: 700;
      color: #1f4f80;
      background: #e9ecef;
      position: relative;
        }

    .nav-item.active::before {
      content: '';
      position: absolute;
      left: -1px;
      top: 8px;
      bottom: 8px;
      width: 4px;
      border-radius: 0 6px 6px 0;
      background: linear-gradient(180deg, var(--brand-1), #4d87be);
    }

    .main {
      padding: 24px;
      display: grid;
      grid-template-rows: auto auto auto auto auto 1fr;
      gap: 18px;
      position: relative;
    }

    .main::before {
      content: '';
      position: absolute;
      right: 10px;
      top: 6px;
      width: 280px;
      height: 280px;
      border-radius: 999px;
      background: radial-gradient(circle, var(--brand-glow), transparent 70%);
      pointer-events: none;
      z-index: 0;
        }

    .main > * {
      position: relative;
      z-index: 1;
        }

    .topbar {
      border: 1px solid rgba(19, 49, 78, 0.12);
      display: grid;
      grid-template-columns: 1fr 300px;
      gap: 12px;
      padding: 14px;
      border-radius: 16px;
      background: #FFFFFF;
      box-shadow: 0 10px 22px rgba(18, 35, 56, 0.06);
    }

.breadcrumbs {
      border: 1px solid rgba(19, 49, 78, 0.12);
      border-radius: 12px;
      background: #f8f9fa;
      min-height: 36px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 12px;
      font-size: 12px;
      color: #627688;
      box-shadow: 0 6px 14px rgba(18, 35, 56, 0.05);
    }

.breadcrumbs .crumb {
      color: #627688;
      font-weight: 600;
    }

.breadcrumbs .crumb.current {
      color: #1f4f80;
      font-weight: 800;
    }

.breadcrumbs .sep {
      color: #9cb2c4;
    }

    .search,
    .profile {
      border: 1px solid rgba(19, 49, 78, 0.12);
      min-height: 38px;
      display: flex;
      align-items: center;
      padding: 0 10px;
      color: #5f7488;
      font-size: 13px;
      background: #f8f9fa;
      border-radius: 12px;
    }

    .section-title {
      border-left: 5px solid #2a5c8c;
      padding-left: 12px;
      font-size: 30px;
      font-weight: 700;
      color: #212529;
      font-family: "Fraunces", Georgia, serif;
      text-shadow: none;
    }

    .dashboard-hero {
      border: 1px solid rgba(19, 49, 78, 0.12);
      border-radius: 18px;
      padding: 16px;
      background:
        linear-gradient(135deg, rgba(30, 79, 128, 0.11), rgb(6, 11, 49)),
        #003366;
      display: grid;
        background: linear-gradient(180deg, #0a1e2b 0%, #123247 100%);
      gap: 12px;
      align-items: center;
      box-shadow: 0 10px 22px rgba(18, 35, 56, 0.06);
      position: relative;
      overflow: hidden;
    }

    .dashboard-hero-header {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding-left: 16px;
      padding-right: 16px;
    }

    .dashboard-hero-header h2 {
      margin: 0;
    }

    .dashboard-hero::after {
      content: '';
      position: absolute;
      right: -60px;
      top: -60px;
      width: 180px;
      height: 180px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(6, 13, 78, 0.35), transparent 65%);
      pointer-events: none;
    }

    .dashboard-hero h2 {
      margin: 0 0 6px;
      font-family: "Fraunces", Georgia, serif;
      font-size: 24px;
      line-height: 1.1;
    }

    .dashboard-hero p {
      margin: 0;
      color: #607284;
      line-height: 1.5;
    }

    .hero-metrics {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .hero-metric {
      border: 1px solid rgba(19, 49, 78, 0.12);
      background: #0a56a2;
      color: #0af0ff;
      border-radius: 14px;
      padding: 10px;
      display: grid;
      gap: 4px;
      transition: transform 160ms ease, box-shadow 160ms ease;
        }

    .hero-metric:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 18px rgba(18, 35, 56, 0.10);
    }

    .hero-metric .metric-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      color: #627688;
    }

    .hero-metric .metric-value {
      font-size: 18px;
      font-weight: 800;
      color: #1f4f80;
    }

    .kpis {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-content: flex-start;
    }

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 18px;
      width: 100%;
      margin-bottom: 40px;
    }

    .kpi {
      border: 1px solid rgba(19, 49, 78, 0.12);
      padding: 20px 18px;
      min-height: 120px;
      background: linear-gradient(180deg, #ffffff, #f8fbff);
      border-radius: 12px;
      box-shadow: 0 10px 20px rgba(18, 35, 56, 0.05);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .kpi::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--brand-1), #5f95c8);
    }

    .kpi .label {
      font-size: 12px;
      color: #5f7488;
      margin-bottom: 10px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      font-weight: 600;
    }

    .kpi .value {
      font-size: 28px;
      font-weight: 700;
      line-height: 1.2;
      color: #1f4f80;
    }

    .content-grid {
      display: grid;
      grid-template-columns: 1.3fr 1fr;
      gap: 16px;
      min-height: 0;
      width: 100%;
      height: auto;
      max-height: none;
    }

    .content-grid.directory-focus {
      grid-template-columns: 1fr;
    }

    .content-grid.single-panel {
      grid-template-columns: 1fr;
    }

    .panel {
      border: 1.5px solid rgba(19, 49, 78, 0.13);
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.94), rgba(5, 24, 43, 0.95));
      display: flex;
      flex-direction: column;
      min-height: 220px;
      border-radius: 18px;
      overflow: visible;
      box-shadow: 0 12px 24px rgba(18, 35, 56, 0.06);
      transition: box-shadow 200ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 200ms ease;
      width: 100%;
      height: auto;
    }

.panel:hover {
      border-color: rgba(30, 79, 128, 0.26);
      box-shadow: 0 20px 40px rgba(18, 35, 56, 0.10);
    }

    .admin-table-panel {
      border-color: rgba(53, 167, 184, 0.24) !important;
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.98), rgba(5, 24, 43, 0.98)) !important;
      box-shadow: 0 18px 42px rgba(0, 16, 34, 0.28) !important;
    }

    .admin-table-panel .panel-head {
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.18), rgba(6, 28, 49, 0.08)) !important;
      border-bottom-color: rgba(53, 167, 184, 0.18) !important;
      color: #2c6aa2 !important;
    }

    .admin-table-panel .panel-body {
      background: linear-gradient(180deg, rgba(7, 30, 52, 0.98), rgba(5, 24, 43, 0.98)) !important;
      color: #e9f7ff !important;
    }

    .admin-table-panel .record-list,
    .admin-table-panel .table-wrap,
    .admin-table-panel .chart {
      background: transparent !important;
    }

    .admin-table-panel .field-label {
      color: #b3d9f2 !important;
    }

    .admin-register-panel {
      border-color: rgba(53, 167, 184, 0.24) !important;
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.98), rgba(5, 24, 43, 0.98)) !important;
      box-shadow: 0 18px 42px rgba(0, 16, 34, 0.28) !important;
    }

    .admin-register-panel .panel-head,
    .admin-register-side-panel .panel-head {
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.18), rgba(6, 28, 49, 0.08)) !important;
      border-bottom-color: rgba(53, 167, 184, 0.18) !important;
      color: #0af0ff !important;
    }

    .admin-register-panel .panel-body,
    .admin-register-side-panel .panel-body {
      background: linear-gradient(180deg, rgba(7, 30, 52, 0.98), rgba(5, 24, 43, 0.98)) !important;
      color: #e9f7ff !important;
    }

    .admin-register-panel .record-list,
    .admin-register-panel .form-grid,
    .admin-register-side-panel .record-list {
      background: transparent !important;
    }

    .admin-register-panel .field-label {
      color: #b3d9f2 !important;
    }

    .admin-register-panel .input-field,
    .admin-register-panel select,
    .admin-register-panel .admin-status-select {
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98)) !important;
      border-color: rgba(53, 167, 184, 0.34) !important;
      color: #e9f7ff !important;
        -webkit-text-fill-color: #e9f7ff !important;
      box-shadow: 0 3px 8px rgba(0, 16, 34, 0.18) !important;
    }

    .admin-register-panel .input-field::placeholder {
      color: rgba(233, 247, 255, 0.6) !important;
    }

    .admin-register-panel .input-field:focus,
    .admin-register-panel select:focus {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 0 3px rgba(53, 167, 184, 0.18), 0 2px 8px rgba(0, 16, 34, 0.2) !important;
    }

    .admin-register-side-panel {
      border-color: rgba(53, 167, 184, 0.24) !important;
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.98), rgba(5, 24, 43, 0.98)) !important;
      box-shadow: 0 18px 42px rgba(0, 16, 34, 0.28) !important;
    }

    .admin-register-side-panel .record-card,
    .admin-register-side-panel .notice {
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98)) !important;
      border-color: rgba(53, 167, 184, 0.22) !important;
      color: #e9f7ff !important;
      box-shadow: 0 4px 14px rgba(0, 16, 34, 0.22) !important;
    }

    .admin-register-side-panel .record-card strong,
    .admin-register-side-panel .record-card b {
      color: #0af0ff !important;
    }

    .admin-register-side-panel .record-card span {
      color: #b3d9f2 !important;
    }

    .panel-head {
      border-bottom: 1px solid rgba(19, 49, 78, 0.11);
      padding: 14px 16px;
      font-weight: 700;
      display: flex;
      justify-content: space-between;
      gap: 8px;
      background: #05499c;
      color: #212529;
      font-family: "Fraunces", Georgia, serif;
    }

    .panel-body {
      padding: 14px 16px 16px;
      display: grid;
      gap: 10px;
      flex: 1;
      align-content: start;
      width: 100%;
      min-width: 0;
    }

    .table-row {
      display: grid;
      grid-template-columns: 120px 1fr 120px 100px;
      border: 1.5px solid #16436f;
      min-height: 52px;
      align-items: center;
      font-size: 14px;
      padding: 10px 12px;
      gap: 8px;
      border-radius: 11px;
      background: #FFFFFF;
      color: #212529;
      transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }

    .table-wrap {
      display: grid;
      gap: 10px;
      overflow-x: hidden;
      padding-bottom: 4px;
    }

    .table-wrap .table-row {
      min-width: 0;
    }

    .admin-table-row {
      grid-template-columns: 90px minmax(210px, 1fr) minmax(210px, 1fr) 140px;
    }

    .admin-table-row > span:nth-child(2) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-table-row > span:nth-child(3) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-status-select {
      min-height: 32px;
      padding: 4px 8px;
      font-size: 12px;
      width: 100%;
      border-radius: 8px;
      border: 1.5px solid rgba(53, 167, 184, 0.34);
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98));
      transition: all 0.2s ease;
      box-shadow: 0 3px 8px rgba(0, 16, 34, 0.18);
      cursor: pointer;
      font-weight: 600;
    }

    .panel-header .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .panel-header .actions input,
    .panel-header .actions select {
      box-sizing: border-box;
      min-height: 42px;
      padding: 10px 14px;
      border-radius: 10px;
      flex: 1 1 180px;
      min-width: 180px;
    }

    .panel-header .actions input {
      flex: 1 1 220px;
      min-width: 220px;
    }

    .panel-header .actions select {
      min-width: 190px;
      padding-right: 38px;
    }

    .registry-toolbar {
      grid-template-columns: minmax(260px, 1.35fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(150px, 0.7fr);
      gap: 12px;
      align-items: end;
    }

    .registry-toolbar .field-group {
      min-width: 0;
    }

    .registry-toolbar .input-field,
    .registry-toolbar select {
      width: 100%;
      min-width: 0;
    }

    .registry-toolbar-chip {
      align-self: stretch;
    }

    .toolbar-pill {
      min-height: 42px;
      padding: 10px 14px;
      border-radius: 10px;
      border: 1.5px solid rgba(53, 167, 184, 0.24);
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98));
      color: #0af0ff;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      font-size: 14px;
      font-weight: 700;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Use a safer approach: keep registry wrap normal, but remove horizontal padding only inside primary panel */
    .registry-table-wrap {
      overflow: auto;
      margin: 0;
      width: 100%;
      border: 1px solid rgba(53, 167, 184, 0.16);
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(7, 30, 52, 0.98), rgba(5, 24, 43, 0.98));
      box-shadow: 0 4px 14px rgba(0, 16, 34, 0.18);
    }

    /* Remove horizontal padding inside primary panel body so internal full-width blocks reach edges */
    #primaryPanel > .panel-body {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    /* When viewing dashboard (directory-focus), make primary panel span full width and hide secondary panel */
    .content-grid.directory-focus #primaryPanel {
      grid-column: 1 / -1;
    }

    .content-grid.directory-focus #secondaryPanel {
      display: none;
    }

    /* When single-panel mode is active, make primary panel span full width and hide secondary panel */
    .content-grid.single-panel #primaryPanel {
      grid-column: 1 / -1;
      width: 100%;
    }

    .content-grid.single-panel #secondaryPanel {
      display: none;
    }

    /* Make registration panels scrollable: enable vertical scrolling with reasonable height limit */
    /* Override overly-large bottom padding and fixed max-height that caused visual gap */
    .admin-register-panel > .panel-body,
    .admin-register-side-panel > .panel-body {
      /* allow flex layout to size these panels; remove hard max-height */
      max-height: none !important;
      overflow-y: auto !important;
      padding-left: 16px !important;
      padding-right: 16px !important;
      padding-bottom: 16px !important;
    }

    /* Add spacing inside form so content doesn't hug the edges */
    .admin-register-panel .form-grid,
    .admin-register-panel .record-list {
      padding: 0 12px;
    }

    /* Apply consistent horizontal padding to all admin panels to prevent cramping */
    .admin-table-panel .record-list,
    .admin-table-panel .registry-toolbar,
    .admin-table-panel .table-wrap {
      padding-left: 12px;
      padding-right: 12px;
    }

    .admin-register-panel .form-grid,
    .admin-register-panel .record-list,
    .admin-register-side-panel .record-list {
      padding-left: 12px;
      padding-right: 12px;
    }

    /* General spacing for all panel content */
    .panel .form-grid,
    .panel .record-list {
      margin-left: 12px;
      margin-right: 12px;
    }

    .registry-table {
      width: 100%;
      min-width: 0; /* allow table to shrink and fill available width */
      border-collapse: collapse;
      color: #212529;
      table-layout: auto;
    }

    .registry-table thead th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.18), rgba(6, 28, 49, 0.94));
      color: #0af0ff;
      text-align: left;
      padding: 14px 16px;
      font-size: 12px;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      border-bottom: 1px solid rgba(53, 167, 184, 0.18);
    }

    /* Sort controls inside table headers: no border, compact icon on the right */
    .queue-sort-header {
      border: none;
      background: transparent;
      color: inherit;
      font: inherit;
      letter-spacing: inherit;
      text-transform: inherit;
      padding: 0;
      margin: 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      cursor: pointer;
      line-height: 1.1;
      text-align: left;
      font-weight: 800;
    }

    .registry-table thead th .queue-sort-header:hover {
      color: #8af4ff;
    }

    .queue-sort-header:focus-visible {
      outline: 2px solid rgba(138, 244, 255, 0.45);
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* Interaction comfort: remove bright flash on click/tap while preserving keyboard focus */
    button,
    .btn,
    [role="button"],
    .queue-sort-header {
      -webkit-tap-highlight-color: transparent;
    }

    button:focus:not(:focus-visible),
    .btn:focus:not(:focus-visible),
    [role="button"]:focus:not(:focus-visible),
    .queue-sort-header:focus:not(:focus-visible) {
      outline: none !important;
      box-shadow: none !important;
    }

    button:active,
    .btn:active,
    [role="button"]:active,
    .queue-sort-header:active {
      box-shadow: none !important;
      filter: brightness(0.98);
    }

    .queue-sort-arrow {
      font-size: 11px;
      opacity: 0.85;
      min-width: 12px;
      text-align: center;
    }

    .registry-table tbody td {
      padding: 14px 16px;
      border-bottom: 1px solid rgba(53, 167, 184, 0.12);
      vertical-align: middle;
      font-size: 14px;
    }

    .registry-table tbody tr:nth-child(even) {
      background: rgba(9, 38, 64, 0.34);
    }

    .registry-table tbody tr:hover {
      background: rgba(53, 167, 184, 0.12);
    }

    .registry-table tbody tr.selected {
      background: rgba(53, 167, 184, 0.18);
      outline: 1px solid rgba(53, 167, 184, 0.34);
      outline-offset: -1px;
    }

    .registry-table td strong {
      display: block;
      font-weight: 800;
      color: #ffffff;
    }

    .registry-table td small {
      font-size: 12px;
      color: rgba(234, 247, 255, 0.72);
    }

    .registry-table .row-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .registry-table .row-actions .btn {
      min-width: 82px;
      padding: 8px 12px;
    }

    .registry-summary {
      margin-top: 6px;
      border: 1px solid rgba(53, 167, 184, 0.14);
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.08), rgba(6, 28, 49, 0.92));
      color: rgba(234, 247, 255, 0.82);
      border-radius: 12px;
      padding: 10px 14px;
      font-size: 12px;
      letter-spacing: 0.2px;
    }

    .admin-status-select:hover {
      border-color: rgba(53, 167, 184, 0.5);
      box-shadow: 0 5px 12px rgba(0, 16, 34, 0.24);
    }

    .admin-status-select:focus {
      outline: none;
      border-color: #35a7b8;
      box-shadow: 0 0 0 3px rgba(53, 167, 184, 0.18), 0 2px 8px rgba(0, 16, 34, 0.2);
    }

    .inline-actions .btn {
      padding: 8px 11px;
      font-size: 12px;
      letter-spacing: 0.4px;
      text-transform: none;
    }

    @media (max-width: 1200px) {
      .registry-toolbar {
        grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr);
      }

      .registry-toolbar-chip {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 700px) {
      .registry-toolbar {
        grid-template-columns: 1fr;
      }

      .registry-table {
        min-width: 640px;
      }
    }

.table-row:hover {
  border-color: rgba(53, 167, 184, 0.42);
  background: linear-gradient(180deg, rgba(11, 48, 79, 0.98), rgba(7, 35, 60, 0.98));
  box-shadow: 0 8px 18px rgba(0, 16, 34, 0.28);
  transform: translateY(-1px);
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      transition: all 0.2s ease;
      border: 1px solid;
    }

    .status-badge.active {
      background: linear-gradient(135deg, var(--success-soft), rgba(16, 169, 129, 0.08));
      color: var(--success);
      border-color: rgba(16, 169, 129, 0.24);
      box-shadow: 0 4px 12px rgba(16, 169, 129, 0.12);
    }

    .status-badge.pending {
      background: linear-gradient(135deg, var(--warning-soft), rgba(220, 53, 69, 0.08));
      color: var(--warning);
      border-color: rgba(220, 53, 69, 0.24);
      box-shadow: 0 4px 12px rgba(220, 53, 69, 0.08);
    }

    .status-badge.expired {
      background: linear-gradient(135deg, var(--danger-soft), rgba(201, 60, 60, 0.08));
      color: var(--danger);
      border-color: rgba(201, 60, 60, 0.24);
      box-shadow: 0 4px 12px rgba(201, 60, 60, 0.10);
    }

    .status-badge::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: 0 0 0 3px currentColor, 0 0 0 6px rgba(255, 255, 255, 0.5);
      animation: statusPulse 2s ease-in-out infinite;
    }

    @keyframes statusPulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .flash-message {
      animation: flashSlideIn 300ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
      background: linear-gradient(135deg, rgba(16, 169, 129, 0.12), rgba(16, 169, 129, 0.06)) !important;
      border-color: rgba(16, 169, 129, 0.3) !important;
      color: #0d8a66 !important;
    }

    @keyframes flashSlideIn {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .thumb,
    .chart,
    .map {
      border: 1px solid rgba(19, 49, 78, 0.12);
      background: linear-gradient(135deg, #0a56a2, #0a1e2b);
      min-height: 110px;
      display: flex;
      align-items: center;
      border-radius: 12px;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
      justify-content: center;
      color: #607284;
      font-size: 12px;
      text-align: center;
      padding: 8px;
      border-radius: 14px;
    }

    .performance-chart {
      display: block;
      text-align: left;
      padding: 8px 12px 12px;
      min-height: 200px;
      width: 100%;
      overflow: hidden;
      position: relative;
    }

    .chart-title {
        color: #0af0ff;
      letter-spacing: 0.45px;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 8px;
      color: rgba(74, 101, 126, 0.9);
    }

    .chart-svg {
      width: 100%;
      height: auto;
      display: block;
      background: transparent !important;
    }

    .chart-grid {
      stroke: rgba(74, 101, 126, 0.22);
      stroke-width: 1;
      stroke-dasharray: 4 4;
    }

    .chart-axis-line {
      stroke: rgba(74, 101, 126, 0.38);
      stroke-width: 1.2;
    }

    .chart-axis-label {
      fill: rgba(74, 101, 126, 0.9);
      font-size: 10px;
      font-weight: 600;
    }

    .chart-axis-tick {
      text-anchor: end;
    }

    .chart-month-label {
      text-anchor: middle;
    }

    .chart-bar {
      fill: rgba(9, 176, 218, 0.5);
      stroke: rgba(9, 176, 218, 0.86);
      stroke-width: 1;
    }

    .chart-line {
      fill: none;
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .chart-line-approval {
      stroke: #00d28f;
    }

    .chart-line-release {
      stroke: #2f8dff;
    }

    .chart-line-record-trend {
      stroke: #ff9a2f;
      stroke-dasharray: 6 4;
    }

    .chart-line-request-trend {
      stroke: #9b6bff;
      stroke-dasharray: 3 3;
    }

    .chart-dot {
      stroke-width: 1;
    }

    .chart-dot-approval {
      fill: #00d28f;
      stroke: rgba(0, 96, 71, 0.4);
    }

    .chart-dot-release {
      fill: #2f8dff;
      stroke: rgba(20, 61, 122, 0.48);
    }

    .chart-dot-record-trend {
      fill: #ff9a2f;
      stroke: rgba(153, 89, 0, 0.45);
    }

    .chart-dot-request-trend {
      fill: #9b6bff;
      stroke: rgba(85, 53, 176, 0.45);
    }

    .chart-legend {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 14px;
      font-size: 11px;
      color: #b3d9f2;
      justify-content: center;
      padding: 8px;
      background: rgba(0,0,0,0.1);
      border-radius: 8px;
    }

    .performance-chart {
      display: block;
      text-align: left;
      padding: 14px 14px 20px;
      min-height: 286px;
      width: 100%;
      overflow: visible;
    }

    .chart-title {
        color: #0af0ff;
      letter-spacing: 0.45px;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 8px;
      color: rgba(74, 101, 126, 0.9);
    }

    .chart-svg {
      width: 100%;
      height: auto;
      display: block;
      background: transparent !important;
    }

    .chart-grid {
      stroke: rgba(74, 101, 126, 0.22);
      stroke-width: 1;
      stroke-dasharray: 4 4;
    }

    .chart-axis-line {
      stroke: rgba(74, 101, 126, 0.38);
      stroke-width: 1.2;
    }

    .chart-axis-label {
      fill: rgba(74, 101, 126, 0.9);
      font-size: 10px;
      font-weight: 600;
    }

    .chart-axis-tick {
      text-anchor: end;
    }

    .chart-month-label {
      text-anchor: middle;
    }

    .chart-bar {
      fill: rgba(9, 176, 218, 0.5);
      stroke: rgba(9, 176, 218, 0.86);
      stroke-width: 1;
    }

    .chart-line {
      fill: none;
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .chart-line-approval {
      stroke: #00d28f;
    }

    .chart-line-release {
      stroke: #2f8dff;
    }

    .chart-line-record-trend {
      stroke: #ff9a2f;
      stroke-dasharray: 6 4;
    }

    .chart-line-request-trend {
      stroke: #9b6bff;
      stroke-dasharray: 3 3;
    }

    .chart-dot {
      stroke-width: 1;
    }

    .chart-dot-approval {
      fill: #00d28f;
      stroke: rgba(0, 96, 71, 0.4);
    }

    .chart-dot-release {
      fill: #2f8dff;
      stroke: rgba(20, 61, 122, 0.48);
    }

    .chart-dot-record-trend {
      fill: #ff9a2f;
      stroke: rgba(153, 89, 0, 0.45);
    }

    .chart-dot-request-trend {
      fill: #9b6bff;
      stroke: rgba(85, 53, 176, 0.45);
    }

    .chart-legend {
      margin-top: 6px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      font-size: 11px;
      color: #b3d9f2;
    }

    .trend-summary {
      margin: 0 0 16px;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      width: 100%;
    }

    .trend-card {
      border: 1px solid rgba(74, 139, 194, 0.24);
      border-radius: 12px;
      padding: 12px 14px;
      background: linear-gradient(180deg, rgba(15, 37, 53, 0.96), rgba(10, 30, 48, 0.96));
    }

    .trend-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      color: rgba(180, 200, 220, 0.8);
      letter-spacing: 0.6px;
      margin-bottom: 6px;
    }

    .trend-value {
      font-size: 14px;
      font-weight: 800;
      color: #e9f7ff;
      line-height: 1.25;
    }

    .chart-legend span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .legend-swatch {
      width: 14px;
      height: 3px;
      border-radius: 999px;
      display: inline-block;
    }

    .legend-bar {
      height: 8px;
      width: 10px;
      border-radius: 2px;
      background: rgba(9, 176, 218, 0.72);
      border: 1px solid rgba(9, 176, 218, 0.86);
    }

    .legend-approval { background: #00d28f; }
    .legend-release { background: #2f8dff; }
    .legend-record-trend { background: #ff9a2f; }
    .legend-request-trend { background: #9b6bff; }
    }

    .legend-approval {
      background: #00d28f;
    }

    .legend-release {
      background: #2f8dff;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .field {
      border: 1px solid rgba(19, 49, 78, 0.12);
      min-height: 38px;
      background: #0a56a2;
      color: #0af0ff;
      padding: 0 8px;
      display: flex;
      align-items: center;
      color: #607284;
      font-size: 12px;
      border-radius: 10px;
    }

    .field.full { grid-column: 1 / -1; }

    .button-row {
      display: flex;
      gap: 8px;
      margin-top: 4px;
      flex-wrap: wrap;
    }

    .btn {
      border: 1.5px solid rgba(19, 49, 78, 0.16);
      padding: 11px 16px;
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.65px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      color: #2a5c8c;
      border-radius: 11px;
      cursor: pointer;
      transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
      box-shadow: 0 4px 12px rgba(22, 35, 48, 0.08);
    }

    .btn:hover {
      background: linear-gradient(180deg, #f0f6fc, #e8f2fa);
      border-color: rgba(30, 79, 128, 0.32);
      box-shadow: 0 6px 16px rgba(22, 35, 48, 0.12);
      transform: translateY(-2px);
    }

    .btn.primary {
      border-color: #1e4f80;
      color: #ffffff;
      background: linear-gradient(135deg, #2f6ba4, #1f5490);
      box-shadow: 0 8px 20px rgba(30, 79, 128, 0.32);
    }

    .btn.primary:hover {
      background: linear-gradient(135deg, #3a78b5, #2a5fa0);
      box-shadow: 0 12px 28px rgba(30, 79, 128, 0.40);
      transform: translateY(-2px);
    }

    .id-card-print-wrap {
      position: relative;
      display: block;
      width: calc(106mm + 74px);
      min-height: calc(68mm + 16px);
      padding-right: 74px;
      margin: 0 auto;
      overflow: visible;
    }

    .id-card-print-wrap .id-card-redesign {
      transform: none;
    }

    @media (max-width: 1600px) {
      .id-card-print-wrap {
        width: calc(100% - 6px);
        max-width: calc(106mm + 74px);
      }
    }

    @media (max-width: 1400px) {
      .id-card-print-wrap {
        width: 100%;
        max-width: calc(106mm + 74px);
      }
    }

    .print-id-button {
      width: 42px;
      height: 42px;
      padding: 0;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-transform: none;
      letter-spacing: 0;
      flex: 0 0 auto;
      position: absolute;
      right: 10px;
      top: 10px;
      z-index: 2;
      box-shadow: 0 8px 18px rgba(30, 79, 128, 0.28);
    }

    .print-id-icon {
      width: 22px;
      height: 22px;
      display: block;
      color: currentColor;
      line-height: 0;
    }

    .print-id-icon svg {
      width: 100%;
      height: 100%;
      display: block;
      fill: currentColor;
    }

    .btn.success {
      border-color: var(--success);
      background: linear-gradient(135deg, var(--success), #0a8f6e);
      color: #ffffff;
      box-shadow: 0 8px 20px rgba(16, 169, 129, 0.30);
    }

    .btn.success:hover {
      background: linear-gradient(135deg, #0fa480, #0b927a);
      box-shadow: 0 12px 28px rgba(16, 169, 129, 0.38);
      transform: translateY(-2px);
    }

    .btn.danger {
      border-color: var(--danger);
      background: linear-gradient(135deg, var(--danger), #a93232);
      color: #ffffff;
      box-shadow: 0 8px 20px rgba(201, 60, 60, 0.28);
    }

    .btn.danger:hover {
      background: linear-gradient(135deg, #d44848, #b53c3c);
      box-shadow: 0 12px 28px rgba(201, 60, 60, 0.36);
      transform: translateY(-2px);
    }

    .color-tool-row {
      display: grid;
      grid-template-columns: 56px 1fr;
      gap: 8px;
      align-items: center;
    }

    .color-picker-input {
      width: 56px;
      min-width: 56px;
      height: 42px;
      padding: 4px;
      border-radius: 10px;
      cursor: pointer;
    }

    .color-code-pill {
      border: 1px solid rgba(19, 49, 78, 0.14);
      min-height: 42px;
      border-radius: 10px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      display: flex;
      align-items: center;
      padding: 0 10px;
      font-size: 13px;
      font-weight: 700;
      color: #315a83;
      letter-spacing: 0.4px;
    }

    .field-help {
      display: block;
      margin-top: 6px;
      font-size: 12px;
      color: #607284;
    }

    @keyframes revealPage {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .id-card {
      --id-accent: #2c6aa2;
      --id-accent-soft: rgba(44, 106, 162, 0.12);
      border: 1px solid var(--id-accent-soft);
      border-radius: 12px;
      background: #0a56a2;
      padding: 16px;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 6px 18px rgba(5,10,18,0.12);
      position: relative;
      overflow: hidden;
      width: 100%;
      min-height: 180px;
      display: flex;
      flex-direction: row;
      gap: 14px;
      align-items: flex-start;
    }

    .id-meta {
      display: flex;
      flex-direction: column;
      gap: 6px;
      color: #ffffff;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.2;
      padding-top: 4px;
    }

    .id-meta strong {
      font-size: 16px;
      font-weight: 800;
    }

    .id-card-header {
      background: var(--id-accent);
      color: #ffffff;
      border-radius: 2px;
      min-height: 90px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 16px 20px;
      font-size: clamp(18px, 2.2vw, 28px);
      letter-spacing: 0.8px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .id-card--coastal {
      --id-accent: #2c6aa2;
      --id-accent-soft: rgba(44, 106, 162, 0.14);
    }

    .id-card--reef {
      --id-accent: #187c78;
      --id-accent-soft: rgba(24, 124, 120, 0.14);
    }

    .id-card--sunrise {
      --id-accent: #c86e1f;
      --id-accent-soft: rgba(200, 110, 31, 0.14);
    }

    .id-card--midnight {
      --id-accent: #294776;
      --id-accent-soft: rgba(41, 71, 118, 0.14);
    }

    .id-card-body {
      margin-top: 28px;
      display: grid;
      grid-template-columns: 1fr 280px;
      gap: 28px;
      align-items: start;
      flex: 1;
    }

    .id-card-fields {
      display: grid;
      gap: 16px;
    }

    .id-line {
      display: grid;
      grid-template-columns: 160px 1fr;
      gap: 12px;
      align-items: center;
    }

    .id-line-full {
      grid-template-columns: 120px 1fr;
    }

    .id-label {
      font-size: 12px;
      font-weight: 800;
      color: #151515;
      letter-spacing: 0.2px;
      text-transform: uppercase;
    }

    .id-value {
      min-height: 36px;
      border-radius: 2px;
      background: #e8e8e8;
      display: flex;
      align-items: center;
      padding: 0 12px;
      font-size: 14px;
      font-weight: 600;
      color: #1f2d3a;
    }

    .id-card-side {
      display: grid;
      gap: 16px;
      align-content: start;
    }

    .id-photo {
      height: 380px;
      border: 1px solid var(--id-accent-soft);
      background: #0a56a2;
      border-radius: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .id-photo span {
      font-size: 20px;
      font-weight: 500;
      color: #727272;
      letter-spacing: 0.5px;
      font-style: italic;
      text-transform: uppercase;
    }

    .id-signature {
      border-top: 1px solid #9f9f9f;
      min-height: 24px;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding-top: 6px;
    }

    .id-signature span {
      width: 100%;
      text-align: center;
      font-size: 14px;
      color: #111 !important;
      padding-top: 0;
      font-weight: 700;
      letter-spacing: 0.03mm;
      line-height: 1.1;
    }

    .id-design-summary {
      border-left: 4px solid #2c6aa2;
    }

    .note {
      margin-top: 10px;
      border-top: 1px solid rgba(19, 49, 78, 0.12);
      padding-top: 8px;
      font-size: 12px;
      color: #607284;
      line-height: 1.5;
    }

    .activity-strip {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .activity-card {
      border: 1px solid rgba(19, 49, 78, 0.12);
      border-radius: 14px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      padding: 10px;
      display: grid;
      gap: 4px;
      min-height: 104px;
      position: relative;
      overflow: hidden;
    }

.activity-card::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--brand-1), #6ca3d8);
    }

    .activity-card .small-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      color: #607284;
    }

    .activity-card .large-value {
      font-size: 18px;
      font-weight: 700;
      color: #1f4f80;
    }

    .timeline {
      display: grid;
      gap: 8px;
    }

    .timeline-item {
      display: grid;
      grid-template-columns: 14px 1fr;
      gap: 10px;
      align-items: start;
    }

    .timeline-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      margin-top: 4px;
      background: #2c6aa2;
      box-shadow: 0 0 0 4px rgba(44, 106, 162, 0.12);
    }

    .timeline-content {
      border: 1px solid rgba(19, 49, 78, 0.12);
      border-radius: 12px;
      padding: 10px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      font-size: 12px;
      display: grid;
      gap: 4px;
      color: #2b4054;
    }

    .timeline-content strong {
      font-size: 13px;
    }

    .quick-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .quick-action {
      border: 1px solid rgba(19, 49, 78, 0.14);
      border-radius: 999px;
      padding: 10px 14px;
      background: linear-gradient(180deg, #0a56a2, #0a1e2b);
      color: #0af0ff;
      font-size: 13px;
      font-weight: 700;
      color: #2d4f6f;
      transition: all 180ms ease;
      cursor: pointer;
        }

    .quick-action:hover {
      color: #ffffff;
      border-color: var(--brand-2);
      background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
      box-shadow: 0 10px 16px rgba(30, 79, 128, 0.24);
      transform: translateY(-1px);
    }

    .view-enter {
          animation: dashboardFadeIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
        }

    @keyframes dashboardFadeIn {
          from {
            opacity: 0;
            transform: translateY(6px);
          }
          to {
            opacity: 1;
            transform: translateY(0);
          }
        }

    @media (max-width: 980px) {
      body {
        background:
          radial-gradient(900px 420px at -15% -16%, rgba(173, 208, 238, 0.42) 0%, rgba(173, 208, 238, 0) 62%),
          radial-gradient(820px 380px at 112% -10%, rgba(84, 134, 186, 0.20) 0%, rgba(84, 134, 186, 0) 64%),
          linear-gradient(180deg, #edf5fc 0%, #d9e8f4 56%, #c8dbeb 100%);
      }

      body::before {
        opacity: 0.38;
      }

      body::after {
        opacity: 0.58;
      }

      .dashboard-hero {
        grid-template-columns: 1fr;
      }

      .login-wireframe {
        grid-template-columns: 1fr;
      }

      .book-cover,
      .book-pages {
        min-height: 0;
      }

      .book-cover {
        border-radius: 18px 18px 0 0;
        padding: 24px 20px;
      }

      .book-pages {
        border-radius: 0 0 18px 18px;
        border-left: 1px solid rgba(19, 49, 78, 0.11);
        padding: 20px;
      }

      .login-header {
        font-size: 24px;
      }

      .canvas {
        grid-template-columns: 1fr;
      }

      .sidebar {
        border-right: 0;
        border-bottom: 2px solid var(--line-strong);
      }

      .kpis {
        grid-template-columns: repeat(2, 1fr);
      }

      .content-grid {
        grid-template-columns: 1fr;
      }

      .content-grid.directory-focus {
        grid-template-columns: 1fr;
      }

      .topbar {
        grid-template-columns: 1fr;
      }

      .table-tools .input-field {
        width: 100%;
      }

      .admin-table-row {
        grid-template-columns: 84px minmax(170px, 1fr) minmax(160px, 1fr) 120px;
      }

      .table-wrap .table-row {
        min-width: 0;
      }

      .scrollable-list {
        max-height: 360px;
      }

      .scrollable-form {
        max-height: calc(100vh - 330px);
      }
    }

    @media (max-width: 600px) {
      body {
        padding: 10px;
        background:
          radial-gradient(460px 220px at -20% -16%, rgba(170, 204, 233, 0.34) 0%, rgba(170, 204, 233, 0) 60%),
          linear-gradient(180deg, #f2f8fe 0%, #deebf6 62%, #cedeee 100%);
      }

      body::before,
      body::after {
        display: none;
      }

      .login-wireframe {
        width: calc(100vw - 20px);
        padding: 12px;
      }

      .cover-title {
        font-size: 36px;
      }

      .brand-logo {
        width: 52px;
        height: 52px;
      }

      .book-pages {
        padding: 16px;
      }

      .auth-title {
        font-size: 28px;
      }

      .kpis {
        grid-template-columns: 1fr;
      }

      .activity-strip {
        grid-template-columns: 1fr;
      }

      .hero-metrics {
        grid-template-columns: 1fr;
      }

      .table-row {
        grid-template-columns: 1fr;
        padding: 8px;
        min-height: unset;
      }

      .form-grid {
        grid-template-columns: 1fr;
      }

      .scrollable-list {
        max-height: 300px;
      }

      .scrollable-form {
        max-height: calc(100vh - 300px);
      }
    }

    /* Neon login redesign */
    .login-wireframe {
      width: min(940px, calc(100vw - 40px));
      min-height: 560px;
      margin: clamp(20px, 5vh, 44px) auto;
      border: 2px solid #35a7b8;
      border-radius: 0;
      background: linear-gradient(145deg, #021a2c 0%, #051f33 100%);
      box-shadow:
        0 0 0 1px rgba(53, 167, 184, 0.28) inset,
        0 0 22px rgba(53, 167, 184, 0.4),
        0 0 64px rgba(53, 167, 184, 0.28);
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: 1fr;
      padding: 0;
      color: #eafaff;
    }

    .login-wireframe::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(100% 90% at 98% 8%, rgba(53, 167, 184, 0.22), transparent 70%),
        radial-gradient(140% 120% at 0% 100%, rgba(19, 113, 119, 0.22), transparent 72%),
        linear-gradient(115deg, rgba(53, 167, 184, 0.08), transparent 34%);
      pointer-events: none;
      z-index: 0;
    }

    .login-wireframe::after {
      content: '';
      position: absolute;
      left: 50.6%;
      top: -16%;
      width: 2px;
      height: 132%;
      background: rgba(53, 167, 184, 0.92);
      transform: rotate(-38deg);
      transform-origin: center;
      box-shadow: 0 0 12px rgba(53, 167, 184, 0.74);
      z-index: 2;
      pointer-events: none;
    }

    .login-mode-switch {
      position: absolute;
      top: 18px;
      left: 18px;
      z-index: 3;
      border: 1px solid rgba(53, 167, 184, 0.34);
      background: rgba(2, 18, 30, 0.78);
      border-radius: 999px;
      padding: 4px;
      gap: 4px;
      margin: 0;
    }

    .login-mode-switch .portal-tab {
      min-width: 64px;
      padding: 8px 12px;
      font-size: 11px;
      letter-spacing: 0.7px;
      color: #8bcfdb;
    }

    .login-mode-switch .portal-tab.active {
      color: #ffffff;
      border-color: rgba(53, 167, 184, 0.84);
      background: linear-gradient(135deg, #137177, #35a7b8);
      box-shadow: 0 6px 14px rgba(53, 167, 184, 0.34);
    }

    .login-left-panel {
      position: relative;
      z-index: 3;
      width: min(420px, 100%);
      margin-left: clamp(26px, 6vw, 80px);
      padding: 80px 18px 44px;
    }

    .login-left-panel::before {
      content: '';
      position: absolute;
      left: -22px;
      top: 126px;
      width: 6px;
      height: 168px;
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(53, 167, 184, 0.9), rgba(53, 167, 184, 0.04));
      box-shadow: 0 0 18px rgba(53, 167, 184, 0.6);
      pointer-events: none;
    }

    .login-right-panel {
      position: absolute;
      top: 0;
      right: 0;
      width: 58%;
      height: 100%;
      clip-path: polygon(18% 0, 100% 0, 100% 100%, 58% 100%);
      background:
        linear-gradient(165deg, rgba(53, 167, 184, 0.24) 0%, rgba(19, 113, 119, 0.52) 100%),
        linear-gradient(145deg, #0e4d64 0%, #137177 52%, #35a7b8 100%);
      display: grid;
      align-items: center;
      justify-items: center;
      padding: 22px 36px 22px 138px;
      z-index: 1;
      box-shadow: inset -10px 0 40px rgba(0, 0, 0, 0.1);
    }

    .login-right-panel::before {
      content: '';
      position: absolute;
      inset: 0;
      background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
      z-index: -1;
    }

    .welcome-card {
      text-align: center;
      color: #f3feff;
      width: min(360px, 100%);
      margin-left: 0;
      text-shadow: 0 6px 16px rgba(5, 37, 49, 0.24);
    }

    .welcome-logo-section {
      display: flex;
      justify-content: center;
      margin-bottom: 20px;
      animation: bounce 2s infinite;
    }

    .welcome-logo {
      width: 100px;
      height: 100px;
      border-radius: 14px;
      object-fit: cover;
      border: 3px solid rgba(255, 255, 255, 0.4);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
                  0 0 30px rgba(53, 167, 184, 0.3);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .welcome-logo:hover {
      transform: scale(1.1) translateY(-8px);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
                  0 0 50px rgba(53, 167, 184, 0.5);
    }

    @keyframes bounce {
      0%, 100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-8px);
      }
    }

    .welcome-kicker {
      margin: 0 0 8px;
      letter-spacing: 1.8px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      color: rgba(230, 255, 255, 0.86);
    }

    .welcome-card h3 {
      margin: 0;
      font-size: clamp(34px, 4.2vw, 56px);
      line-height: 0.95;
      letter-spacing: 1px;
      font-weight: 800;
      background: linear-gradient(135deg, #ffffff 0%, #d4f4ff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: welcomeGlow 3s ease-in-out infinite;
    }

    @keyframes welcomeGlow {
      0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
      }
      50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
      }
    }

    .welcome-card p {
      margin: 16px 0 0;
      font-size: clamp(13px, 1.4vw, 24px);
      line-height: 1.45;
      font-weight: 600;
      color: rgba(241, 255, 255, 0.92);
    }

    .welcome-metrics {
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
    }

    .welcome-metrics span {
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid rgba(227, 255, 255, 0.36);
      background: rgba(4, 110, 128, 0.24);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.4px;
    }

    .neon-form {
      display: grid;
      gap: 14px;
      align-content: start;
      animation: revealPage 260ms ease;
    }

    .login-logo-section {
      display: flex;
      justify-content: center;
      padding: 20px 0 10px 0;
      animation: slideDown 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .login-logo {
      width: 120px;
      height: 120px;
      border-radius: 16px;
      object-fit: cover;
      border: 3px solid rgba(255, 255, 255, 0.3);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                  0 0 30px rgba(53, 167, 184, 0.2);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .login-logo:hover {
      transform: scale(1.05) translateY(-5px);
      box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 
                  0 0 50px rgba(53, 167, 184, 0.4);
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .form-kicker {
      margin: 0;
      width: fit-content;
      padding: 7px 11px;
      border-radius: 999px;
      border: 1px solid rgba(53, 167, 184, 0.34);
      background: rgba(53, 167, 184, 0.12);
      color: rgba(230, 251, 255, 0.88);
      font-size: 11px;
      letter-spacing: 1px;
      text-transform: uppercase;
      font-weight: 700;
    }

    .neon-form .auth-title {
      margin: 0;
      font-family: "Manrope", "Trebuchet MS", sans-serif;
      font-size: clamp(42px, 4vw, 54px);
      line-height: 1;
      color: #f2feff;
      font-weight: 800;
      letter-spacing: 0.6px;
      text-shadow: 0 6px 16px rgba(7, 42, 58, 0.34),
                   0 0 20px rgba(53, 167, 184, 0.28);
      background: linear-gradient(135deg, #f2feff 0%, #35a7b8 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: titleGlow 3s ease-in-out infinite;
    }

    @keyframes titleGlow {
      0%, 100% {
        text-shadow: 0 6px 16px rgba(7, 42, 58, 0.34),
                     0 0 20px rgba(53, 167, 184, 0.28);
      }
      50% {
        text-shadow: 0 6px 16px rgba(7, 42, 58, 0.34),
                     0 0 40px rgba(53, 167, 184, 0.42);
      }
    }

    .neon-field-group {
      gap: 8px;
    }

    .neon-label {
      color: #ecf9ff;
      font-size: 34px;
      text-transform: none;
      letter-spacing: 0;
      font-weight: 500;
      opacity: 0.96;
    }

    .neon-input-wrap {
      position: relative;
    }

    .neon-input {
      min-height: 52px;
      border: 0;
      border-bottom: 3px solid rgba(225, 247, 252, 0.95);
      border-radius: 0;
      padding: 12px 86px 10px 0;
      background: transparent;
      box-shadow: none;
      color: #ffffff;
      font-size: 22px;
      font-weight: 500;
      transition: all 0.3s ease;
      position: relative;
    }

    .neon-input::after {
      content: '';
      position: absolute;
      bottom: -3px;
      left: 0;
      width: 0;
      height: 3px;
      background: #35a7b8;
      transition: width 0.3s ease;
    }

    .neon-input:invalid,
    .neon-input:valid {
      background: linear-gradient(180deg, var(--read-bg-control), var(--read-bg-control-2)) !important;
      border-color: var(--read-border) !important;
    }

    .neon-input:focus,
    .neon-input:focus:invalid,
    .neon-input:focus:valid {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 20px rgba(53, 167, 184, 0.3);
    }

    .neon-input:-webkit-autofill,
    .neon-input:-webkit-autofill:hover,
    .neon-input:-webkit-autofill:focus {
      -webkit-text-fill-color: #ffffff;
      -webkit-box-shadow: 0 0 0 1000px #07243a inset;
      box-shadow: 0 0 0 1000px #07243a inset;
      caret-color: #ffffff;
      border-bottom-color: rgba(225, 247, 252, 0.95);
      transition: background-color 9999s ease-out 0s;
    }

    .neon-input:focus {
      border-color: #35a7b8;
      box-shadow: 0 6px 12px rgba(53, 167, 184, 0.24);
      transform: none;
    }

    .neon-input::placeholder {
      color: rgba(227, 242, 248, 0.5);
    }

    .input-icon {
      position: absolute;
      right: 58px;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      pointer-events: none;
    }

    .input-icon.user::before,
    .input-icon.user::after,
    .input-icon.lock::before,
    .input-icon.lock::after {
      content: '';
      position: absolute;
      border: 2px solid rgba(233, 251, 255, 0.96);
    }

    .input-icon.user::before {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      top: 1px;
      left: 6px;
      border-width: 2px;
    }

    .input-icon.user::after {
      width: 12px;
      height: 7px;
      border-radius: 8px 8px 4px 4px;
      border-top: 0;
      bottom: 2px;
      left: 4px;
    }

    .input-icon.lock::before {
      width: 12px;
      height: 10px;
      border-radius: 2px;
      bottom: 2px;
      left: 5px;
      border-width: 2px;
    }

    .input-icon.lock::after {
      width: 8px;
      height: 8px;
      border-radius: 999px 999px 0 0;
      border-bottom: 0;
      top: 0;
      left: 7px;
      border-width: 2px;
    }

    .login-button-row {
      margin-top: 12px;
    }

    .password-toggle {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      border: 1px solid rgba(53, 167, 184, 0.45);
      background: rgba(14, 77, 100, 0.24);
      color: #d9fdff;
      min-height: 30px;
      padding: 0 8px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: all 0.16s ease;
    }

    .password-toggle:hover {
      background: rgba(53, 167, 184, 0.32);
      border-color: rgba(53, 167, 184, 0.72);
    }

    .password-toggle.active {
      color: #01263a;
      background: #35a7b8;
      border-color: #35a7b8;
    }

    .neon-login-btn {
      width: min(360px, 100%);
      min-height: 56px;
      border-radius: 999px;
      border: 2px solid rgba(156, 220, 228, 0.92);
      background: linear-gradient(180deg, #35a7b8 0%, #1f8a8f 52%, #0e4d64 100%);
      color: #ffffff;
      font-size: 34px;
      text-transform: none;
      letter-spacing: 0;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 10px 24px rgba(19, 113, 119, 0.35),
        0 0 30px rgba(53, 167, 184, 0.3);
      padding: 10px 24px;
      font-weight: 700;
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      overflow: hidden;
    }

    .neon-login-btn::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transform: rotate(45deg);
      animation: shine 3s infinite;
    }

    @keyframes shine {
      0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
      }
      100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
      }
    }

    .neon-login-btn:hover {
      transform: translateY(-3px) scale(1.02);
      background: linear-gradient(180deg, #4db8c4 0%, #2d9a9f 52%, #137177 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 14px 28px rgba(19, 113, 119, 0.42),
        0 0 50px rgba(53, 167, 184, 0.5);
      border-color: #35a7b8;
    }

    .neon-login-btn:active {
      transform: translateY(-1px) scale(0.98);
    }

    .signup-line {
      margin: 4px 0 0;
      color: rgba(231, 250, 255, 0.92);
      font-size: 17px;
      line-height: 1.35;
      font-weight: 500;
    }

    .signup-line span {
      color: #14e8ff;
      font-weight: 800;
      cursor: pointer;
    }

    .signup-action {
      border: 0;
      background: transparent;
      color: #14e8ff;
      font: inherit;
      font-weight: 800;
      cursor: pointer;
      padding: 0;
    }

    .signup-action:hover {
      text-decoration: underline;
    }

    .login-left-panel .alert {
      margin-top: 16px;
      border-color: rgba(26, 236, 255, 0.38);
      background: rgba(4, 138, 156, 0.2);
      color: #dffcff;
      border-radius: 10px;
    }

    @media (max-width: 980px) {
      .login-wireframe {
        width: min(720px, calc(100vw - 24px));
        min-height: 0;
      }

      .login-wireframe::after {
        left: 52%;
        top: -20%;
        height: 140%;
      }

      .login-left-panel {
        width: min(380px, 100%);
        margin-left: 24px;
        padding: 96px 16px 28px;
      }

      .login-right-panel {
        padding-left: 124px;
      }

      .neon-label {
        font-size: 26px;
      }

      .neon-input {
        font-size: 18px;
      }

      .neon-login-btn {
        font-size: 28px;
      }
    }

    @media (max-width: 700px) {
      .login-wireframe {
        width: calc(100vw - 20px);
        border-radius: 14px;
        overflow: hidden;
        padding-bottom: 12px;
      }

      .login-wireframe::after {
        display: none;
      }

      .login-right-panel {
        display: none;
      }

      .login-left-panel {
        width: 100%;
        margin-left: 0;
        padding: 86px 18px 20px;
      }

      .login-left-panel::before {
        display: none;
      }

      .neon-form .auth-title {
        font-size: 40px;
      }

      .neon-label {
        font-size: 24px;
      }

      .neon-input {
        font-size: 18px;
      }

      .neon-login-btn {
        width: 100%;
        font-size: 28px;
      }

      .signup-line {
        font-size: 16px;
      }
    }

    /* Reference-match login refinements */
    body {
      background:
        radial-gradient(1100px 640px at -12% -18%, rgba(35, 122, 182, 0.26) 0%, rgba(35, 122, 182, 0) 58%),
        radial-gradient(920px 560px at 110% -12%, rgba(11, 172, 201, 0.20) 0%, rgba(11, 172, 201, 0) 62%),
        radial-gradient(1200px 760px at 50% 118%, rgba(5, 75, 128, 0.30) 0%, rgba(5, 75, 128, 0) 56%),
        linear-gradient(180deg, #031e34 0%, #031a2d 52%, #021528 100%);
    }

    body::before,
    body::after {
      display: block;
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: -1;
    }

    body::before {
      background:
        repeating-linear-gradient(28deg, rgba(137, 197, 224, 0.07) 0 1px, transparent 1px 82px),
        repeating-linear-gradient(-28deg, rgba(154, 213, 238, 0.05) 0 1px, transparent 1px 82px);
      opacity: 0.42;
      -webkit-mask-image: radial-gradient(circle at center, black 24%, rgba(0, 0, 0, 0.7) 66%, transparent 100%);
      mask-image: radial-gradient(circle at center, black 24%, rgba(0, 0, 0, 0.7) 66%, transparent 100%);
    }

    body::after {
      background:
        radial-gradient(130% 100% at 0% 104%, transparent 0 66%, rgba(121, 167, 209, 0.20) 66.2% 66.8%, transparent 67% 100%),
        radial-gradient(130% 100% at 0% 104%, transparent 0 74%, rgba(121, 167, 209, 0.14) 74.2% 74.8%, transparent 75% 100%),
        radial-gradient(130% 100% at 0% 104%, transparent 0 82%, rgba(121, 167, 209, 0.10) 82.2% 82.8%, transparent 83% 100%);
      opacity: 0.52;
    }

    .login-wireframe {
      width: min(760px, calc(100vw - 36px));
      min-height: 470px;
      margin: clamp(18px, 10vh, 84px) auto;
      border: 2px solid #13e8ff;
      box-shadow:
        0 0 0 1px rgba(19, 232, 255, 0.24) inset,
        0 0 18px rgba(19, 232, 255, 0.36),
        0 0 44px rgba(19, 232, 255, 0.26);
      background: linear-gradient(165deg, #021a2e 0%, #01182a 100%);
      font-family: "Poppins", "Manrope", "Trebuchet MS", sans-serif;
    }

    .login-wireframe::after {
      left: 49.3%;
      top: -13%;
      height: 128%;
      transform: rotate(-37deg);
      background: #13e8ff;
      box-shadow: 0 0 8px rgba(19, 232, 255, 0.62);
    }

    .login-mode-switch,
    .form-kicker,
    .welcome-kicker,
    .welcome-metrics {
      display: none !important;
    }

    .login-left-panel {
      width: min(320px, 100%);
      margin-left: clamp(22px, 4vw, 34px);
      padding: 66px 10px 28px;
    }

    .login-left-panel::before {
      display: none;
    }

    .neon-form {
      gap: 11px;
    }

    .neon-form .auth-title {
      font-size: clamp(30px, 3.9vw, 48px);
      line-height: 1;
      margin-bottom: 6px;
      letter-spacing: 0;
      font-weight: 700;
    }

    .neon-form .auth-title.system-title {
      font-size: clamp(18px, 2vw, 26px);
      line-height: 1.22;
      max-width: 320px;
      margin-bottom: 10px;
      font-weight: 800;
      letter-spacing: 0.15px;
      color: #ebfcff;
    }

    .neon-label {
      font-size: 15px;
      font-weight: 500;
      color: rgba(236, 249, 255, 0.96);
      margin-bottom: 1px;
    }

    .neon-input {
      min-height: 36px;
      padding: 6px 24px 6px 0;
      font-size: 14px;
      border: 0 !important;
      border-radius: 0;
      box-shadow: none !important;
      background: transparent !important;
      font-weight: 500;
      line-height: 1.2;
      color: #eafaff;
      caret-color: #eafaff;
      -webkit-appearance: none;
      appearance: none;
    }

    .neon-input-wrap {
      border-bottom: 2px solid rgba(242, 252, 255, 0.96);
      min-height: 40px;
      display: flex;
      align-items: center;
    }

    .neon-input-wrap:focus-within {
      border-bottom-color: #20ecff;
      box-shadow: 0 7px 14px rgba(8, 198, 224, 0.14);
    }

    .neon-input::placeholder {
      color: rgba(214, 236, 245, 0.42);
    }

    .neon-input:-webkit-autofill,
    .neon-input:-webkit-autofill:hover,
    .neon-input:-webkit-autofill:focus {
      -webkit-text-fill-color: #eafaff !important;
      -webkit-box-shadow: 0 0 0 1000px rgba(2, 27, 45, 0.98) inset !important;
      box-shadow: 0 0 0 1000px rgba(2, 27, 45, 0.98) inset !important;
      caret-color: #eafaff;
      border: 0 !important;
      transition: background-color 9999s ease-out 0s;
    }

    .input-icon {
      right: 0;
      width: 16px;
      height: 16px;
      top: 48%;
    }

    .input-icon.user::before,
    .input-icon.user::after {
      border-width: 1.7px;
    }

    .input-icon.user::before {
      width: 6px;
      height: 6px;
      left: 5px;
      top: 0;
    }

    .input-icon.user::after {
      width: 10px;
      height: 6px;
      left: 3px;
      bottom: 0;
    }

    .login-button-row {
      margin-top: 8px;
    }

    .neon-login-btn {
      width: 100%;
      min-height: 50px;
      font-size: clamp(19px, 2vw, 28px);
      font-weight: 800;
      border-radius: 999px;
      border: 1px solid rgba(120, 247, 255, 0.96) !important;
      background: linear-gradient(180deg, #27f3ff 0%, #10d7ee 54%, #0689aa 100%) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 12px 26px rgba(5, 186, 214, 0.4);
      padding: 7px 18px;
      color: #ecffff !important;
    }

    .neon-login-btn:hover {
      background: linear-gradient(180deg, #47f6ff 0%, #20e2f6 54%, #1496b6 100%) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.46),
        0 14px 30px rgba(5, 186, 214, 0.48);
    }

    .signup-line {
      margin-top: 9px;
      font-size: 13px;
      font-weight: 500;
      color: rgba(238, 251, 255, 0.94);
    }

    .portal-jump {
      margin: 8px 0 0;
      font-size: 12px;
      font-weight: 500;
      color: rgba(224, 246, 252, 0.9);
    }

    .signup-action {
      color: #12e8ff;
      font-weight: 800;
      text-decoration: none;
    }

    .portal-jump-btn {
      border: 0;
      padding: 0;
      margin: 0;
      background: transparent;
      font: inherit;
      font-weight: 800;
      color: #13e8ff;
      text-decoration: none;
      cursor: pointer;
      transition: color 0.16s ease;
    }

    .portal-jump-btn:hover {
      color: #5df6ff;
      text-decoration: underline;
    }

    .password-toggle {
      display: inline-flex !important;
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      min-width: 20px;
      min-height: 20px;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
      cursor: pointer;
      border-radius: 4px;
      color: rgba(230, 250, 255, 0.96);
      opacity: 0.95;
    }

    .password-toggle::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      width: 20px;
      height: 20px;
      background-repeat: no-repeat;
      background-position: center;
      background-size: 17px 17px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e7fbff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 12s3.6-6 10.5-6 10.5 6 10.5 6-3.6 6-10.5 6S1.5 12 1.5 12z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3C/svg%3E");
    }

    .password-toggle.active::before {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319efff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 2l20 20'/%3E%3Cpath d='M8.1 8.1A7.6 7.6 0 0 1 12 7c6.9 0 10.5 5 10.5 5a18.6 18.6 0 0 1-4.6 4.8'/%3E%3Cpath d='M14.8 14.8A3.9 3.9 0 0 1 9.2 9.2'/%3E%3Cpath d='M6 17.5A17 17 0 0 1 1.5 12s1.5-2.5 4.5-4.6'/%3E%3C/svg%3E");
    }

    .password-toggle.active {
      background: transparent;
      border: 0;
      box-shadow: none;
      color: #19efff;
    }

    .password-toggle:hover {
      opacity: 1;
      transform: translateY(-50%) scale(1.04);
    }

    .password-toggle:focus-visible {
      outline: 1px solid rgba(25, 239, 255, 0.72);
      outline-offset: 2px;
      border-radius: 4px;
    }

    .password-toggle:hover::before {
      filter: drop-shadow(0 0 4px rgba(25, 239, 255, 0.45));
    }

    .password-toggle.active:hover::before {
      filter: drop-shadow(0 0 5px rgba(25, 239, 255, 0.55));
    }

    .password-toggle.active:hover {
      opacity: 1;
      transform: translateY(-50%) scale(1.04);
    }

    .login-right-panel {
      width: 56%;
      clip-path: polygon(14% 0, 100% 0, 100% 100%, 54% 100%);
      padding: 0 30px 0 94px;
      background:
        linear-gradient(168deg, rgba(6, 193, 217, 0.72) 0%, rgba(22, 214, 236, 0.86) 58%, rgba(38, 226, 247, 0.92) 100%),
        linear-gradient(145deg, #0ca5bd 0%, #26d9f2 100%);
    }

    .welcome-card {
      width: min(246px, 100%);
      text-align: center;
      margin: 0 auto;
      padding-right: 4px;
    }

    .welcome-card h3 {
      font-size: clamp(24px, 3vw, 40px);
      line-height: 0.97;
      letter-spacing: 0;
      white-space: normal;
      overflow-wrap: normal;
      word-break: keep-all;
      font-weight: 800;
    }

    .welcome-card p {
      margin-top: 9px;
      font-size: clamp(10px, 0.95vw, 14px);
      font-weight: 500;
      line-height: 1.45;
      color: rgba(243, 254, 255, 0.95);
      max-width: 178px;
      margin-left: auto;
      margin-right: auto;
    }

    .welcome-card #loginWelcomeSubtitle {
      min-height: 22px;
    }

    .login-left-panel .alert {
      margin-top: 10px;
      font-size: 12px;
      padding: 7px 9px;
    }

    @media (max-width: 980px) {
      .login-wireframe {
        width: min(700px, calc(100vw - 24px));
        min-height: 430px;
      }

      .neon-form .auth-title {
        font-size: 44px;
      }

      .welcome-card h3 {
        font-size: 40px;
      }
    }

    /* Neon-blue dark mode override */
    :root {
      --brand-1: #0e4d64;
      --brand-2: #137177;
      --brand-soft: rgba(53, 167, 184, 0.16);
      --brand-glow: rgba(53, 167, 184, 0.24);
    }

    body {
      color: #e9f7ff;
      background:
        radial-gradient(1000px 560px at -12% -14%, rgba(53, 167, 184, 0.24) 0%, rgba(53, 167, 184, 0) 60%),
        radial-gradient(880px 500px at 112% -10%, rgba(19, 113, 119, 0.2) 0%, rgba(19, 113, 119, 0) 62%),
        linear-gradient(180deg, #03192e 0%, #021325 52%, #010c1d 100%);
    }

    body::before {
      opacity: 0.52;
      background:
        repeating-linear-gradient(34deg, rgba(120, 198, 255, 0.12) 0 1px, transparent 1px 86px),
        repeating-linear-gradient(-34deg, rgba(179, 231, 255, 0.08) 0 1px, transparent 1px 86px);
    }

    body::after {
      opacity: 0.62;
    }

    .app-shell .canvas {
      border: 1px solid rgba(53, 167, 184, 0.26);
      background: linear-gradient(180deg, rgba(4, 24, 43, 0.95), rgba(2, 18, 34, 0.96));
      box-shadow: 0 30px 90px rgba(0, 8, 22, 0.58);
    }

    .sidebar {
      border-right: 1px solid rgba(53, 167, 184, 0.24);
      background:
        radial-gradient(120% 80% at 0% 0%, rgba(53, 167, 184, 0.16), transparent 62%),
        linear-gradient(180deg, #041d34 0%, #03172c 100%);
    }

    .logo {
      border-color: rgba(53, 167, 184, 0.28);
      background: linear-gradient(145deg, rgba(53, 167, 184, 0.14), rgba(19, 113, 119, 0.1));
      box-shadow: 0 18px 36px rgba(0, 12, 28, 0.46);
      color: #eaf9ff;
    }

    .logo .system-tag,
    .title-small,
    .profile-meta span,
    .breadcrumbs,
    .search,
    .profile,
    .helper-text,
    .note {
      color: #9dc7df;
    }

    .nav-item {
      border-color: rgba(53, 167, 184, 0.22);
      background: linear-gradient(180deg, rgba(7, 34, 58, 0.9), rgba(5, 27, 47, 0.95));
      color: #e9f7ff;
      box-shadow: 0 8px 18px rgba(0, 8, 22, 0.42);
    }

    .nav-item:hover {
      border-color: rgba(83, 184, 198, 0.5);
      background: linear-gradient(180deg, rgba(10, 47, 78, 0.95), rgba(6, 35, 60, 0.96));
    }

    .nav-item.active {
      border-color: rgba(53, 167, 184, 0.58);
      color: #ffffff;
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.24), rgba(19, 113, 119, 0.14));
      box-shadow: 0 10px 20px rgba(53, 167, 184, 0.24);
    }

    .main {
      padding: 24px;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .thumb,
    .chart,
    .map {
      border-color: rgba(53, 167, 184, 0.2);
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.94), rgba(5, 24, 43, 0.95));
      color: #e9f7ff;
      box-shadow: 0 10px 26px rgba(0, 8, 24, 0.42);
    }

    .performance-chart .chart-title,
    .performance-chart .chart-axis-label,
    .performance-chart .chart-legend {
      color: #e9f7ff;
      fill: #e9f7ff;
    }

    .performance-chart .chart-grid {
      stroke: rgba(53, 167, 184, 0.16);
    }

    .performance-chart .chart-axis-line {
      stroke: rgba(53, 167, 184, 0.34);
    }

    .performance-chart .chart-bar {
      fill: rgba(53, 167, 184, 0.28);
      stroke: rgba(53, 167, 184, 0.72);
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong {
      color: #0af0ff;
    }

    .panel-head {
      border-bottom-color: rgba(53, 167, 184, 0.2);
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.16), transparent);
    }

    .input-field,
    .admin-status-select,
    .color-code-pill {
      color: #e9f7ff;
      border-color: rgba(53, 167, 184, 0.28);
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.96), rgba(6, 28, 49, 0.98));
    }

    .input-field::placeholder {
      color: #8bb2c8;
    }

    .input-field:focus,
    .admin-status-select:focus {
      border-color: #35a7b8;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.18);
    }

    .btn {
      color: #0af0ff;
      border-color: rgba(53, 167, 184, 0.28);
      background: linear-gradient(180deg, rgba(8, 43, 71, 0.96), rgba(6, 31, 54, 0.96));
      box-shadow: 0 8px 18px rgba(0, 12, 28, 0.45);
    }

    .btn:hover {
      border-color: rgba(83, 184, 198, 0.56);
      background: linear-gradient(180deg, rgba(10, 58, 93, 0.98), rgba(8, 42, 71, 0.98));
    }

    .btn.primary,
    .quick-action:hover,
    .nav-badge {
      border-color: rgba(180, 226, 233, 0.82);
      color: #ffffff;
      background: linear-gradient(135deg, #35a7b8 0%, #137177 100%);
      box-shadow: 0 12px 28px rgba(53, 167, 184, 0.35);
    }

    .quick-action {
      color: #0af0ff;
      border-color: rgba(53, 167, 184, 0.26);
      background: linear-gradient(180deg, rgba(8, 43, 71, 0.92), rgba(6, 31, 54, 0.95));
    }

    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      color: #dbf4ff;
      background: rgba(53, 167, 184, 0.16);
      border: 1px solid rgba(53, 167, 184, 0.24);
    }

    .login-wireframe {
      background:
        radial-gradient(110% 95% at 6% 6%, rgba(53, 167, 184, 0.24), transparent 62%),
        radial-gradient(105% 90% at 98% 4%, rgba(19, 113, 119, 0.28), transparent 62%),
        linear-gradient(150deg, #031d35 0%, #03182e 58%, #021325 100%);
      border: 2px solid rgba(53, 167, 184, 0.74);
      box-shadow: 0 0 24px rgba(53, 167, 184, 0.34), 0 0 70px rgba(19, 113, 119, 0.22);
    }

    .login-right-panel {
      background:
        linear-gradient(170deg, rgba(3, 24, 44, 0.18), rgba(3, 24, 44, 0.08)),
        linear-gradient(140deg, #0e4d64 0%, #137177 52%, #35a7b8 100%);
    }

    .neon-login-btn {
      background: linear-gradient(135deg, #35a7b8 0%, #137177 100%) !important;
      border-color: rgba(172, 243, 255, 0.86) !important;
    }

    @media (max-width: 700px) {
      .main {
        padding: 14px;
      }
    }

    /* Readability pass for neon theme */
    .main,
    .panel,
    .panel-body,
    .record-card,
    .table-row,
    .timeline-content,
    .notice,
    .search,
    .profile,
    .breadcrumbs,
    .kpi,
    .hero-metric,
    .activity-card {
      color: #e9f7ff;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .record-card strong,
    .timeline-content strong,
    .kpi .value,
    .activity-card .large-value,
    .hero-metric .metric-value,
    .profile-meta strong,
    .auth-title,
    .system-title {
      color: #0af0ff;
    }

    .dashboard-hero p,
    .record-card span,
    .timeline-content span,
    .notice,
    .helper-text,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .profile-meta span,
    .breadcrumbs .crumb,
    .breadcrumbs .sep,
    .login-helper,
    .portal-jump,
    .signup-line {
      color: #b3d9f2;
    }

    .breadcrumbs .crumb.current,
    .title-small,
    .role-badge,
    .field-label,
    .neon-label {
      color: #d8f2ff;
    }

    .input-field,
    .admin-status-select,
    .color-code-pill,
    .neon-input {
      color: #f2fbff;
      font-weight: 500;
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder {
      color: #9fc9df;
      opacity: 1;
    }

    .btn,
    .quick-action,
    .link-button,
    .portal-tab {
      color: #e8f7ff;
    }

    .btn.primary,
    .quick-action:hover,
    .neon-login-btn,
    .portal-tab.active {
      color: #ffffff;
    }

    .table-row,
    .admin-table-row > span,
    .status-badge {
      font-size: 14px;
      line-height: 1.45;
    }

    /* Eye-comfort refinement: coastal palette, reduce strain */
    body {
      line-height: 1.55;
      background:
        radial-gradient(900px 520px at -8% -10%, rgba(53, 167, 184, 0.18) 0%, rgba(53, 167, 184, 0) 62%),
        radial-gradient(820px 480px at 108% -10%, rgba(19, 113, 119, 0.16) 0%, rgba(19, 113, 119, 0) 64%),
        linear-gradient(180deg, #081d27 0%, #071821 54%, #05131a 100%);
    }

    body::before {
      opacity: 0.34;
    }

    body::after {
      opacity: 0.42;
    }

    .app-shell .canvas,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .topbar,
    .breadcrumbs,
    .search,
    .profile {
      box-shadow: 0 8px 18px rgba(0, 8, 24, 0.32);
    }

    .login-wireframe {
      box-shadow: 0 0 10px rgba(53, 167, 184, 0.24), 0 0 34px rgba(19, 113, 119, 0.16);
      border-color: rgba(123, 203, 213, 0.58);
    }

    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      border-color: rgba(95, 176, 190, 0.24);
      background: linear-gradient(180deg, rgba(10, 38, 50, 0.94), rgba(7, 27, 38, 0.96));
    }

    .btn.primary,
    .quick-action:hover,
    .neon-login-btn,
    .portal-tab.active,
    .nav-badge {
      background: linear-gradient(135deg, #35a7b8 0%, #137177 100%);
      box-shadow: 0 8px 18px rgba(19, 113, 119, 0.3);
    }

    .dashboard-hero p,
    .record-card span,
    .timeline-content span,
    .notice,
    .helper-text,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .profile-meta span,
    .breadcrumbs .crumb,
    .breadcrumbs .sep,
    .login-helper,
    .portal-jump,
    .signup-line {
      color: #d2e9f8;
      font-size: 13px;
      line-height: 1.55;
    }

    .field-label,
    .neon-label,
    .title-small,
    .role-badge {
      font-size: 13px;
      letter-spacing: 0.35px;
    }

    .input-field,
    .admin-status-select,
    .neon-input,
    .btn,
    .quick-action,
    .nav-item,
    .table-row {
      font-size: 14px;
      line-height: 1.5;
    }

    .neon-form .auth-title,
    .neon-form .auth-title.system-title,
    .section-title,
    .dashboard-hero h2 {
      text-shadow: none;
      line-height: 1.25;
    }

    .status-badge::before {
      animation: none;
      box-shadow: none;
      width: 5px;
      height: 5px;
    }

    .main > *:not(.hidden),
    .portal-view,
    .neon-form,
    .view-enter,
    .login-wireframe.shell-enter,
    .app-shell.shell-enter .canvas,
    .login-wireframe.shell-exit,
    .app-shell.shell-exit .canvas,
    .flash-message {
      animation-duration: 140ms !important;
    }

    .nav-item,
    .btn,
    .quick-action,
    .table-row,
    .input-field,
    .admin-status-select,
    .password-toggle,
    .portal-tab,
    .link-button {
      transition-duration: 120ms !important;
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation: none !important;
        transition: none !important;
      }
    }

    /* Final global readability lock (all controls and text) */
    :root {
      --read-text-strong: #0af0ff;
      --read-text-base: #e9f7ff;
      --read-text-muted: #b3d9f2;
      --read-text-soft: #7eb3d1;
      --read-border: rgba(95, 176, 190, 0.36);
      --read-bg-control: rgba(10, 37, 49, 0.98);
      --read-bg-control-2: rgba(7, 28, 38, 0.98);
      --read-focus: #35a7b8;
    }

    body,
    .main,
    .sidebar,
    .topbar,
    .panel,
    .panel-body,
    .record-card,
    .table-row,
    .timeline-content,
    .notice,
    .kpi,
    .hero-metric,
    .activity-card,
    .search,
    .profile,
    .breadcrumbs,
    .logo,
    .login-wireframe,
    .login-left-panel,
    .login-right-panel,
    .welcome-card {
      color: var(--read-text-base) !important;
    }

    h1,
    h2,
    h3,
    h4,
    .section-title,
    .panel-head,
    .record-card strong,
    .timeline-content strong,
    .kpi .value,

    

    .id-card-header-redesign {
      background: var(--id-accent);
      color: #ffffff;
      text-align: center;
      font-weight: 700;
      padding: 10px 8px;
      line-height: 1.05;
      letter-spacing: 0.5px;
      font-size: 14px;
    }

    .id-card-body-redesign {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      padding: 12px 12px 10px 12px;
      gap: 12px;
      flex: 1;
    }

    .id-card-fields-redesign {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .id-line-redesign {
      display: grid;
      grid-template-columns: 80px 1fr;
      column-gap: 8px;
      align-items: end;
    }

    .id-label-redesign {
      font-size: 11px;
      font-weight: 800;
      color: #111111;
      line-height: 1;
      text-transform: uppercase;
    }

    .id-value-redesign { position: relative; min-height: 22px; }

    .id-value-text { position: absolute; left: 0; bottom: 2px; max-width: 100%; font-size: 12px; color: #111; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .id-underline { position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid #222; }

    .id-card-photo-signature { width: 110px; display:flex; flex-direction:column; gap:10px; align-items:center; }

    .id-photo-redesign { width: 88px; height: 95px; border: 2px solid #888; background: #fff; display:flex; align-items:center; justify-content:center; overflow: hidden; }

    .id-photo-redesign span { font-size: 12px; color:#666; font-style:italic; }

    .id-signature-redesign { min-height: 52px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding-top:0; font-weight:700; color:#222; }
    .hero-metric .metric-value,
    .activity-card .large-value,
    .profile-meta strong,
    .auth-title,
    .system-title,
    .welcome-card h3 {
      color: var(--read-text-strong) !important;
      text-shadow: none !important;
    }

    p,
    span,
    label,
    small,
    .helper-text,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .logo .system-tag,
    .title-small,
    .breadcrumbs .crumb,
    .breadcrumbs .sep,
    .profile-meta span,
    .portal-jump,
    .signup-line,
    .login-helper,
    .note {
      color: var(--read-text-muted) !important;
    }

    .breadcrumbs .crumb.current,
    .field-label,
    .neon-label,
    .role-badge,
    .stats-tag {
      color: var(--read-text-base) !important;
    }

    .btn,
    .btn span,
    .quick-action,
    .quick-action span,
    .link-button,
    #logoutButton,
    .portal-tab,
    .portal-jump-btn,
    .signup-action,
    .password-toggle {
      color: var(--read-text-base) !important;
      border-color: var(--read-border) !important;
    }

    .btn.primary,
    .btn.success,
    .btn.danger,
    .quick-action:hover,
    .portal-tab.active,
    .neon-login-btn {
      color: #ffffff !important;
    }

    .link-button,
    #logoutButton {
      background: linear-gradient(180deg, rgba(13, 52, 68, 0.96), rgba(9, 39, 52, 0.98)) !important;
      border-width: 1.5px !important;
      font-weight: 700 !important;
    }

    .link-button:hover,
    #logoutButton:hover {
      background: linear-gradient(180deg, rgba(20, 82, 108, 0.98), rgba(13, 56, 76, 0.98)) !important;
      color: #ffffff !important;
    }

    input,
    textarea,
    select,
    .input-field,
    .admin-status-select,
    .neon-input,
    .color-code-pill {
      color: var(--read-text-strong) !important;
      background: linear-gradient(180deg, var(--read-bg-control), var(--read-bg-control-2)) !important;
      border-color: var(--read-border) !important;
      caret-color: var(--read-text-strong) !important;
      font-size: 14px !important;
      line-height: 1.5 !important;
      -webkit-text-fill-color: var(--read-text-strong);
    }

    textarea {
      line-height: 1.55 !important;
    }

    input::placeholder,
    textarea::placeholder,
    select:invalid,
    .input-field::placeholder,
    .neon-input::placeholder {
      color: var(--read-text-soft) !important;
      opacity: 1 !important;
    }

    select,
    .admin-status-select {
      color-scheme: dark;
    }

    select option,
    select optgroup {
      background-color: #0a2a37 !important;
      color: #f2fbff !important;
    }

    input:focus,
    textarea:focus,
    select:focus,
    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .link-button:focus-visible,
    #logoutButton:focus-visible,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible {
      outline: none !important;
      border-color: var(--read-focus) !important;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.22) !important;
    }

    .table-row,
    .admin-table-row > span,
    .status-badge,
    .record-card,
    .notice,
    .timeline-content,
    .panel-body {
      font-size: 14px !important;
      line-height: 1.55 !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      color: #f2fbff !important;
      border-color: rgba(95, 176, 190, 0.42) !important;
      background: rgba(19, 113, 119, 0.28) !important;
      text-shadow: none !important;
    }

    .status-badge::before {
      background: #7ccbd5 !important;
    }

    /* Preserve readability for the light ID card preview surfaces */
    .id-card,
    .id-card * {
      color: #1b2836 !important;
      text-shadow: none !important;
    }

    .id-card .id-card-header {
      color: #ffffff !important;
      background: #0e4d64 !important;
    }

    .id-card .id-label {
      color: #1a1a1a !important;
      font-weight: 800 !important;
    }

    .id-card .id-value {
      color: #1f2d3a !important;
      background: #e2e2e2 !important;
      font-weight: 700 !important;
    }

    .id-card .id-photo {
      background: #ffffff !important;
      border-color: rgba(36, 74, 120, 0.28) !important;
    }

    .id-card .id-photo span,
    .id-card .id-signature span {
      color: #6a6a6a !important;
    }

    .id-card .id-signature {
      border-top-color: #979797 !important;
    }

    /* Coastal Government final override (authoritative) */
    :root {
      --coastal-primary: #0e4d64;
      --coastal-secondary: #137177;
      --coastal-accent: #35a7b8;
      --coastal-bg-1: #081c25;
      --coastal-bg-2: #06171f;
      --coastal-surface-1: rgba(12, 46, 60, 0.95);
      --coastal-surface-2: rgba(8, 32, 44, 0.97);
      --coastal-border: rgba(95, 176, 190, 0.32);
      --coastal-border-strong: rgba(132, 202, 214, 0.48);
      --coastal-text: #eaf6fb;
      --coastal-text-muted: #b6d0db;
      --coastal-focus: rgba(53, 167, 184, 0.24);
      --coastal-card-1: rgba(24, 84, 102, 0.97);
      --coastal-card-2: rgba(11, 43, 58, 0.99);
      --coastal-card-border: rgba(94, 210, 223, 0.62);
      --coastal-card-head-1: rgba(53, 167, 184, 0.52);
      --coastal-card-head-2: rgba(14, 77, 100, 0.42);
      --coastal-spark: #f4b740;
      --coastal-spark-soft: rgba(244, 183, 64, 0.26);
    }

    body {
      background:
        radial-gradient(980px 560px at -8% -12%, rgba(53, 167, 184, 0.18) 0%, rgba(53, 167, 184, 0) 64%),
        radial-gradient(860px 500px at 108% -10%, rgba(19, 113, 119, 0.16) 0%, rgba(19, 113, 119, 0) 64%),
        linear-gradient(180deg, var(--coastal-bg-1) 0%, #061720 55%, var(--coastal-bg-2) 100%) !important;
      color: var(--coastal-text) !important;
    }

    .sidebar {
      border-right: 1px solid var(--coastal-border) !important;
      background:
        radial-gradient(120% 78% at 0% 0%, rgba(53, 167, 184, 0.16), transparent 62%),
        linear-gradient(180deg, #072432 0%, #061c28 100%) !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      border-color: var(--coastal-border) !important;
      background: linear-gradient(180deg, var(--coastal-surface-1), var(--coastal-surface-2)) !important;
      color: var(--coastal-text) !important;
    }

    .panel {
      border-color: var(--coastal-card-border) !important;
      background:
        radial-gradient(140% 120% at 0% 0%, rgba(76, 190, 205, 0.18), transparent 60%),
        linear-gradient(180deg, var(--coastal-card-1), var(--coastal-card-2)) !important;
      box-shadow:
        0 14px 34px rgba(4, 22, 30, 0.5),
        inset 0 0 0 1px rgba(157, 226, 234, 0.16) !important;
    }

    .panel-body {
      background: linear-gradient(180deg, rgba(14, 56, 72, 0.6), rgba(8, 34, 45, 0.72)) !important;
    }

    .record-card {
      border-color: rgba(128, 214, 224, 0.58) !important;
      background:
        linear-gradient(160deg, rgba(22, 74, 91, 0.94) 0%, rgba(11, 46, 60, 0.95) 62%, rgba(8, 36, 49, 0.98) 100%) !important;
      box-shadow:
        0 9px 22px rgba(4, 18, 26, 0.34),
        inset 0 0 0 1px rgba(244, 183, 64, 0.1) !important;
    }

    .title-small,
    .logo .system-tag,
    .breadcrumbs,
    .profile-meta span,
    .helper-text,
    .note,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .record-card span,
    .timeline-content span,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: var(--coastal-text-muted) !important;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    .record-card strong,
    .timeline-content strong,
    .auth-title,
    .system-title {
      color: #ffffff !important;
    }

    .panel-head {
      border-bottom-color: var(--coastal-card-border) !important;
      background: linear-gradient(90deg, var(--coastal-card-head-1) 0%, var(--coastal-card-head-2) 58%, var(--coastal-spark-soft) 100%) !important;
    }

    .nav-item {
      border-color: var(--coastal-border) !important;
      background: linear-gradient(180deg, rgba(10, 41, 56, 0.94), rgba(7, 30, 42, 0.96)) !important;
      color: var(--coastal-text) !important;
    }

    .nav-item:hover {
      border-color: var(--coastal-border-strong) !important;
      background: linear-gradient(180deg, rgba(16, 62, 82, 0.96), rgba(11, 45, 62, 0.96)) !important;
    }

    .nav-item.active {
      border-color: rgba(128, 198, 210, 0.62) !important;
      background: linear-gradient(90deg, rgba(53, 167, 184, 0.3), rgba(19, 113, 119, 0.22)) !important;
      box-shadow: 0 10px 20px rgba(19, 113, 119, 0.3) !important;
      color: #ffffff !important;
    }

    .btn,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .password-toggle {
      border-color: var(--coastal-border) !important;
      color: var(--coastal-text) !important;
      background: linear-gradient(180deg, rgba(13, 52, 68, 0.96), rgba(9, 39, 52, 0.98)) !important;
    }

    .btn.primary,
    .quick-action:hover,
    .portal-tab.active,
    .neon-login-btn,
    .nav-badge {
      background: linear-gradient(135deg, var(--coastal-accent) 0%, var(--coastal-secondary) 100%) !important;
      border-color: rgba(180, 226, 233, 0.84) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 22px rgba(19, 113, 119, 0.3) !important;
    }

    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible {
      border-color: var(--coastal-accent) !important;
      box-shadow: 0 0 0 4px var(--coastal-focus) !important;
      outline: none !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      border-color: rgba(95, 176, 190, 0.44) !important;
      background: rgba(19, 113, 119, 0.3) !important;
      color: #f2fbff !important;
    }

    .status-badge::before {
      background: #7ccbd5 !important;
    }

    .login-wireframe {
      border-color: rgba(127, 204, 214, 0.68) !important;
      box-shadow: 0 0 14px rgba(53, 167, 184, 0.28), 0 0 42px rgba(19, 113, 119, 0.18) !important;
      background:
        radial-gradient(110% 94% at 6% 6%, rgba(53, 167, 184, 0.2), transparent 64%),
        radial-gradient(104% 90% at 98% 4%, rgba(19, 113, 119, 0.24), transparent 63%),
        linear-gradient(150deg, #08222f 0%, #071c28 58%, #061821 100%) !important;
    }

    .login-right-panel {
      background:
        linear-gradient(168deg, rgba(4, 27, 37, 0.2), rgba(4, 27, 37, 0.1)),
        linear-gradient(140deg, var(--coastal-primary) 0%, var(--coastal-secondary) 52%, var(--coastal-accent) 100%) !important;
    }

    /* Final theme switch: Fisherman Palette (consistent + readable) */
    :root {
      --fish-deep: #0f3443;
      --fish-harbor: #1b6079;
      --fish-seafoam: #49a8b8;
      --fish-tide: #d9eef4;
      --fish-net: #5b7382;
      --fish-sand: #f2c982;

      --fish-bg-1: #f3f9fc;
      --fish-bg-2: #e3f1f6;
      --fish-surface-1: #ffffff;
      --fish-surface-2: #f4fbff;
      --fish-card-1: #ffffff;
      --fish-card-2: #edf7fc;
      --fish-border: rgba(15, 52, 67, 0.2);
      --fish-border-strong: rgba(15, 52, 67, 0.34);
      --fish-title: #123c4d;
      --fish-text: #234a5d;
      --fish-muted: #5b7382;
      --fish-accent: #1b6079;
      --fish-accent-2: #49a8b8;
      --fish-focus: rgba(73, 168, 184, 0.26);
    }

    body {
      background:
        radial-gradient(1200px 680px at -10% -18%, rgba(73, 168, 184, 0.18) 0%, rgba(73, 168, 184, 0) 60%),
        radial-gradient(980px 620px at 110% -16%, rgba(27, 96, 121, 0.14) 0%, rgba(27, 96, 121, 0) 62%),
        linear-gradient(180deg, var(--fish-bg-1) 0%, var(--fish-bg-2) 100%) !important;
      color: var(--fish-text) !important;
    }

    .app-shell .canvas {
      border-color: var(--fish-border) !important;
      background: linear-gradient(180deg, #f7fcff, #edf6fb) !important;
      box-shadow: 0 24px 56px rgba(9, 41, 57, 0.16) !important;
    }

    .sidebar {
      border-right: 1px solid var(--fish-border) !important;
      background:
        radial-gradient(120% 78% at 0% 0%, rgba(73, 168, 184, 0.14), transparent 62%),
        linear-gradient(180deg, #e5f3f8 0%, #dceef5 100%) !important;
    }

    .logo {
      border-color: var(--fish-border) !important;
      background: linear-gradient(145deg, rgba(73, 168, 184, 0.16), rgba(27, 96, 121, 0.08)) !important;
      color: var(--fish-title) !important;
      box-shadow: 0 12px 24px rgba(12, 57, 77, 0.12) !important;
    }

    .title-small,
    .logo .system-tag,
    .breadcrumbs,
    .profile-meta span,
    .helper-text,
    .note,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .record-card span,
    .timeline-content span,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: var(--fish-muted) !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      border-color: var(--fish-border) !important;
      background: linear-gradient(180deg, var(--fish-surface-1), var(--fish-surface-2)) !important;
      color: var(--fish-text) !important;
      box-shadow: 0 8px 20px rgba(10, 47, 66, 0.09) !important;
    }

    .panel {
      background: linear-gradient(180deg, var(--fish-card-1), var(--fish-card-2)) !important;
      border-color: var(--fish-border-strong) !important;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    .record-card strong,
    .timeline-content strong,
    .auth-title,
    .system-title {
      color: var(--fish-title) !important;
      text-shadow: none !important;
    }

    .panel-head {
      border-bottom-color: var(--fish-border) !important;
      background: linear-gradient(90deg, rgba(73, 168, 184, 0.22), rgba(27, 96, 121, 0.1) 56%, rgba(242, 201, 130, 0.2) 100%) !important;
    }

    .nav-item {
      border-color: var(--fish-border) !important;
      background: linear-gradient(180deg, #f5fbff, #e9f5fb) !important;
      color: #1f4b60 !important;
      box-shadow: 0 6px 14px rgba(10, 47, 66, 0.08) !important;
    }

    .nav-item:hover {
      border-color: var(--fish-border-strong) !important;
      background: linear-gradient(180deg, #ecf7fc, #dff0f8) !important;
    }

    .nav-item.active {
      border-color: rgba(73, 168, 184, 0.62) !important;
      background: linear-gradient(90deg, rgba(73, 168, 184, 0.28), rgba(27, 96, 121, 0.2)) !important;
      color: #123f53 !important;
      box-shadow: 0 10px 20px rgba(27, 96, 121, 0.18) !important;
    }

    .btn,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .password-toggle {
      border-color: var(--fish-border-strong) !important;
      color: #1a495d !important;
      background: linear-gradient(180deg, #f7fcff, #e8f4fb) !important;
    }

    .btn.primary,
    .quick-action:hover,
    .portal-tab.active,
    .neon-login-btn,
    .nav-badge {
      background: linear-gradient(135deg, var(--fish-accent-2) 0%, var(--fish-accent) 100%) !important;
      border-color: rgba(15, 94, 101, 0.32) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 20px rgba(27, 96, 121, 0.2) !important;
    }

    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible {
      border-color: var(--fish-accent) !important;
      box-shadow: 0 0 0 4px var(--fish-focus) !important;
      outline: none !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      border-color: rgba(27, 96, 121, 0.28) !important;
      background: rgba(73, 168, 184, 0.14) !important;
      color: #1a4f66 !important;
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder {
      color: #6d8795 !important;
      opacity: 1;
    }

    /* Final override: Harbor Dawn palette (richer contrast, non-neon) */
    :root {
      --harbor-bg: #e7eff3;
      --harbor-bg-soft: #d8e6ee;
      --harbor-surface: #f7fbfe;
      --harbor-card: #ffffff;
      --harbor-card-soft: #f0f7fb;
      --harbor-border: rgba(38, 78, 96, 0.24);
      --harbor-border-strong: rgba(38, 78, 96, 0.4);
      --harbor-title: #1a4457;
      --harbor-text: #2e5667;
      --harbor-muted: #607c8b;
      --harbor-accent: #2f7a92;
      --harbor-accent-2: #529fb5;
      --harbor-sand: #e2b06a;
      --harbor-focus: rgba(82, 159, 181, 0.24);
    }

    body {
      background:
        radial-gradient(1150px 620px at -8% -12%, rgba(82, 159, 181, 0.16) 0%, rgba(82, 159, 181, 0) 60%),
        radial-gradient(900px 580px at 110% -12%, rgba(47, 122, 146, 0.14) 0%, rgba(47, 122, 146, 0) 62%),
        linear-gradient(180deg, var(--harbor-bg) 0%, var(--harbor-bg-soft) 100%) !important;
      color: var(--harbor-text) !important;
    }

    .app-shell .canvas {
      border-color: var(--harbor-border) !important;
      background: linear-gradient(180deg, #f8fcff, #ecf5fa) !important;
      box-shadow: 0 22px 50px rgba(17, 45, 58, 0.14) !important;
    }

    .sidebar {
      border-right: 1px solid var(--harbor-border) !important;
      background:
        radial-gradient(120% 76% at 0% 0%, rgba(82, 159, 181, 0.12), transparent 62%),
        linear-gradient(180deg, #dcebf2 0%, #d3e4ed 100%) !important;
    }

    .logo {
      border-color: var(--harbor-border-strong) !important;
      background: linear-gradient(145deg, rgba(82, 159, 181, 0.14), rgba(47, 122, 146, 0.08)) !important;
      color: var(--harbor-title) !important;
      box-shadow: 0 10px 20px rgba(17, 45, 58, 0.12) !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      border-color: var(--harbor-border) !important;
      background: linear-gradient(180deg, var(--harbor-surface), #eef6fb) !important;
      color: var(--harbor-text) !important;
      box-shadow: 0 6px 16px rgba(17, 45, 58, 0.08) !important;
    }

    .panel {
      border-color: var(--harbor-border-strong) !important;
      background: linear-gradient(180deg, var(--harbor-card), var(--harbor-card-soft)) !important;
      box-shadow: 0 10px 24px rgba(17, 45, 58, 0.1) !important;
    }

    .panel-body {
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.96), rgba(5, 24, 43, 0.98)) !important;
      border-color: rgba(0, 200, 255, 0.16) !important;
      color: #e9f7ff !important;
    }

    .panel-body .field-group,
    .panel-body .field-group * {
      color: #dff5ff !important;
    }

    .panel-body .input-field,
    .panel-body .admin-status-select,
    .panel-body .neon-input {
      background: linear-gradient(180deg, rgba(10, 37, 49, 0.98), rgba(7, 28, 38, 0.98)) !important;
      border-color: rgba(53, 167, 184, 0.36) !important;
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    .record-card {
      background: linear-gradient(180deg, #ffffff, #f5fbff) !important;
      border-color: rgba(38, 78, 96, 0.3) !important;
      box-shadow: 0 6px 16px rgba(17, 45, 58, 0.08) !important;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    .record-card strong,
    .timeline-content strong,
    .auth-title,
    .system-title {
      color: var(--harbor-title) !important;
      text-shadow: none !important;
    }

    .title-small,
    .logo .system-tag,
    .breadcrumbs,
    .profile-meta span,
    .helper-text,
    .note,
    .field-help,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .record-card span,
    .timeline-content span,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: var(--harbor-muted) !important;
    }

    .panel-head {
      border-bottom-color: var(--harbor-border) !important;
      background: linear-gradient(90deg, rgba(82, 159, 181, 0.22), rgba(47, 122, 146, 0.12) 56%, rgba(226, 176, 106, 0.2) 100%) !important;
    }

    .nav-item {
      border-color: var(--harbor-border) !important;
      background: linear-gradient(180deg, #f6fbff, #eaf4fa) !important;
      color: #2b596c !important;
      box-shadow: 0 5px 12px rgba(17, 45, 58, 0.08) !important;
    }

    .nav-item:hover {
      border-color: var(--harbor-border-strong) !important;
      background: linear-gradient(180deg, #edf7fc, #e2f0f7) !important;
    }

    .nav-item.active {
      border-color: rgba(47, 122, 146, 0.54) !important;
      background: linear-gradient(90deg, rgba(82, 159, 181, 0.26), rgba(47, 122, 146, 0.2)) !important;
      color: #18475b !important;
      box-shadow: 0 9px 18px rgba(47, 122, 146, 0.16) !important;
    }

    .btn,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .password-toggle {
      border-color: var(--harbor-border-strong) !important;
      color: #225066 !important;
      background: linear-gradient(180deg, #f8fcff, #eaf4fb) !important;
    }

    .btn.primary,
    .quick-action:hover,
    .portal-tab.active,
    .neon-login-btn,
    .nav-badge {
      background: linear-gradient(135deg, var(--harbor-accent-2) 0%, var(--harbor-accent) 100%) !important;
      border-color: rgba(26, 86, 106, 0.34) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 18px rgba(47, 122, 146, 0.2) !important;
    }

    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible {
      border-color: var(--harbor-accent) !important;
      box-shadow: 0 0 0 4px var(--harbor-focus) !important;
      outline: none !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      border-color: rgba(47, 122, 146, 0.3) !important;
      background: rgba(82, 159, 181, 0.14) !important;
      color: #215166 !important;
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder {
      color: #6f8997 !important;
      opacity: 1;
    }

    /* Master redesign: Harbor + Sand (highly visible) */
    :root {
      --master-bg: #f2f4ef;
      --master-bg-soft: #e7ece6;
      --master-main: #f8fbfc;
      --master-panel: #ffffff;
      --master-panel-soft: #f3f7f8;
      --master-sidebar-1: #113a4a;
      --master-sidebar-2: #0c2e3c;
      --master-line: rgba(17, 58, 74, 0.2);
      --master-line-strong: rgba(17, 58, 74, 0.36);
      --master-title: #1a3b49;
      --master-text: #385663;
      --master-muted: #6b8591;
      --master-accent: #2d7a8f;
      --master-accent-2: #4ba5b8;
      --master-warm: #d09343;
      --master-warm-soft: rgba(208, 147, 67, 0.2);
      --master-focus: rgba(75, 165, 184, 0.26);
    }

    body {
      background:
        radial-gradient(1200px 650px at -8% -14%, rgba(75, 165, 184, 0.16) 0%, rgba(75, 165, 184, 0) 62%),
        radial-gradient(950px 620px at 112% -16%, rgba(208, 147, 67, 0.12) 0%, rgba(208, 147, 67, 0) 66%),
        linear-gradient(180deg, var(--master-bg) 0%, var(--master-bg-soft) 100%) !important;
      color: var(--master-text) !important;
    }

    .app-shell .canvas {
      border: 1px solid var(--master-line) !important;
      background: linear-gradient(180deg, var(--master-main), #eef3f5) !important;
      box-shadow: 0 24px 54px rgba(16, 44, 57, 0.14) !important;
    }

    .sidebar {
      border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
      background:
        radial-gradient(130% 84% at 0% 0%, rgba(75, 165, 184, 0.18), transparent 62%),
        linear-gradient(180deg, var(--master-sidebar-1) 0%, var(--master-sidebar-2) 100%) !important;
      color: #e9f6fb !important;
    }

    .logo {
      border-color: rgba(255, 255, 255, 0.2) !important;
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(75, 165, 184, 0.16)) !important;
      color: #f2fbff !important;
      box-shadow: 0 10px 20px rgba(4, 18, 26, 0.28) !important;
    }

    .title-small,
    .logo .system-tag {
      color: #bedbe8 !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      border-color: var(--master-line) !important;
      background: linear-gradient(180deg, var(--master-panel), var(--master-panel-soft)) !important;
      color: var(--master-text) !important;
      box-shadow: 0 6px 15px rgba(16, 44, 57, 0.07) !important;
    }

    .panel {
      border-color: var(--master-line-strong) !important;
      box-shadow: 0 10px 24px rgba(16, 44, 57, 0.1) !important;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    .record-card strong,
    .timeline-content strong,
    .auth-title,
    .system-title {
      color: var(--master-title) !important;
      text-shadow: none !important;
    }

    .panel-head {
      border-bottom-color: var(--master-line) !important;
      background: linear-gradient(90deg, rgba(75, 165, 184, 0.22), rgba(45, 122, 143, 0.12) 55%, var(--master-warm-soft) 100%) !important;
    }

    .record-card span,
    .timeline-content span,
    .helper-text,
    .field-help,
    .note,
    .profile-meta span,
    .breadcrumbs,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: var(--master-muted) !important;
    }

    .nav-item {
      border-color: rgba(185, 222, 236, 0.2) !important;
      background: linear-gradient(180deg, rgba(10, 45, 60, 0.92), rgba(8, 37, 49, 0.94)) !important;
      color: #def3fb !important;
      box-shadow: 0 5px 12px rgba(3, 13, 20, 0.28) !important;
    }

    .nav-item:hover {
      border-color: rgba(210, 147, 67, 0.42) !important;
      background: linear-gradient(180deg, rgba(14, 58, 76, 0.94), rgba(10, 46, 62, 0.96)) !important;
    }

    .nav-item.active {
      border-color: rgba(75, 165, 184, 0.66) !important;
      background: linear-gradient(90deg, rgba(75, 165, 184, 0.34), rgba(45, 122, 143, 0.3)) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 20px rgba(45, 122, 143, 0.3) !important;
    }

    .btn,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .password-toggle {
      border-color: var(--master-line-strong) !important;
      color: var(--master-title) !important;
      background: linear-gradient(180deg, #fbfdfe, #edf4f7) !important;
    }

    .btn.primary,
    .quick-action:hover,
    .portal-tab.active,
    .neon-login-btn,
    .nav-badge {
      border-color: rgba(33, 98, 116, 0.42) !important;
      background: linear-gradient(135deg, var(--master-accent-2) 0%, var(--master-accent) 60%, var(--master-warm) 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 20px rgba(45, 122, 143, 0.24) !important;
    }

    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible {
      border-color: var(--master-accent) !important;
      box-shadow: 0 0 0 4px var(--master-focus) !important;
      outline: none !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      border-color: rgba(45, 122, 143, 0.28) !important;
      background: rgba(75, 165, 184, 0.14) !important;
      color: #24576b !important;
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder {
      color: #7a909c !important;
      opacity: 1;
    }

    /* Absolute full redesign: Fisherman Unified Theme */
    :root {
      --u-bg-1: #f1f6f8;
      --u-bg-2: #dfe9ee;
      --u-water-1: #1f4f63;
      --u-water-2: #2f7b95;
      --u-water-3: #58aeca;
      --u-sand: #d9a15b;
      --u-panel: #ffffff;
      --u-panel-soft: #f1f7fa;
      --u-border: rgba(28, 72, 92, 0.22);
      --u-border-strong: rgba(28, 72, 92, 0.38);
      --u-title: #173d4f;
      --u-text: #355765;
      --u-muted: #64808f;
      --u-sidebar-text: #e8f5fb;
      --u-focus: rgba(88, 174, 202, 0.26);
    }

    body {
      background:
        radial-gradient(1100px 580px at -10% -12%, rgba(88, 174, 202, 0.2) 0%, rgba(88, 174, 202, 0) 62%),
        radial-gradient(980px 560px at 112% -14%, rgba(217, 161, 91, 0.14) 0%, rgba(217, 161, 91, 0) 66%),
        linear-gradient(180deg, var(--u-bg-1) 0%, var(--u-bg-2) 100%) !important;
      color: var(--u-text) !important;
    }

    body::before {
      opacity: 0.26 !important;
      background:
        repeating-linear-gradient(36deg, rgba(54, 107, 130, 0.14) 0 1px, transparent 1px 84px),
        repeating-linear-gradient(-36deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 84px) !important;
    }

    body::after {
      opacity: 0.28 !important;
      background:
        radial-gradient(160% 110% at 0% 110%, transparent 0 58%, rgba(47, 123, 149, 0.24) 58.3% 59%, transparent 59.2% 100%),
        radial-gradient(160% 110% at 0% 110%, transparent 0 66%, rgba(47, 123, 149, 0.18) 66.3% 67%, transparent 67.2% 100%) !important;
    }

    .login-wireframe {
      border: 1px solid var(--u-border-strong) !important;
      background:
        radial-gradient(110% 95% at 6% 6%, rgba(88, 174, 202, 0.2), transparent 62%),
        radial-gradient(105% 90% at 98% 4%, rgba(47, 123, 149, 0.2), transparent 62%),
        linear-gradient(150deg, #f7fbfd 0%, #edf5f9 62%, #e4eff4 100%) !important;
      box-shadow: 0 22px 52px rgba(18, 46, 58, 0.16) !important;
      color: var(--u-title) !important;
    }

    .login-mode-switch {
      border-color: var(--u-border) !important;
      background: rgba(250, 253, 255, 0.9) !important;
    }

    .login-mode-switch .portal-tab {
      color: #406273 !important;
      border-color: transparent !important;
      background: transparent !important;
    }

    .login-mode-switch .portal-tab.active {
      color: #ffffff !important;
      border-color: rgba(28, 72, 92, 0.2) !important;
      background: linear-gradient(135deg, var(--u-water-3), var(--u-water-2)) !important;
      box-shadow: 0 8px 16px rgba(47, 123, 149, 0.24) !important;
    }

    .login-left-panel,
    .neon-form,
    .form-kicker,
    .neon-form .auth-title,
    .neon-label,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: var(--u-title) !important;
    }

    /* Master Detail Modal Styling */
    .master-detail-modal-card {
      width: min(900px, 90vw);
      max-height: calc(100vh - 80px);
      display: flex;
      flex-direction: column;
      border-radius: 16px;
      background: #0a1e2b;
      border: 1px solid rgba(0, 212, 255, 0.24);
      box-shadow: 0 24px 64px rgba(0, 12, 25, 0.64);
      overflow: hidden;
    }

    .master-detail-modal-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 18px 20px;
      background: linear-gradient(90deg, rgba(0, 212, 255, 0.16), rgba(42, 122, 162, 0.08));
      border-bottom: 1px solid rgba(0, 212, 255, 0.18);
      flex-shrink: 0;
    }

    .master-detail-modal-head h3 {
      margin: 0;
      font-size: 20px;
      font-weight: 700;
      color: #0af0ff;
      font-family: "Fraunces", Georgia, serif;
    }

    .master-detail-modal-head button {
      background: linear-gradient(180deg, #0a56a2, #0a1e2b) !important;
      border: 1px solid rgba(0, 212, 255, 0.24) !important;
      color: #0af0ff !important;
      padding: 8px 14px !important;
      border-radius: 8px !important;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      transition: all 0.2s ease;
    }

    .master-detail-modal-head button:hover {
      background: linear-gradient(180deg, #0d6bc4, #0a2e47) !important;
      border-color: #00d4ff !important;
      box-shadow: 0 6px 14px rgba(0, 212, 255, 0.24) !important;
    }

    #masterDetailModalBody {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 16px;
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.94), rgba(5, 24, 43, 0.95));
    }

    #masterDetailModalBody::-webkit-scrollbar {
      width: 8px;
    }

    #masterDetailModalBody::-webkit-scrollbar-track {
      background: rgba(0, 212, 255, 0.08);
      border-radius: 4px;
    }

    #masterDetailModalBody::-webkit-scrollbar-thumb {
      background: rgba(0, 212, 255, 0.34);
      border-radius: 4px;
    }

    #masterDetailModalBody::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 212, 255, 0.54);
    }

    /* Content inside master detail modal */
    #masterDetailModalBody .registry-detail-body {
      display: grid;
      gap: 12px;
      padding: 0;
    }

    #masterDetailModalBody .registry-profile-card {
      background: linear-gradient(135deg, rgba(10, 86, 162, 0.24), rgba(42, 122, 162, 0.16));
      border: 1px solid rgba(0, 212, 255, 0.2);
      padding: 14px;
      border-radius: 12px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    #masterDetailModalBody .registry-avatar-large {
      width: 64px;
      height: 64px;
      min-width: 64px;
      border-radius: 50%;
      background: linear-gradient(135deg, #0d6bc4, #0a56a2);
      color: #0af0ff;
      font-weight: 800;
      font-size: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(0, 212, 255, 0.28);
    }

    #masterDetailModalBody .profile-copy {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
    }

    #masterDetailModalBody .profile-copy strong {
      color: #ffffff;
      font-size: 16px;
      font-weight: 700;
    }

    #masterDetailModalBody .profile-copy span {
      color: #9dc7df;
      font-size: 13px;
    }

    #masterDetailModalBody .registry-summary-list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    #masterDetailModalBody .registry-summary-list .record-card {
      background: linear-gradient(180deg, rgba(10, 86, 162, 0.18), rgba(5, 56, 92, 0.14));
      border: 1px solid rgba(0, 212, 255, 0.16);
      padding: 10px;
      border-radius: 8px;
      gap: 4px;
    }

    #masterDetailModalBody .registry-summary-list .record-card strong {
      color: #0af0ff;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    #masterDetailModalBody .registry-summary-list .record-card span {
      color: #b3d9f2;
      font-size: 13px;
      font-weight: 600;
    }

    #masterDetailModalBody .registry-id-preview {
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.6), rgba(5, 24, 43, 0.72));
      border: 1px solid rgba(0, 212, 255, 0.18);
      border-radius: 12px;
      overflow: hidden;
    }

    #masterDetailModalBody .registry-id-preview .panel-head {
      background: linear-gradient(90deg, rgba(0, 212, 255, 0.18), rgba(42, 122, 162, 0.1));
      border-bottom: 1px solid rgba(0, 212, 255, 0.16);
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      font-weight: 700;
      color: #0af0ff;
    }

    #masterDetailModalBody .registry-id-preview .panel-body {
      padding: 12px;
      background: linear-gradient(180deg, rgba(8, 30, 50, 0.94), rgba(5, 22, 40, 0.96));
    }

    #masterDetailModalBody .registry-id-card-wrap {
      max-height: 480px;
      overflow-y: auto;
      padding: 8px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 8px;
      margin-bottom: 12px;
    }

    #masterDetailModalBody .button-row {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }

    #masterDetailModalBody .button-row .btn {
      flex: 1;
      min-height: 38px;
      padding: 10px 12px;
      font-size: 13px;
      background: linear-gradient(135deg, #0d6bc4, #0a56a2) !important;
      border: 1px solid rgba(0, 212, 255, 0.24) !important;
      color: #0af0ff !important;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    #masterDetailModalBody .button-row .btn:hover {
      background: linear-gradient(135deg, #1080d8, #0d6bc4) !important;
      border-color: #00d4ff !important;
      box-shadow: 0 6px 14px rgba(0, 212, 255, 0.24) !important;
    }

    @media (max-width: 768px) {
      .master-detail-modal-card {
        width: min(95vw, calc(100vw - 20px));
        max-height: 90vh;
      }

      #masterDetailModalBody .registry-summary-list {
        grid-template-columns: 1fr;
      }
    }

    /* Admin Panel Page Text Visibility Fixes */
    .panel-body {
      color: #e9f7ff !important;
    }

    .panel-body .record-card {
      background: linear-gradient(180deg, rgba(10, 86, 162, 0.18), rgba(5, 56, 92, 0.14)) !important;
      border: 1px solid rgba(0, 212, 255, 0.16) !important;
      color: #e9f7ff !important;
    }

    .panel-body .record-card strong {
      color: #0af0ff !important;
      font-weight: 700;
      display: block;
      margin-bottom: 6px;
    }

    .panel-body .record-card span {
      color: #b3d9f2 !important;
      font-size: 13px;
      display: block;
      margin-bottom: 4px;
    }

    .panel-body .notice {
      background: linear-gradient(180deg, rgba(10, 86, 162, 0.12), rgba(5, 56, 92, 0.08)) !important;
      border: 1px solid rgba(0, 212, 255, 0.16) !important;
      color: #b3d9f2 !important;
      font-size: 13px;
      line-height: 1.55;
    }

    .panel-body .kpi,
    .panel-body .kpis .kpi {
      background: linear-gradient(180deg, rgba(10, 50, 75, 0.4), rgba(5, 35, 55, 0.36)) !important;
      border: 1px solid rgba(0, 212, 255, 0.14) !important;
      color: #e9f7ff !important;
    }

    .panel-body .kpi .label,
    .panel-body .kpis .kpi .label {
      color: #7eb3d1 !important;
      text-transform: uppercase;
      font-weight: 600;
      font-size: 11px;
      letter-spacing: 0.5px;
    }

    .panel-body .kpi .value,
    .panel-body .kpis .kpi .value {
      color: #0af0ff !important;
      font-size: 24px;
      font-weight: 800;
      margin-top: 8px;
    }

    .panel-body .field-label {
      color: #7eb3d1 !important;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 700;
      display: block;
      margin-bottom: 6px;
    }

    .panel-body .input-field,
    .panel-body textarea.input-field,
    .panel-body select {
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98)) !important;
      border-color: rgba(0, 212, 255, 0.28) !important;
      color: #f2fbff !important;
      -webkit-text-fill-color: #f2fbff !important;
    }

    .panel-body .input-field::placeholder,
    .panel-body textarea.input-field::placeholder {
      color: #8bb2c8 !important;
      opacity: 1 !important;
    }

    .panel-body .input-field:focus,
    .panel-body textarea.input-field:focus,
    .panel-body select:focus {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.18) !important;
      outline: none !important;
    }

    .panel-body .btn {
      background: linear-gradient(135deg, #0d6bc4, #0a56a2) !important;
      border: 1px solid rgba(0, 212, 255, 0.24) !important;
      color: #0af0ff !important;
      font-weight: 700;
      transition: all 0.2s ease;
    }

    .panel-body .btn:hover {
      background: linear-gradient(135deg, #1080d8, #0d6bc4) !important;
      border-color: #00d4ff !important;
      box-shadow: 0 6px 14px rgba(0, 212, 255, 0.24) !important;
    }

    .panel-body .btn.danger {
      background: #c9143c !important;
      border: 1px solid rgba(220, 53, 69, 0.36) !important;
      color: #ffffff !important;
    }

    .panel-body .btn.danger:hover {
      background: #dc3545 !important;
      border-color: rgba(220, 53, 69, 0.56) !important;
      box-shadow: 0 6px 14px rgba(220, 53, 69, 0.24) !important;
    }

    .panel-body .button-row {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .panel-body .button-row .btn {
      flex: 1;
      min-width: 100px;
    }

    .panel-body .chart {
      background: linear-gradient(180deg, rgba(7, 30, 52, 0.96), rgba(7, 30, 52, 0.96)) !important;
      border: 1px solid rgba(53, 167, 184, 0.12) !important;
      color: #b3d9f2 !important;
    }

    .panel-body .chart-title {
      color: #0af0ff !important;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .panel-body .chart-legend {
      color: #7eb3d1 !important;
      font-size: 12px;
      margin-top: 10px;
    }

    .panel-body .scrollable-list,
    .panel-body .queue-scroll,
    .panel-body .subsidy-admin-list {
      max-height: 560px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .panel-body .scrollable-list::-webkit-scrollbar,
    .panel-body .queue-scroll::-webkit-scrollbar,
    .panel-body .subsidy-admin-list::-webkit-scrollbar {
      width: 8px;
    }

    .panel-body .scrollable-list::-webkit-scrollbar-track,
    .panel-body .queue-scroll::-webkit-scrollbar-track,
    .panel-body .subsidy-admin-list::-webkit-scrollbar-track {
      background: rgba(0, 212, 255, 0.08);
      border-radius: 4px;
    }

    .panel-body .scrollable-list::-webkit-scrollbar-thumb,
    .panel-body .queue-scroll::-webkit-scrollbar-thumb,
    .panel-body .subsidy-admin-list::-webkit-scrollbar-thumb {
      background: rgba(0, 212, 255, 0.34);
      border-radius: 4px;
    }

    .panel-body .scrollable-list::-webkit-scrollbar-thumb:hover,
    .panel-body .queue-scroll::-webkit-scrollbar-thumb:hover,
    .panel-body .subsidy-admin-list::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 212, 255, 0.54);
    }

    /* Register and subsidy page specific fixes */
    .admin-register-panel .panel-body,
    .admin-register-side-panel .panel-body {
      background: linear-gradient(180deg, rgba(8, 33, 56, 0.94), rgba(5, 24, 43, 0.95)) !important;
      color: #e9f7ff !important;
    }

    .admin-register-panel .record-card,
    .admin-register-side-panel .record-card {
      background: linear-gradient(180deg, rgba(10, 86, 162, 0.18), rgba(5, 56, 92, 0.14)) !important;
      border: 1px solid rgba(0, 212, 255, 0.16) !important;
      color: #e9f7ff !important;
    }

    .admin-register-panel .record-card strong,
    .admin-register-side-panel .record-card strong {
      color: #0af0ff !important;
    }

    .admin-register-panel .record-card span,
    .admin-register-side-panel .record-card span {
      color: #b3d9f2 !important;
    }

    /* Form grid and field styling */
    .panel-body .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .panel-body .form-grid.full {
      grid-column: 1 / -1;
    }

    .panel-body .field-group {
      display: grid;
      gap: 6px;
    }

    .panel-body .field-group.full {
      grid-column: 1 / -1;
    }

    /* AGGRESSIVE GLOBAL TEXT COLOR OVERRIDES - Override ALL white text */
    .panel-body,
    .panel-body * {
      color: #e9f7ff !important;
    }

    .panel-body td,
    .panel-body th,
    .panel-body tr {
      color: #e9f7ff !important;
    }

    .panel-body strong,
    .panel-body b {
      color: #0af0ff !important;
    }

    .panel-body span,
    .panel-body p,
    .panel-body div,
    .panel-body label,
    .panel-body h1,
    .panel-body h2,
    .panel-body h3,
    .panel-body h4,
    .panel-body h5,
    .panel-body h6 {
      color: #e9f7ff !important;
    }

    .panel-body table td:not(.action-cell) {
      color: #e9f7ff !important;
    }

    .panel-body table th {
      color: #0af0ff !important;
      background: rgba(10, 25, 47, 0.6) !important;
    }

    .panel-body .record-card,
    .panel-body .kpi-card {
      color: #e9f7ff !important;
    }

    .panel-body .record-card *,
    .panel-body .kpi-card * {
      color: inherit !important;
    }

    .panel-body .record-card strong,
    .panel-body .kpi-card strong {
      color: #0af0ff !important;
    }

    .panel-body .notice,
    .panel-body .alert,
    .panel-body .message {
      color: #b3d9f2 !important;
    }

    .panel-body a {
      color: #0af0ff !important;
    }

    .panel-body a:hover {
      color: #0fd0ff !important;
    }

    /* Ensure inline styles are overridden */
    [style*="color: #fff"],
    [style*="color:#fff"],
    [style*="color: white"],
    [style*="color:white"] {
      color: #e9f7ff !important;
    }

    [style*="color: #fff"] strong,
    [style*="color: #fff"] b,
    [style*="color: #fff"] .label-text {
      color: #0af0ff !important;
    }

    /* KPI card text overrides */
    .kpi-value {
      color: #00d4ff !important;
    }

    .kpi-label {
      color: #b3d9f2 !important;
    }

    /* Settings and forms */
    .admin-settings-form input[type="text"],
    .admin-settings-form input[type="email"],
    .admin-settings-form input[type="number"],
    .admin-settings-form input[type="password"],
    .admin-settings-form textarea,
    .admin-settings-form select {
      color: #f2fbff !important;
      background: rgba(10, 30, 43, 0.8) !important;
      border: 1px solid rgba(0, 212, 255, 0.3) !important;
    }

    .admin-settings-form input::placeholder,
    .admin-settings-form textarea::placeholder {
      color: rgba(233, 247, 255, 0.4) !important;
    }

    /* Buttons in panel body */
    .panel-body button,
    .panel-body .btn,
    .panel-body input[type="button"],
    .panel-body input[type="submit"] {
      color: #0af0ff !important;
      background: linear-gradient(135deg, rgba(10, 86, 162, 0.4), rgba(5, 56, 92, 0.5)) !important;
      border: 1px solid rgba(0, 212, 255, 0.4) !important;
    }

    .panel-body button:hover,
    .panel-body .btn:hover {
      background: linear-gradient(135deg, rgba(10, 112, 188, 0.6), rgba(8, 76, 122, 0.7)) !important;
      box-shadow: 0 0 12px rgba(0, 212, 255, 0.3) !important;
    }

    .panel-body button.danger,
    .panel-body .btn.danger {
      color: #fff !important;
      background: #c9143c !important;
    }

    /* List items */
    .panel-body li,
    .panel-body ul li,
    .panel-body ol li {
      color: #e9f7ff !important;
    }

    /* Scrollbar styling */
    .panel-body::-webkit-scrollbar {
      width: 10px;
    }

    .panel-body::-webkit-scrollbar-track {
      background: rgba(10, 30, 43, 0.5);
    }

    .panel-body::-webkit-scrollbar-thumb {
      background: rgba(0, 212, 255, 0.4);
      border-radius: 5px;
    }

    .panel-body::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 212, 255, 0.7);
    }

    /* ====== UNIVERSAL CONTENT CONTAINER OVERRIDES ====== */
    /* Ensure ALL content containers use correct colors */
    .record-list,
    .scrollable-list,
    .queue-scroll,
    .subsidy-admin-list {
      color: #e9f7ff !important;
    }

    .record-list *,
    .scrollable-list *,
    .queue-scroll *,
    .subsidy-admin-list * {
      color: #e9f7ff !important;
    }

    .record-list strong,
    .record-list b,
    .scrollable-list strong,
    .scrollable-list b,
    .queue-scroll strong,
    .queue-scroll b,
    .subsidy-admin-list strong,
    .subsidy-admin-list b {
      color: #0af0ff !important;
    }

    .record-list span,
    .scrollable-list span,
    .queue-scroll span,
    .subsidy-admin-list span {
      color: #b3d9f2 !important;
    }

    /* KPI and report cards */
    .kpis,
    .kpi,
    .kpi-card {
      color: #e9f7ff !important;
    }

    .kpi *,
    .kpi-card * {
      color: inherit !important;
    }

    .kpi .label,
    .kpi-card .label {
      color: #b3d9f2 !important;
    }

    .kpi .value,
    .kpi-card .value {
      color: #00d4ff !important;
    }

    /* Report chart styling */
    .chart-container,
    .chart-wrap {
      color: #e9f7ff !important;
    }

    .chart-container *,
    .chart-wrap * {
      color: #e9f7ff !important;
    }

    /* Form containers */
    form {
      color: #e9f7ff !important;
    }

    form * {
      color: #e9f7ff !important;
    }

    form strong,
    form b {
      color: #0af0ff !important;
    }

    form label {
      color: #b3d9f2 !important;
    }

    form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form input[type="number"],
    form textarea,
    form select {
      color: #f2fbff !important;
    }

    /* Panel content defaults - override any remaining white text */
    #primaryPanel,
    #secondaryPanel,
    #dashboardHero {
      color: #e9f7ff !important;
    }

    #primaryPanel *,
    #secondaryPanel *,
    #dashboardHero * {
      color: #e9f7ff !important;
    }

    #primaryPanel strong,
    #secondaryPanel strong,
    #dashboardHero strong,
    #primaryPanel b,
    #secondaryPanel b,
    #dashboardHero b {
      color: #0af0ff !important;
    }

    #primaryPanel td,
    #secondaryPanel td,
    #primaryPanel th,
    #secondaryPanel th {
      color: #e9f7ff !important;
    }

    /* Override any remaining white text from inline styles */
    .panel-body [style*="color: white"],
    .panel-body [style*="color:white"],
    .panel-body [style*="color: #fff"],
    .panel-body [style*="color:#fff"],
    .record-list [style*="color: white"],
    .record-list [style*="color: #fff"],
    .scrollable-list [style*="color: white"],
    .scrollable-list [style*="color: #fff"] {
      color: #e9f7ff !important;
    }

    /* Announcement form specific */
    #announcementForm label,
    #announcementForm .field-label {
      color: #b3d9f2 !important;
    }

    #announcementForm input,
    #announcementForm textarea {
      color: #f2fbff !important;
      background: rgba(10, 30, 43, 0.8) !important;
    }

    /* Quick actions and buttons */
    .quick-actions,
    .action-buttons,
    .button-row {
      color: #e9f7ff !important;
    }

    .quick-actions *,
    .action-buttons *,
    .button-row * {
      color: #e9f7ff !important;
    }

    .quick-actions button,
    .quick-actions .btn,
    .action-buttons button,
    .action-buttons .btn,
    .button-row button,
    .button-row .btn {
      color: #0af0ff !important;
      background: linear-gradient(135deg, rgba(10, 86, 162, 0.4), rgba(5, 56, 92, 0.5)) !important;
      border: 1px solid rgba(0, 212, 255, 0.4) !important;
    }

    .quick-actions button.danger,
    .action-buttons button.danger,
    .button-row button.danger {
      color: #fff !important;
      background: #c9143c !important;
    }

    /* ====== NUCLEAR OPTION: UNIVERSAL TEXT COLOR ENFORCEMENT ====== */
    /* Force ALL text in content areas to use correct colors */
    .content-grid,
    .content-grid * {
      color: #e9f7ff !important;
    }

    .content-grid strong,
    .content-grid b,
    .content-grid .strong {
      color: #0af0ff !important;
    }

    .content-grid label,
    .content-grid .label {
      color: #b3d9f2 !important;
    }

    .content-grid h1,
    .content-grid h2,
    .content-grid h3,
    .content-grid h4,
    .content-grid h5,
    .content-grid h6 {
      color: #0af0ff !important;
    }

    .content-grid p,
    .content-grid div,
    .content-grid span,
    .content-grid li,
    .content-grid td,
    .content-grid th {
      color: #e9f7ff !important;
    }

    /* Panel rendering overrides - target render function outputs */
    .panel-head,
    .panel-header {
      color: #0af0ff !important;
    }

    .panel-head *,
    .panel-header * {
      color: #0af0ff !important;
    }

    .notice,
    .alert,
    .info {
      color: #b3d9f2 !important;
    }

    .notice *,
    .alert *,
    .info * {
      color: #b3d9f2 !important;
    }

    /* All input and form elements */
    input,
    textarea,
    select,
    button,
    .btn,
    [type="button"],
    [type="submit"],
    [type="reset"] {
      color: #e9f7ff !important;
    }

    input::placeholder,
    textarea::placeholder {
      color: rgba(233, 247, 255, 0.5) !important;
    }

    /* Danger buttons stay red/white */
    .btn.danger,
    button.danger,
    .danger {
      color: #fff !important;
      background: #c9143c !important;
    }

    /* Override all instances of white text - use attribute selector */
    [style*="color: #fff"],
    [style*="color:#fff"],
    [style*="color: white"],
    [style*="color:white"],
    [style*="color: #ffffff"],
    [style*="color:#ffffff"] {
      color: #e9f7ff !important;
    }

    /* Helper classes that might be generated */
    .text-white,
    .white-text,
    .light-text {
      color: #e9f7ff !important;
    }

    .text-bright,
    .bright-text,
    .cyan-text {
      color: #0af0ff !important;
    }

    /* Ensure scrollable content is readable */
    .scrollable-list,
    .scrollable,
    [style*="overflow"]  {
      color: #e9f7ff !important;
    }

    .scrollable-list *,
    .scrollable *,
    [style*="overflow"] * {
      color: #e9f7ff !important;
    }

    /* Table styling - all cells */
    table {
      color: #e9f7ff !important;
    }

    table td,
    table th,
    table tr {
      color: #e9f7ff !important;
    }

    table thead th {
      color: #0af0ff !important;
      background: rgba(10, 25, 47, 0.6) !important;
    }

    table tbody td strong,
    table tbody td b {
      color: #0af0ff !important;
    }

    /* Dialog and modal text */
    .modal-overlay,
    .modal-card {
      color: #e9f7ff !important;
    }

    .modal-overlay *,
    .modal-card * {
      color: #e9f7ff !important;
    }

    .modal-overlay strong,
    .modal-card strong {
      color: #0af0ff !important;
    }

    /* Ensure field groups and form groups are readable */
    .field-group,
    .form-group {
      color: #e9f7ff !important;
    }

    .field-group *,
    .form-group * {
      color: #e9f7ff !important;
    }

    .field-group label,
    .form-group label {
      color: #b3d9f2 !important;
    }

    /* Final fallback: any element with class containing 'text' or 'label' */
    [class*="text"],
    [class*="label"],
    [class*="title"] {
      color: #e9f7ff !important;
    }

    [class*="text"] strong,
    [class*="label"] strong,
    [class*="title"] strong {
      color: #0af0ff !important;
    }

    /* Card styling - ensure consistency */
    .card,
    .record-card,
    .info-card,
    .data-card {
      color: #e9f7ff !important;
    }

    .card *,
    .record-card *,
    .info-card *,
    .data-card * {
      color: #e9f7ff !important;
    }

    .card strong,
    .record-card strong,
    .info-card strong,
    .data-card strong {
      color: #0af0ff !important;
    }

    .card span,
    .record-card span,
    .info-card span,
    .data-card span {
      color: #b3d9f2 !important;
    }

    .panel-body .field-group label {
      color: #7eb3d1 !important;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 700;
    }

    .panel-body .field-group textarea {
      resize: vertical;
      min-height: 100px;
      line-height: 1.5;
    }

    .panel-body .record-list {
      display: grid;
      gap: 10px;
    }

    .panel-body .record-list.scrollable-form {
      max-height: calc(100vh - 360px);
      overflow-y: auto;
      padding-right: 4px;
    }

    /* Admin-status-select styling */
    .panel-body .admin-status-select {
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98)) !important;
      border-color: rgba(0, 212, 255, 0.28) !important;
      color: #f2fbff !important;
      font-weight: 600;
      -webkit-text-fill-color: #f2fbff !important;
    }

    .panel-body .admin-status-select option {
      background-color: #021b2a !important;
      color: #f2fbff !important;
    }

    .panel-body .admin-status-select:focus {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.18) !important;
      outline: none !important;
    }

    /* Subsidy and reports specific styles */
    .admin-register-panel .form-grid,
    .admin-register-panel .record-list,
    .admin-register-side-panel .record-list {
      padding: 0 !important;
      background: transparent !important;
    }

    .admin-register-panel .input-field,
    .admin-register-panel select,
    .admin-register-panel .admin-status-select,
    .admin-register-side-panel .input-field {
      background: linear-gradient(180deg, rgba(9, 38, 64, 0.98), rgba(6, 28, 49, 0.98)) !important;
      border-color: rgba(0, 212, 255, 0.34) !important;
      color: #f2fbff !important;
      -webkit-text-fill-color: #f2fbff !important;
      box-shadow: 0 3px 8px rgba(0, 16, 34, 0.18) !important;
    }

    .admin-register-panel .input-field::placeholder,
    .admin-register-side-panel .input-field::placeholder {
      color: rgba(255, 255, 255, 0.6) !important;
    }

    .admin-register-panel .input-field:focus,
    .admin-register-panel select:focus,
    .admin-register-side-panel .input-field:focus {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 0 3px rgba(53, 167, 184, 0.18), 0 2px 8px rgba(0, 16, 34, 0.2) !important;
    }

    .form-kicker {
      border-color: rgba(47, 123, 149, 0.32) !important;
      background: rgba(88, 174, 202, 0.12) !important;
    }

    .neon-form .auth-title {
      background: linear-gradient(135deg, #1f4f63 0%, #2f7b95 100%) !important;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: none !important;
    }

    .neon-input,
    .input-field,
    .admin-status-select,
    .color-code-pill {
      color: var(--u-text) !important;
      background: linear-gradient(180deg, #ffffff, #f2f8fb) !important;
      border-color: var(--u-border) !important;
      box-shadow: 0 4px 12px rgba(18, 46, 58, 0.08) !important;
    }

    .neon-input:focus,
    .input-field:focus,
    .admin-status-select:focus {
      border-color: var(--u-water-2) !important;
      box-shadow: 0 0 0 4px var(--u-focus) !important;
      outline: none !important;
    }

    .password-toggle,
    .link-button,
    #logoutButton,
    .btn,
    .quick-action {
      color: var(--u-title) !important;
      border-color: var(--u-border-strong) !important;
      background: linear-gradient(180deg, #fbfdff, #edf4f7) !important;
    }

    .neon-login-btn,
    .btn.primary,
    .quick-action:hover,
    .portal-tab.active,
    .nav-badge {
      color: #ffffff !important;
      border-color: rgba(21, 67, 84, 0.36) !important;
      background: linear-gradient(135deg, var(--u-water-3) 0%, var(--u-water-2) 58%, var(--u-sand) 100%) !important;
      box-shadow: 0 10px 20px rgba(47, 123, 149, 0.22) !important;
    }

    .login-right-panel {
      background:
        linear-gradient(168deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
        linear-gradient(140deg, #2a6a82 0%, #3d8fab 52%, #67b7cf 100%) !important;
    }

    .welcome-card,
    .welcome-card h3,
    .welcome-card p,
    .welcome-kicker,
    .welcome-metrics span {
      color: #f4fbff !important;
    }

    .welcome-metrics span {
      border-color: rgba(255, 255, 255, 0.36) !important;
      background: rgba(255, 255, 255, 0.14) !important;
    }

    .app-shell .canvas {
      border: 1px solid var(--u-border) !important;
      background: linear-gradient(180deg, #f9fcfe, #edf4f8) !important;
      box-shadow: 0 24px 54px rgba(16, 44, 57, 0.14) !important;
    }

    .sidebar {
      border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
      background:
        radial-gradient(125% 82% at 0% 0%, rgba(88, 174, 202, 0.22), transparent 62%),
        linear-gradient(180deg, var(--u-water-1) 0%, #153f51 52%, #123646 100%) !important;
      color: var(--u-sidebar-text) !important;
    }

    .logo {
      color: #f1f9fd !important;
      border-color: rgba(217, 239, 248, 0.24) !important;
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(88, 174, 202, 0.16)) !important;
      box-shadow: 0 12px 24px rgba(3, 16, 24, 0.24) !important;
    }

    .title-small,
    .logo .system-tag {
      color: #c1deea !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .modal-card {
      border-color: var(--u-border) !important;
      background: linear-gradient(180deg, var(--u-panel), var(--u-panel-soft)) !important;
      color: var(--u-text) !important;
      box-shadow: 0 8px 18px rgba(16, 44, 57, 0.08) !important;
    }

    .panel,
    .modal-card {
      border-color: var(--u-border-strong) !important;
    }

    .panel-head {
      border-bottom-color: var(--u-border) !important;
      background: linear-gradient(90deg, rgba(88, 174, 202, 0.2), rgba(47, 123, 149, 0.1) 56%, rgba(217, 161, 91, 0.18) 100%) !important;
    }

    .section-title,
    .panel-head,
    .dashboard-hero h2,
    .record-card strong,
    .timeline-content strong,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    #logoutModalTitle,
    .modal-card h3 {
      color: var(--u-title) !important;
      text-shadow: none !important;
    }

    .record-card span,
    .timeline-content span,
    .helper-text,
    .field-help,
    .note,
    .profile-meta span,
    .breadcrumbs,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .portal-jump,
    .signup-line,
    .login-helper {
      color: var(--u-muted) !important;
    }

    .nav-item {
      border-color: rgba(210, 235, 246, 0.2) !important;
      background: linear-gradient(180deg, rgba(13, 50, 66, 0.92), rgba(10, 40, 53, 0.94)) !important;
      color: #dff2fa !important;
      box-shadow: 0 6px 12px rgba(3, 13, 20, 0.26) !important;
    }

    .nav-item:hover {
      border-color: rgba(217, 161, 91, 0.44) !important;
      background: linear-gradient(180deg, rgba(18, 63, 82, 0.94), rgba(13, 49, 65, 0.96)) !important;
    }

    .nav-item.active {
      border-color: rgba(88, 174, 202, 0.68) !important;
      background: linear-gradient(90deg, rgba(88, 174, 202, 0.34), rgba(47, 123, 149, 0.3)) !important;
      color: #ffffff !important;
      box-shadow: 0 10px 20px rgba(47, 123, 149, 0.28) !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      border-color: rgba(47, 123, 149, 0.28) !important;
      background: rgba(88, 174, 202, 0.16) !important;
      color: #214f63 !important;
      text-shadow: none !important;
    }

    .status-badge::before {
      background: #4ba5b8 !important;
      box-shadow: none !important;
    }

    .modal-overlay {
      background: rgba(13, 34, 44, 0.38) !important;
      -webkit-backdrop-filter: blur(3px);
      backdrop-filter: blur(3px);
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder {
      color: #758f9b !important;
      opacity: 1;
    }

    /* Revert theme: Neon Dark Blue (forced final) */
    :root {
      --revert-neon-1: #00d4ff;
      --revert-neon-2: #2a7fff;
      --revert-bg-1: #03192e;
      --revert-bg-2: #021325;
      --revert-bg-3: #010c1d;
      --revert-surface-1: rgba(8, 33, 56, 0.94);
      --revert-surface-2: rgba(5, 24, 43, 0.95);
      --revert-border: rgba(0, 200, 255, 0.24);
      --revert-border-strong: rgba(0, 216, 255, 0.56);
      --revert-text: #e9f7ff;
      --revert-muted: #9dc7df;
    }

    body {
      color: var(--revert-text) !important;
      background:
        radial-gradient(1000px 560px at -12% -14%, rgba(0, 170, 255, 0.24) 0%, rgba(0, 170, 255, 0) 60%),
        radial-gradient(880px 500px at 112% -10%, rgba(18, 112, 255, 0.2) 0%, rgba(18, 112, 255, 0) 62%),
        linear-gradient(180deg, var(--revert-bg-1) 0%, var(--revert-bg-2) 52%, var(--revert-bg-3) 100%) !important;
    }

    .app-shell .canvas {
      border: 1px solid rgba(0, 205, 255, 0.26) !important;
      background: linear-gradient(180deg, rgba(4, 24, 43, 0.95), rgba(2, 18, 34, 0.96)) !important;
      box-shadow: 0 30px 90px rgba(0, 8, 22, 0.58) !important;
    }

    .sidebar {
      border-right: 1px solid var(--revert-border) !important;
      background:
        radial-gradient(120% 80% at 0% 0%, rgba(0, 212, 255, 0.16), transparent 62%),
        linear-gradient(180deg, #041d34 0%, #03172c 100%) !important;
      color: #eaf9ff !important;
    }

    .logo {
      border-color: rgba(0, 212, 255, 0.28) !important;
      background: linear-gradient(145deg, rgba(0, 212, 255, 0.14), rgba(42, 127, 255, 0.1)) !important;
      box-shadow: 0 18px 36px rgba(0, 12, 28, 0.46) !important;
      color: #eaf9ff !important;
    }

    .title-small,
    .logo .system-tag,
    .profile-meta span,
    .breadcrumbs,
    .helper-text,
    .note,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .record-card span,
    .timeline-content span,
    .portal-jump,
    .signup-line,
    .login-helper,
    .field-help {
      color: var(--revert-muted) !important;
    }

    .topbar,
    .breadcrumbs,
    .search,
    .profile,
    .panel,
    .record-card,
    .table-row,
    .notice,
    .timeline-content,
    .hero-metric,
    .kpi,
    .activity-card,
    .input-field,
    .admin-status-select,
    .color-code-pill,
    .modal-card {
      border-color: rgba(0, 200, 255, 0.2) !important;
      background: linear-gradient(180deg, var(--revert-surface-1), var(--revert-surface-2)) !important;
      color: #d9f2ff !important;
      box-shadow: 0 10px 26px rgba(0, 8, 24, 0.42) !important;
    }

    .panel-head,
    .section-title,
    .dashboard-hero h2,
    .record-card strong,
    .timeline-content strong,
    .kpi .value,
    .activity-card .large-value,
    .profile-meta strong,
    .auth-title,
    .system-title,
    #logoutModalTitle,
    .modal-card h3 {
      color: #ecfbff !important;
      text-shadow: none !important;
    }

    .neon-form .auth-title,
    .neon-form .auth-title.system-title {
      background: none !important;
      -webkit-background-clip: border-box !important;
      background-clip: border-box !important;
      -webkit-text-fill-color: #ecfbff !important;
      color: #ecfbff !important;
      text-shadow: none !important;
    }

    .panel-head {
      border-bottom-color: rgba(0, 200, 255, 0.2) !important;
      background: linear-gradient(90deg, rgba(0, 212, 255, 0.16), transparent) !important;
    }

    .nav-item {
      border-color: rgba(0, 208, 255, 0.22) !important;
      background: linear-gradient(180deg, rgba(7, 34, 58, 0.9), rgba(5, 27, 47, 0.95)) !important;
      color: #d8f1ff !important;
      box-shadow: 0 8px 18px rgba(0, 8, 22, 0.42) !important;
    }

    .nav-item:hover {
      border-color: rgba(32, 220, 255, 0.5) !important;
      background: linear-gradient(180deg, rgba(10, 47, 78, 0.95), rgba(6, 35, 60, 0.96)) !important;
    }

    .nav-item.active {
      border-color: rgba(0, 216, 255, 0.58) !important;
      color: #ffffff !important;
      background: linear-gradient(90deg, rgba(0, 212, 255, 0.24), rgba(42, 127, 255, 0.14)) !important;
      box-shadow: 0 10px 20px rgba(0, 170, 255, 0.24) !important;
    }

    .btn,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .password-toggle {
      color: #dff5ff !important;
      border-color: rgba(0, 212, 255, 0.28) !important;
      background: linear-gradient(180deg, rgba(8, 43, 71, 0.96), rgba(6, 31, 54, 0.96)) !important;
    }

    .btn:hover,
    .quick-action:hover,
    .link-button:hover,
    #logoutButton:hover,
    .password-toggle:hover {
      border-color: rgba(32, 220, 255, 0.56) !important;
      background: linear-gradient(180deg, rgba(10, 58, 93, 0.98), rgba(8, 42, 71, 0.98)) !important;
    }

    .btn.primary,
    .portal-tab.active,
    .neon-login-btn,
    .nav-badge {
      border-color: rgba(145, 236, 255, 0.82) !important;
      color: #ffffff !important;
      background: linear-gradient(135deg, #2c6aa2 0%, #1e4d73 100%) !important;
      box-shadow: 0 6px 20px rgba(44, 106, 162, 0.3) !important;
    }

    .input-field,
    .admin-status-select,
    .neon-input,
    .color-code-pill {
      color: #eaf7ff !important;
      border-color: rgba(53, 167, 184, 0.28) !important;
      background: transparent !important;
    }

    .admin-register-panel .input-field,
    .admin-register-panel select,
    .admin-register-panel textarea,
    .admin-register-panel .neon-input {
      color: #ecfbff !important;
      -webkit-text-fill-color: #ecfbff !important;
      border-color: rgba(53, 167, 184, 0.34) !important;
      background: transparent !important;
      box-shadow: none !important;
    }

    .admin-register-panel .input-field::placeholder,
    .admin-register-panel textarea.input-field::placeholder {
      color: rgba(217, 242, 255, 0.62) !important;
      opacity: 1 !important;
    }

    .admin-register-panel .input-field:focus,
    .admin-register-panel select:focus,
    .admin-register-panel textarea:focus,
    .admin-register-panel .neon-input:focus {
      border-color: #35a7b8 !important;
      box-shadow: 0 0 0 4px rgba(53, 167, 184, 0.18) !important;
      outline: none !important;
    }

    .admin-register-panel .input-field:-webkit-autofill,
    .admin-register-panel .input-field:-webkit-autofill:hover,
    .admin-register-panel .input-field:-webkit-autofill:focus,
    .admin-register-panel .neon-input:-webkit-autofill,
    .admin-register-panel .neon-input:-webkit-autofill:hover,
    .admin-register-panel .neon-input:-webkit-autofill:focus {
      -webkit-text-fill-color: #ecfbff !important;
      -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
      box-shadow: 0 0 0 1000px transparent inset !important;
      caret-color: #ecfbff !important;
      transition: background-color 9999s ease-out 0s;
    }

    .input-field:focus,
    .admin-status-select:focus,
    .neon-input:focus,
    .btn:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible {
      border-color: #24dcff !important;
      box-shadow: 0 0 0 4px rgba(36, 220, 255, 0.18) !important;
      outline: none !important;
    }

    .status-badge,
    .status-badge.badge-success,
    .status-badge.badge-warning,
    .status-badge.badge-danger,
    .status-badge.badge-muted {
      color: #dbf4ff !important;
      background: rgba(0, 175, 255, 0.16) !important;
      border: 1px solid rgba(0, 212, 255, 0.24) !important;
    }

    .status-badge::before {
      background: #8de9ff !important;
      box-shadow: none !important;
    }

    .login-wireframe {
      background:
        radial-gradient(110% 95% at 6% 6%, rgba(0, 212, 255, 0.24), transparent 62%),
        radial-gradient(105% 90% at 98% 4%, rgba(42, 127, 255, 0.28), transparent 62%),
        linear-gradient(150deg, #031d35 0%, #03182e 58%, #021325 100%) !important;
      border: 2px solid rgba(0, 220, 255, 0.74) !important;
      box-shadow: 0 0 24px rgba(0, 210, 255, 0.34), 0 0 70px rgba(0, 114, 255, 0.22) !important;
    }

    .login-right-panel {
      background:
        linear-gradient(170deg, rgba(3, 24, 44, 0.18), rgba(3, 24, 44, 0.08)),
        linear-gradient(140deg, #0d8ec7 0%, #0f6ad0 52%, #03d2ff 100%) !important;
    }

    .modal-overlay {
      background: rgba(4, 16, 30, 0.46) !important;
      -webkit-backdrop-filter: blur(3px);
      backdrop-filter: blur(3px);
    }

    /* Neon dark blue consistency lock (final) */
    :root {
      --bg: #03192e !important;
      --panel: rgba(8, 33, 56, 0.94) !important;
      --ink: #e9f7ff !important;
      --muted: #9dc7df !important;
      --line: rgba(0, 200, 255, 0.24) !important;
      --line-strong: rgba(0, 216, 255, 0.56) !important;
      --brand-1: #00d4ff !important;
      --brand-2: #2a7fff !important;
      --brand-soft: rgba(0, 212, 255, 0.16) !important;
      --brand-glow: rgba(0, 212, 255, 0.24) !important;
    }

    .app-shell,
    .main,
    .dashboard-hero,
    .quick-actions,
    .content-grid,
    .table-wrap,
    .panel-body,
    .record-list,
    .view-enter,
    .portal-view,
    .breadcrumbs .crumb,
    .breadcrumbs .sep,
    .breadcrumbs .crumb.current,
    .field-label,
    .neon-label,
    .admin-table-row > span,
    .table-row strong,
    .search *,
    .profile *,
    .notice *,
    .timeline-content *,
    .record-card *,
    .kpi *,
    .hero-metric *,
    .activity-card *,
    .section-title,
    .login-left-panel,
    .login-left-panel *,
    .modal-card,
    .modal-card * {
      color: #dff5ff !important;
    }

    .table-row strong,
    .admin-table-row > span,
    .admin-status-select {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff;
      font-weight: 700;
    }

    .section-title,
    .panel-head,
    .dashboard-hero h2,
    .record-card strong,
    .timeline-content strong,
    .kpi .value,
    .hero-metric .metric-value,
    .activity-card .large-value,
    .profile-meta strong,
    .auth-title,
    .system-title,
    #logoutModalTitle,
    .modal-card h3 {
      color: #ecfbff !important;
    }

    .input-field::placeholder,
    .neon-input::placeholder,
    textarea.input-field::placeholder,
    .field-help,
    .helper-text,
    .note,
    .profile-meta span,
    .kpi .label,
    .hero-metric .metric-label,
    .activity-card .small-label,
    .record-card span,
    .timeline-content span,
    .title-small,
    .logo .system-tag,
    .breadcrumbs,
    .signup-line,
    .portal-jump,
    .login-helper {
      color: #9dc7df !important;
    }

    select,
    select option,
    select optgroup {
      background: rgba(6, 28, 49, 0.98) !important;
      color: #eaf7ff !important;
    }

    .sidebar .title-small,
    .sidebar .logo .system-tag,
    .sidebar .nav-item,
    .sidebar .nav-item * {
      color: #dff2fa !important;
    }

    .admin-register-panel .input-field,
    .admin-register-panel .neon-input,
    .admin-register-panel textarea.input-field,
    .admin-register-panel select.input-field {
      background: linear-gradient(180deg, rgba(12, 44, 60, 0.96), rgba(8, 32, 44, 0.98)) !important;
      box-shadow: inset 0 0 0 1px rgba(95, 176, 190, 0.22) !important;
      -webkit-appearance: none;
      appearance: none;
      color: #ecfbff !important;
      -webkit-text-fill-color: #ecfbff !important;
    }

    .admin-register-panel .input-field::-webkit-calendar-picker-indicator {
      filter: invert(1) brightness(1.2);
      opacity: 0.9;
    }

    .admin-register-panel select.input-field {
      color-scheme: dark;
    }

    input:not([type="color"]):-webkit-autofill,
    input:not([type="color"]):-webkit-autofill:hover,
    input:not([type="color"]):-webkit-autofill:focus,
    textarea:-webkit-autofill,
    textarea:-webkit-autofill:hover,
    textarea:-webkit-autofill:focus,
    select:-webkit-autofill,
    select:-webkit-autofill:hover,
    select:-webkit-autofill:focus {
      -webkit-text-fill-color: #eaf7ff !important;
      transition: background-color 9999s ease-out 0s !important;
      -webkit-box-shadow: 0 0 0 1000px rgba(8, 32, 44, 0.98) inset !important;
              box-shadow: 0 0 0 1000px rgba(8, 32, 44, 0.98) inset !important;
    }

    /* Final interaction override: smooth clicks and suppress bright default flashes */
    button,
    .btn,
    .login-btn,
    .nav-item,
    .quick-action,
    .portal-tab,
    .link-button,
    #logoutButton,
    .notification-btn,
    .theme-toggle,
    .post-action-btn,
    .action-icon-btn,
    .post-submit-btn,
    .comment-submit-btn,
    .modal-buttons button {
      -webkit-appearance: none !important;
      appearance: none !important;
      -webkit-tap-highlight-color: transparent !important;
      background-clip: padding-box !important;
      backface-visibility: hidden;
      will-change: transform, background-color, border-color, box-shadow, filter;
      transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease !important;
    }

    .btn:hover {
      background: linear-gradient(180deg, rgba(13, 64, 100, 0.98), rgba(7, 28, 48, 0.98));
      color: #ecfbff;
      border-color: rgba(53, 167, 184, 0.3);
      box-shadow: 0 8px 18px rgba(22, 35, 48, 0.14);
      transform: translateY(-1px);
      filter: none;
    }

    .btn.primary:hover {
      background: linear-gradient(135deg, #3a78b5, #2a5fa0);
      color: #ffffff;
      box-shadow: 0 12px 28px rgba(30, 79, 128, 0.36);
      transform: translateY(-1px);
    }

    .login-btn:hover,
    .nav-item:hover,
    .quick-action:hover,
    .portal-tab:hover,
    .link-button:hover,
    #logoutButton:hover,
    .notification-btn:hover,
    .theme-toggle:hover,
    .post-action-btn:hover,
    .action-icon-btn:hover,
    .post-submit-btn:hover,
    .comment-submit-btn:hover,
    .modal-buttons button:hover {
      transform: translateY(-1px);
      filter: brightness(1.03);
    }

    button:active,
    .btn:active,
    .login-btn:active,
    .nav-item:active,
    .quick-action:active,
    .portal-tab:active,
    .link-button:active,
    #logoutButton:active,
    .notification-btn:active,
    .theme-toggle:active,
    .post-action-btn:active,
    .action-icon-btn:active,
    .post-submit-btn:active,
    .comment-submit-btn:active,
    .modal-buttons button:active {
      transform: translateY(1px) scale(0.99);
      box-shadow: none !important;
      filter: none !important;
    }

    button:focus:not(:focus-visible),
    .btn:focus:not(:focus-visible),
    .login-btn:focus:not(:focus-visible),
    .nav-item:focus:not(:focus-visible),
    .quick-action:focus:not(:focus-visible),
    .portal-tab:focus:not(:focus-visible),
    .link-button:focus:not(:focus-visible),
    #logoutButton:focus:not(:focus-visible),
    .notification-btn:focus:not(:focus-visible),
    .theme-toggle:focus:not(:focus-visible),
    .post-action-btn:focus:not(:focus-visible),
    .action-icon-btn:focus:not(:focus-visible),
    .post-submit-btn:focus:not(:focus-visible),
    .comment-submit-btn:focus:not(:focus-visible),
    .modal-buttons button:focus:not(:focus-visible) {
      outline: none !important;
      box-shadow: none !important;
    }

    button:focus-visible,
    .btn:focus-visible,
    .login-btn:focus-visible,
    .nav-item:focus-visible,
    .quick-action:focus-visible,
    .portal-tab:focus-visible,
    .link-button:focus-visible,
    #logoutButton:focus-visible,
    .notification-btn:focus-visible,
    .theme-toggle:focus-visible,
    .post-action-btn:focus-visible,
    .action-icon-btn:focus-visible,
    .post-submit-btn:focus-visible,
    .comment-submit-btn:focus-visible,
    .modal-buttons button:focus-visible {
      outline: 2px solid rgba(36, 220, 255, 0.24) !important;
      outline-offset: 2px;
    }

/* Restore white text globally as requested */
    .app-shell,
    .app-shell *,
    .panel,
    .panel *,
    .content-grid,
    .content-grid *,
    .dashboard-hero,
    .dashboard-hero *,
    .quick-actions,
    .quick-actions *,
    .kpis,
    .kpis *,
    .record-card,
    .record-card *,
    .timeline-content,
    .timeline-content *,
    .table-row,
    .table-row *,
    .admin-table-row,
    .admin-table-row *,
    .section-title,
    .breadcrumbs,
    .breadcrumbs *,
    .note,
    .field-label,
    .field-group,
    .field-group *,
    .panel-head,
    .panel-head *,
    .panel-body,
    .panel-body *,
    .hero-metric,
    .hero-metric *,
    .activity-card,
    .activity-card *,
    .profile,
    .profile *,
    .search,
    .search *,
    .sidebar,
    .sidebar * {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
      text-shadow: none !important;
    }

    .app-shell .panel-head,
    .app-shell .section-title,
    .app-shell .dashboard-hero h2,
    .app-shell .record-card strong,
    .app-shell .timeline-content strong,
    .app-shell .kpi .value,
    .app-shell .hero-metric .metric-value,
    .app-shell .activity-card .large-value,
    .app-shell .profile-meta strong,
    .app-shell .modal-card h3,
    .app-shell #logoutModalTitle {
      color: #ffffff !important;
    }

    .app-shell .note,
    .app-shell .breadcrumbs,
    .app-shell .breadcrumbs .crumb,
    .app-shell .breadcrumbs .sep,
    .app-shell .breadcrumbs .crumb.current,
    .app-shell .kpi .label,
    .app-shell .hero-metric .metric-label,
    .app-shell .activity-card .small-label,
    .app-shell .record-card span,
    .app-shell .timeline-content span,
    .app-shell .profile-meta span,
    .app-shell .title-small,
    .app-shell .logo .system-tag,
    .app-shell .signup-line,
    .app-shell .portal-jump,
    .app-shell .login-helper,
    .app-shell .field-help,
    .app-shell .helper-text {
      color: #ffffff !important;
    }

    /* ID card elements: keep original dark colors for white card background */
    .id-card-redesign .id-label-redesign {
      color: #111 !important;
      -webkit-text-fill-color: #111 !important;
    }

    .id-card-redesign .id-value-text {
      color: #111 !important;
      -webkit-text-fill-color: #111 !important;
    }

    .id-card-redesign .id-photo-redesign {
      color: #666 !important;
      -webkit-text-fill-color: #666 !important;
    }

    .id-card-redesign .id-signature-redesign {
      color: #111 !important;
      -webkit-text-fill-color: #111 !important;
    }

    .id-card-header-redesign {
      color: #fff !important;
      -webkit-text-fill-color: #fff !important;
    }


/* Specific override for visible panel headers within the light layout */
.admin-register-panel .panel-head *, 
.admin-register-side-panel .panel-head *, 
.admin-table-panel .panel-head * {
  color: #2c6aa2 !important;
  -webkit-text-fill-color: #2c6aa2 !important;
}
/* Table styling for settings view */
.settings-table-wrap {
  max-height: 300px;
  overflow-y: auto !important;
  background: rgba(0, 18, 34, 0.4) !important;
  border: 1px solid rgba(0, 212, 255, 0.1) !important;
  border-radius: 8px;
}

.settings-table-wrap table tbody tr {
  background: #001a33 !important;
}

.settings-table-wrap table tbody tr:hover {
  background: #001a4d !important;
  color: #fff !important;
}

