.theme-control{display:flex;align-items:center;gap:8px;justify-content:flex-end;padding:10px 24px;font-size:12px}.theme-control select{width:auto;min-height:32px;padding:5px 9px}.customer-workspace{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:24px}.customer-directory{align-self:start}.customer-directory .search{width:100%;margin-bottom:16px}.customer-choices{display:grid;gap:8px;padding:10px}.customer-choice{display:flex;align-items:center;gap:12px;text-align:left;width:100%;border:0;padding:14px}.customer-choice.active{background:#dceef8}.customer-choice strong{display:block}.customer-avatar{width:44px;height:44px;border-radius:10px;background:#d8e9f3;display:grid;place-items:center;flex-shrink:0;font-weight:700;color:#24516d}.customer-header{display:flex;align-items:center;gap:16px}.customer-header h2{font-size:21px}.customer-details{display:grid;grid-template-columns:1fr 1fr;gap:20px}.customer-details dt{font-size:12px;color:var(--muted);margin:0 0 5px}.customer-details dd{margin:0;overflow-wrap:anywhere}.customer-summary{grid-template-columns:repeat(3,1fr)}.folder-route{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:14px 0;border-top:1px solid var(--line)}.folder-route .actions{justify-content:flex-end}.picker-dialog{z-index:10000!important}.picker-dialog-bg{z-index:9999!important}
:root[data-theme=dark]{color-scheme:dark;background:#1b2730;color:#e7eef5;--blue:#21818c;--navy:#152630;--muted:#a9bfce;--line:#3a4f5d}
[data-theme=dark] body{background:#1b2730;color:#e7eef5}[data-theme=dark] .card,[data-theme=dark] .stat,[data-theme=dark] .topbar,[data-theme=dark] dialog,[data-theme=dark] main:not(.main){background:#24343f;color:#e7eef5}[data-theme=dark] .actions{background:transparent!important}[data-theme=dark] .card-head,[data-theme=dark] td,[data-theme=dark] th,[data-theme=dark] .payment{border-color:#3a4f5d}[data-theme=dark] th{background:#2c3d49;color:#bed1df}[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select,[data-theme=dark] button,[data-theme=dark] .file-label{background:#20313c;color:#e7eef5;border-color:#4a6272}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#a6bac9}[data-theme=dark] button:hover{background:#344c59}[data-theme=dark] .primary,[data-theme=dark] button.primary{background:#247d86;color:#fff;border-color:#3c9da6}[data-theme=dark] a,[data-theme=dark] .link{color:#8ed6ff}[data-theme=dark] .secondary,[data-theme=dark] .field label,[data-theme=dark] .save-state,[data-theme=dark] .row-total{color:#adc3d2}[data-theme=dark] .notice{background:#463b26;color:#ffe3a6;border-color:#6d5b34}[data-theme=dark] .notice.info{background:#253f50;color:#cae7f9;border-color:#3d6078}[data-theme=dark] .notice.error,[data-theme=dark] .badge.red{background:#512f36;color:#ffc4cb}[data-theme=dark] .badge.green{background:#234c45;color:#b0ead9}[data-theme=dark] .badge.amber{background:#51472d;color:#ffe4a6}[data-theme=dark] .badge{background:#3b4f5d;color:#d9e6ef}[data-theme=dark] .danger{color:#ffb5bd}[data-theme=dark] .mono,[data-theme=dark] .operator,[data-theme=dark] .customer-choice.active{background:#334c59;color:#e5f4ff}[data-theme=dark] .customer-avatar{background:#3b5665;color:#c2e5f9}[data-theme=dark] .stat.accent{background:#234b50}[data-theme=dark] .legal-footer{background:#152630}[data-theme=dark] .legal-footer a{color:#aecbde}[data-theme=dark] .summary-total{border-color:#3a4f5d}[data-theme=dark] .tab-strip button.active{background:#355363;border-color:#6898b4;color:#e7f4ff}
@media(max-width:1000px){.customer-workspace{grid-template-columns:230px minmax(0,1fr)}.customer-summary{grid-template-columns:1fr}.customer-details{grid-template-columns:1fr}}
@media(max-width:760px){.customer-workspace{grid-template-columns:1fr}.customer-choices{max-height:240px;overflow:auto}.customer-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.customer-summary .stat strong{font-size:17px}.folder-route{align-items:flex-start;flex-direction:column}.theme-control{padding:10px 18px}}
@media print{:root[data-theme=dark],[data-theme=dark] body,[data-theme=dark] main:not(.main){background:white;color:black}.theme-control{display:none}}

.account-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.theme-buttons{display:flex;gap:4px}.theme-buttons button{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #426174;border-radius:8px;background:transparent;color:#c5dce9;font-size:21px;line-height:1}.theme-buttons button[aria-pressed=true]{background:#315b70;color:#fff;border-color:#7ccbe7}.theme-buttons button:hover{background:#294b5d}.theme-buttons button:focus-visible{outline:2px solid #8ed6ff;outline-offset:2px}

/* Sidebar navigation keeps the same flat treatment in both themes. */
[data-theme=dark] .nav button{background:none;color:#91aebe;border:0;box-shadow:none}
[data-theme=dark] .nav button.active{background:#1d3b4f;color:white}
[data-theme=dark] .nav button:hover{background:#183244;color:white}

/* Google positions its dialog in the document. Keep it in the visible viewport. */
.picker-dialog{min-width:0!important;position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:0!important;box-sizing:border-box!important}
.picker-dialog-bg{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important}
.picker-dialog-content{max-width:100%!important;max-height:calc(100dvh - 70px)!important}
.picker-dialog iframe{min-width:0!important;max-width:100%!important;max-height:calc(100dvh - 70px)!important}
input:disabled{opacity:.45;cursor:not-allowed}.discount-switch{font-size:12px;white-space:nowrap}.card-head{flex-wrap:wrap}
.row-editor{grid-template-columns:minmax(180px,3fr) repeat(var(--row-fields,3),minmax(55px,1fr)) 30px}
.row-editor textarea{height:auto;min-height:48px;overflow-y:hidden;resize:vertical;line-height:1.4}
[data-theme=dark] .summary-line strong{color:#e7eef5}
#toast{z-index:20000}dialog #toast{position:sticky;bottom:0;left:auto;transform:none;margin:18px 0 0;max-width:100%;width:100%}
.sidebar{overflow-y:auto}.mobile-menu,.nav-backdrop{display:none}
@media(max-width:1150px){.row-editor{grid-template-columns:repeat(4,minmax(0,1fr))}.row-editor .field:first-child{grid-column:1/-1}}
@media(max-width:760px){
 .mobile-menu{display:block}.shell{display:block}.sidebar{position:fixed;left:0;top:0;width:min(300px,85vw);height:100dvh;padding:25px 18px;display:flex;z-index:120;transform:translateX(-100%);visibility:hidden;transition:transform .18s,visibility .18s}
 .nav-open{overflow:hidden}.nav-open .sidebar{transform:translateX(0);visibility:visible}.close-menu{align-self:flex-end;background:transparent;color:#d9e6ed;border:0;font-size:24px;padding:0 8px}
 .sidebar .brand{margin:10px 6px 28px}.sidebar .nav-label,.sidebar-bottom .user-mini{display:block}.sidebar .nav,.sidebar-bottom .nav{display:grid;overflow:visible;gap:5px}.sidebar .nav button{font-size:14px;padding:13px 15px;white-space:normal}.sidebar .nav span{display:inline-block}.sidebar-bottom{margin-top:auto;padding-top:25px}
 .nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:110;background:#08131c99;border:0;border-radius:0;width:100%;height:100dvh}
 .row-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.row-editor .row-total{grid-column:1/-1}.discount-switch{font-size:11px}.topbar>span{flex:1}.topbar .connection{width:100%;flex-wrap:wrap}.card-head{gap:10px}
}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

@media(max-width:760px){.topbar{position:sticky;top:0;z-index:100}}

/* Balanced back buttons and a compact, branded phone header. */
button.back{display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.4;padding:10px 15px;border:1px solid var(--line)}
@media(max-width:760px){
 .topbar{min-height:62px;flex-wrap:nowrap;justify-content:flex-start;gap:14px}
 .topbar .desktop-breadcrumb,.topbar .connection{display:none}
 .topbar .mobile-brand{display:flex;align-items:center;gap:10px;flex:1;color:inherit;text-decoration:none;font-size:19px;font-weight:800;letter-spacing:1px}
 .mobile-brand img{width:29px;height:34px}
 .topbar .mobile-menu{display:grid;place-items:center;width:40px;height:40px;padding:0;font-size:22px;background:transparent;border:0}
}
