﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Inter", "Segoe UI", Arial, sans-serif; background: #f4f6fb; color: #1a1a2e; min-height: 100vh; }
.hidden { display: none !important; }

/* ── topbar ── */
.topbar { background: #fff; border-bottom: 1px solid #e5e9f0; position: sticky; top: 0; z-index: 100; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 112px; height: auto; display: block; flex-shrink: 0; }
.topbar-nav { display: flex; align-items: center; gap: 46px; flex-wrap: wrap; justify-content: center; margin-left: 14px; flex: 1; }
.topbar-nav a { color: #65748a; text-decoration: none; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.topbar-nav a:hover { color: #1e73be; }

/* Hamburger Menu */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 6px; flex-direction: column; gap: 5px; }
.hamburger-btn span { display: block; width: 24px; height: 2.5px; background: #1a3a8f; border-radius: 2px; transition: all 0.3s ease; }
.mobile-menu { display: flex; background: #f9fafb; border-top: 1px solid #e5e9f0; padding: 12px 16px; flex-direction: column; gap: 0; }
.mobile-menu a { padding: 12px 14px; color: #1a3a8f; text-decoration: none; font-size: 0.95rem; font-weight: 600; border-bottom: 1px solid #e5e9f0; }
.mobile-menu a:hover { background: #f0f4ff; }

.nav-link { font-size: .95rem; font-weight: 700; color: #fff; background: linear-gradient(180deg, #2f8ad9 0%, #1f73b8 100%); padding: 10px 26px; border-radius: 999px; text-decoration: none; transition: filter .15s, transform .15s; box-shadow: 0 4px 10px rgba(31,115,184,.18); }
.nav-link:hover { filter: brightness(1.03); transform: translateY(-1px); }
.market-strip { max-width: 1200px; margin: 0 auto; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 8px 24px 14px; border-top: 1px solid #eef1f6; color: #656565; font-size: .72rem; font-weight: 500; }
.market-item { white-space: nowrap; }
.market-item span { color: #f0b429; font-weight: 700; }

/* ── two-column auth layout ── */
.auth-layout { display: grid; grid-template-columns: 1fr 440px; min-height: calc(100vh - 69px); }

/* ── hero (left) ── */
.auth-hero { background: #fff; padding: 60px 48px 60px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; border-right: 1px solid #e5e9f0; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }
.hero-title { font-size: 2.2rem; font-weight: 800; color: #1a1a2e; line-height: 1.2; margin-bottom: 16px; }
.hero-title span { color: #1a3a8f; }
.hero-body { font-size: 1rem; color: #555; line-height: 1.6; max-width: 480px; }
.hero-image { display: block; margin-top: 26px; max-width: 100%; height: auto; }
.hero-image-landscape { width: min(100%, 560px); }
.hero-image-illustration { width: min(100%, 520px); }
.hero-dots { display: flex; gap: 8px; margin-top: 36px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ccd3e3; cursor: pointer; transition: background .2s; }
.dot.active { background: #1a3a8f; }

/* ── auth panel (right) ── */
.auth-panel { background: #f4f6fb; padding: 48px 36px; display: flex; flex-direction: column; justify-content: center; }
.panel-title { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.panel-sub { font-size: .88rem; color: #777; margin-bottom: 28px; }
.back-btn { background: none; border: none; color: #1a3a8f; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 16px; }
.back-btn:hover { text-decoration: underline; }

/* option cards */
.option-card { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  background: #fff; 
  border: 2px solid #e5e9f0; 
  border-radius: 10px; 
  padding: 20px 18px; 
  margin-bottom: 14px; 
  cursor: pointer; 
  transition: all .25s ease;
}
.option-card:hover { 
  border-color: #1a3a8f; 
  box-shadow: 0 4px 16px rgba(26,58,143,.15);
  transform: translateY(-2px);
}
.option-icon { flex-shrink: 0; }
.option-text { flex: 1; }
.option-title { font-size: .95rem; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.option-desc { font-size: .8rem; color: #6b7280; line-height: 1.5; }
.option-arrow { font-size: 1.4rem; color: #cbd5e0; transition: all .2s ease; }
.option-card:hover .option-arrow { color: #1a3a8f; }
.sign-in-hint { font-size: .82rem; color: #777; margin-top: 20px; text-align: center; }
.sign-in-hint a { color: #1a3a8f; font-weight: 600; text-decoration: none; }
.sign-in-hint a:hover { text-decoration: underline; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label, .field-row label { font-size: .82rem; font-weight: 600; color: #2d3748; letter-spacing: 0.3px; }
input, select, textarea { 
  background: #fff; 
  border: 1.5px solid #d1d9ee; 
  border-radius: 8px; 
  color: #1a1a2e; 
  padding: 12px 14px; 
  font-size: .92rem; 
  font-family: inherit; 
  width: 100%; 
  transition: all .2s ease;
}
input::placeholder, textarea::placeholder { color: #a0aec0; }
input:hover, select:hover, textarea:hover { border-color: #8b96c9; }
input:focus, select:focus, textarea:focus { 
  outline: none; 
  border-color: #1a3a8f; 
  box-shadow: 0 0 0 4px rgba(26,58,143,.12), inset 0 1px 2px rgba(0,0,0,.05);
  background: #fafbfc;
}
textarea { resize: vertical; line-height: 1.5; }

/* buttons */
.btn-primary { 
  padding: 12px 28px; 
  border-radius: 8px; 
  border: none; 
  background: linear-gradient(135deg, #1a3a8f 0%, #0f2860 100%);
  color: #fff; 
  font-weight: 700; 
  cursor: pointer; 
  font-size: .92rem; 
  font-family: inherit; 
  transition: all .2s ease;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(26,58,143,.2);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, #0f2860 0%, #061840 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,58,143,.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.full { width: 100%; }
.btn-outline { 
  padding: 12px 28px; 
  border-radius: 8px; 
  border: 2px solid #1a3a8f; 
  background: transparent; 
  color: #1a3a8f; 
  font-weight: 700; 
  cursor: pointer; 
  font-size: .92rem; 
  font-family: inherit; 
  transition: all .2s ease;
  margin-top: 8px; 
  margin-right: 10px;
}
.btn-outline:hover { 
  background: #f0f4ff;
  border-color: #0f2860;
  color: #0f2860;
}
.btn-outline-sm { 
  padding: 8px 18px; 
  border-radius: 7px; 
  border: 1.5px solid #1a3a8f; 
  background: transparent; 
  color: #1a3a8f; 
  font-weight: 600; 
  cursor: pointer; 
  font-size: .84rem; 
  font-family: inherit;
  transition: all .2s ease;
}
.btn-outline-sm:hover { 
  background: #f0f4ff;
  border-color: #0f2860;
}

/* dual file input buttons */
.file-input-group { 
  display: flex; 
  gap: 12px; 
  width: 100%; 
  margin-bottom: 8px;
}
.file-btn { 
  flex: 1; 
  padding: 12px 16px; 
  font-size: .88rem; 
  border-radius: 8px; 
  border: 2px solid #1a3a8f; 
  background: #fff; 
  color: #1a3a8f; 
  font-weight: 600; 
  cursor: pointer; 
  transition: all .2s ease;
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.file-btn:hover { 
  background: #f0f4ff;
  border-color: #0f2860;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(26,58,143,.15);
}
.file-btn.camera-btn { 
  background: linear-gradient(135deg, #1a3a8f 0%, #0f2860 100%);
  color: #fff; 
  border-color: #1a3a8f;
  box-shadow: 0 2px 8px rgba(26,58,143,.2);
}
.file-btn.camera-btn:hover { 
  background: linear-gradient(135deg, #0f2860 0%, #061840 100%);
  border-color: #0f2860;
  box-shadow: 0 4px 12px rgba(26,58,143,.3);
  transform: translateY(-1px);
}

/* footer */
.auth-footer { background: #fff; border-top: 1px solid #e5e9f0; text-align: center; padding: 14px; font-size: .78rem; color: #aaa; }

/* ── app topbar ── */
.app-topbar { background: #fff; border-bottom: 1px solid #e5e9f0; position: sticky; top: 0; z-index: 100; }
.app-topbar .topbar-inner { max-width: 1200px; }
.app-topbar .brand-main { color: #1a3a8f; }
.app-topbar .brand-sub { color: #888; }
.app-topbar .topbar-nav a { color: #65748a; }
.app-topbar .topbar-nav a:hover { color: #1e73be; }
.app-topbar .market-strip { max-width: 1200px; color: #656565; border-top-color: #eef1f6; }
.app-topbar .market-item span { color: #f0b429; }
.app-nav-right { display: flex; align-items: center; gap: 12px; }
.app-user { font-size: .85rem; color: #555; }
.app-topbar .btn-outline-sm { border-color: #1a3a8f; color: #fff; background: linear-gradient(180deg, #2f8ad9 0%, #1f73b8 100%); border-radius: 999px; padding: 10px 22px; }
.app-topbar .btn-outline-sm:hover { filter: brightness(1.03); }

/* ── stepper ── */
.app-container { max-width: 760px; margin: 36px auto; padding: 0 16px 48px; }
.stepper { 
  display: flex; 
  align-items: center; 
  margin-bottom: 32px;
  gap: 0;
}
.step-item { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 6px;
  flex: 1;
  position: relative;
}
.step-num { 
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  background: #f0f4ff; 
  color: #8b96c9; 
  font-weight: 700; 
  font-size: .9rem; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all .3s ease;
  border: 2px solid #d1d9ee;
  z-index: 2;
  position: relative;
}
.step-label { 
  font-size: .75rem; 
  color: #8b96c9; 
  white-space: nowrap; 
  font-weight: 500;
  transition: all .3s ease;
}
.step-item.active .step-num { 
  background: linear-gradient(135deg, #1a3a8f 0%, #0f2860 100%);
  color: #fff;
  border-color: #1a3a8f;
  box-shadow: 0 4px 12px rgba(26,58,143,.2);
}
.step-item.active .step-label { 
  color: #1a3a8f; 
  font-weight: 700;
}
.step-item.done .step-num { 
  background: #10b981; 
  color: #fff;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,.2);
}
.step-item.done .step-label { 
  color: #059669;
  font-weight: 700;
}
.step-line { 
  position: absolute;
  top: 20px;
  left: 50%;
  right: -50%;
  height: 2px; 
  background: #d1d9ee;
  z-index: 1;
  transition: background .3s ease;
  margin: 0;
  margin-left: 20px;
  margin-bottom: 0;
}
.step-line.done { background: #10b981; }

/* ── cards ── */
.card { 
  background: #fff; 
  border: 1px solid #e5e9f0; 
  border-radius: 12px; 
  padding: 32px 36px; 
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.card h2 { 
  font-size: 1.3rem; 
  font-weight: 700; 
  margin-bottom: 8px; 
  color: #1a1a2e;
  letter-spacing: -0.5px;
}
.card-sub { 
  font-size: .88rem; 
  color: #6b7280; 
  margin-bottom: 26px;
  line-height: 1.5;
}

.apps-list { display: flex; flex-direction: column; gap: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: #68758f; }
.empty-state a { color: #1a3a8f; text-decoration: underline; }

/* ── Client Header ── */
.client-header {
  background: linear-gradient(135deg, #1a3a8f 0%, #0f2463 100%);
  color: white;
  padding: 24px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

.client-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-greeting {
  font-size: 1.2rem;
  font-weight: 500;
}

.client-greeting strong {
  font-weight: 700;
}

.client-id-display {
  font-size: .9rem;
  opacity: 0.9;
}

/* ── Application Row ── */
.app-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f7;
  background: #fff;
}

.app-row:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.app-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.app-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem;
  font-weight: 600;
  color: #1a3a8f;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.app-status-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #68758f;
}

.app-workflow-status {
  font-size: .95rem;
  color: #333;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-not-submitted {
  font-size: 1rem;
  color: #da8b00;
  font-weight: 600;
}

.app-right {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.app-continue-btn {
  padding: 10px 18px;
  background: #1a3a8f;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.app-continue-btn:hover {
  background: #0f2463;
  box-shadow: 0 2px 4px rgba(26, 58, 143, 0.2);
}

.app-history-btn {
  padding: 10px 18px;
  background: #1e40af;
  color: white;
  border: 1px solid #1e3a8a;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-history-btn:hover {
  background: #1e3a8a;
  border-color: #172554;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

/* ── Legacy Styles (keep for backwards compatibility) ── */
.app-item-meta { font-size: .8rem; color: #68758f; }
.app-item-meta + .app-item-meta { margin-top: 2px; }
.state-pill { border-radius: 999px; padding: 4px 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.state-draft { background: #f3f4f6; color: #4b5563; }
.state-processing { background: #dbeafe; color: #1d4ed8; }
.state-information-requested { background: #fef3c7; color: #92400e; }
.state-account-created { background: #dcfce7; color: #166534; }
.section-label { 
  font-size: .75rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: .1em; 
  color: #1a3a8f; 
  margin: 28px 0 16px; 
  border-bottom: 2px solid #f0f4ff; 
  padding-bottom: 10px;
  display: block;
}
.field-row { 
  display: grid; 
  grid-template-columns: 260px 1fr; 
  gap: 16px; 
  margin-bottom: 14px; 
  align-items: center;
}
.field-row label { font-size: .85rem; color: #2d3748; font-weight: 600; }

/* done */
.done-check { width: 60px; height: 60px; border-radius: 50%; background: #1a3a8f; color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

/* alerts */
.alert { 
  border-radius: 10px; 
  padding: 14px 16px; 
  margin-top: 16px; 
  font-size: .88rem;
  border-left: 4px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-danger { 
  background: #fef2f2; 
  border: 1px solid #fecaca;
  border-left-color: #dc2626;
  color: #991b1b;
  font-weight: 500;
}
.alert-success { 
  background: #f0fdf4; 
  border: 1px solid #bbf7d0;
  border-left-color: #16a34a;
  color: #166534;
  font-weight: 500;
}

/* errors */
.form-error { 
  color: #dc2626; 
  font-size: .82rem; 
  min-height: 20px; 
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* side-by-side field pairs */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* phone input with country code prefix */
.phone-wrap { 
  display: flex; 
  gap: 8px;
  width: 100%;
}
.phone-code { 
  width: 120px; 
  flex-shrink: 0;
  padding: 12px 10px;
  font-size: .92rem;
}
.phone-wrap input { 
  flex: 1;
  min-width: 0;
}

/* consent text */
.consent-text { font-size: .76rem; color: #888; line-height: 1.5; margin: 12px 0 4px; }
.consent-text a { color: #1a3a8f; text-decoration: underline; }

/* toast */
#toastArea { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 999; }
.toast { padding: 12px 18px; border-radius: 8px; font-size: .87rem; font-weight: 600; background: #1a1a2e; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.toast-success { background: #166534; }
.toast-warn    { background: #92400e; }

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 24px; min-height: 220px; }
  .auth-panel { padding: 32px 24px; }
  .brand-logo { width: 104px; }
  .topbar-inner { flex-wrap: wrap; justify-content: center; }
  .topbar-nav { order: 3; width: 100%; }
  .market-strip { padding-left: 16px; padding-right: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .stepper { flex-wrap: wrap; gap: 8px; }
}

/* ── Mobile-First Responsive (phones 320px+) ── */
@media (max-width: 640px) {
  /* Viewport and Typography */
  html { font-size: 14px; }
  body { background: #f4f6fb; }
  
  /* Topbar */
  .topbar-inner { padding: 12px 16px; gap: 8px; }
  .brand-logo { width: 100px; }
  .topbar-nav { display: none; }
  .hamburger-btn { display: flex; }
  .nav-link { display: none; }
  .market-strip { gap: 12px; padding: 8px 16px; font-size: 0.65rem; }
  
  /* Auth Layout */
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .auth-hero { padding: 16px; min-height: auto; border-right: none; border-bottom: 1px solid #e5e9f0; }
  .hero-title { font-size: 1.3rem; }
  .hero-body { font-size: 0.8rem; }
  .hero-image-landscape { display: none; }
  .hero-image-illustration { display: none; }
  .auth-panel { padding: 16px; }
  
  /* Forms */
  .card { padding: 16px; margin-bottom: 12px; border-radius: 8px; }
  .card h2 { font-size: 1.1rem; margin-bottom: 8px; }
  .card-sub { font-size: 0.8rem; }
  .section-label { font-size: 0.7rem; margin: 16px 0 8px; }
  .field { margin-bottom: 14px; }
  .field label { font-size: 0.85rem; font-weight: 600; }
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="date"],
  .field input[type="number"],
  .field textarea,
  .field select { 
    width: 100%; 
    padding: 12px 10px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #dde3f0;
  }
  .field-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
  .field-row label { font-size: 0.85rem; }
  
  /* Phone input - responsive on mobile */
  .phone-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .phone-code {
    width: 100%;
    flex-shrink: 0;
    padding: 12px 10px;
    font-size: 0.92rem;
    background: #fff;
    border: 1.5px solid #d1d9ee;
    border-radius: 8px;
    color: #1a1a2e;
    font-family: inherit;
  }
  .phone-code option {
    font-size: 0.9rem;
  }
  .phone-code:focus {
    outline: none;
    border-color: #1a3a8f;
    box-shadow: 0 0 0 4px rgba(26,58,143,.12), inset 0 1px 2px rgba(0,0,0,.05);
    background: #fafbfc;
  }
  .phone-wrap input {
    flex: 1;
    min-width: 0;
    width: 100%;
  }
  
  /* File inputs - Make them more mobile-friendly */
  .field input[type="file"] {
    width: 100%;
    padding: 12px 8px;
    font-size: 16px;
    border: 2px dashed #1a3a8f;
    border-radius: 8px;
    background: #f0f4ff;
    cursor: pointer;
  }
  
  /* Dual file input buttons */
  .file-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
  }
  .file-btn {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    min-height: 48px;
    border-radius: 8px;
    border: 2px solid #1a3a8f;
    background: #fff;
    color: #1a3a8f;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .file-btn.camera-btn {
    background: #1a3a8f;
    color: #fff;
    border-color: #1a3a8f;
  }
  .file-btn.camera-btn:hover {
    background: #0f2463;
    border-color: #0f2463;
  }
  .file-btn.file-btn-secondary:hover {
    background: #f0f4ff;
    border-color: #1a3a8f;
  }
  
  /* Buttons */
  .btn-primary, .btn-outline, .btn-outline-sm {
    padding: 14px 16px;
    font-size: 0.9rem;
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
  }
  .btn-primary {
    background: #1a3a8f;
    color: white;
  }
  .btn-primary:hover, .btn-primary:active {
    background: #0f2463;
  }
  .btn-outline {
    background: white;
    border: 2px solid #1a3a8f;
    color: #1a3a8f;
  }
  .btn-outline-sm {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  /* Stepper */
  .stepper {
    flex-direction: column;
    gap: 8px;
    flex-wrap: wrap;
  }
  .step-item {
    flex: 1 1 auto;
    min-width: 0;
  }
  .step-num {
    font-size: 1rem;
  }
  .step-label {
    font-size: 0.7rem;
  }
  .step-line {
    display: none;
  }
  
  /* Container */
  .app-container {
    max-width: 100%;
    padding: 8px;
  }
  
  /* Applications List */
  .apps-list { gap: 12px; }
  .client-header {
    padding: 18px 16px;
    border-radius: 8px 8px 0 0;
  }
  .client-greeting {
    font-size: 1rem;
  }
  .client-id-display {
    font-size: 0.8rem;
  }
  
  .app-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
  }
  .app-row:last-child {
    border-radius: 0 0 8px 8px;
  }
  .app-left, .app-center, .app-right {
    display: block;
    width: 100%;
  }
  .app-right {
    display: flex;
    justify-content: stretch;
  }
  .app-continue-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
  }
  
  /* Inputs - Better for touch */
  input:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: #1a3a8f;
    box-shadow: 0 0 0 3px rgba(26, 58, 143, 0.1);
  }
  
  /* Completion Screen */
  #completionScreen {
    padding: 16px;
  }
  .done-check {
    font-size: 3rem;
  }
}

/* ── Small Tablets (641px - 1024px) ── */
@media (min-width: 641px) and (max-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr 400px; }
  .auth-hero { padding: 48px 32px; }
  .auth-panel { padding: 40px 28px; }
  .card { padding: 20px; }
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="date"],
  .field input[type="number"],
  .field textarea,
  .field select {
    padding: 11px 10px;
    font-size: 15px;
  }
  .btn-primary { min-height: 44px; }
  .app-row {
    grid-template-columns: 150px 1fr 140px;
  }
}

/* ── Audit Trail and Document Styles ── */
.audit-trail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.audit-event {
  padding: 14px 16px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #f9fafb;
  border-left: 4px solid #1a3a8f;
}

.audit-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.audit-role {
  font-size: 0.8rem;
  color: #65748a;
  font-weight: 400;
}

.audit-time {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 8px;
}

.audit-detail {
  font-size: 0.85rem;
  color: #555;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 4px;
  border-left: 3px solid #f0b429;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.document-item {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-name {
  font-weight: 500;
  color: #1a1a2e;
}

.document-size {
  color: #999;
  font-size: 0.8rem;
}
