/* ═══════════════════════════════════════════════════
   BIS Estimator — Main Stylesheet
   Brand: CorpBiz / Deep Navy + Gold accent
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --navy:     #1a2e5a;
  --navy-mid: #243a73;
  --navy-lt:  #e8edf8;
  --gold:     #f0a500;
  --gold-lt:  #fff8e6;
  --green:    #22c55e;
  --red:      #ef4444;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --white:    #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(26,46,90,.12);
  --shadow-lg: 0 8px 32px rgba(26,46,90,.18);
  --radius:    12px;
  --radius-sm: 8px;
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Desktop zoom: 75% on all desktop browsers, NOT on mobile/tablet/iOS/Android ── */
@media screen and (min-width: 1024px) and (min-height: 600px) {
  /* Exclude touch devices (iOS, Android, tablets) using pointer: coarse */
  @media (pointer: fine) {
    html {
      zoom: 0.75;
    }
  }
}

/* ── Chrome desktop: render at 75% so it doesn't look oversized at 100% zoom ── */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 1024px) {
  html {
    zoom: 0.75;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--navy-mid); border-radius: 3px; }

/* ════════════════════ HEADER ════════════════════ */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.3px;
}
.logo span { color: var(--gold); }
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255,255,255,.75);
  font-size: .875rem;
}
.header-right strong { color: var(--white); }
.header-phone {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  font-size: .9rem;
}

/* ── Logo / Header responsive ── */
.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;          /* allows flex children to shrink */
  overflow: hidden;
}
.header-logo-img {
  height: 56px;          /* fits inside 80px header with breathing room */
  max-height: calc(100% - 16px); /* never taller than header minus padding */
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.header-logo-label {
  font-size: .95rem;
  font-weight: 600;
  opacity: .8;
  letter-spacing: .3px;
  white-space: nowrap;
  color: #fff;
}

/* Tablet (768px) */
@media (max-width: 768px) {
  .header-logo-img   { height: 38px; padding: 2px 6px; }
  .header-logo-label { font-size: .78rem; }
}

/* Mobile (640px) */
@media (max-width: 640px) {
  .header-logo-img   { height: 32px; padding: 2px 5px; }
  .header-logo-label { display: none; }   /* hide "BIS Estimator" text, keep logo */
}

/* Very small (400px) */
@media (max-width: 400px) {
  .header-logo-img { height: 28px; padding: 2px 4px; border-radius: 4px; }
}

/* Chrome DevTools narrow viewport / inspect mode */
@media (max-width: 320px) {
  .header-logo-img { height: 24px; padding: 1px 3px; }
}


/* ════════════════════ STEPPER ════════════════════ */
.stepper-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: .75rem 1rem;
  overflow-x: auto;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 720px;
  max-width: 1100px;
  margin: 0 auto;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  cursor: pointer;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after { background: var(--navy); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .82rem;
  z-index: 1;
  transition: var(--transition);
  border: 2px solid transparent;
}
.step-item.active .step-circle {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(26,46,90,.15);
}
.step-item.done .step-circle {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.step-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 5px;
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--navy); }
.step-item.done .step-label  { color: var(--green); }

/* ════════════════════ MAIN CONTENT ════════════════════ */
.main-content {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.25rem 4rem;
}

/* ════════════════════ CARD ════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .25rem;
}
.card-subtitle {
  font-size: .875rem;
  color: var(--gray-600);
  margin-bottom: 1.75rem;
}

/* ════════════════════ FORM ELEMENTS ════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-grid.col-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .4px;
}
label .req { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,46,90,.1);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem; }

/* ════════════════════ SEARCH BAR ════════════════════ */
.search-bar-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}
.search-bar-wrap .search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
}
.search-bar-wrap input {
  padding-left: 2.6rem;
  padding-right: 4.5rem;
  font-size: 1rem;
  height: 52px;
  border-radius: 10px;
}
.search-go-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background var(--transition), transform .1s;
  z-index: 10;
}
.search-go-btn:hover { background: var(--navy-mid); }
.search-go-btn:active { transform: translateY(-50%) scale(.96); }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--navy-lt);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: .5rem .85rem;
  cursor: pointer;
  font-size: .8rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
  line-height: 1.35;
}
.autocomplete-item b { color: var(--navy); font-weight: 700; }
.autocomplete-item:hover { background: var(--navy-lt); color: var(--navy); }
.autocomplete-item:last-child { border-bottom: none; }

/* ════════════════════ RESULTS TABLE ════════════════════ */
.results-header {
  margin-bottom: .5rem;
}
.results-count {
  font-size: .82rem;
  color: var(--gray-600);
  padding: .5rem 0;
}
.results-table-wrap {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  max-height: 320px;
  overflow-y: auto;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.results-table thead { position: sticky; top: 0; z-index: 5; }
.results-table th {
  background: var(--gray-50);
  color: var(--gray-600);
  padding: .6rem .5rem;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 2px solid var(--gray-200);
}
.results-table td {
  padding: .55rem .5rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}
.results-table .td-isno { font-weight:700;color:var(--primary-dark); }
.results-table .td-title { }
.results-table .td-committee { font-size:.72rem;color:var(--gray-500); }
.results-table tr:last-child td { border-bottom: none; }
.results-table tr.result-row { cursor: pointer; transition: background .15s; }
.results-table tr.result-row:hover td { background: #f0f7ff; }
.results-table tr.selected td { background: var(--gold-lt); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-active { background:#ecfdf5;color:#059669;font-size:.7rem;padding:2px 8px;border-radius:20px;font-weight:600; }
.badge-withdrawn { background:#fef2f2;color:#dc2626;font-size:.7rem;padding:2px 8px;border-radius:20px; }

/* ════════════════════ DETAIL PANEL ════════════════════ */
.detail-panel {
  background: var(--navy-lt);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--navy);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .75rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .6rem;
}
.detail-kv { display: flex; flex-direction: column; gap: 2px; }
.detail-kv .dk { font-size: .72rem; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.detail-kv .dv { font-size: .875rem; color: var(--navy); font-weight: 500; }

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--navy);
}
.stat-chip span { color: var(--gold); font-weight: 800; }

/* ════════════════════ LOCATION TOGGLE ════════════════════ */
.toggle-group {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.toggle-option {
  flex: 1;
  padding: .65rem;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: .875rem;
  color: var(--gray-600);
  transition: var(--transition);
  user-select: none;
}
.toggle-option:first-child { border-right: 1px solid var(--gray-200); }
.toggle-option.active {
  background: var(--navy);
  color: var(--white);
}

/* ════════════════════ RADIO / CHECK CARDS ════════════════════ */
.option-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.option-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.option-card:hover { border-color: var(--navy); background: var(--navy-lt); }
.option-card.selected { border-color: var(--navy); background: var(--navy-lt); }
.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 10px;
  color: var(--navy);
  font-weight: 800;
}
.option-card h4 { font-size: .9rem; font-weight: 700; color: var(--navy); margin-bottom: .2rem; }
.option-card p  { font-size: .78rem; color: var(--gray-600); }

/* ════════════════════ SCHEME CARDS ════════════════════ */
.scheme-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.scheme-card:hover { border-color: var(--navy); }
.scheme-card.selected { border-color: var(--gold); background: var(--gold-lt); }
.scheme-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: .35rem; }
.scheme-card p  { font-size: .82rem; color: var(--gray-600); line-height: 1.5; }
.scheme-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: .6rem;
}
.scheme-card.selected .scheme-badge { background: var(--gold); color: var(--navy); }

/* ════════════════════ LAB CARDS ════════════════════ */
.lab-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.lab-card:hover { border-color: var(--navy); }
.lab-card.selected { border-color: var(--navy); background: var(--navy-lt); }
.lab-card.recommended { border-color: var(--gold); }
.lab-card .rec-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: .4rem;
  display: inline-block;
}
.lab-card h4 { font-size: .9rem; font-weight: 700; color: var(--navy); }
.lab-card .lab-meta { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }
.lab-card .lab-fee { font-size: .95rem; font-weight: 700; color: var(--green); margin-top: .4rem; }

/* ════════════════════ QUOTE TABLE ════════════════════ */
.quote-table { width: 100%; border-collapse: collapse; }
.quote-table td { padding: .65rem .5rem; font-size: .9rem; }
.quote-table td:last-child { text-align: right; font-weight: 600; }
.quote-table tr.subtotal { border-top: 1.5px solid var(--gray-200); }
.quote-table tr.total td {
  border-top: 2.5px solid var(--navy);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
}
.quote-table .label-cell { color: var(--gray-600); }

/* ════════════════════ DOCS CHECKLIST ════════════════════ */
.doc-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.doc-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.doc-item .doc-icon {
  width: 32px; height: 32px;
  background: var(--navy-lt);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-size: 1rem;
  flex-shrink: 0;
}
.doc-item h5 { font-size: .875rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.doc-item p  { font-size: .78rem; color: var(--gray-600); }

/* ════════════════════ BUTTONS ════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-mid); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-success {
  background: var(--green);
  color: var(--white);
}
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* ════════════════════ PREVIEW DRAWER ════════════════════ */
.preview-btn {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-2px);
  background: linear-gradient(180deg,#1a3a6e,#2a5298);
  color: var(--white);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: translateY(-50%) rotate(180deg);
  padding: 1rem .6rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  z-index: 300;
  transition: var(--transition);
  box-shadow: 2px 2px 10px rgba(26,46,90,.2);
}
.preview-btn:hover { background: linear-gradient(180deg,#2a4a7e,#3a62a8); }

.preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 400;
}
.preview-overlay.open { display: block; }

.preview-drawer {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 380px;
  background: linear-gradient(180deg,#e8f0fc,#dce8f8 50%,#eaf1fb);
  z-index: 500;
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 4px 0 24px rgba(26,46,90,.15);
}
.preview-drawer.open { transform: translateX(0); }

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid var(--gray-200);
}
.preview-header h2 { font-size: 1rem; font-weight: 800; color: var(--navy); }
.close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.close-btn:hover { background: var(--gray-200); }

.preview-section {
  margin-bottom: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.preview-section-header {
  background: var(--navy-lt);
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-section-header h3 { font-size: .82rem; font-weight: 700; color: var(--navy); }
.preview-section-body { padding: .75rem 1rem; }
.preview-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .82rem;
}
.preview-field:last-child { border-bottom: none; }
.preview-field .pf-key { color: var(--gray-600); font-weight: 500; }
.preview-field .pf-val { color: var(--gray-800); font-weight: 600; text-align: right; }
.preview-field input {
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: .82rem;
  width: 130px;
  text-align: right;
}

/* ════════════════════ INFO BOX ════════════════════ */
.info-box {
  display: flex;
  gap: .75rem;
  background: var(--navy-lt);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .875rem;
  color: var(--navy);
}
.info-box .info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ════════════════════ LOADING / SPINNER ════════════════════ */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 1.5rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
  z-index: 600;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.loading-overlay.show { display: flex; }
.loading-overlay p { color: var(--navy); font-weight: 600; }

/* ════════════════════ SUCCESS SCREEN ════════════════════ */
.success-screen {
  text-align: center;
  padding: 3rem 2rem;
}
.success-icon {
  width: 80px; height: 80px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}
.success-screen h2 { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-bottom: .5rem; }
.success-screen p  { color: var(--gray-600); font-size: .95rem; max-width: 420px; margin: 0 auto 2rem; }
.order-id-box {
  background: var(--navy-lt);
  border-radius: var(--radius-sm);
  padding: .75rem 1.5rem;
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

/* ════════════════════ MISC ════════════════════ */
.text-navy { color: var(--navy); }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.sep { border: none; border-top: 1.5px solid var(--gray-200); margin: 1.5rem 0; }
.hidden { display: none !important; }

/* ════════════════════ RESPONSIVE — ALL DEVICES ════════════════════ */

/* ── Viewport fix for iOS Safari tap delay + bounce ── */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
input, select, textarea, button { font-size: 16px; } /* prevent iOS zoom on focus */

/* ── TABLET LANDSCAPE & SMALL DESKTOP (max 1024px) ── */
@media (max-width: 1024px) {
  .main-content { max-width: 720px; }
  .card { padding: 1.75rem 1.75rem; }
  .sel-prod-card { flex-direction: column; }
  .sel-prod-actions { flex-direction: row; align-items: center; }
  .lab-modal { max-width: 580px; }
}

/* ── TABLET PORTRAIT (max 768px) ── */
@media (max-width: 768px) {
  .site-header { padding: 0 1rem; height: 56px; }
  .logo { font-size: 1.05rem; }
  .header-right { gap: .75rem; font-size: .78rem; }
  .header-right span:nth-child(1) { display: none; } /* hide "Self-Checkout Platform" */
  .header-right span:nth-child(2) { display: none; } /* hide separator */

  .main-content { max-width: 100%; margin: .75rem auto; padding: 0 .75rem 3rem; }
  .card { padding: 1.25rem 1rem; border-radius: 10px; }
  .card-title { font-size: 1.15rem; }
  .card-subtitle { font-size: .82rem; margin-bottom: 1.25rem; }

  .form-grid { grid-template-columns: 1fr; gap: 1rem; }
  .form-actions { flex-direction: column-reverse; gap: .5rem; }
  .form-actions .btn { width: 100%; justify-content: center; }

  .toggle-group { flex-wrap: wrap; }
  .toggle-option { flex: 1 1 48%; font-size: .8rem; padding: .55rem; }

  .option-cards { grid-template-columns: 1fr 1fr; }

  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-panel { padding: 1rem; }
  .detail-panel h3 { font-size: .92rem; }

  .results-table-wrap { max-height: 260px; }
  .results-table td { font-size: .75rem; padding: .45rem .35rem; }
  .results-table th { font-size: .68rem; padding: .5rem .35rem; }

  .quote-table td { padding: .5rem .35rem; font-size: .82rem; }

  .preview-drawer { width: 100%; }
  .preview-btn { padding: .75rem .45rem; font-size: .72rem; }

  .lab-modal { width: 96%; max-height: 88vh; }

  /* Scale buttons for fee display */
  .card > div[style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  .card > div[style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── MOBILE (max 640px) — iPhone, Android phones ── */
@media (max-width: 640px) {
  .site-header { padding: 0 .75rem; height: 52px; }
  .logo { font-size: .95rem; }
  .header-phone { font-size: .8rem; }

  .stepper-wrap { padding: .5rem .5rem; }
  .stepper { min-width: 580px; }
  .step-circle { width: 30px; height: 30px; font-size: .72rem; }
  .step-label { font-size: .58rem; }

  .main-content { margin: .5rem auto; padding: 0 .5rem 3rem; }
  .card { padding: 1rem .85rem; margin-bottom: 1rem; }
  .card-title { font-size: 1.05rem; }
  .card-subtitle { font-size: .78rem; margin-bottom: 1rem; }

  .form-grid { grid-template-columns: 1fr; gap: .85rem; }
  label { font-size: .72rem; }
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
    padding: .6rem .75rem;
    font-size: .88rem;
  }

  .search-bar-wrap input { height: 48px; font-size: .9rem; padding-right: 4rem; }
  .search-go-btn { padding: 7px 14px; font-size: .8rem; }

  .toggle-group { border-radius: 6px; }
  .toggle-option { font-size: .75rem; padding: .5rem .3rem; flex: 1 1 48%; }

  .option-cards { grid-template-columns: 1fr; }

  .btn { padding: .6rem 1rem; font-size: .85rem; }
  .btn-lg { padding: .7rem 1.5rem; font-size: .9rem; }

  .sel-prod-card { flex-direction: column; padding: 14px; gap: 10px; }
  .sel-prod-actions { flex-direction: row; justify-content: flex-start; }
  .sel-prod-title { font-size: .92rem; }

  .detail-grid { grid-template-columns: 1fr; gap: .5rem; }
  .detail-panel { padding: .85rem; }
  .stat-chips { gap: .35rem; }
  .stat-chip { font-size: .7rem; padding: 2px 8px; }

  .lab-card { padding: .85rem 1rem; }
  .lab-card h4 { font-size: .82rem; }
  .lab-card .lab-meta { font-size: .72rem; }
  .lab-card .lab-fee { font-size: .85rem; }

  .results-table-wrap { max-height: 220px; overflow-x: auto; }
  .results-table { min-width: 600px; }
  .results-table td { font-size: .72rem; }

  .quote-table td { font-size: .78rem; padding: .45rem .3rem; }

  .fee-breakdown-table td, .fee-breakdown-table th { padding: 6px 7px; font-size: .75rem; }

  .doc-item { padding: .6rem; font-size: .82rem; }
  .doc-item .doc-icon { width: 28px; height: 28px; font-size: .9rem; }

  .preview-drawer { width: 100%; }

  .lab-modal { width: 98%; max-height: 90vh; border-radius: 10px; }
  .lab-modal-header { padding: .85rem 1rem; }
  .lab-modal-body { padding: 1rem; }

  .info-box { font-size: .8rem; padding: .75rem; }

  .success-screen { padding: 2rem 1rem; }
  .success-screen h2 { font-size: 1.3rem; }
  .success-icon { width: 64px; height: 64px; font-size: 2rem; }

  .engagement-box { font-size: .78rem; max-height: 200px; padding: .75rem; }

  .consent-check-wide { font-size: .8rem; }
  .consent-check-wide input[type="checkbox"] { width: 16px; height: 16px; }
}

/* ── SMALL MOBILE (max 400px) — iPhone SE, small Androids ── */
@media (max-width: 400px) {
  .site-header { height: 48px; }
  .logo { font-size: .85rem; }
  .header-phone { font-size: .72rem; }

  .stepper { min-width: 520px; }
  .step-circle { width: 26px; height: 26px; font-size: .65rem; }
  .step-label { font-size: .52rem; }

  .card { padding: .85rem .7rem; }
  .card-title { font-size: .95rem; }

  .btn { padding: .55rem .85rem; font-size: .8rem; }

  .search-bar-wrap input { height: 44px; font-size: .85rem; }
  .search-go-btn { padding: 6px 10px; font-size: .75rem; }

  .toggle-option { font-size: .68rem; padding: .4rem .25rem; }

  .quote-table td { font-size: .72rem; }
  .fee-breakdown-table td { font-size: .7rem; padding: 5px 5px; }
}

/* ── LANDSCAPE PHONE ── */
@media (max-height: 450px) and (orientation: landscape) {
  .site-header { height: 44px; }
  .stepper-wrap { padding: .35rem .5rem; }
  .main-content { margin: .5rem auto; }
  .card { padding: 1rem; }
  .lab-modal { max-height: 95vh; }
}

/* ── SAFE AREA for notched phones (iPhone X+) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-header { padding-left: max(.75rem, env(safe-area-inset-left)); padding-right: max(.75rem, env(safe-area-inset-right)); }
  .main-content { padding-left: max(.5rem, env(safe-area-inset-left)); padding-right: max(.5rem, env(safe-area-inset-right)); }
  .form-actions { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── PRINT ── */
@media print {
  .site-header, .stepper-wrap, .preview-btn, .form-actions, .loading-overlay { display: none !important; }
  .main-content { max-width: 100%; margin: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* ════════════════════ LAB DETAIL MODAL ════════════════════ */
.lab-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}
.lab-modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 660px;
  width: 92%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lab-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1.5px solid var(--gray-200);
  background: var(--navy-lt);
  border-radius: var(--radius) var(--radius) 0 0;
}
.lab-modal-header h3 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.lab-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.lab-modal-body .detail-kv { padding: .4rem 0; }
.lab-modal-body .detail-kv.full { grid-column: 1 / -1; }
.lab-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: .85rem 1.25rem;
  border-top: 1.5px solid var(--gray-200);
}

/* ════════════════════ TIMELINE ════════════════════ */
.timeline-list { display: flex; flex-direction: column; gap: 0; padding-left: .5rem; }
.tl-item { display: flex; gap: .75rem; position: relative; padding-bottom: 1.25rem; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--gray-200); }
.tl-item.tl-done:not(:last-child)::before { background: var(--green); }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--gray-300); flex-shrink: 0; margin-top: 3px; }
.tl-item.tl-done .tl-dot { background: var(--green); }
.tl-content h5 { font-size: .9rem; font-weight: 600; color: var(--navy); margin: 0 0 2px; }
.tl-content p { font-size: .8rem; color: var(--gray-600); margin: 0; }
.tl-days { font-size: .78rem; font-weight: 600; color: var(--primary); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.4); } 50% { box-shadow: 0 0 0 6px rgba(37,99,235,0); } }

/* ════════════════════ DOCUMENT CHECKLIST ════════════════════ */
.doc-checklist { display: flex; flex-direction: column; gap: .4rem; }
.doc-check-item { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; color: var(--gray-700); cursor: pointer; padding: .35rem .5rem; border-radius: 6px; transition: background .15s; }
.doc-check-item:hover { background: var(--gray-50); }
.doc-check-item input[type="checkbox"] { margin-top: 2px; accent-color: var(--green); }

/* ════════════════════ CHECKOUT SUMMARY ════════════════════ */
.co-summary { border: 1.5px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.co-row { display: flex; justify-content: space-between; padding: .5rem .85rem; font-size: .85rem; border-bottom: 1px solid var(--gray-100); }
.co-row span { color: var(--gray-600); }
.co-row strong { color: var(--navy); }
.co-row.co-total { background: var(--navy-lt); border-bottom: none; }
.co-row.co-total span, .co-row.co-total strong { font-size: .95rem; }

/* ════════════════════ CONSENT CHECKBOXES ════════════════════ */
.consent-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .82rem; color: var(--gray-700); cursor: pointer; line-height: 1.5; }
.consent-check input[type="checkbox"] { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }

/* ════════════════════ ASPECT FILTER ACTIVE ════════════════════ */
.aspect-filter .btn.btn-sm { font-size: .78rem; padding: .3rem .7rem; }

/* ════════════════════ BUTTON GOLD ════════════════════ */
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: none; }
.btn-gold:hover { background: linear-gradient(135deg, #d97706, #b45309); }

/* ════════════════════ BUTTON SUCCESS ════════════════════ */
.btn-success { background: var(--green); color: #fff; border: none; }
.btn-success:hover { background: #059669; }
.btn-success:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }

/* inline grid responsive handled in main responsive block above */

/* ════════════════════ SCHEME TAGS (ISI/CRS) ════════════════════ */
.scheme-tag { display: inline-block; font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; vertical-align: middle; margin-left: 4px; letter-spacing: .5px; }
.scheme-tag.isi { background: #dbeafe; color: #1e40af; }
.scheme-tag.crs { background: #fef3c7; color: #92400e; }

/* ════════════════════ ENGAGEMENT BOX ════════════════════ */
.engagement-box { border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 1rem; max-height: 280px; overflow-y: auto; font-size: .82rem; color: var(--gray-700); background: var(--gray-50); line-height: 1.65; }
.engagement-box p { margin: .4rem 0; }

/* ════════════════════ CONSENT SECTION (FULL WIDTH) ════════════════════ */
.consent-section { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.25rem; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 1.25rem; }
.consent-check-wide { display: flex; align-items: flex-start; gap: .65rem; font-size: .88rem; color: var(--gray-700); cursor: pointer; line-height: 1.55; }
.consent-check-wide input[type="checkbox"] { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }

/* ════════════════════ CHECKOUT HEADINGS ════════════════════ */
.checkout-heading { font-size: .95rem; color: var(--navy); margin-bottom: .5rem; font-weight: 600; padding-bottom: .35rem; border-bottom: 1.5px solid var(--gray-100); }

/* Simplified Procedure tag */
.scheme-tag.sp { background: #d1fae5; color: #065f46; }

/* === V2 Search Tags & Aspect Badges === */
.tag {
  display:inline-block;padding:4px 12px;border-radius:20px;font-size:.75rem;font-weight:600;
  cursor:pointer;border:1.5px solid var(--gray-300);background:#fff;color:var(--gray-600);
  transition:all .15s;user-select:none;
}
.tag:hover { border-color:var(--primary);color:var(--primary); }
.tag.sel { background:var(--primary);color:#fff;border-color:var(--primary); }

.aspect-badge {
  display:inline-block;padding:3px 8px;border-radius:4px;font-size:.65rem;font-weight:700;
  letter-spacing:.3px;white-space:nowrap;
}
.aspect-badge.spec { background:#dbeafe;color:#1e40af; }
.aspect-badge.standard { background:#e0e7ff;color:#3730a3; }
.aspect-badge.method { background:#fef3c7;color:#92400e; }
.aspect-badge.safety { background:#fce7f3;color:#9d174d; }
.aspect-badge.cop { background:#d1fae5;color:#065f46; }
.aspect-badge.term { background:#ede9fe;color:#5b21b6; }
.aspect-badge.other { background:var(--gray-100);color:var(--gray-600); }

.result-row.withdrawn { opacity:.5; }

.search-go-btn { min-width:90px; }

/* === Selected Product Card (v2 style) === */
.sel-prod-card {
  display:flex;justify-content:space-between;gap:16px;
  border:2px solid var(--primary);border-radius:12px;
  padding:20px;margin-top:12px;background:#f8faff;
}
.sel-prod-main { flex:1;min-width:0; }
.sel-prod-title { font-size:1.05rem;font-weight:700;color:var(--primary-dark);margin:0 0 8px; }
.sel-prod-meta { font-size:.82rem;color:var(--gray-600);margin-bottom:4px; }
.sel-prod-meta strong { color:var(--gray-700); }
.sel-prod-meta span { margin-right:16px; }
.sel-prod-chips { display:flex;flex-wrap:wrap;gap:8px;margin-top:10px; }
.sel-chip { font-size:.76rem;padding:3px 10px;background:#fff;border:1px solid var(--gray-200);border-radius:6px;color:var(--gray-600); }
.sel-prod-download { display:inline-block;margin-top:10px;font-size:.82rem;color:var(--primary);font-weight:600;text-decoration:none; }
.sel-prod-download:hover { text-decoration:underline; }
.sel-prod-actions { display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0; }

.scheme-badge {
  display:inline-block;padding:4px 14px;border-radius:6px;font-size:.8rem;font-weight:700;
  letter-spacing:.5px;
}
.scheme-badge.isi { background:#dbeafe;color:#1e40af; }
.scheme-badge.crs { background:#fef3c7;color:#92400e; }
.scheme-badge.sp { background:#d1fae5;color:#065f46; }

.btn-danger { background:#ef4444;color:#fff;border:none; }
.btn-danger:hover { background:#dc2626; }

/* === Fee Breakdown Table === */
.fee-breakdown-table { width:100%;border-collapse:collapse;font-size:.82rem; }
.fee-breakdown-table th { background:var(--gray-50);padding:8px 10px;text-align:left;font-size:.72rem;text-transform:uppercase;color:var(--gray-500);border-bottom:2px solid var(--gray-200); }
.fee-breakdown-table td { padding:8px 10px;border-bottom:1px solid var(--gray-100); }
.fee-breakdown-table tfoot td { padding:8px 10px; }
.fee-breakdown-table tfoot tr:first-child td { border-top:2px solid var(--gray-300); }
.govt-fee-table { border:1px solid var(--gray-200);border-radius:8px;overflow:hidden;margin-bottom:.75rem; }

/* === Quote Table Sections === */
.quote-table thead th { background:var(--gray-50);font-size:.72rem;text-transform:uppercase;color:var(--gray-500);padding:8px 12px; }
.quote-table .section-header td { background:var(--gray-50);padding:6px 12px;font-size:.82rem; }

/* ═══════════════════════════════════════════════════
   ENHANCED UI — Global Animations & Shared Components
═══════════════════════════════════════════════════ */
@keyframes eFadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes eBadgeGlow { 0%,100% { box-shadow:0 0 8px rgba(240,165,0,.2); } 50% { box-shadow:0 0 16px rgba(240,165,0,.4); } }
@keyframes eShimmer { 0% { background-position:-200% center; } 100% { background-position:200% center; } }

.e-card { position:relative; animation:eFadeUp .45s ease-out both; }

/* Step header banner — reusable across all steps */
.e-step-banner {
  border-radius:12px; overflow:hidden; margin-bottom:1.5rem;
}
.e-step-banner-top {
  background:linear-gradient(135deg, #0f1d3d 0%, #1a2e5a 40%, #2d4a8c 80%, #3b5da8 100%);
  padding:1.4rem 1.6rem; display:flex; justify-content:space-between; align-items:center;
  position:relative; overflow:hidden;
}
.e-step-banner-top::before {
  content:''; position:absolute; top:-50%; right:-15%; width:260px; height:260px;
  background:radial-gradient(circle, rgba(240,165,0,.1) 0%, transparent 70%);
  border-radius:50%; pointer-events:none;
}
.e-step-banner-top::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--gold), #fbbf24, var(--gold));
}
.e-banner-title { font-size:.58rem; text-transform:uppercase; letter-spacing:2.5px; color:rgba(255,255,255,.4); font-weight:600; margin-bottom:3px; }
.e-banner-h2 { margin:0; font-size:1.2rem; font-weight:800; color:#fff; line-height:1.3; }
.e-banner-badge {
  background:linear-gradient(135deg, rgba(240,165,0,.18), rgba(251,191,36,.12));
  border:1.5px solid rgba(240,165,0,.45); padding:.35rem 1rem; border-radius:8px;
  font-size:.82rem; font-weight:700; color:#fbbf24; letter-spacing:.4px;
  animation:eBadgeGlow 3s ease-in-out infinite; white-space:nowrap;
}
.e-banner-meta {
  padding:1rem 1.6rem; display:grid; grid-template-columns:1fr 1fr;
  gap:.4rem .7rem; font-size:.8rem; color:var(--gray-600);
  background:linear-gradient(180deg, #f0f3f9, #f8fafc); border-bottom:1px solid var(--gray-200);
}
.e-meta-label { color:var(--gray-400); font-size:.68rem; text-transform:uppercase; letter-spacing:.5px; font-weight:600; }
.e-meta-val { font-weight:700; color:var(--navy); }

/* Step number pill on card */
.e-step-num {
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.25rem .8rem; border-radius:6px; font-size:.7rem; font-weight:700;
  letter-spacing:.5px; text-transform:uppercase; margin-bottom:.6rem;
}
.e-step-num.blue { background:#dbeafe; color:#1e40af; }
.e-step-num.green { background:#d1fae5; color:#065f46; }
.e-step-num.amber { background:#fef3c7; color:#92400e; }
.e-step-num.purple { background:#ede9fe; color:#5b21b6; }
.e-step-num.navy { background:var(--navy-lt); color:var(--navy); }

/* Enhanced card title */
.e-card-title {
  font-size:1.15rem; font-weight:800; color:var(--navy); margin-bottom:.3rem;
  letter-spacing:-.2px; line-height:1.3;
}
.e-card-subtitle {
  font-size:.85rem; color:var(--gray-600); margin-bottom:1.2rem; line-height:1.5;
}

/* Info cards grid */
.e-info-cards { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.5rem; }
.e-info-card {
  border:1.5px solid var(--gray-200); border-radius:12px; overflow:hidden;
  background:#fff; transition:border-color .2s, box-shadow .2s;
}
.e-info-card:hover { border-color:var(--navy-lt); box-shadow:0 4px 14px rgba(26,46,90,.07); }
.e-info-card-hdr {
  padding:.5rem 1rem; font-size:.66rem; text-transform:uppercase; letter-spacing:1.2px;
  font-weight:700; display:flex; align-items:center; gap:.45rem;
}
.e-info-card-hdr.blue { background:linear-gradient(135deg,#eff6ff,#dbeafe); color:#1e40af; border-bottom:2px solid #93c5fd; }
.e-info-card-hdr.green { background:linear-gradient(135deg,#ecfdf5,#d1fae5); color:#065f46; border-bottom:2px solid #6ee7b7; }
.e-info-card-hdr.amber { background:linear-gradient(135deg,#fffbeb,#fef3c7); color:#92400e; border-bottom:2px solid #fcd34d; }
.e-info-card-hdr.purple { background:linear-gradient(135deg,#f5f3ff,#ede9fe); color:#5b21b6; border-bottom:2px solid #c4b5fd; }
.e-info-card-body { padding:.9rem 1rem; }

/* Section divider heading */
.e-section-heading {
  display:flex; align-items:center; gap:.55rem; margin:1.3rem 0 .8rem;
}
.e-section-heading .bar { width:4px; height:22px; border-radius:2px; background:linear-gradient(180deg, var(--navy), #3b5da8); }
.e-section-heading h4 { font-size:1rem; color:var(--navy); margin:0; font-weight:800; letter-spacing:-.2px; }

/* Enhanced form elements */
.e-form-group label {
  font-size:.78rem; font-weight:600; color:var(--gray-600); text-transform:uppercase;
  letter-spacing:.3px; margin-bottom:6px; display:block;
}
.e-form-group input, .e-form-group select, .e-form-group textarea {
  transition:border-color .2s, box-shadow .2s;
}
.e-form-group input:focus, .e-form-group select:focus, .e-form-group textarea:focus {
  border-color:var(--navy) !important; box-shadow:0 0 0 3px rgba(26,46,90,.08) !important; outline:none;
}

/* Enhanced toggle buttons */
.e-toggle-group { display:grid; gap:.5rem; }
.e-toggle-option {
  text-align:center; padding:.7rem .5rem; border:1.5px solid var(--gray-200);
  border-radius:10px; cursor:pointer; transition:all .2s; background:#fff;
}
.e-toggle-option:hover { border-color:var(--navy-lt); background:#f8fafc; }
.e-toggle-option.active {
  border-color:var(--navy); background:var(--navy); color:#fff;
  box-shadow:0 2px 8px rgba(26,46,90,.2);
}

/* Enhanced info box */
.e-info-box {
  display:flex; gap:.6rem; align-items:flex-start;
  padding:.85rem 1.1rem; border-radius:10px; font-size:.82rem; line-height:1.5;
  margin-top:.75rem; position:relative; overflow:hidden;
}
.e-info-box::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:4px; border-radius:4px 0 0 4px;
}
.e-info-box.blue { background:#eff6ff; border:1px solid #93c5fd; color:#1e40af; }
.e-info-box.blue::before { background:#3b82f6; }
.e-info-box.green { background:#ecfdf5; border:1px solid #86efac; color:#065f46; }
.e-info-box.green::before { background:#22c55e; }
.e-info-box.amber { background:#fffbeb; border:1px solid #fcd34d; color:#92400e; }
.e-info-box.amber::before { background:#f59e0b; }
.e-info-box.purple { background:#f5f3ff; border:1px solid #c4b5fd; color:#5b21b6; }
.e-info-box.purple::before { background:#8b5cf6; }

/* Enhanced buttons */
.e-btn-primary {
  padding:.7rem 1.8rem; border:none; border-radius:10px; font-weight:700; font-size:.9rem;
  cursor:pointer; transition:all .2s; letter-spacing:.2px;
  background:linear-gradient(135deg, var(--navy), var(--navy-mid));
  color:#fff; box-shadow:0 3px 10px rgba(26,46,90,.2);
}
.e-btn-primary:hover { box-shadow:0 5px 16px rgba(26,46,90,.3); transform:translateY(-1px); }
.e-btn-gold {
  padding:.7rem 1.8rem; border:none; border-radius:10px; font-weight:800; font-size:.92rem;
  cursor:pointer; transition:all .2s; letter-spacing:.3px;
  background:linear-gradient(135deg, #f59e0b, #d97706); color:#fff;
  box-shadow:0 3px 12px rgba(245,158,11,.3);
}
.e-btn-gold:hover { background:linear-gradient(135deg,#d97706,#b45309); box-shadow:0 5px 18px rgba(245,158,11,.4); transform:translateY(-1px); }
.e-btn-outline {
  padding:.65rem 1.4rem; border:1.5px solid var(--navy); border-radius:10px;
  font-weight:700; font-size:.88rem; cursor:pointer; transition:all .2s;
  background:transparent; color:var(--navy);
}
.e-btn-outline:hover { background:var(--navy); color:#fff; box-shadow:0 3px 10px rgba(26,46,90,.2); }
.e-btn-success {
  padding:.7rem 1.8rem; border:none; border-radius:10px; font-weight:800; font-size:.92rem;
  cursor:pointer; transition:all .2s;
  background:linear-gradient(135deg, #16a34a, #15803d); color:#fff;
  box-shadow:0 3px 12px rgba(22,163,74,.3);
}
.e-btn-success:hover { box-shadow:0 5px 18px rgba(22,163,74,.4); transform:translateY(-1px); }

/* Form actions row */
.e-form-actions {
  display:flex; justify-content:space-between; align-items:center;
  margin-top:1.5rem; gap:1rem; padding-top:1rem; border-top:1px solid var(--gray-100);
}

/* Enhanced fee table */
.e-fee-container { border:1.5px solid var(--gray-200); border-radius:12px; overflow:hidden; margin-bottom:1rem; box-shadow:0 2px 8px rgba(0,0,0,.04); }
.e-fee-table { width:100%; border-collapse:collapse; }
.e-fee-table thead th {
  background:linear-gradient(135deg, var(--navy), var(--navy-mid));
  color:rgba(255,255,255,.85); font-size:.68rem; text-transform:uppercase;
  letter-spacing:1px; padding:.65rem 1rem; font-weight:600;
}
.e-fee-table thead th:last-child { text-align:right; }
.e-fee-table .section-row td {
  background:linear-gradient(135deg, #f0f3f9, #e8edf8);
  padding:.45rem 1rem; font-size:.78rem; font-weight:700; color:var(--navy);
  border-bottom:1px solid var(--gray-200);
}
.e-fee-table .section-row td .ico {
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; background:var(--navy); color:#fff;
  border-radius:5px; font-size:.6rem; margin-right:.45rem; vertical-align:middle;
}
.e-fee-table td { padding:.55rem 1rem; font-size:.85rem; border-bottom:1px solid var(--gray-100); color:var(--gray-600); }
.e-fee-table td:last-child { text-align:right; font-weight:600; color:var(--gray-800); white-space:nowrap; }
.e-fee-table tr:hover td { background:rgba(26,46,90,.015); }
.e-fee-table .subtotal-row td { background:#f8fafc; font-weight:700; padding-left:1.4rem; border-top:1.5px solid var(--gray-200); color:var(--navy); }
.e-fee-table .gst-row td { background:#fffbeb; font-size:.8rem; color:#92400e; }

/* Grand total bar */
.e-grand-footer {
  background:linear-gradient(135deg, #0f1d3d, #1a2e5a 50%, #2d4a8c);
  display:flex; justify-content:space-between; align-items:center;
  padding:.9rem 1.2rem; position:relative; overflow:hidden;
}
.e-grand-footer::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(90deg, var(--gold), #fbbf24, var(--gold)); }
.e-grand-label { font-size:.72rem; text-transform:uppercase; letter-spacing:2px; color:rgba(255,255,255,.55); font-weight:600; }
.e-grand-label strong { display:block; font-size:1rem; color:#fff; letter-spacing:0; margin-top:2px; }
.e-grand-amount { font-size:1.4rem; font-weight:800; color:#fbbf24; text-shadow:0 2px 6px rgba(240,165,0,.25); transition:transform .2s; }

/* Notes panel */
.e-notes { background:linear-gradient(135deg,#f0f4ff,#eef2ff); border:1.5px solid #c7d2fe; border-radius:12px; padding:1rem 1.2rem; margin-top:1.2rem; position:relative; overflow:hidden; }
.e-notes::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:linear-gradient(180deg,#6366f1,#818cf8); border-radius:4px 0 0 4px; }
.e-notes ul { list-style:none; padding:0; margin:.4rem 0 0; }
.e-notes li { position:relative; padding:.25rem 0 .25rem 1.1rem; font-size:.78rem; color:#374151; line-height:1.5; }
.e-notes li::before { content:''; position:absolute; left:0; top:.58rem; width:5px; height:5px; background:var(--navy); border-radius:50%; }

/* Pill tags */
.e-pill { display:inline-block; padding:2px 8px; border-radius:4px; font-size:.72rem; font-weight:600; }
.e-pill.navy { background:var(--navy-lt); color:var(--navy); }
.e-pill.green { background:#d1fae5; color:#065f46; }
.e-pill.amber { background:#fef3c7; color:#92400e; }

/* Enhanced doc checklist */
.e-doc-item {
  display:flex; align-items:flex-start; gap:.6rem; padding:.55rem .8rem;
  border:1px solid var(--gray-100); border-radius:8px; margin-bottom:.4rem;
  transition:all .2s; cursor:pointer; background:#fff;
}
.e-doc-item:hover { border-color:var(--navy-lt); background:#f8fafc; }
.e-doc-item input[type=checkbox] { margin-top:3px; accent-color:var(--navy); width:16px; height:16px; cursor:pointer; }
.e-doc-item .doc-name { font-size:.85rem; font-weight:600; color:var(--gray-800); }
.e-doc-item .doc-remark { font-size:.72rem; color:var(--gray-400); margin-top:2px; }

/* Timeline */
.e-timeline { position:relative; padding-left:1.5rem; }
.e-timeline::before { content:''; position:absolute; left:.45rem; top:.5rem; bottom:.5rem; width:2px; background:linear-gradient(180deg, var(--navy-lt), var(--navy), var(--navy-lt)); border-radius:1px; }
.e-tl-item { position:relative; padding-bottom:1rem; }
.e-tl-item:last-child { padding-bottom:0; }
.e-tl-dot {
  position:absolute; left:-1.5rem; top:.15rem; width:12px; height:12px;
  border-radius:50%; border:2.5px solid var(--navy); background:#fff;
  transition:all .2s;
}
.e-tl-item:hover .e-tl-dot { background:var(--navy); box-shadow:0 0 0 3px rgba(26,46,90,.15); }
.e-tl-title { font-size:.88rem; font-weight:700; color:var(--navy); margin-bottom:2px; }
.e-tl-desc { font-size:.78rem; color:var(--gray-500); }
.e-tl-days { display:inline-block; padding:1px 6px; background:var(--navy-lt); border-radius:4px; font-size:.68rem; font-weight:700; color:var(--navy); margin-top:3px; }

/* Engagement box */
.e-engagement-box {
  max-height:300px; overflow-y:auto; border:1.5px solid var(--gray-200); border-radius:10px;
  padding:1.2rem; font-size:.85rem; line-height:1.7; background:#fff;
  margin-bottom:1rem;
}
.e-engagement-box p { margin-bottom:.5rem; }

/* Consent items */
.e-consent { display:flex; align-items:flex-start; gap:.6rem; padding:.6rem .85rem; border:1.5px solid var(--gray-200); border-radius:8px; margin-bottom:.5rem; transition:all .2s; cursor:pointer; }
.e-consent:hover { border-color:var(--navy-lt); background:#f8fafc; }
.e-consent input[type=checkbox] { margin-top:3px; width:17px; height:17px; accent-color:var(--navy); cursor:pointer; flex-shrink:0; }
.e-consent span { font-size:.84rem; color:var(--gray-600); line-height:1.4; }

/* Success screen */
.e-success { text-align:center; padding:2rem 1rem; }
.e-success-icon { font-size:3.5rem; margin-bottom:.5rem; animation:eFadeUp .4s ease-out; }
.e-success h2 { font-size:1.5rem; font-weight:800; color:var(--navy); margin-bottom:.5rem; }
.e-success p { font-size:.9rem; color:var(--gray-600); max-width:500px; margin:.3rem auto; line-height:1.5; }
.e-order-id {
  display:inline-block; padding:.5rem 1.5rem; margin:1rem 0;
  background:var(--navy-lt); border:1.5px solid var(--navy); border-radius:8px;
  font-size:1rem; font-weight:800; color:var(--navy); letter-spacing:.5px;
}

/* Responsive */
@media (max-width:640px) {
  .e-info-cards { grid-template-columns:1fr; }
  .e-step-banner-top { flex-direction:column; gap:.6rem; align-items:flex-start; padding:1rem; }
  .e-banner-meta { grid-template-columns:1fr; padding:.7rem 1rem; }
  .e-form-actions { flex-direction:column-reverse; }
  .e-grand-amount { font-size:1.15rem; }
}

/* ════════════════════════════════════════════════════════════════
   AUTH / LOGIN PAGE
   ════════════════════════════════════════════════════════════════ */
.auth-tab {
  flex:1; padding:.65rem 1rem; border:none; background:transparent; cursor:pointer;
  font-weight:600; font-size:.9rem; color:var(--gray-400); transition:all .2s;
  border-bottom:3px solid transparent;
}
.auth-tab.active {
  color:var(--navy); border-bottom-color:var(--navy);
}
.auth-tab:hover { color:var(--navy-mid); }

/* ════════════════════════════════════════════════════════════════
   USER MENU (top-right header)
   ════════════════════════════════════════════════════════════════ */
.user-menu-wrap { position:relative; }
.user-menu-btn {
  display:flex; align-items:center; gap:.45rem;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
  padding:.35rem .85rem .35rem .45rem; border-radius:8px; color:#fff;
  font-size:.85rem; font-weight:600; cursor:pointer; transition:all .2s;
}
.user-menu-btn:hover { background:rgba(255,255,255,.18); }
.user-avatar {
  width:28px; height:28px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-weight:800; font-size:.8rem;
  background:linear-gradient(135deg, var(--gold), #d97706); color:#fff;
}
.user-dropdown {
  position:absolute; top:calc(100% + 6px); right:0; min-width:220px;
  background:#fff; border:1.5px solid var(--gray-200); border-radius:10px;
  box-shadow:0 8px 32px rgba(0,0,0,.15); z-index:200; overflow:hidden;
}
.user-dropdown.hidden { display:none; }
.ud-email {
  padding:.65rem 1rem; font-size:.78rem; color:var(--gray-400);
  border-bottom:1px solid var(--gray-100); background:var(--gray-50);
}
.user-dropdown button {
  display:block; width:100%; text-align:left; padding:.6rem 1rem;
  border:none; background:transparent; cursor:pointer;
  font-size:.85rem; color:var(--gray-800); transition:all .15s;
}
.user-dropdown button:hover {
  background:var(--navy-lt); color:var(--navy);
}

/* ════════════════════════════════════════════════════════════════
   STATS DRAWER (right side — mirrors Preview drawer on left)
   ════════════════════════════════════════════════════════════════ */
.stats-btn {
  position:fixed; right:0; top:50%; transform:translateY(-50%);
  writing-mode:vertical-rl; text-orientation:mixed;
  background:linear-gradient(180deg,#1a3a6e,#2a5298); color:#fff;
  padding:1rem .55rem; border-radius:10px 0 0 10px;
  font-weight:700; font-size:.82rem; cursor:pointer; z-index:50;
  box-shadow:-2px 2px 10px rgba(26,46,90,.2); transition:all .2s;
  letter-spacing:.5px;
}
.stats-btn:hover { padding-right:.75rem; box-shadow:-4px 2px 16px rgba(26,46,90,.3); }

.stats-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.3);
  z-index:150; opacity:0; pointer-events:none; transition:opacity .3s;
}
.stats-overlay.open { opacity:1; pointer-events:auto; }

.stats-drawer {
  position:fixed; top:0; right:-380px; width:370px; height:100vh;
  background:linear-gradient(180deg,#e8f0fc,#dce8f8 50%,#eaf1fb); box-shadow:-4px 0 24px rgba(26,46,90,.15);
  z-index:200; transition:right .35s cubic-bezier(.4,0,.2,1);
  overflow-y:auto; display:flex; flex-direction:column;
}
.stats-drawer.open { right:0; }

/* Admin panel: centered modal style — overrides slide-from-right */
#admin-panel-drawer {
  width:min(96vw,1080px);
  right:auto !important; left:50%; top:2vh; height:96vh;
  transform:translateX(-50%) scale(.95); opacity:0; pointer-events:none;
  border-radius:16px; overflow:hidden;
  box-shadow:0 25px 60px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05);
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .3s;
}
#admin-panel-drawer.open {
  right:auto !important;
  transform:translateX(-50%) scale(1); opacity:1; pointer-events:auto;
}

.stat-card {
  background:linear-gradient(145deg,#f4f8fd,#e2ecf7); border:1.5px solid #c5d8ee;
  border-radius:12px; padding:1rem 1.2rem; margin-bottom:.7rem; text-align:center;
  box-shadow:3px 3px 8px rgba(26,46,90,.1),-2px -2px 6px rgba(255,255,255,.8);
}
.stat-card:nth-child(2) { background:linear-gradient(145deg,#edf8f4,#daf0e8); border-color:#9ad4be; }
.stat-card:nth-child(3) { background:linear-gradient(145deg,#fdf8ec,#f8f0d4); border-color:#e8d48a; }
.stat-card:nth-child(4) { background:linear-gradient(145deg,#fbf0f6,#f4e0ec); border-color:#e8a8c8; }
.stat-val { font-size:1.6rem; font-weight:800; color:var(--navy); }
.stat-label { font-size:.78rem; font-weight:600; color:var(--gray-500); margin-top:.2rem; text-transform:uppercase; letter-spacing:.5px; }

.past-proposal-item {
  display:flex; justify-content:space-between; align-items:center;
  padding:.55rem .75rem; border:1px solid var(--gray-100); border-radius:8px;
  margin-bottom:.4rem; font-size:.8rem; transition:all .15s;
}
.past-proposal-item:hover { border-color:var(--navy-lt); background:#f8fafc; }

/* ════════════════════════════════════════════════════════════════
   CHANGE PASSWORD MODAL
   ════════════════════════════════════════════════════════════════ */
.cpw-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:300;
  display:flex; align-items:center; justify-content:center;
}
.cpw-overlay.hidden { display:none; }
.cpw-modal {
  background:#fff; border-radius:14px; width:100%; max-width:420px;
  box-shadow:0 16px 48px rgba(0,0,0,.2); overflow:hidden;
}
.cpw-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:.85rem 1.2rem; background:var(--navy); color:#fff;
}
.cpw-header h3 { margin:0; font-size:1rem; }

/* ════════════════════════════════════════════════════════════════
   EDITABLE LAB FEE STYLES
   ════════════════════════════════════════════════════════════════ */
.lab-fee-edit-toggle {
  display:inline-flex; align-items:center; gap:.3rem; cursor:pointer;
  font-size:.72rem; color:var(--navy); font-weight:600; margin-left:.5rem;
  padding:2px 6px; border-radius:4px; transition:all .15s;
}
.lab-fee-edit-toggle:hover { background:var(--navy-lt); }
.lab-fee-edit-toggle input[type=checkbox] {
  width:13px; height:13px; accent-color:var(--navy); cursor:pointer;
}
.lab-fee-edit-input {
  width:130px; padding:.35rem .6rem; border:1.5px solid var(--navy);
  border-radius:8px; font-size:.88rem; text-align:right; font-weight:600;
  transition:border-color .2s, box-shadow .2s; font-family:inherit;
}
.lab-fee-edit-input:focus {
  border-color:var(--gold); box-shadow:0 0 0 3px rgba(240,165,0,.15); outline:none;
}
/* ════════════════════════════════════════════════════════════════
   CART / BASKET STYLES
   ════════════════════════════════════════════════════════════════ */

.cart-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(26, 46, 90, 0.35);
  transition: all 0.3s ease;
}
.cart-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(26, 46, 90, 0.45);
}
.cart-floating-btn .cart-icon { font-size: 1.5rem; }
.cart-floating-btn .cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.cart-floating-btn .cart-badge.empty { display: none; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 95vw;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  z-index: 200;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: #fff;
}
.cart-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.cart-header .close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cart-header .close-btn:hover { background: rgba(255, 255, 255, 0.25); }

#cart-body { flex: 1; overflow-y: auto; padding: 1rem; }
.cart-loading { text-align: center; padding: 2rem; color: var(--gray-400); }
.cart-empty { text-align: center; padding: 3rem 1.5rem; }
.cart-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.cart-empty h3 { color: var(--navy); margin: 0 0 0.5rem; font-size: 1.1rem; }
.cart-empty p { color: var(--gray-500); font-size: 0.85rem; margin: 0; }

.cart-item {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}
.cart-item:hover { border-color: var(--navy-lt); box-shadow: 0 2px 12px rgba(26, 46, 90, 0.08); }
.cart-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.cart-item-is { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.cart-item-scheme { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.cart-item-scheme.isi { background: #dbeafe; color: #1e40af; }
.cart-item-scheme.crs { background: #fef3c7; color: #92400e; }
.cart-item-scheme.fmcs { background: #dcfce7; color: #166534; }
.cart-item-title { font-size: 0.8rem; color: var(--gray-600); line-height: 1.4; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-details { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.cart-item-details span { background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--gray-200); }
.cart-item-price { display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; border-top: 1px solid var(--gray-200); }
.cart-item-price .price { font-size: 1rem; font-weight: 700; color: var(--green); }
.cart-item-remove { background: none; border: none; color: var(--red); font-size: 0.78rem; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; }
.cart-item-remove:hover { background: rgba(239, 68, 68, 0.1); }

.cart-footer { padding: 1rem 1.25rem; background: var(--gray-50); border-top: 1.5px solid var(--gray-200); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.cart-total-row span:first-child { font-size: 0.9rem; color: var(--gray-600); font-weight: 600; }
.cart-total-amount { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.cart-checkout-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(240, 165, 0, 0.3);
}
.cart-checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240, 165, 0, 0.4); }

.add-other-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.add-other-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35); }
.add-other-btn .plus-icon { width: 20px; height: 20px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; }

.checkout-items-list { margin-bottom: 1.5rem; }
.checkout-item { background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; }
.checkout-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.checkout-item-header h4 { margin: 0; font-size: 0.9rem; color: var(--navy); }
.checkout-item-total { font-weight: 700; color: var(--green); }
.checkout-item-details { font-size: 0.8rem; color: var(--gray-500); }

.combined-total-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 12px;
  padding: 1.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.combined-total-card .items-count { font-size: 0.85rem; opacity: 0.8; margin-bottom: 0.5rem; }
.combined-total-card .total-row { display: flex; justify-content: space-between; align-items: center; }
.combined-total-card .total-label { font-size: 1rem; font-weight: 600; }
.combined-total-card .total-amount { font-size: 1.5rem; font-weight: 800; color: var(--gold); }

@media (max-width: 480px) {
  .cart-drawer { width: 100%; right: -100%; }
  .cart-floating-btn { bottom: 16px; right: 16px; width: 54px; height: 54px; }
}

/* ─── Admin Panel Drawer ──────────────────────────────── */
#admin-panel-drawer {
  right: -100%;
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1100px) !important;
  max-height: 92vh;
  top: 4vh;
  border-radius: 12px 0 0 12px;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
}
#admin-panel-drawer.open {
  right: 0;
}
#admin-panel-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════ */
.main-content:has(.db-page){max-width:100%!important;margin:0!important;padding:0 0 2rem!important}
.main-content:has(.lic-page){max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important}
.db-page{margin:0;padding:1rem 1.5rem}
.db-welcome{background:linear-gradient(135deg,#0f172a,#1e3a5f);border-radius:16px;padding:1.3rem 2rem;margin-bottom:1.2rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.db-avatar{width:50px;height:50px;border-radius:12px;background:rgba(245,158,11,.2);border:2px solid rgba(245,158,11,.5);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fbbf24;font-size:1.4rem}
.db-name{font-weight:800;color:#fff;font-size:1.15rem}
.db-email{font-size:.75rem;color:#93c5fd;margin-top:1px}
.db-role-badge{background:rgba(245,158,11,.15);color:#fbbf24;padding:.18rem .6rem;border-radius:20px;font-size:.65rem;font-weight:800;letter-spacing:.5px}
.db-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.8rem;margin-bottom:1.2rem}
.db-st{background:linear-gradient(145deg,#eef4fc,#dce8f8);border-radius:14px;padding:1rem 1.2rem;border:1px solid #c5d8ee;position:relative;overflow:hidden;box-shadow:2px 2px 8px rgba(26,46,90,.06),-1px -1px 4px rgba(255,255,255,.7)}
.db-st::before{content:'';position:absolute;top:0;left:0;width:4px;height:100%}
.db-st.c1::before{background:#1a2e5a}.db-st.c2::before{background:#059669}.db-st.c3::before{background:#d97706}.db-st.c4::before{background:#2563eb}
.db-st-v{font-size:1.7rem;font-weight:800;line-height:1}
.db-st-l{font-size:.65rem;text-transform:uppercase;letter-spacing:.5px;color:#4b6a9b;font-weight:700;margin-top:3px}
.db-st-s{font-size:.7rem;color:#64748b;margin-top:2px}
.db-st-click{cursor:pointer;transition:all .2s}
.db-st-click:hover{transform:translateY(-2px);box-shadow:4px 4px 18px rgba(26,46,90,.15),-2px -2px 6px rgba(255,255,255,.8);border-color:#1a2e5a}
.db-pills{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1.2rem}
.db-pill{background:linear-gradient(145deg,#eef4fc,#dce8f8);padding:.4rem .85rem;border-radius:10px;text-align:center;min-width:85px;border:1px solid #c5d8ee;box-shadow:2px 2px 6px rgba(26,46,90,.06)}
.db-pill-v{font-size:1.1rem;font-weight:800}
.db-pill-l{font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.3px;margin-top:1px}
.db-sec{background:#fff;border-radius:14px;border:1px solid #d6e3f0;box-shadow:0 2px 10px rgba(26,46,90,.05);margin-bottom:1.2rem;overflow:hidden}
.db-tabs{display:flex;gap:0;border-bottom:2px solid #e2e8f0;background:#f8fafc;overflow-x:auto}
.db-tab{padding:.65rem 1.3rem;border:none;background:none;cursor:pointer;font-size:.8rem;font-weight:700;color:#64748b;font-family:inherit;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .15s;white-space:nowrap}
.db-tab:hover{color:#1a2e5a;background:#eef2f8}
.db-tab.active{color:#fff;border-bottom:3px solid #f59e0b;background:linear-gradient(135deg,#1a2e5a,#2d4a8a);border-radius:6px 6px 0 0;box-shadow:0 2px 8px rgba(26,46,90,.2)}
.db-cnt{background:#e8edf5;color:#1a2e5a;padding:.12rem .55rem;border-radius:20px;font-size:.68rem;font-weight:700;margin-left:4px}
.db-fbar{display:flex;gap:.4rem;padding:.7rem 1.2rem;border-bottom:1px solid #edf1f7;flex-wrap:wrap;align-items:center;background:#fafbfd}
.db-fb{padding:.28rem .7rem;border:1.5px solid #c5d8ee;border-radius:20px;background:#fff;cursor:pointer;font-size:.7rem;font-weight:600;color:#4b6a9b;font-family:inherit;transition:all .15s}
.db-fb:hover{border-color:#1a2e5a;color:#1a2e5a;background:#eef4fc}
.db-fb.on{background:#1a2e5a;color:#fff;border-color:#1a2e5a}
.db-search{flex:1;min-width:180px;max-width:280px;padding:.3rem .7rem;border:1.5px solid #c5d8ee;border-radius:8px;font-size:.75rem;font-family:inherit;outline:none;background:#fff;transition:border-color .2s}
.db-search:focus{border-color:#1a2e5a;box-shadow:0 0 0 2px rgba(26,46,90,.08)}
.db-vbtns{display:flex;gap:3px;margin-left:auto}
.db-vb{width:28px;height:28px;border:1.5px solid #c5d8ee;border-radius:5px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#64748b;transition:all .12s}
.db-vb.on{background:#1a2e5a;color:#fff;border-color:#1a2e5a}
.db-sort-btn{padding:.28rem .65rem;border:1.5px solid #c5d8ee;border-radius:8px;background:#fff;cursor:pointer;font-size:.68rem;font-weight:700;color:#4b6a9b;font-family:inherit;display:flex;align-items:center;gap:.25rem;transition:all .15s}
.db-sort-btn:hover{border-color:#1a2e5a;color:#1a2e5a}
.db-sort-btn.asc,.db-sort-btn.desc{background:#1a2e5a;color:#fff;border-color:#1a2e5a}
/* User cards */
.db-ucards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:.9rem;padding:1rem 1.2rem}
.db-uc{background:linear-gradient(150deg,#eef4fc,#dce8f8);border-radius:14px;border:1px solid #c5d8ee;padding:1.1rem 1.3rem;transition:all .2s;box-shadow:2px 2px 8px rgba(26,46,90,.06),-1px -1px 4px rgba(255,255,255,.7);cursor:pointer;position:relative}
.db-uc:hover{box-shadow:4px 4px 18px rgba(26,46,90,.15),-2px -2px 6px rgba(255,255,255,.8);transform:translateY(-2px);border-color:#1a2e5a}
.db-uc::after{content:'👁 View Details';position:absolute;top:.7rem;right:.7rem;font-size:.6rem;background:#1a2e5a;color:#fff;padding:.2rem .5rem;border-radius:5px;opacity:0;transition:opacity .2s}
.db-uc:hover::after{opacity:1}
.db-uc-top{display:flex;align-items:center;gap:.8rem;margin-bottom:.8rem}
.db-uc-av{width:48px;height:48px;border-radius:12px;background:linear-gradient(135deg,#1a2e5a,#2d4a8a);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:1.2rem;flex-shrink:0;box-shadow:0 3px 8px rgba(26,46,90,.2)}
.db-uc-nm{font-weight:700;color:#0f1d3d;font-size:.9rem}
.db-uc-em{font-size:.7rem;color:#4b6a9b;margin-top:1px}
.db-uc-ph{font-size:.68rem;color:#64748b;margin-top:1px}
.db-uc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin:.6rem 0}
.db-uc-s{background:rgba(255,255,255,.7);border-radius:8px;padding:.45rem .4rem;text-align:center;border:1px solid rgba(197,216,238,.5)}
.db-uc-sv{font-size:1rem;font-weight:800;color:#1a2e5a;line-height:1}
.db-uc-sv.grn{color:#059669}
.db-uc-sl{font-size:.5rem;text-transform:uppercase;letter-spacing:.3px;color:#4b6a9b;font-weight:700;margin-top:2px}
.db-uc-foot{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem;padding-top:.5rem;border-top:1px solid rgba(197,216,238,.5)}
.db-uc-meta{font-size:.62rem;color:#64748b}
.db-uc-badge{font-size:.55rem;padding:.12rem .4rem;border-radius:4px;font-weight:700}
.db-uc-active{background:#dcfce7;color:#166534}
.db-uc-inactive{background:#fef3c7;color:#92400e}
.db-uc-docbar{margin-top:.5rem;padding-top:.5rem;border-top:1px solid rgba(197,216,238,.5)}
.db-uc-docbar-label{font-size:.6rem;font-weight:600;color:#4b6a9b;display:flex;justify-content:space-between;margin-bottom:.25rem}
.db-uc-docbar-track{background:rgba(197,216,238,.5);border-radius:10px;height:5px;overflow:hidden}
.db-uc-docbar-fill{height:100%;border-radius:10px;background:linear-gradient(90deg,#059669,#34d399);transition:width .3s}
/* Proposal cards */
.db-pcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:.8rem;padding:1rem 1.2rem}
.db-pc{background:linear-gradient(150deg,#eef4fc,#dce8f8);border-radius:12px;border:1px solid #c5d8ee;padding:.85rem 1.1rem;transition:all .2s;box-shadow:2px 2px 8px rgba(26,46,90,.06),-1px -1px 4px rgba(255,255,255,.7)}
.db-pc:hover{box-shadow:4px 4px 16px rgba(26,46,90,.1);transform:translateY(-1px)}
.db-pc-row{display:flex;align-items:center;justify-content:space-between;gap:.4rem;flex-wrap:wrap}
.db-oid{font-family:monospace;font-size:.68rem;font-weight:700;color:#1a2e5a;background:rgba(255,255,255,.7);padding:.12rem .45rem;border-radius:4px;border:1px solid #c5d8ee}
.db-sch{padding:.12rem .45rem;border-radius:4px;font-size:.6rem;font-weight:700;text-transform:uppercase}
.db-sch-isi{background:rgba(30,64,175,.1);color:#1e40af}.db-sch-crs{background:rgba(146,64,14,.1);color:#92400e}.db-sch-fmcs{background:rgba(6,95,70,.1);color:#065f46}
.db-pc-dt{font-size:.63rem;color:#64748b}
.db-pc-is{font-size:.8rem;font-weight:700;color:#0f1d3d;margin-top:.3rem}
.db-pc-ti{font-size:.7rem;color:#4b6a9b;margin-top:.1rem;line-height:1.3}
.db-pc-cl{font-size:.68rem;color:#374151;margin-top:.15rem}
.db-pc-usr{font-size:.63rem;color:#2563eb;font-weight:600;margin-top:.15rem}
.db-pc-tot{font-weight:800;color:#065f46;font-size:.95rem;margin-top:.35rem}
.db-pc-docs{margin-top:.5rem;padding-top:.4rem;border-top:1px solid rgba(197,216,238,.4)}
.db-pc-docs-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:.3rem}
.db-pc-docs-label{font-size:.62rem;font-weight:700;color:#4b6a9b}
.db-pc-docs-count{font-size:.6rem;font-weight:700}
.db-pc-docs-count.complete{color:#059669}
.db-pc-docs-count.partial{color:#d97706}
.db-pc-docs-count.none{color:#94a3b8}
.db-pc-docbar{background:rgba(197,216,238,.5);border-radius:10px;height:4px;overflow:hidden;margin-bottom:.35rem}
.db-pc-docbar-fill{height:100%;border-radius:10px;transition:width .3s}
.db-pc-docnames{font-size:.58rem;color:#64748b;line-height:1.4}
/* Table */
.db-tw{overflow-x:auto}
.db-tbl{width:100%;border-collapse:collapse;font-size:.75rem}
.db-tbl th{background:#eef4fc;padding:.5rem .7rem;text-align:left;font-weight:700;color:#1a2e5a;font-size:.65rem;text-transform:uppercase;letter-spacing:.3px;border-bottom:2px solid #c5d8ee;white-space:nowrap;cursor:pointer;user-select:none}
.db-tbl th:hover{background:#dce8f8}
.db-tbl th.sort-asc::after{content:' ↑'}
.db-tbl th.sort-desc::after{content:' ↓'}
.db-tbl td{padding:.5rem .7rem;border-bottom:1px solid #edf1f7;color:#374151}
.db-tbl tr:hover{background:#eef4fc}
.db-tbl tr.clickable-row{cursor:pointer}
.db-empty{text-align:center;padding:2.5rem;color:#4b6a9b}
.db-empty-icon{font-size:2rem;margin-bottom:.4rem}
.db-loading{text-align:center;padding:3rem;color:#4b6a9b}
.db-pc-actions{display:flex;gap:.4rem;margin-top:.5rem;padding-top:.5rem;border-top:1px solid rgba(197,216,238,.4)}
.db-pc-abtn{padding:.3rem .6rem;border:1.5px solid #c5d8ee;border-radius:6px;background:#fff;cursor:pointer;font-size:.65rem;font-weight:600;color:#1a2e5a;font-family:inherit;display:flex;align-items:center;gap:.25rem;transition:all .15s}
.db-pc-abtn:hover{background:#1a2e5a;color:#fff;border-color:#1a2e5a}
.db-pc-abtn.dl{color:#065f46;border-color:#86efac}
.db-pc-abtn.dl:hover{background:#065f46;color:#fff;border-color:#065f46}

/* ═══ USER DETAIL MODAL ═══ */
.ud-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:1001;display:flex;align-items:flex-start;justify-content:center;padding:1.5rem 1rem;overflow-y:auto}
.ud-modal{background:#fff;border-radius:18px;width:100%;max-width:1000px;box-shadow:0 24px 70px rgba(0,0,0,.3);overflow:hidden;animation:eFadeUp .25s ease-out}
.ud-head{background:linear-gradient(135deg,#0f172a,#1e3a5f);padding:1.3rem 2rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.ud-head-left{display:flex;align-items:center;gap:1rem}
.ud-head-av{width:52px;height:52px;border-radius:13px;background:rgba(245,158,11,.2);border:2px solid rgba(245,158,11,.5);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fbbf24;font-size:1.4rem;flex-shrink:0}
.ud-head-name{color:#fff;font-weight:800;font-size:1.05rem}
.ud-head-email{color:#93c5fd;font-size:.75rem;margin-top:2px}
.ud-head-meta{display:flex;gap:.5rem;margin-top:.4rem;flex-wrap:wrap}
.ud-meta-chip{background:rgba(255,255,255,.1);color:#cbd5e1;font-size:.62rem;padding:.15rem .5rem;border-radius:5px;font-weight:600}
.ud-close{background:rgba(255,255,255,.12);border:none;color:#fff;width:34px;height:34px;border-radius:9px;font-size:1.2rem;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ud-close:hover{background:rgba(255,255,255,.25)}
.ud-bar{height:3px;background:linear-gradient(90deg,#f59e0b,#fbbf24,#f59e0b)}
.ud-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.6rem;padding:1.2rem 1.5rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.ud-st{background:#fff;border-radius:10px;padding:.7rem .8rem;text-align:center;border:1px solid #e2e8f0;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.ud-st-v{font-size:1.3rem;font-weight:800;color:#1a2e5a;line-height:1}
.ud-st-l{font-size:.58rem;text-transform:uppercase;letter-spacing:.3px;color:#94a3b8;font-weight:700;margin-top:3px}
.ud-body{max-height:72vh;overflow-y:auto}
.ud-section{padding:1.2rem 1.5rem}
.ud-section-title{font-size:.78rem;font-weight:700;color:#1a2e5a;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.8rem;padding-bottom:.35rem;border-bottom:2px solid #e8edf5;display:flex;align-items:center;justify-content:space-between}
.ud-doc-row{display:flex;align-items:center;gap:.6rem;padding:.45rem .6rem;background:#f8fafc;border-radius:7px;border:1px solid #e2e8f0;margin-bottom:.4rem}
.ud-doc-icon{font-size:.9rem;flex-shrink:0}
.ud-doc-name{font-size:.73rem;font-weight:600;color:#374151;flex:1}
.ud-doc-badge{font-size:.58rem;font-weight:700;padding:.12rem .45rem;border-radius:4px;flex-shrink:0}
.ud-doc-submitted{background:#dcfce7;color:#166534}
.ud-doc-pending{background:#fef3c7;color:#92400e}
.ud-prop{background:linear-gradient(150deg,#eef4fc,#dce8f8);border-radius:12px;border:1px solid #c5d8ee;padding:.9rem 1rem;margin-bottom:.8rem}
.ud-prop-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.4rem;margin-bottom:.6rem}
.ud-fbar{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center;margin-bottom:.8rem;background:#f0f4f8;border-radius:10px;padding:.5rem .7rem}

/* ═══ ORDER DETAIL MODAL ═══ */
.od-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1002;display:flex;align-items:flex-start;justify-content:center;padding:2rem 1rem;overflow-y:auto}
.od-modal{background:#fff;border-radius:16px;width:100%;max-width:900px;box-shadow:0 20px 60px rgba(0,0,0,.25);overflow:hidden;animation:eFadeUp .25s ease-out}
.od-head{background:linear-gradient(135deg,#0f172a,#1e3a5f);padding:1.2rem 1.8rem;display:flex;align-items:center;justify-content:space-between}
.od-head-title{color:#fff;font-weight:700;font-size:1rem}
.od-head-oid{font-family:monospace;color:#fbbf24;font-size:.85rem;font-weight:700}
.od-close{background:rgba(255,255,255,.12);border:none;color:#fff;width:32px;height:32px;border-radius:8px;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center}
.od-close:hover{background:rgba(255,255,255,.25)}
.od-bar{height:3px;background:linear-gradient(90deg,#f59e0b,#fbbf24,#f59e0b)}
.od-body{padding:1.5rem 1.8rem;max-height:70vh;overflow-y:auto}
.od-dl-row{display:flex;gap:.6rem;margin-bottom:1.2rem;flex-wrap:wrap}
.od-dl-btn{padding:.6rem 1.2rem;border-radius:10px;border:none;cursor:pointer;font-size:.8rem;font-weight:700;font-family:inherit;display:flex;align-items:center;gap:.4rem;transition:all .2s}
.od-dl-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.12)}
.od-dl-prop{background:linear-gradient(135deg,#1a2e5a,#2d4a8a);color:#fff}
.od-dl-inv{background:linear-gradient(135deg,#065f46,#047857);color:#fff}
.od-section{margin-bottom:1rem}
.od-section-title{font-size:.78rem;font-weight:700;color:#1a2e5a;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.5rem;padding-bottom:.3rem;border-bottom:2px solid #e8edf5}
.od-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.4rem .8rem}
.od-field{margin-bottom:.3rem}
.od-lbl{font-size:.6rem;text-transform:uppercase;letter-spacing:.3px;color:#94a3b8;font-weight:600}
.od-val{font-size:.8rem;color:#1e293b;font-weight:600}
.od-product{background:linear-gradient(150deg,#eef4fc,#dce8f8);border-radius:10px;border:1px solid #c5d8ee;padding:.8rem 1rem;margin-bottom:.7rem}
.od-product-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem;flex-wrap:wrap;gap:.4rem}
@media(max-width:600px){.od-modal,.ud-modal{margin:0;border-radius:12px}.od-body,.ud-body{padding:1rem}.od-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.db-stats{grid-template-columns:repeat(2,1fr)}.db-pcards,.db-ucards{grid-template-columns:1fr}.db-uc-grid{grid-template-columns:repeat(2,1fr)}}

/* Payment Status Button */
.db-ps-btn{padding:.18rem .55rem;border-radius:5px;font-size:.63rem;font-weight:700;border:1.5px solid;cursor:pointer;transition:all .15s;font-family:inherit;text-transform:uppercase;letter-spacing:.3px}
.db-ps-hold{background:#fef3c7;color:#92400e;border-color:#fde68a}
.db-ps-hold:hover{background:#fde68a}
.db-ps-given{background:#dbeafe;color:#1e40af;border-color:#93c5fd}
.db-ps-given:hover{background:#bfdbfe}

/* Settings Modal */
.settings-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1002;display:flex;align-items:center;justify-content:center;padding:1rem}
.settings-modal{background:#fff;border-radius:16px;width:100%;max-width:480px;box-shadow:0 20px 60px rgba(0,0,0,.25);overflow:hidden;animation:eFadeUp .25s ease-out}
.settings-head{background:linear-gradient(135deg,#0f172a,#1e3a5f);padding:1.2rem 1.5rem;display:flex;align-items:center;justify-content:space-between}
.settings-head h3{color:#fff;font-size:1rem;font-weight:700;margin:0}
.settings-close{background:rgba(255,255,255,.12);border:none;color:#fff;width:32px;height:32px;border-radius:8px;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center}
.settings-close:hover{background:rgba(255,255,255,.25)}
.settings-body{padding:1.5rem}
.settings-field{margin-bottom:1rem}
.settings-label{font-size:.72rem;font-weight:600;color:#374151;text-transform:uppercase;letter-spacing:.4px;display:block;margin-bottom:.3rem}
.settings-input{width:100%;padding:.6rem .85rem;border:1.5px solid #d1d5db;border-radius:8px;font-size:.88rem;font-family:inherit;outline:none;transition:border-color .2s}
.settings-input:focus{border-color:#1a2e5a;box-shadow:0 0 0 2px rgba(26,46,90,.08)}
.settings-save{width:100%;padding:.7rem;background:linear-gradient(135deg,#1a2e5a,#2d4a8a);color:#fff;border:none;border-radius:8px;font-size:.9rem;font-weight:700;cursor:pointer;font-family:inherit;transition:all .2s}
.settings-save:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(26,46,90,.2)}

/* Drafts badge */
.drafts-badge{background:#d97706;color:#fff;font-size:.55rem;font-weight:800;min-width:16px;height:16px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;position:absolute;top:-4px;right:-4px;line-height:1}


/* ═══ Dashboard v2 extras ═══ */
.db-row-av{width:28px;height:28px;border-radius:7px;background:linear-gradient(135deg,#1a2e5a,#2d4a8a);display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:.72rem;flex-shrink:0}
.db-td-sm{font-size:.7rem;color:#4b6a9b}
.db-td-c{text-align:center;font-weight:700;color:#1a2e5a}
.db-td-ellip{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.db-badge{font-size:.58rem;padding:.15rem .45rem;border-radius:5px;font-weight:700;white-space:nowrap}
.db-bg-green{background:#dcfce7;color:#166534}
.db-bg-amber{background:#fef3c7;color:#92400e}
.db-bg-amber-yl{background:#fef08a;color:#854d0e;border:1px solid #fde047}
.db-bg-blue{background:#dbeafe;color:#1d4ed8}
.db-bg-red{background:#fee2e2;color:#dc2626}
.draft-step-badge{background:#f59e0b;color:#fff;font-size:.52rem;font-weight:800;padding:.1rem .35rem;border-radius:5px;position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);white-space:nowrap;line-height:1.2}

/* Popup modal animation */
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
#_popup-overlay{animation:fadeIn .15s ease-out}
#_popup-overlay>div{animation:eFadeUp .2s ease-out}

/* Sort button active state */
.db-sort-btn.active{background:#1a2e5a!important;color:#fff!important;border-color:#1a2e5a!important}
.db-act-btn{padding:.25rem .45rem;border:1.5px solid #c5d8ee;border-radius:6px;background:#fff;cursor:pointer;font-size:.68rem;display:inline-flex;align-items:center;gap:.2rem;transition:all .18s ease;color:#1a2e5a;font-family:inherit}
.db-act-btn:hover{background:#1a2e5a;color:#fff;border-color:#1a2e5a;transform:translateY(-1px);box-shadow:0 3px 8px rgba(26,46,90,.15)}
.db-doc-btn{font-weight:700}
.db-doc-cnt{font-size:.58rem;font-weight:700;margin-left:1px}
.db-th-sort{cursor:pointer}
.db-tbl th:hover{background:#dce8f8;color:#0f172a}
.db-tbl tr{transition:background .15s ease}
.db-tbl tr:hover{background:#e3ecf7!important}
.clickable-row{cursor:pointer}
.db-tab{transition:all .18s ease}
.db-tab:hover{color:#1a2e5a;background:rgba(26,46,90,.04)}
.db-fb{transition:all .15s ease}
.db-fb:hover{border-color:#1a2e5a;color:#1a2e5a;background:#eef4fc;transform:translateY(-1px)}
.db-st{transition:all .22s ease}
.db-pill{transition:all .18s ease}
.db-pill:hover{transform:translateY(-1px);box-shadow:3px 3px 12px rgba(26,46,90,.1)}
.db-uc{transition:all .22s ease}
.db-pc{transition:all .22s ease}
/* ════════════════════ SUPER ADMIN STYLES ════════════════════ */
.sa-page { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.sa-tab {
  flex: 1; padding: .7rem 1rem; border: none; background: transparent;
  font-size: .82rem; font-weight: 600; color: #64748b; cursor: pointer;
  font-family: inherit; border-bottom: 3px solid transparent; transition: all .2s;
}
.sa-tab:hover { background: #f8fafc; color: #1a2e5a; }
.sa-tab.active { color: #1a2e5a; border-bottom-color: #f59e0b; background: #fefce8; }

/* SweetAlert2 button overrides */
.swal2-confirm { font-family: 'Plus Jakarta Sans', sans-serif !important; font-weight: 700 !important; }
.swal2-deny { font-family: 'Plus Jakarta Sans', sans-serif !important; font-weight: 700 !important; }
.swal2-cancel { font-family: 'Plus Jakarta Sans', sans-serif !important; }

/* ── CRITICAL: SweetAlert2 always on topmost layer ── */
/* Forces Swal backdrop + popup above every modal, overlay, sticky header, and panel */
.swal2-container {
  z-index: 999999 !important;
}
.swal2-backdrop-show {
  z-index: 999998 !important;
}
/* Ensure the popup itself is never clipped by a parent stacking context */
.swal2-popup {
  z-index: 1000000 !important;
  position: relative !important;
}

/* Super Admin badge in header */
.sa-badge-gold {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #0f172a;
  font-size: .6rem;
  font-weight: 900;
  padding: .15rem .5rem;
  border-radius: 999px;
  letter-spacing: 1px;
  vertical-align: middle;
}

/* ── Skeleton / shimmer for dashboard loading ── */
@keyframes shimmer {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}
[style*="animation:pulse"] { animation: shimmer 1.2s ease-in-out infinite !important; }

/* ── Compact SweetAlert2 popup ── */
.swal2-popup.swal-compact {
  padding: 1.4rem 1.6rem 1.2rem !important;
  border-radius: 14px !important;
}
.swal2-popup.swal-compact .swal2-title {
  font-size: 1.05rem !important;
  margin-bottom: .4rem !important;
}
.swal2-popup.swal-compact .swal2-html-container {
  font-size: .85rem !important;
  margin: .3rem 0 .8rem !important;
}
.swal2-popup.swal-compact .swal2-actions {
  gap: .5rem !important;
  margin-top: .5rem !important;
}
.swal2-popup.swal-compact .swal2-confirm,
.swal2-popup.swal-compact .swal2-deny {
  padding: .5rem 1.2rem !important;
  font-size: .85rem !important;
  border-radius: 8px !important;
}



/* ═══════════════════════════════════════════════════
   CROSS-PLATFORM FIXES — Mac / iOS / Android
═══════════════════════════════════════════════════ */

/* iOS Safari — safe area insets for notch/home bar */
body {
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Fix sticky header height for iOS Safari (100vh issue) */
@supports (-webkit-touch-callout: none) {
  .site-header {
    position: -webkit-sticky;
    position: sticky;
  }
  /* Prevent rubber-band scroll from revealing gap above header */
  html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* Fix zoom on input focus (iOS Safari zooms in on inputs < 16px font) */
input, select, textarea {
  font-size: max(16px, 1em);
}
/* Override back to design size on larger screens only */
@media (min-width: 768px) {
  input, select, textarea {
    font-size: inherit;
  }
}

/* Chrome desktop zoom (Task 1) — exclude Safari on Mac */
/* Safari does NOT support @supports selector(:is()) in the same way,
   so we add a Safari exclusion: */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 1024px) {
  /* Apply zoom only on Chrome/Edge (not Safari) */
  _::-webkit-full-page-media, _:future, :root html {
    zoom: 0.75;
  }
}

/* Android Chrome — fix tap highlight color */
* {
  -webkit-tap-highlight-color: rgba(26, 46, 90, 0.08);
}

/* Fix button appearance on iOS (iOS renders buttons with native styling) */
button, input[type="button"], input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Fix select dropdown on iOS */
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Smooth scrolling — exclude on reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Fix mobile header — prevent logo overflow on small screens */
@media (max-width: 480px) {
  .site-header {
    padding: 0 1rem;
    height: 60px;
  }
  .site-header .logo img {
    height: 44px !important;
  }
  .header-right {
    gap: 0.5rem;
    font-size: .75rem;
  }
  .header-right span:first-child {
    display: none; /* hide "Self-Checkout Platform" text on very small screens */
  }
}

/* Tablet (iPad) layout adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .site-header {
    padding: 0 1.5rem;
  }
  .main-content {
    padding: 1rem;
  }
}