* { box-sizing: border-box; }
:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #17243b; background: #f4f7fc; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(8,102,232,.4); outline-offset: 2px; }
.admin-icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.admin-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-brand { display: flex; align-items: center; gap: 9px; color: #073a7b; font-size: 1.05rem; font-weight: 800; letter-spacing: -.025em; }
.admin-brand img { display: block; }
.admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.admin-login-shell { width: min(100%, 430px); }
.admin-login-shell > .admin-brand { margin: 0 auto 22px; justify-content: center; }
.admin-login-card { padding: 26px; border: 1px solid #e8edf5; border-radius: 18px; background: #fff; box-shadow: 0 16px 44px rgba(27,56,95,.1); }
.admin-eyebrow { margin: 0 0 6px; color: #0866e8; font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.admin-login-card h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.admin-login-copy { margin: 8px 0 18px; color: #71819a; font-size: .78rem; line-height: 1.55; }
.admin-form { display: grid; gap: 8px; }
.admin-form label { margin-top: 3px; color: #253953; font-size: .72rem; font-weight: 650; }
.admin-form input, .admin-form textarea { width: 100%; min-width: 0; min-height: 40px; padding: 9px 10px; border: 1px solid #dce5f1; border-radius: 9px; color: #263a57; background: #fff; font-size: .76rem; }
.admin-form textarea { min-height: 100px; resize: vertical; }
.admin-form input::placeholder, .admin-form textarea::placeholder { color: #9aa8bb; }
.admin-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 10px 14px; border: 0; border-radius: 9px; color: #fff; background: #0866e8; box-shadow: 0 5px 12px rgba(8,102,232,.18); font-size: .76rem; font-weight: 700; cursor: pointer; }
.admin-button:hover { background: #0758ca; }
.admin-login-card .admin-button { margin-top: 8px; }
.admin-demo-notice { margin: 15px 0 0; padding: 10px; border-radius: 8px; color: #70551e; background: #fff7e6; font-size: .67rem; line-height: 1.5; }
.admin-back-link { display: block; margin-top: 17px; color: #0866e8; font-size: .75rem; text-align: center; }
.admin-status { display: none; margin: 0; padding: 9px 10px; border-radius: 8px; color: #155e40; background: #eaf8f0; font-size: .7rem; line-height: 1.5; }
.admin-status.is-visible, .admin-page-status.is-visible { display: block; }
.admin-status.is-error, .admin-page-status.is-error { color: #8d2929; background: #fff0ef; }
.admin-shell { min-height: 100vh; }
body.admin-auth-pending .admin-shell { visibility: hidden; }
[hidden] { display: none !important; }
.admin-sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 238px; flex-direction: column; padding: 20px 14px 14px; border-right: 1px solid #e8edf5; background: #fff; }
.admin-sidebar-label { margin: 31px 10px 9px; color: #93a0b2; font-size: .6rem; font-weight: 800; letter-spacing: .12em; }
.admin-nav { display: grid; gap: 4px; }
.admin-sidebar-customers { display: grid; max-height: min(45vh,390px); gap: 3px; overflow-y: auto; }
.admin-sidebar-customer-label { margin-top: 15px; }
.admin-customer-nav { min-width: 0; }
.admin-customer-nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-link, .admin-logout { display: flex; min-height: 42px; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 9px; color: #596a81; background: transparent; font-size: .77rem; text-align: left; cursor: pointer; }
.admin-nav-link:hover, .admin-logout:hover { color: #0866e8; background: #f3f7fd; }
.admin-nav-link.is-active { color: #0866e8; background: #eaf3ff; font-weight: 700; }
.admin-nav-link .admin-icon, .admin-logout .admin-icon { width: 17px; height: 17px; }
.admin-logout { margin-top: auto; }
.admin-workspace { min-height: 100vh; margin-left: 238px; }
.admin-topbar { position: sticky; z-index: 10; top: 0; display: flex; min-height: 72px; align-items: center; gap: 14px; padding: 12px 30px; border-bottom: 1px solid rgba(232,237,245,.8); background: rgba(244,247,252,.96); backdrop-filter: blur(12px); }
.admin-topbar h1 { margin: 0; font-size: .98rem; }
.admin-topbar .admin-eyebrow { margin-bottom: 3px; font-size: .57rem; }
.admin-preview-badge { margin-left: auto; padding: 6px 9px; border-radius: 999px; color: #566a87; background: #e8eef7; font-size: .63rem; font-weight: 700; }
.admin-menu-button, .admin-scrim { display: none; }
.admin-content { width: min(100% - 60px, 920px); margin: 0 auto; padding: 19px 0 50px; }
.admin-demo-warning { margin-bottom: 22px; padding: 11px 13px; border: 1px solid #f1d38f; border-radius: 9px; color: #70551e; background: #fff8e9; font-size: .7rem; line-height: 1.5; }
.admin-section { scroll-margin-top: 90px; margin-bottom: 27px; }
.admin-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.admin-section-heading h2 { margin: 0; color: #17243b; font-size: 1.02rem; letter-spacing: -.02em; }
.admin-section-heading p:not(.admin-eyebrow) { margin: 5px 0 0; color: #71819a; font-size: .73rem; line-height: 1.5; }
.admin-section-heading .admin-eyebrow { margin-bottom: 4px; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.admin-overview-card, .admin-panel, .admin-request-card { min-width: 0; padding: 15px; border: 1px solid #e8edf5; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(27,56,95,.045); }
.admin-overview-card { display: grid; gap: 6px; transition: border-color .15s, transform .15s; }
.admin-overview-card:hover { transform: translateY(-1px); border-color: #b7d4fb; }
.admin-overview-label { color: #71819a; font-size: .68rem; }
.admin-overview-card strong { color: #17243b; font-size: 1.2rem; overflow-wrap: anywhere; }
.admin-overview-card small { color: #8794a7; font-size: .63rem; line-height: 1.4; }
.admin-panel { display: grid; gap: 9px; }
.admin-code-reference { margin-top: 11px; }
.admin-code-reference h3 { margin: 0; color: #17243b; font-size: .86rem; }
.admin-code-reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-code-reference-grid p { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; margin: 0; color: #506482; font-size: .72rem; }
.admin-code-reference-grid code { padding: 5px 8px; border: 1px solid #e8edf5; border-radius: 6px; color: #17243b; background: #f7f9fc; font-size: .78rem; font-weight: 700; letter-spacing: .08em; }
.admin-form select { width: 100%; min-width: 0; min-height: 40px; padding: 9px 10px; border: 1px solid #dce5f1; border-radius: 9px; color: #263a57; background: #fff; font-size: .76rem; }
.admin-customer-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 11px; }
.admin-customer-list { display: grid; max-height: 270px; gap: 6px; overflow-y: auto; }
.admin-customer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; margin-top: 14px; }
.admin-customer-search-label { display: block; margin-top: 18px; color: #253953; font-size: .72rem; font-weight: 650; }
.admin-customer-search { width: 100%; min-height: 40px; margin-top: 6px; padding: 9px 10px; border: 1px solid #dce5f1; border-radius: 9px; color: #263a57; background: #fff; font: inherit; font-size: .76rem; }
.admin-customer-option { width: 100%; padding: 9px 10px; border: 1px solid #edf1f7; border-radius: 8px; color: #596a81; background: #fff; font-size: .68rem; line-height: 1.45; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.admin-customer-card { display: grid; gap: 4px; text-align: left; }
.admin-customer-card strong { color: #17243b; font-size: .8rem; }
.admin-customer-card span { font-size: .69rem; }
.admin-customer-card code { color: #8794a7; font-size: .62rem; overflow-wrap: anywhere; }
.admin-customer-card small { width: fit-content; padding: 3px 7px; border-radius: 999px; color: #155e40; background: #eaf8f0; font-size: .6rem; font-weight: 700; }
.admin-customer-card small.is-inactive { color: #8d2929; background: #fff0ef; }
.admin-overview-heading { align-items: center; }
.admin-customer-summary-panel { margin-bottom: 20px; }
.admin-customer-detail-content { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.admin-customer-detail-content > div { min-width: 0; }
.admin-customer-detail-content dt { color: #8794a7; font-size: .62rem; }
.admin-customer-detail-content dd { margin: 3px 0 0; color: #263a57; font-size: .7rem; font-weight: 650; overflow-wrap: anywhere; }
.admin-page-view .admin-section { margin-bottom: 25px; }
.admin-customer-option:hover, .admin-customer-option.is-selected { border-color: #b7d4fb; color: #0866e8; background: #f3f8ff; }
.admin-customer-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; }
.admin-customer-details > div { min-width: 0; }
.admin-customer-details dt { color: #8794a7; font-size: .62rem; }
.admin-customer-details dd { margin: 3px 0 0; color: #263a57; font-size: .7rem; font-weight: 650; overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-balance-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-balance-actions > .admin-button { flex: 1 1 120px; }
.admin-button-secondary { min-height: 34px; padding: 7px 10px; border: 1px solid #dce5f1; color: #52657e; background: #fff; box-shadow: none; font-size: .67rem; }
.admin-button-secondary:hover { color: #0866e8; background: #f3f7fd; }
.admin-button:disabled { opacity: .5; cursor: not-allowed; }
.admin-create-customer { margin-top: 11px; }
.admin-create-customer h3 { margin: 0; font-size: .82rem; }
.admin-request-update { grid-template-columns: minmax(130px,.7fr) minmax(180px,1fr) auto; align-items: end; margin-top: 12px; }
.admin-request-history { display: grid; gap: 0; margin-top: 10px; padding-top: 4px; border-top: 1px solid #edf1f7; }
.admin-request-history .admin-list-item { padding-block: 7px; }
.child-account-panel { max-width: 560px; }
.child-customer-id { overflow-wrap: anywhere; color: #17243b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }
.admin-current-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; padding-bottom: 10px; border-bottom: 1px solid #edf1f7; }
.admin-current-value span { color: #71819a; font-size: .72rem; }
.admin-current-value strong { color: #0866e8; font-size: .92rem; }
.admin-profile-image-row { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid #edf1f7; }
.admin-profile-image { width: 66px; height: 66px; flex: none; border: 1px solid #e8edf5; border-radius: 50%; object-fit: cover; }
.admin-profile-image-fallback { display: grid; width: 66px; height: 66px; flex: none; place-items: center; border: 1px solid #e8edf5; border-radius: 50%; color: #fff; background: linear-gradient(140deg, #d28368, #694674 58%, #315485); font-size: .82rem; font-weight: 800; }
.admin-profile-image-row > div { display: grid; flex: 1; gap: 5px; }
.admin-profile-image-row small { color: #8794a7; font-size: .64rem; line-height: 1.4; }
.admin-profile-image-row input { min-height: 36px; padding: 6px; font-size: .68rem; }
.admin-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 12px; }
.admin-field-grid > div { display: grid; min-width: 0; gap: 5px; }
.admin-field-wide { grid-column: 1 / -1; }
.admin-recent-list { margin-top: 9px; }
.admin-recent-list h3 { margin: 0 0 8px; font-size: .8rem; }
.admin-list-item { display: grid; gap: 4px; padding: 9px 0; border-top: 1px solid #edf1f7; }
.admin-list-item strong { font-size: .73rem; }
.admin-list-item p { margin: 0; color: #596a81; font-size: .7rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-list-item time { color: #8794a7; font-size: .62rem; }
.admin-empty { margin: 0; padding: 13px; border: 1px dashed #dce5f1; border-radius: 9px; color: #71819a; font-size: .7rem; text-align: center; }
.admin-request-list { display: grid; gap: 10px; }
.admin-request-card { padding: 15px; }
.admin-request-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid #edf1f7; }
.admin-request-heading h3 { margin: 0; font-size: .82rem; }
.admin-request-status { padding: 5px 8px; border-radius: 999px; color: #8a641c; background: #fff4d8; font-size: .61rem; font-weight: 700; white-space: nowrap; }
.admin-request-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 11px 0 0; }
.admin-request-fields > div { min-width: 0; }
.admin-request-fields dt { color: #8794a7; font-size: .62rem; }
.admin-request-fields dd { margin: 3px 0 0; color: #263a57; font-size: .7rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-page-status { display: none; margin: 0; padding: 10px; border-radius: 8px; color: #155e40; background: #eaf8f0; font-size: .7rem; }

@media (max-width: 900px) {
  .admin-sidebar { width: 218px; }
  .admin-workspace { margin-left: 218px; }
  .admin-content { width: min(100% - 36px, 720px); }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-code-reference-grid { grid-template-columns: 1fr; }
  .admin-customer-layout { grid-template-columns: 1fr; }
  .admin-customer-detail-content { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .admin-sidebar { width: min(290px,calc(100vw - 56px)); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 35px rgba(21,46,79,.14); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-workspace { margin-left: 0; }
  .admin-menu-button { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border: 1px solid #edf1f7; border-radius: 10px; color: #1c2a42; background: #fff; cursor: pointer; }
  .admin-scrim { position: fixed; z-index: 19; inset: 0; display: block; border: 0; background: rgba(8,25,48,.38); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .admin-scrim.is-visible { opacity: 1; pointer-events: auto; }
  .admin-topbar { min-height: 62px; gap: 10px; padding: 10px 16px; }
  .admin-content { width: min(100% - 32px, 620px); padding-top: 15px; }
}
@media (max-width: 480px) {
  .admin-content { width: calc(100% - 28px); }
  .admin-topbar h1 { font-size: .9rem; }
  .admin-preview-badge { padding: 5px 7px; font-size: .58rem; }
  .admin-demo-warning { font-size: .66rem; }
  .admin-field-grid, .admin-request-fields { grid-template-columns: 1fr; }
  .admin-customer-details { grid-template-columns: 1fr; }
  .admin-customer-grid { grid-template-columns: 1fr; }
  .admin-customer-detail-content { grid-template-columns: 1fr; }
  .admin-request-update { grid-template-columns: 1fr; }
  .admin-field-wide { grid-column: auto; }
  .admin-current-value { align-items: flex-start; flex-direction: column; gap: 4px; }
  .admin-login-card { padding: 20px; }
  .admin-profile-image { width: 56px; height: 56px; }
}
@media (max-width: 340px) { body { min-width: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }