:root {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, Arial, sans-serif;
  color: #172b3a;
  background: #eef3f6;
  font-synthesis: none;
  --navy-950: #071b2c;
  --navy-900: #0b2940;
  --navy-800: #123b57;
  --teal: #087d80;
  --teal-hover: #066a6d;
  --teal-soft: #ddf1ef;
  --gold: #c69b55;
  --admin-bg: #f4f7f9;
  --admin-border: #dce5ea;
  --admin-muted: #667985;
  --burgundy: #7a2432;
  --burgundy-hover: #641b27;
  --burgundy-soft: #f3e5e5;
  --cream: #f7f2ea;
  --customer-border: #e4dad1;
  --customer-text: #2f2724;
  --customer-muted: #6e625d;
  --success: #35a774;
  --warning: #d6902f;
  --danger: #e2555c;
  --info: #2f80c9;
  --shadow: 0 10px 30px rgba(15, 35, 50, 0.08);
  --shadow-lg: 0 20px 60px rgba(7, 27, 44, 0.2);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.app-loading { min-height: 100vh; display: grid; place-items: center; color: var(--admin-muted); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

.btn { min-height: 44px; border: 0; border-radius: 10px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; transition: .18s ease; }
.btn:focus-visible, .field:focus-visible, .nav-link:focus-visible { outline: 3px solid rgba(47,128,201,.2); outline-offset: 2px; }
.btn-primary { color: #fff; background: var(--teal); box-shadow: 0 8px 20px rgba(8,125,128,.22); }
.btn-primary:hover { background: var(--teal-hover); transform: translateY(-1px); }
.btn-customer { color: #fff; background: var(--burgundy); box-shadow: 0 8px 20px rgba(122,36,50,.2); }
.btn-customer:hover { background: var(--burgundy-hover); }
.btn-secondary { color: var(--navy-900); background: #fff; border: 1px solid var(--admin-border); }
.btn-soft { color: var(--teal); background: var(--teal-soft); }
.btn-danger-soft { color: #b43c45; background: #ffecef; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.field { width: 100%; min-height: 44px; border: 1px solid var(--admin-border); border-radius: 9px; background: #fff; color: #172b3a; padding: 0 13px; outline: none; }
.field:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,125,128,.1); }
.field-wrap { position: relative; }
.field-wrap .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8ca0ac; }
.field-wrap .field { padding-left: 42px; }
.form-label { display: block; font-size: 13px; color: var(--admin-muted); margin-bottom: 7px; font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.success { color: #267b55; background: #e2f5eb; }
.badge.warning { color: #9d6419; background: #fff2df; }
.badge.danger { color: #b23943; background: #ffe8eb; }
.badge.info { color: #246ba5; background: #e7f3fc; }
.badge.neutral { color: #5e707b; background: #edf1f3; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.demo-launcher { min-height: 100vh; background: radial-gradient(circle at 15% 10%, rgba(8,125,128,.13), transparent 30%), radial-gradient(circle at 85% 15%, rgba(198,155,85,.13), transparent 28%), linear-gradient(135deg, #071b2c, #0b2940 55%, #123b57); color: #fff; padding: 44px 24px; display: grid; place-items: center; }
.launcher-card { width: min(1060px, 100%); background: rgba(255,255,255,.97); color: #172b3a; border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; display: grid; grid-template-columns: 1.03fr .97fr; }
.launcher-copy { padding: 54px; background: linear-gradient(160deg, #fff, #f4f8f9); }
.launcher-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 700; font-size: 13px; letter-spacing: .05em; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(145deg, var(--teal), var(--navy-900)); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(8,125,128,.25); }
.launcher-copy h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.14; margin: 24px 0 18px; letter-spacing: -.04em; }
.launcher-copy p { color: var(--admin-muted); line-height: 1.8; margin: 0; max-width: 530px; }
.launcher-points { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.launcher-point { border: 1px solid var(--admin-border); background: #fff; border-radius: 12px; padding: 14px; display: flex; gap: 11px; font-size: 13px; color: #405766; }
.launcher-point .icon { color: var(--teal); }
.launcher-actions { background: var(--navy-950); padding: 42px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.portal-card { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); border-radius: 16px; padding: 22px; color: #fff; transition: .2s ease; }
.portal-card:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.portal-card .portal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-card h2 { font-size: 20px; margin: 0 0 8px; }
.portal-card p { margin: 0; color: #b9cad4; font-size: 13px; line-height: 1.65; }
.portal-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; }
.portal-customer .portal-icon { background: rgba(198,155,85,.2); color: #f0d9ae; }
.demo-note { font-size: 12px; color: #8ea6b4; line-height: 1.6; padding: 0 4px; }

/* Customer H5 */
.customer-preview { min-height: 100vh; background: radial-gradient(circle at 20% 10%, #fbf6ee, transparent 32%), #e8ecef; display: grid; place-items: center; padding: 26px; }
.customer-preview-stage { display: flex; align-items: center; gap: 28px; }
.preview-caption { width: 270px; color: #435763; }
.preview-caption h2 { color: var(--navy-900); font-size: 28px; margin: 0 0 12px; }
.preview-caption p { line-height: 1.75; color: var(--admin-muted); }
.preview-caption .btn { margin-top: 18px; }
.phone-frame { --customer-safe-top: 24px; width: 390px; height: min(844px, calc(100vh - 52px)); background: var(--cream); border: 9px solid #111a20; border-radius: 42px; overflow: hidden; box-shadow: 0 28px 70px rgba(7,27,44,.27); position: relative; }
.phone-frame::before { content: ""; position: absolute; width: 112px; height: 24px; left: 50%; top: 4px; transform: translateX(-50%); border-radius: 0 0 15px 15px; background: #111a20; z-index: 20; }
.customer-app { height: 100%; overflow: hidden; background: var(--cream); color: var(--customer-text); position: relative; }
.customer-scroll { height: 100%; overflow-y: auto; padding-bottom: 86px; scrollbar-width: none; }
.customer-scroll::-webkit-scrollbar { display: none; }
.customer-header { height: calc(56px + var(--customer-safe-top, 0px)); padding: var(--customer-safe-top, 0px) 16px 0; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 8; background: rgba(247,242,234,.94); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(228,218,209,.7); }
.customer-header h1 { font-size: 17px; margin: 0; }
.icon-button { width: 40px; height: 40px; border: 0; background: transparent; color: inherit; border-radius: 50%; display: grid; place-items: center; }
.icon-button:hover { background: rgba(0,0,0,.05); }
.customer-content { padding: 16px; }
.customer-hero { background: linear-gradient(145deg, #8b3140, var(--burgundy)); color: #fff; padding: 22px; border-radius: 20px; position: relative; overflow: hidden; box-shadow: 0 14px 32px rgba(122,36,50,.23); }
.customer-hero::after { content: ""; position: absolute; width: 160px; height: 160px; border: 26px solid rgba(198,161,91,.18); border-radius: 50%; right: -60px; top: -68px; }
.customer-hero small { color: #f1dfe2; }
.customer-hero h2 { font-size: 25px; margin: 9px 0 5px; }
.customer-hero p { margin: 0; color: #ead5d9; font-size: 13px; }
.customer-card { background: #fff; border: 1px solid var(--customer-border); border-radius: 15px; padding: 16px; box-shadow: 0 5px 18px rgba(72,46,36,.06); }
.customer-card + .customer-card { margin-top: 12px; }
.customer-section { margin-top: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h3 { margin: 0; font-size: 16px; }
.text-link { color: var(--burgundy); font-weight: 600; font-size: 13px; border: 0; background: transparent; padding: 0; }
.reminder-card { margin-top: -26px; position: relative; z-index: 2; }
.reminder-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.amount { font-size: 29px; font-weight: 700; letter-spacing: -.02em; color: var(--burgundy); margin: 10px 0 2px; }
.amount-caption { color: var(--customer-muted); font-size: 12px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 15px; }
.mini-stat { background: #faf7f2; border-radius: 10px; padding: 10px 8px; text-align: center; }
.mini-stat strong { display: block; font-size: 13px; margin-top: 4px; }
.mini-stat span { color: var(--customer-muted); font-size: 11px; }
.loan-facts { margin-top: 12px; border-top: 1px solid #eee5df; }
.loan-facts .breakdown-row { padding: 10px 0; }
.loan-facts .breakdown-row:last-child { border-bottom: 0; }
.rule-note { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #faf4e8; color: #7a6040; font-size: 12px; line-height: 1.6; }
.total-row { margin-top: 4px; padding-top: 14px; border-top: 1px solid #dccfc6; }
.total-row strong { color: var(--burgundy); font-size: 16px; }
.computed-field { background: #eef8f5 !important; color: #176e61 !important; font-weight: 700; }
.rate-field { display: inline-flex; align-items: center; gap: 6px; }
.rate-field input { width: 72px; padding: 8px 10px; border: 1px solid var(--admin-border); border-radius: 8px; font: inherit; color: var(--admin-text); }
.customer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.service-banner { display: flex; align-items: center; gap: 13px; background: linear-gradient(135deg, #fff, #f7ede7); }
.service-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--burgundy-soft); color: var(--burgundy); }
.service-banner strong { display: block; font-size: 15px; }
.service-banner span { color: var(--customer-muted); font-size: 12px; }
.service-banner .icon { margin-left: auto; color: var(--burgundy); }
.product-banner { background: linear-gradient(135deg, #f7efe1, #fffaf2); position: relative; overflow: hidden; }
.product-banner::after { content: ""; position: absolute; right: -30px; bottom: -48px; width: 140px; height: 140px; border-radius: 50%; background: rgba(198,161,91,.14); }
.product-banner h3 { margin: 3px 0 6px; }
.product-banner p { margin: 0 0 14px; color: var(--customer-muted); font-size: 12px; line-height: 1.7; max-width: 75%; }
.customer-bottom-nav { height: 66px; position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255,255,255,.96); border-top: 1px solid var(--customer-border); display: grid; grid-template-columns: repeat(4,1fr); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
.customer-nav-item { border: 0; background: transparent; color: #8a7f79; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; }
.customer-nav-item.active { color: var(--burgundy); font-weight: 700; }
.customer-login { min-height: 100%; background: linear-gradient(180deg, #8a2f3f 0, #7a2432 30%, var(--cream) 30%); padding: 74px 20px 30px; }
.login-brand { color: #fff; margin-bottom: 28px; }
.login-brand .brand-mark { background: #fff; color: var(--burgundy); margin-bottom: 15px; }
.login-brand h1 { font-size: 26px; margin: 0 0 7px; }
.login-brand p { margin: 0; color: #ead6da; font-size: 13px; }
.login-panel { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 18px 44px rgba(78,29,37,.2); }
.login-panel h2 { margin: 0 0 6px; font-size: 19px; }
.login-panel > p { color: var(--customer-muted); font-size: 12px; margin: 0 0 20px; }
.phone-input { height: 50px; border: 1px solid var(--customer-border); border-radius: 11px; display: flex; align-items: center; overflow: hidden; margin-bottom: 13px; }
.phone-input span { padding: 0 12px; border-right: 1px solid var(--customer-border); color: var(--customer-muted); }
.phone-input input { border: 0; outline: 0; height: 100%; width: 100%; padding: 0 12px; color: var(--customer-text); }
.login-help { font-size: 11px; line-height: 1.6; color: var(--customer-muted); text-align: center; margin-top: 15px; }
.login-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.login-benefit { text-align: center; color: var(--customer-muted); font-size: 10px; }
.login-benefit .icon-box { margin: 0 auto 7px; }
.icon-box { width: 38px; height: 38px; border-radius: 12px; background: var(--burgundy-soft); color: var(--burgundy); display: grid; place-items: center; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.tab { border: 1px solid var(--customer-border); background: #fff; color: var(--customer-muted); border-radius: 999px; padding: 8px 13px; font-size: 12px; white-space: nowrap; }
.tab.active { color: #fff; background: var(--burgundy); border-color: var(--burgundy); }
.record-card { cursor: pointer; }
.record-title { display: flex; justify-content: space-between; gap: 10px; }
.record-card h3 { font-size: 15px; margin: 0; }
.record-meta { color: var(--customer-muted); font-size: 12px; line-height: 1.8; margin: 10px 0; }
.record-foot { display: flex; justify-content: space-between; align-items: end; border-top: 1px solid #eee5df; padding-top: 12px; }
.record-foot strong { color: var(--burgundy); font-size: 18px; }
.detail-summary { text-align: center; padding: 22px 16px; }
.detail-summary .badge { margin-bottom: 9px; }
.detail-summary .amount { font-size: 32px; }
.breakdown-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0e8e2; font-size: 13px; }
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row span { color: var(--customer-muted); }
.installment { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0e8e2; }
.installment:last-child { border-bottom: 0; }
.installment-index { width: 26px; height: 26px; border-radius: 50%; background: var(--burgundy-soft); color: var(--burgundy); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.installment small { color: var(--customer-muted); }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0e8e2; }
.doc-row:last-child { border-bottom: 0; }
.doc-row .icon-box { flex: none; }
.doc-row strong { display: block; font-size: 14px; }
.doc-row span { font-size: 11px; color: var(--customer-muted); }
.doc-row .text-link { margin-left: auto; }

.chat-page { height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: #f8f4ef; }
.service-head { padding-top: var(--customer-safe-top, 0px); background: rgba(255,255,255,.98); border-bottom: 1px solid var(--customer-border); }
.chat-title-bar { height: 54px; padding: 0 12px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.chat-title-bar h1 { margin: 0; text-align: center; font-size: 17px; color: var(--customer-text); }
.title-spacer { width: 40px; height: 40px; }
.service-profile-card { min-height: 76px; margin: 0 14px 12px; padding: 11px 12px; display: grid; grid-template-columns: 52px 1fr 36px; align-items: center; gap: 11px; border: 1px solid var(--customer-border); border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(72,46,36,.07); }
.service-photo-wrap { width: 52px; height: 52px; position: relative; display: block; flex: none; }
.service-photo { width: 52px; height: 52px; display: block; border-radius: 50%; object-fit: cover; object-position: center 32%; border: 2px solid #fff; box-shadow: 0 2px 9px rgba(52,37,32,.16); }
.online-indicator { position: absolute; width: 12px; height: 12px; right: 1px; bottom: 2px; border-radius: 50%; background: var(--success); border: 2px solid #fff; }
.service-profile-copy { min-width: 0; display: block; }
.service-profile-title { display: flex; align-items: center; gap: 6px; }
.service-profile-title strong { color: var(--customer-text); font-size: 14px; }
.service-profile-title em { padding: 2px 6px; border-radius: 999px; color: #2e865d; background: #e2f5eb; font-size: 9px; font-style: normal; font-weight: 700; }
.service-profile-copy small { display: block; margin-top: 5px; color: var(--customer-muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(145deg, var(--teal), var(--navy-800)); position: relative; }
.avatar::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--success); border: 2px solid #fff; right: -1px; bottom: -1px; }
.messages { overflow-y: auto; padding: 18px 14px 26px; }
.system-message { text-align: center; color: #9b8e86; font-size: 10px; margin: 5px 0 16px; }
.message { display: flex; margin: 11px 0; }
.message.me { justify-content: flex-end; }
.bubble { max-width: 76%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 4px 14px rgba(72,46,36,.07); font-size: 13px; line-height: 1.55; }
.message.me .bubble { color: #fff; background: var(--burgundy); border-radius: 14px 14px 4px 14px; }
.message-time { font-size: 9px; opacity: .65; margin-top: 4px; text-align: right; }
.chat-compose { padding: 10px; display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: end; background: #fff; border-top: 1px solid var(--customer-border); }
.chat-compose textarea { min-height: 42px; max-height: 100px; resize: none; border: 1px solid var(--customer-border); border-radius: 11px; padding: 10px 12px; outline: none; }
.chat-compose .btn { min-height: 42px; padding: 0 14px; }

/* Admin */
.admin-shell { min-height: 100vh; background: var(--admin-bg); display: grid; grid-template-columns: 240px 1fr; }
.admin-sidebar { background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: #fff; min-height: 100vh; position: sticky; top: 0; padding: 20px 14px; display: flex; flex-direction: column; }
.admin-brand { height: 56px; display: flex; align-items: center; gap: 11px; padding: 0 10px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.admin-brand .brand-mark { width: 38px; height: 38px; }
.admin-brand strong { display: block; font-size: 15px; }
.admin-brand small { color: #8fabbc; font-size: 10px; }
.nav-section-label { color: #688799; font-size: 10px; letter-spacing: .1em; padding: 14px 12px 7px; }
.nav-link { border: 0; width: 100%; background: transparent; color: #a9c0ce; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 13px; border-radius: 9px; text-align: left; margin: 2px 0; position: relative; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: rgba(8,125,128,.34); }
.nav-link.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; background: #63d0cb; border-radius: 0 4px 4px 0; }
.nav-link .nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 10px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
.admin-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.admin-user .avatar { width: 34px; height: 34px; }
.admin-user strong { display: block; font-size: 12px; }
.admin-user small { color: #89a6b7; }
.admin-main { min-width: 0; }
.admin-topbar { height: 64px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.admin-topbar-left { display: flex; align-items: center; gap: 14px; }
.admin-topbar h1 { font-size: 20px; margin: 0; }
.admin-topbar p { font-size: 12px; color: var(--admin-muted); margin: 2px 0 0; }
.admin-topbar-actions { display: flex; align-items: center; gap: 8px; }
.admin-content { padding: 24px; max-width: 1600px; margin: 0 auto; }
.admin-mobile-nav { display: none; }
.admin-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; }
.col-12 { grid-column: span 12; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.admin-card { background: #fff; border: 1px solid var(--admin-border); border-radius: 12px; box-shadow: 0 4px 16px rgba(15,35,50,.05); }
.admin-card-header { min-height: 56px; padding: 14px 18px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-card-header h2, .admin-card-header h3 { font-size: 15px; margin: 0; }
.admin-card-header p { margin: 4px 0 0; font-size: 11px; color: var(--admin-muted); }
.admin-card-body { padding: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.summary-card { background: #fff; border: 1px solid var(--admin-border); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 16px rgba(15,35,50,.05); }
.summary-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.summary-icon.warning { background: #fff2df; color: var(--warning); }
.summary-icon.danger { background: #ffe8eb; color: var(--danger); }
.summary-icon.info { background: #e7f3fc; color: var(--info); }
.summary-card small { color: var(--admin-muted); }
.summary-card strong { display: block; font-size: 25px; margin-top: 3px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .field-wrap { min-width: 220px; flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { border: 1px solid var(--admin-border); background: #fff; color: var(--admin-muted); border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.filter-chip.active { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; color: var(--admin-muted); font-size: 11px; padding: 12px 14px; background: #f7f9fa; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-top: 1px solid var(--admin-border); font-size: 13px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfdfd; }
.table-scroll { overflow-x: auto; }
.customer-cell { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.customer-cell .avatar { width: 34px; height: 34px; font-size: 11px; }
.customer-cell strong { display: block; }
.customer-cell small { color: var(--admin-muted); }
.task-list { display: grid; gap: 9px; }
.task-item { border: 1px solid var(--admin-border); border-radius: 10px; padding: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.task-priority { width: 8px; height: 38px; border-radius: 4px; background: var(--danger); }
.task-priority.warning { background: var(--warning); }
.task-priority.info { background: var(--info); }
.task-item strong { font-size: 13px; }
.task-item p { margin: 3px 0 0; color: var(--admin-muted); font-size: 11px; }
.activity-list { display: grid; gap: 15px; }
.activity { display: grid; grid-template-columns: 12px 1fr; gap: 11px; position: relative; }
.activity::before { content: ""; position: absolute; width: 1px; background: var(--admin-border); left: 5px; top: 15px; bottom: -15px; }
.activity:last-child::before { display: none; }
.activity-dot { width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--teal-soft); background: var(--teal); margin-top: 3px; z-index: 1; }
.activity p { margin: 0; font-size: 12px; }
.activity small { color: var(--admin-muted); }

.split-view { display: grid; grid-template-columns: minmax(360px, .8fr) minmax(430px, 1.2fr); gap: 16px; min-height: calc(100vh - 112px); }
.list-panel, .detail-panel { min-width: 0; }
.list-item { padding: 14px 16px; border-bottom: 1px solid var(--admin-border); cursor: pointer; background: #fff; transition: .15s; }
.list-item:hover { background: #f8fbfb; }
.list-item.active { background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); }
.list-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-item h3 { margin: 0; font-size: 13px; }
.list-item p { margin: 7px 0 0; color: var(--admin-muted); font-size: 11px; line-height: 1.5; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 18px; background: linear-gradient(135deg, #f4fbfa, #fff); border-bottom: 1px solid var(--admin-border); }
.profile-hero .avatar { width: 50px; height: 50px; }
.profile-hero h2 { margin: 0 0 4px; font-size: 18px; }
.profile-hero p { margin: 0; color: var(--admin-muted); font-size: 12px; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.detail-block { background: #f7f9fa; border-radius: 9px; padding: 12px; }
.detail-block small { color: var(--admin-muted); }
.detail-block strong { display: block; margin-top: 4px; font-size: 13px; }

.service-layout { height: calc(100vh - 112px); min-height: 620px; display: grid; grid-template-columns: 330px minmax(440px,1fr) 310px; background: #fff; border: 1px solid var(--admin-border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.conversation-list { border-right: 1px solid var(--admin-border); min-width: 0; display: flex; flex-direction: column; }
.conversation-search { padding: 14px; border-bottom: 1px solid var(--admin-border); }
.queue-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 10px; }
.queue-tab { border: 0; background: #f1f4f6; color: var(--admin-muted); padding: 7px 4px; border-radius: 7px; font-size: 11px; }
.queue-tab.active { color: var(--teal); background: var(--teal-soft); font-weight: 700; }
.conversation-items { overflow-y: auto; }
.conversation-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 14px; border-bottom: 1px solid var(--admin-border); cursor: pointer; }
.conversation-item:hover, .conversation-item.active { background: #f4fbfa; }
.conversation-item.active { box-shadow: inset 3px 0 0 var(--teal); }
.conversation-item h3 { margin: 0; font-size: 13px; }
.conversation-item p { margin: 5px 0 0; color: var(--admin-muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 160px; }
.conversation-meta { text-align: right; font-size: 10px; color: var(--admin-muted); }
.unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; color: #fff; background: var(--danger); display: inline-grid; place-items: center; margin-top: 7px; }
.admin-chat { min-width: 0; display: grid; grid-template-rows: 62px 1fr 68px; }
.admin-chat-header { padding: 0 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--admin-border); }
.admin-chat-header h2 { margin: 0; font-size: 15px; }
.admin-chat-header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10px; }
.admin-chat-header .toolbar { margin-left: auto; }
.admin-messages { overflow-y: auto; padding: 20px; background: #f7f9fa; }
.admin-message .bubble { background: #fff; color: #172b3a; border: 1px solid var(--admin-border); }
.admin-message.me .bubble { background: var(--teal); color: #fff; border-color: var(--teal); }
.admin-compose { padding: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; border-top: 1px solid var(--admin-border); }
.admin-compose input { min-height: 42px; border: 1px solid var(--admin-border); border-radius: 9px; padding: 0 12px; outline: 0; }
.customer-context { border-left: 1px solid var(--admin-border); overflow-y: auto; }
.context-section { padding: 16px; border-bottom: 1px solid var(--admin-border); }
.context-section h3 { font-size: 13px; margin: 0 0 12px; }
.context-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin: 9px 0; }
.context-row span { color: var(--admin-muted); }
.agent-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; }
.agent-row .avatar { width: 30px; height: 30px; font-size: 10px; }
.agent-row strong { display: block; font-size: 11px; }
.agent-row small { color: var(--admin-muted); }
.agent-load { margin-left: auto; font-size: 10px; color: var(--admin-muted); }

.config-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.config-card { background: #fff; border: 1px solid var(--admin-border); border-radius: 12px; padding: 18px; }
.config-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); margin-bottom: 14px; }
.config-card h3 { margin: 0 0 6px; font-size: 15px; }
.config-card p { margin: 0 0 15px; color: var(--admin-muted); font-size: 12px; line-height: 1.6; }
.config-card ul { margin: 0; padding-left: 18px; color: #405766; font-size: 12px; line-height: 1.9; }
.switch { width: 40px; height: 22px; border-radius: 11px; background: #ccd7dd; position: relative; border: 0; transition: .2s; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: .2s; }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(18px); }

.install-link { width: 100%; margin-top: 15px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.guide-row { width: 100%; border: 0; background: transparent; text-align: left; color: inherit; }
.guide-row > .icon:last-child { margin-left: auto; color: var(--burgundy); }
.guide-hero { padding: 20px; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #8b3140, var(--burgundy)); box-shadow: 0 14px 32px rgba(122,36,50,.22); }
.guide-hero h2 { margin: 12px 0 7px; font-size: 22px; }
.guide-hero p { margin: 0 0 16px; color: #f0dce0; font-size: 12px; line-height: 1.7; }
.guide-list { display: grid; gap: 11px; }
.guide-step { position: relative; min-height: 112px; display: grid; grid-template-columns: 30px 1fr 92px; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--customer-border); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(72,46,36,.05); }
.guide-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--burgundy); color: #fff; font-weight: 700; font-size: 12px; }
.guide-copy h3 { margin: 0 0 5px; font-size: 14px; }
.guide-copy p { margin: 0; color: var(--customer-muted); font-size: 11px; line-height: 1.55; }
.guide-visual { min-height: 82px; display: grid; place-items: center; border-radius: 12px; background: #faf6f1; color: var(--burgundy); overflow: hidden; }
.mini-phone { width: 58px; height: 76px; padding: 9px 5px; border: 3px solid #27313a; border-radius: 10px; background: #fff; text-align: center; }
.mini-phone span { display: block; color: #8796a0; font-size: 8px; margin-bottom: 16px; }
.mini-phone b { font-size: 8px; }
.mini-menu, .share-visual { width: 72px; min-height: 58px; padding: 8px; display: grid; place-items: center; gap: 5px; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); font-size: 8px; text-align: center; }
.mini-menu i { font-size: 18px; line-height: 12px; }
.share-visual .icon { width: 20px; height: 20px; }
.home-icon { width: 58px; text-align: center; font-size: 8px; }
.home-icon > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--burgundy), #571923); display: block; margin: 0 auto 5px; }
.home-icon small { color: #6d625c; font-size: 8px; }
.simple-steps { display: grid; gap: 12px; }
.simple-steps > div { display: flex; align-items: center; gap: 11px; }
.simple-steps b { color: var(--burgundy); font-size: 15px; }
.simple-steps span { display: grid; }
.simple-steps strong { font-size: 13px; }
.simple-steps small { color: var(--customer-muted); margin-top: 2px; }

.import-card { padding: 20px; }
.import-drop { min-height: 420px; padding: 42px 22px; border: 2px dashed #b9cdd4; border-radius: 14px; background: linear-gradient(145deg,#f8fbfc,#eef7f7); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.import-drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.import-icon, .recognition-orbit { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: var(--teal); background: #fff; box-shadow: 0 14px 32px rgba(8,125,128,.15); }
.import-drop h2, .recognition-progress h2 { margin: 20px 0 7px; }
.import-drop p, .recognition-progress p { margin: 0 0 20px; max-width: 560px; color: var(--admin-muted); line-height: 1.7; }
.import-drop small { margin-top: 16px; color: var(--admin-muted); }
.recognition-progress { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.recognition-orbit { border-radius: 50%; animation: recognition-pulse 1.2s ease-in-out infinite; }
.progress-track { width: min(520px,90%); height: 8px; overflow: hidden; border-radius: 4px; background: #dce6e9; }
.progress-track i { display: block; width: 78%; height: 100%; background: linear-gradient(90deg,var(--teal),#60c9c4); animation: recognition-progress 1.1s ease both; }
.recognition-points { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; color: #45616e; font-size: 12px; }
.recognition-points span { display: flex; align-items: center; gap: 5px; }
.recognition-points .icon { color: var(--success); }
.import-summary { padding: 14px 18px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--admin-border); }
.import-summary small { margin-left: auto; color: var(--admin-muted); }
.inline-field { width: 100%; min-width: 120px; min-height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; color: #172b3a; background: transparent; }
.inline-field:focus { border-color: var(--teal); background: #fff; outline: 0; }
.import-assurance { padding: 16px 18px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; border-top: 1px solid var(--admin-border); }
.import-assurance > div { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 9px; background: #f7f9fa; color: var(--teal); }
.import-assurance span { display: grid; color: #172b3a; }
.import-assurance small { color: var(--admin-muted); margin-top: 2px; }
.guide-admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.guide-admin-grid .guide-step { grid-template-columns: 30px 1fr; grid-template-rows: auto 110px; border-color: var(--admin-border); box-shadow: none; }
.guide-admin-grid .guide-visual { grid-column: 1/-1; background: #f4f8f9; color: var(--teal); }
.admin-mini b { color: var(--teal); }
.admin-home > .icon { background: linear-gradient(145deg,var(--teal),var(--navy-900)); }
.admin-share { color: var(--teal); }
.admin-steps { grid-template-columns: repeat(2,1fr); }
.admin-steps b { color: var(--teal); }
@keyframes recognition-pulse { 50% { transform: scale(1.06); box-shadow: 0 18px 40px rgba(8,125,128,.25); } }
@keyframes recognition-progress { from { width: 6%; } to { width: 78%; } }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(7,27,44,.5); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal { width: min(560px,100%); max-height: min(760px,90vh); overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--admin-border); display: flex; justify-content: flex-end; gap: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1/-1; }

.loan-ticker { height: 38px; margin: 0 0 12px; border: 1px solid #ead8c8; background: #fffaf3; border-radius: 12px; display: flex; align-items: center; overflow: hidden; color: #725348; font-size: 12px; }
.loan-ticker-label { height: 100%; padding: 0 11px; display: flex; align-items: center; flex: none; color: #fff; background: var(--burgundy); font-weight: 700; position: relative; z-index: 2; }
.loan-ticker-window { overflow: hidden; flex: 1; min-width: 0; }
.loan-ticker-track { width: max-content; display: flex; align-items: center; gap: 34px; padding-left: 24px; white-space: nowrap; animation: loan-ticker-scroll 24s linear infinite; }
.loan-ticker-track span { display: inline-flex; align-items: center; gap: 5px; }
.loan-ticker-track strong { color: var(--burgundy); }
@keyframes loan-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.notification-button { position: relative; }
.notification-button > b { position: absolute; right: 1px; top: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: #df4b58; border: 2px solid #fff; font-size: 9px; line-height: 1; }
.login-events { display: grid; gap: 0; }
.login-event { min-height: 58px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto auto; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--admin-border); }
.login-event:last-child { border-bottom: 0; }
.login-event strong, .login-event small { display: block; }
.login-event small { margin-top: 4px; color: var(--admin-muted); font-size: 12px; }
.login-event time { color: var(--admin-muted); font-size: 12px; }
.login-pulse { width: 9px; height: 9px; border-radius: 50%; background: #2eaf74; box-shadow: 0 0 0 5px rgba(46,175,116,.12); }
.empty-login { display: flex; align-items: center; gap: 14px; color: var(--admin-muted); }
.empty-login strong, .empty-login small { display: block; }
.empty-login small { margin-top: 5px; line-height: 1.6; }
.activity-dot.online { background: #2eaf74; box-shadow: 0 0 0 4px rgba(46,175,116,.12); }
.announcement-admin { display: grid; gap: 0; }
.announcement-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--admin-border); }
.announcement-row:last-child { border-bottom: 0; }
.announcement-row small { display: block; color: var(--admin-muted); margin-top: 4px; }

#toast-root { position: fixed; z-index: 200; right: 20px; top: 20px; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 15px; border-radius: 10px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow-lg); animation: toast-in .2s ease; font-size: 13px; }
.toast.success { background: #287b58; }
.toast.warning { background: #9b661d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.empty-state { text-align: center; padding: 42px 20px; color: var(--admin-muted); }
.empty-state .icon-box { margin: 0 auto 12px; background: #eef4f6; color: #8399a6; }
.empty-state h3 { color: #405766; margin: 0 0 6px; }
.empty-state p { margin: 0; font-size: 12px; }
.mobile-only { display: none; }

@media (max-width: 1199px) {
  .admin-shell { grid-template-columns: 76px 1fr; }
  .admin-brand strong, .admin-brand small, .nav-link span, .nav-section-label, .admin-user > div { display: none; }
  .admin-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-link .nav-count { position: absolute; right: 5px; top: 4px; }
  .service-layout { grid-template-columns: 290px 1fr; }
  .customer-context { display: none; }
  .config-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .launcher-card { grid-template-columns: 1fr; }
  .launcher-copy { padding: 30px 24px; }
  .launcher-actions { padding: 24px; }
  .launcher-points { grid-template-columns: 1fr; }
  .customer-preview { display: block; padding: 0; background: var(--cream); justify-items: stretch; }
  .customer-preview-stage { display: block; width: 100%; max-width: 100vw; }
  .preview-caption { display: none; }
  .phone-frame { --customer-safe-top: env(safe-area-inset-top, 0px); width: 100%; min-width: 0; max-width: 100%; height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .phone-frame::before { display: none; }
  .admin-shell { display: block; min-height: 100vh; padding-bottom: 66px; }
  .admin-sidebar { display: none; }
  .admin-topbar { height: 56px; padding: 0 15px; }
  .admin-topbar h1 { font-size: 17px; }
  .admin-topbar p { display: none; }
  .admin-topbar-actions .btn-secondary { display: none; }
  .admin-content { padding: 14px; }
  .admin-mobile-nav { display: grid; grid-template-columns: repeat(4,1fr); height: 66px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--admin-border); }
  .admin-mobile-nav .customer-nav-item { color: #7a8d98; }
  .admin-mobile-nav .customer-nav-item.active { color: var(--teal); }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .summary-card { padding: 13px; gap: 10px; }
  .summary-icon { width: 39px; height: 39px; }
  .summary-card > span:last-child { min-width: 0; }
  .summary-card strong { font-size: 18px; overflow-wrap: anywhere; }
  .admin-grid { display: block; }
  .admin-grid > * { margin-bottom: 12px; }
  .admin-card-header, .admin-card-body { padding-left: 14px; padding-right: 14px; }
  .admin-card-header { align-items: flex-start; flex-wrap: wrap; }
  .admin-card-header > div:first-child { min-width: 0; flex: 1 1 190px; }
  .admin-card-header > .btn { width: 100%; margin-top: 4px; }
  .table-scroll { overflow: visible; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 1px solid var(--admin-border); padding: 12px 14px; }
  .data-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .data-table td::before { content: attr(data-label); color: var(--admin-muted); font-size: 11px; }
  .data-table td:first-child::before { display: none; }
  .customer-cell { width: 100%; }
  .split-view { display: block; min-height: 0; }
  .detail-panel { display: none; }
  .split-view.show-detail .list-panel { display: none; }
  .split-view.show-detail .detail-panel { display: block; }
  .profile-actions { flex-direction: column; }
  .service-layout { height: calc(100vh - 136px); min-height: 540px; display: block; }
  .conversation-list { border: 0; height: 100%; }
  .admin-chat { display: none; height: 100%; }
  .service-layout.chat-open .conversation-list { display: none; }
  .service-layout.chat-open .admin-chat { display: grid; }
  .admin-chat { grid-template-rows: auto minmax(0,1fr) 62px; }
  .admin-chat-header { min-height: 74px; padding: 8px 10px; gap: 8px; align-content: center; flex-wrap: wrap; }
  .admin-chat-header > span:not(.avatar) { flex: 1; min-width: 118px; }
  .admin-chat-header .avatar { width: 38px; height: 38px; flex: 0 0 38px; }
  .admin-chat-header .toolbar { width: auto; margin-left: auto; gap: 5px; }
  .admin-chat-header .toolbar .btn { min-height: 32px; padding: 0 9px; font-size: 12px; white-space: nowrap; }
  .admin-compose { grid-template-columns: 34px minmax(0,1fr) auto; padding: 8px; gap: 6px; }
  .admin-compose .btn { min-width: 66px; padding: 0 10px; white-space: nowrap; }
  .admin-compose .btn svg { display: none; }
  .config-grid { grid-template-columns: 1fr; }
  .guide-admin-grid, .admin-steps, .import-assurance { grid-template-columns: 1fr; }
  .import-card { padding: 12px; }
  .import-drop { min-height: calc(100vh - 190px); padding: 28px 16px; }
  .import-summary { align-items: flex-start; flex-wrap: wrap; }
  .import-summary small { width: 100%; margin: 3px 0 0; }
  .import-table td:first-child::before { display: block; }
  .inline-field { max-width: 68%; text-align: right; }
  .login-event { grid-template-columns: 10px minmax(0,1fr) auto; }
  .login-event time { grid-column: 2; }
  .login-event .btn { grid-column: 3; grid-row: 1 / span 2; }
  .announcement-row { grid-template-columns: minmax(0,1fr) auto; }
  .announcement-row .btn { grid-column: 1 / -1; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .mobile-only { display: inline-flex; }
  #toast-root { left: 14px; right: 14px; top: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 380px) {
  .customer-content { padding: 13px; }
  .customer-actions { grid-template-columns: 1fr; }
  .mini-grid { gap: 6px; }
  .mini-stat { padding: 9px 4px; }
  .summary-grid { grid-template-columns: 1fr; }
}

.admin-login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 15% 15%, rgba(18,118,128,.16), transparent 34%), #eef4f6; }
.admin-login-card { width: min(1040px,100%); display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); overflow: hidden; border: 1px solid var(--admin-border); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(21,45,56,.14); }
.admin-login-intro { padding: 44px; background: linear-gradient(145deg,#123f4b,#0c6d78); color:#fff; }
.admin-login-intro .brand-mark { margin-bottom: 22px; }
.admin-login-intro h1 { margin: 15px 0 8px; font-size: 34px; }
.admin-login-intro > p { max-width: 620px; color:rgba(255,255,255,.78); line-height:1.75; }
.account-demo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:28px; }
.account-demo { border:1px solid rgba(255,255,255,.22); border-radius:14px; padding:15px; text-align:left; color:#fff; background:rgba(255,255,255,.08); cursor:pointer; }
.account-demo:hover { background:rgba(255,255,255,.16); transform:translateY(-1px); }
.account-demo strong,.account-demo span,.account-demo small { display:block; }
.account-demo span { margin-top:5px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; color:#b9f2ed; }
.account-demo small { margin-top:5px; color:rgba(255,255,255,.68); line-height:1.45; }
.admin-login-form { padding:44px 36px; display:flex; flex-direction:column; justify-content:center; gap:16px; }
.admin-login-form h2 { margin:0; font-size:25px; color:var(--admin-ink); }
.admin-login-form > p { margin:-8px 0 2px; color:var(--admin-muted); }
.admin-login-form label { display:grid; gap:7px; }
.admin-login-form .text-link { align-self:center; }
.scope-pill { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:0 12px; border-radius:999px; background:#e8f6f4; color:var(--teal); font-size:12px; font-weight:700; white-space:nowrap; }
.import-scope { display:flex; align-items:center; gap:16px; margin:0 18px 18px; padding:14px 16px; border:1px solid #b9dedb; border-radius:14px; background:#effaf8; color:var(--admin-ink); }
.import-scope > span { flex:1; display:grid; gap:3px; }
.import-scope small { color:var(--admin-muted); }
.import-scope .field { width:min(300px,100%); }
.import-scope.locked > .icon { color:var(--teal); }
.import-scope.locked > b { color:var(--teal); font-size:17px; }

@media (max-width: 760px) {
  .admin-login-page { padding:0; display:block; background:#fff; }
  .admin-login-card { min-height:100vh; grid-template-columns:1fr; border:0; border-radius:0; box-shadow:none; }
  .admin-login-intro { padding:28px 20px; }
  .admin-login-intro h1 { font-size:27px; }
  .account-demo-grid { grid-template-columns:1fr 1fr; gap:8px; margin-top:18px; }
  .account-demo { padding:11px; }
  .admin-login-form { padding:26px 20px 40px; }
  .scope-pill { max-width:112px; overflow:hidden; text-overflow:ellipsis; }
  .import-scope { margin:0 0 12px; flex-direction:column; align-items:stretch; }
  .import-scope.locked { flex-direction:row; align-items:center; }
}
