/* Phone first: a small working surface for sales, a separate management area. */
:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Noto Sans SC',sans-serif;--safe-bottom:env(safe-area-inset-bottom,0px)}
:root[data-view="dashboard"]{--page-accent:#325f9e;--page-soft:#eaf1fb;--page-line:#d2dff0;--page-canvas:#f3f6fa}
:root[data-view="accounts"]{--page-accent:#76579e;--page-soft:#f0eafa;--page-line:#ded2ef;--page-canvas:#f7f5fb}
:root[data-view="import"]{--page-accent:#287868;--page-soft:#eaf5f1;--page-line:#d1e7df;--page-canvas:#f3f8f5}
button,input,select{touch-action:manipulation}
button{min-height:40px}
.primary{font-size:var(--text-body);font-weight:600;min-height:46px}
.primary.full{width:100%}.primary.compact{padding:10px 15px}
.outline{font-size:var(--text-small);min-height:40px}
.mobile-cards{display:none}
.demo-accounts .account-links{flex-wrap:wrap}.account-links button{flex:1 1 90px}
.install-icon{display:grid;place-items:center;width:36px;min-height:36px;border:1px solid #dfe7e0;border-radius:8px;color:#58715f;background:#f8faf7}
.install-icon svg{width:19px;height:19px}
.install-help{text-align:center;line-height:1.9}.install-help img{border-radius:18px;margin:10px auto 17px}.install-help p{color:#53635a;font-size:var(--text-body)}.install-help small{color:#59856b;font-size:var(--text-small)}
.connection-banner{padding:9px 20px;background:#fff2d9;text-align:center;font-size:var(--text-small);font-weight:600;color:#936921}
.update-banner{padding:10px 20px;background:#e6eefc;display:flex;gap:14px;align-items:center;justify-content:center;font-size:var(--text-small);color:#4e6798}
.update-banner button{background:#fff;border-radius:5px;padding:4px 12px;font-size:var(--text-small);color:#375d96;min-height:30px}
.connection-banner[hidden],.update-banner[hidden],.install-icon[hidden]{display:none}
.manager-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:25px}
.manager-heading h1{font-size:28px;font-weight:650;letter-spacing:-.5px;color:#2e3e50}.manager-heading p{font-size:var(--text-small);color:#87958d;margin-top:7px}
.manager-heading .eyebrow{font-size:var(--text-small);letter-spacing:1px;color:#8b9cb5}
.manager-heading>input{font-size:var(--text-label);color:#61768d;background:#fff;border:1px solid #dce4ee;border-radius:8px;padding:10px;min-height:42px;max-width:165px}
.manager-heading>select{font-size:var(--text-label);color:#61768d;background:#fff;border:1px solid #dce4ee;border-radius:8px;padding:10px;min-height:44px;max-width:180px}
.manager-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.metric{border:1px solid #d8e5f6;background:#eaf2ff;border-radius:13px;padding:21px}
.metric>span{font-size:var(--text-small);color:#71839b;display:block;line-height:1.5}.metric>strong{font-size:32px;font-weight:650;letter-spacing:-1px;display:block;margin-top:10px;color:#355f96;line-height:1.1;overflow-wrap:anywhere}.metric>small{font-size:var(--text-small);color:#879ab4;display:block;margin-top:6px}
.metric-orange{border-color:#f0e0c6;background:#fff4e3}.metric-orange>strong{color:#9d7136}.metric-orange>span{color:#9c8667}
.metric-green{border-color:#d8e9dc;background:#edf7ee}.metric-green>strong{color:#4a7b51}.metric-green>span{color:#7d977f}
.metric-purple{border-color:#e4dcf4;background:#f3edfd}.metric-purple>strong{color:#7c619f}.metric-purple>span{color:#9787ad}
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.dashboard-bottom{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px}
.dashboard-filters{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(150px,1fr);gap:12px;max-width:450px}.dashboard-filters>div{display:grid;gap:7px;min-width:0}.dashboard-filters label{font-size:var(--text-small);color:#71839b}.dashboard-filters select{width:100%;min-width:0;min-height:44px;font-size:var(--text-label);color:#61768d;background:#fff;border:1px solid #dce4ee;border-radius:8px;padding:10px}
.manager-panel{padding:23px;border-color:#e1e7ef;overflow:hidden}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.section-head h2{font-size:var(--text-body);font-weight:600;color:#465a6d}.section-head .text-button{font-size:var(--text-small)}
.daily-chart{padding-top:8px}.daily-chart svg{width:100%;height:auto;max-height:210px;stroke:none;fill:none;overflow:visible}.daily-chart svg text{font-family:inherit}.chart-period{text-align:center;color:#98a6b7;font-size:var(--text-small);margin-top:9px}
.performance-list{display:grid;gap:22px}.performance-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.performance-heading .client-name{font-size:var(--text-label);color:#405b79}.performance-heading>strong{font-size:var(--text-section);font-weight:600;white-space:nowrap;color:#3d5f87}.performance-heading small{font-size:var(--text-small);font-weight:400;color:#8ea0b1}
.performance-detail{display:flex;justify-content:space-between;gap:10px;font-size:var(--text-small);color:#91a0ae;margin-top:6px}.performance-progress{height:5px;background:#e9eff6;border-radius:10px;overflow:hidden;margin-top:8px}.performance-progress span{height:100%;background:#82a6ce;border-radius:10px;display:block}.performance-last{font-size:var(--text-small);color:#a2adb8;margin-top:7px}
.review-list{display:grid;gap:19px}.review-row{display:flex;gap:11px;align-items:flex-start}.review-dot{width:7px;height:7px;flex-shrink:0;margin-top:4px;background:#d5a15d;border-radius:50%}.review-row strong{font-size:var(--text-small);font-weight:600;color:#8b795c}.review-row p{font-size:var(--text-small);color:#96917f;line-height:1.8;margin-top:4px}.panel-empty{font-size:var(--text-small);color:#95a398;line-height:1.9}
.setup-actions{display:grid;gap:15px}.setup-actions>button{display:flex;gap:13px;align-items:center;text-align:left;width:100%;padding:8px 0}.setup-actions>button>span:nth-child(2){flex:1}.setup-actions strong{font-size:var(--text-small);font-weight:500;color:#55695c;display:block}.setup-actions small{font-size:var(--text-small);color:#99a596;display:block;margin-top:5px}.setup-actions>button>svg{width:14px;height:14px;color:#a1b3a2}
.setup-icon{width:42px;height:42px;background:#eaf5ee;border-radius:10px;display:grid;place-items:center;color:#6e9478}.setup-icon.purple{background:#f1eafb;color:#9a83b7}.setup-icon svg{width:19px;height:19px}
.account-summary{display:flex;gap:8px;align-items:baseline;font-size:var(--text-small);color:#88977e;margin-bottom:20px}.account-summary>strong{font-size:23px;color:#6c6380}.account-summary>span{margin-left:auto;font-size:var(--text-small);color:#acb4a6}
.account-list{display:grid;gap:14px}.account-card{display:flex;align-items:center;gap:15px;padding:20px}.account-avatar{width:44px;height:44px;border-radius:12px;background:#eee8f6;color:#9383ad;display:grid;place-items:center;font-size:var(--text-small);text-transform:uppercase;flex-shrink:0}.account-avatar.disabled{background:#f0f1ee;color:#b1b8ab}.account-info{flex:1;min-width:0}.account-info>strong{display:block;font-size:var(--text-body);font-weight:600;color:#5b5871;overflow-wrap:anywhere}.account-info>small{display:block;font-size:var(--text-small);color:#a6ad9b;margin-top:7px}.account-controls{display:flex;gap:18px;align-items:center}.account-status{display:inline-flex;align-items:center;font-size:var(--text-small);color:#7a9d70;background:#f0f6e9;border-radius:20px;padding:5px 9px}.account-status.inactive{background:#f2f1ec;color:#a6a696}.soft-danger{color:#b27373;background:#fffafa;border-color:#ecdada}
.import-card{padding:25px}.upload-zone{border:1.5px dashed #ccdcd3;border-radius:12px;background:#f7faf8;display:flex;flex-direction:column;align-items:center;gap:9px;padding:30px 20px;position:relative;text-align:center;cursor:pointer}.upload-zone input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.upload-icon{width:46px;height:46px;background:#e7f1ea;border-radius:12px;color:#729c7d;display:grid;place-items:center;margin-bottom:6px}.upload-icon svg{width:23px;height:23px}.upload-zone strong{font-size:var(--text-body);font-weight:500;color:#74937a}.upload-zone>span:last-of-type{font-size:var(--text-small);color:#afbaab}.upload-zone:focus-within{outline:3px solid #9dbca5;outline-offset:3px}
.import-fields{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:17px;margin:23px 0}.import-fields input,.import-fields select{height:45px}
.import-history{margin-top:22px}.count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:23px;min-height:23px;border-radius:6px;background:#edf3ee;color:#92a48e;font-size:var(--text-small)}.imported-file{display:flex;align-items:center;gap:13px;border-top:1px solid #edf1e9;padding:17px 0}.imported-file>div{flex:1;min-width:0}.imported-file strong{font-size:var(--text-small);font-weight:500;display:block;color:#758270;overflow-wrap:anywhere}.imported-file small{font-size:var(--text-small);display:block;color:#a6b09c;margin-top:6px}.file-icon{color:#93a38a}.imported-check{color:#8fb18b}.imported-check svg{width:15px}
.import-preview{border-top:1px solid #e5ece5;margin-top:25px;padding-top:22px}.preview-heading strong{font-size:var(--text-label);font-weight:600;color:#63836a;overflow-wrap:anywhere;display:block}.preview-heading>span{font-size:var(--text-small);color:#92a187;margin-top:6px;display:block}.preview-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:21px 0}.preview-metrics>div{border:1px solid #e6ece1;border-radius:9px;padding:14px;text-align:center;background:#f9fbf6}.preview-metrics strong{font-size:23px;font-weight:600;color:#788f69;display:block}.preview-metrics span{font-size:var(--text-small);color:#9cab8e;display:block;margin-top:6px}.preview-note{font-size:var(--text-small);line-height:1.8;color:#8fa080;display:flex;gap:8px;align-items:center;margin:13px 0}.preview-note svg{width:16px;height:16px}.import-issues{font-size:var(--text-small);color:#a39070;background:#fbf8ed;border:1px solid #eee5c9;border-radius:7px;padding:11px 13px;margin-bottom:17px}.import-issues summary{cursor:pointer;font-weight:500}.import-issues p{margin-top:10px;line-height:1.7}.preview-months{margin:18px 0 22px}.preview-months>div{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #f0f3eb;padding:8px 0;font-size:var(--text-small);color:#97a38c}.preview-months strong{font-size:var(--text-small);font-weight:500;color:#7d926d}
.header-user-name{max-width:160px}
.nav button{font-size:var(--text-label)}.field input,.field select{font-size:var(--text-body)}.field label{font-size:var(--text-small)}
@media(max-width:1100px){.dashboard-grid,.dashboard-bottom{grid-template-columns:1fr}.manager-metrics{gap:11px}.metric{padding:17px}.metric>strong{font-size:28px}}
@media(max-width:880px){
  body{overflow-x:hidden}
  .shell{display:block;padding-bottom:calc(82px + var(--safe-bottom))}
  .sidebar{position:fixed;inset:auto 0 0;width:100%;height:calc(72px + var(--safe-bottom));padding:0 10px var(--safe-bottom);display:block;background:#fff;border-right:0;border-top:1px solid #e1e7e1;z-index:20;box-shadow:0 -6px 24px #233e2c05}
  .sidebar>.brand,.sidebar-bottom,.workspace,.nav-label{display:none}
  .nav{height:72px;display:flex;gap:4px;justify-content:space-around}
  .nav button{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-height:60px;border-radius:10px;padding:7px 3px;font-size:var(--text-small);color:#97a28f;position:relative}
  .nav button svg{width:22px;height:22px;stroke-width:1.7}
  .nav button.active{background:transparent;color:var(--page-accent);box-shadow:none;font-weight:600}
  .nav button.active:before{content:'';position:absolute;top:3px;width:30px;height:3px;border-radius:3px;background:var(--page-accent)}
  .topbar{position:sticky;top:0;z-index:15;height:calc(63px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 16px 0;background:#fcfdfb;border-bottom-color:#e6ebe4}
  .top-left,.topbar .today-date{display:none}
  .mobile-brand{display:flex}.mobile-brand strong{font:26px Georgia,serif;letter-spacing:-1.5px}
  .top-right{gap:8px}.header-user{gap:4px;padding-left:8px}.header-user-name{font-size:var(--text-small);max-width:110px;color:#52624e}.header-user .logout{width:34px;min-height:40px}
  .language{font-size:var(--text-small);min-height:36px;padding:5px 7px}.install-icon{width:34px;min-height:36px}.install-icon svg{width:18px}
  .content{padding:21px 16px 12px;max-width:650px;margin:auto}
  .page-heading{margin-bottom:19px}.page-heading h1{font-size:25px}.page-footer{padding-top:20px}.page-footer button{font-size:var(--text-small);min-height:32px}
  .entry-grid{display:block;margin-bottom:16px}.entry-card{padding:22px 20px;border-radius:16px;border-top-width:3px}
  .goal-card{display:none}.fields{display:grid;grid-template-columns:1fr;gap:18px}
  .field{gap:9px}.field label{font-size:var(--text-label);color:#6e806a;font-weight:500}.field input,.field select,.field input::placeholder{font-size:var(--text-body);height:53px;border-radius:8px}
  .field input::placeholder{font-size:var(--text-body)}.field .search-input{padding-left:41px}.input-icon{width:18px;height:18px;bottom:17px;left:14px}
  .quantity input,.quantity input::placeholder{font-size:36px;height:65px;padding-left:17px;letter-spacing:-.7px}.input-suffix{font-size:var(--text-small);bottom:22px;right:18px}
  .date-row{margin-top:17px;gap:9px}.date-field{gap:7px;font-size:var(--text-small);flex:1}.date-field svg{width:17px;height:17px}.date-field input{font-size:var(--text-body);width:155px;height:42px;border:1px solid #e9eee4;background:#f8faf5;border-radius:7px;padding:4px 7px;color:#768c68}.today-button{font-size:var(--text-small);min-height:40px;padding:4px;color:#859974}
  .form-hint{font-size:var(--text-small);line-height:1.8;margin-top:12px}.save-row{margin-top:18px;padding-top:17px;border-top-color:#edf1e7}.save-row .primary{width:100%;min-height:55px;font-size:var(--text-body);letter-spacing:.2px;border-radius:9px;gap:10px}.save-row .primary svg{width:20px;height:20px}
  .suggestions{top:81px;max-height:285px;border-radius:10px;padding:6px}.suggestion{min-height:54px;font-size:var(--text-label);gap:11px;padding:8px 10px}.suggestion small{font-size:var(--text-small)}.suggestion-header{font-size:var(--text-small);padding:8px 10px}.suggestion .tiny-avatar{width:32px;height:32px;font-size:var(--text-small)}.no-match{font-size:var(--text-label)}
  .stats{gap:9px;margin-bottom:21px;grid-template-columns:repeat(3,minmax(0,1fr))}.stat{padding:13px 11px;border-radius:11px;align-items:flex-start}.stat-label{font-size:var(--text-small);white-space:normal;line-height:1.5;min-height:30px;color:#7d8b73}.stat-value{font-size:25px;line-height:1.15;margin-top:6px}.stat-value small{font-size:var(--text-small);margin-top:4px}.stat-icon{display:none}
  .records-card{border-radius:14px}.records-heading{padding:20px 16px 17px;align-items:center}.records-heading h2{font-size:var(--text-body);line-height:1.5}.record-actions{gap:10px}.record-actions .text-button{font-size:var(--text-small)}.record-actions .outline{font-size:var(--text-small);padding:7px 9px;gap:6px;min-height:37px}.record-actions .outline svg{width:14px;height:14px}
  .desktop-table{display:none}.mobile-cards{display:grid;gap:0}
  .sale-card,.client-card{padding:17px 17px 15px;border-top:1px solid #edf1e9;background:#fff}.sale-card:nth-child(even),.client-card:nth-child(even){background:#fbfcf9}
  .sale-card-main,.client-card-main{display:flex;align-items:flex-start;gap:15px;justify-content:space-between}.sale-card-main>div:first-child{min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:5px}.client-card-main .customer-cell{min-width:0;max-width:none;flex:1}
  .client-name,.customer-cell .client-name{font-size:var(--text-body);font-weight:600;line-height:1.5;min-height:32px;padding:1px 0;color:#546b49;text-align:left}.sale-date{font-size:var(--text-small);color:#9aa68f;font-weight:400;display:block}.card-quantity{font-size:26px;line-height:1.3;font-weight:550;letter-spacing:-.6px;color:#5d794d;text-align:right;white-space:nowrap;flex-shrink:0}.card-quantity small{display:block;font-size:var(--text-small);line-height:1.5;font-weight:400;letter-spacing:0;color:#a5b195;margin-top:1px}
  .sale-card-bottom,.client-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px}.sale-card-bottom>.row-actions{margin-left:auto}.client-card-bottom>span{font-size:var(--text-small);line-height:1.6;color:#a3ad97;max-width:190px}.source-badge{font-size:var(--text-small);padding:4px 7px}
  .row-actions{gap:7px}.action-button{width:43px;height:43px;min-height:43px;border-radius:9px}.action-button svg{width:18px;height:18px;stroke-width:1.7}.customer-avatar{width:32px;height:32px;font-size:var(--text-small);border-radius:8px}.customer-cell small{font-size:var(--text-small);margin-top:3px;color:#a1af94}
  .table-bottom{padding:16px;font-size:var(--text-small);align-items:center;line-height:1.6}.pagination{gap:9px}.pagination button{width:36px;height:36px;min-height:36px;border-radius:7px}.pagination svg{width:15px;height:15px}
  .filterbar{padding:0 16px 18px;gap:9px}.filterbar input,.filterbar select{height:44px;font-size:var(--text-body);border-radius:7px}.filterbar input[type=search]{font-size:var(--text-body);max-width:none;min-width:140px}.filterbar input[type=month]{font-size:var(--text-body);width:150px}
  .tabs{padding:4px}.tabs button{font-size:var(--text-small);padding:6px 9px;min-height:34px}.month-summary{padding:20px;border-radius:14px}.section-title{font-size:var(--text-body)}.bar-row{font-size:var(--text-small)}
  .manager-heading{margin-bottom:22px;gap:12px}.manager-heading h1{font-size:27px;line-height:1.4}.manager-heading p{font-size:var(--text-small);line-height:1.7}.manager-heading>input{font-size:var(--text-body);max-width:148px;min-height:44px}.manager-heading .primary{font-size:var(--text-small);min-height:44px;padding:8px 12px}.manager-heading .primary svg{width:16px}
  .manager-heading>select{font-size:var(--text-label);max-width:168px;min-height:44px}.filterbar #month-filter{max-width:none;width:165px;font-size:var(--text-body)}
  .manager-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-bottom:20px}.metric{padding:17px 16px;border-radius:13px;min-height:120px}.metric>span{font-size:var(--text-small);line-height:1.5}.metric>strong{font-size:31px;margin-top:11px}.metric>small{font-size:var(--text-small)}
  .dashboard-grid,.dashboard-bottom{grid-template-columns:1fr;gap:18px}.dashboard-bottom{margin-top:18px}.manager-panel{padding:20px;border-radius:14px}.section-head{margin-bottom:20px}.section-head h2{font-size:var(--text-body)}.section-head .text-button{font-size:var(--text-small);min-height:34px}.daily-chart{padding:8px 0 0}.chart-period{font-size:var(--text-small);margin-top:9px}
  .dashboard-heading{flex-direction:column;align-items:flex-start;gap:16px}.dashboard-filters{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);width:100%;max-width:none;gap:10px}.dashboard-filters label{font-size:var(--text-small)}.dashboard-filters select{font-size:var(--text-body);min-height:46px;padding:9px 8px}
  .performance-list{gap:22px}.performance-heading .client-name{font-size:var(--text-body);min-height:38px}.performance-heading>strong{font-size:23px}.performance-heading small{font-size:var(--text-small)}.performance-detail{font-size:var(--text-small);margin-top:5px}.performance-last{font-size:var(--text-small);margin-top:9px}.performance-progress{height:6px}.review-row strong{font-size:var(--text-small)}.review-row p{font-size:var(--text-small)}.setup-actions strong{font-size:var(--text-body)}.setup-actions small{font-size:var(--text-small)}.setup-actions>button{min-height:60px}.setup-icon{width:45px;height:45px}
  .account-card{padding:18px 15px;gap:11px;border-radius:14px;align-items:flex-start}.account-avatar{width:36px;height:36px;font-size:var(--text-small);border-radius:10px}.account-info>strong{font-size:var(--text-body);line-height:1.6}.account-info>small{font-size:var(--text-small);line-height:1.6}.account-controls{gap:8px;flex-direction:column;align-items:flex-end}.account-controls .outline{min-height:41px;font-size:var(--text-small);padding:7px 10px;gap:5px}.account-status{font-size:var(--text-small);padding:4px 8px}.account-summary{font-size:var(--text-small)}.account-summary>span{font-size:var(--text-small)}
  .import-card{padding:20px;border-radius:14px}.upload-zone{padding:28px 16px;min-height:160px}.upload-zone strong{font-size:var(--text-body)}.upload-icon{width:48px;height:48px}.import-fields{grid-template-columns:minmax(0,1fr) 98px;gap:13px;margin:22px 0}.import-fields .field input,.import-fields .field select{font-size:var(--text-body);height:50px}.import-card .primary.full{font-size:var(--text-body);min-height:52px}
  .preview-metrics{gap:8px}.preview-metrics>div{padding:13px 8px}.preview-metrics strong{font-size:25px}.preview-metrics span{font-size:var(--text-small);line-height:1.6}.preview-note{font-size:var(--text-small)}.preview-months>div{font-size:var(--text-small);padding:10px 0}.preview-months strong{font-size:var(--text-small)}.imported-file strong{font-size:var(--text-small);line-height:1.7}.imported-file small{font-size:var(--text-small);line-height:1.7}.import-issues{font-size:var(--text-small);line-height:1.8}
  dialog,.history-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:92dvh;margin:auto 0 0;border:0;border-top:4px solid #7196c4;border-radius:20px 20px 0 0;padding:20px 18px calc(20px + var(--safe-bottom));box-shadow:0 -12px 70px #1c352b33;overflow:auto}
  dialog::backdrop{background:#253c315f;backdrop-filter:blur(4px)}.dialog-head{position:sticky;top:-21px;z-index:4;background:#fff;margin:0 -2px 14px;padding:3px 2px 9px}.dialog-head h2{font-size:var(--text-section);line-height:1.5;color:#4d6350}.dialog-head>button{width:42px;height:42px;min-height:42px;display:grid;place-items:center}.dialog-head svg{width:20px;height:20px}.dialog-content{font-size:var(--text-body);line-height:1.8;color:#88957e}.dialog-content .field{margin-bottom:17px}.dialog-actions{gap:10px;flex-wrap:wrap;margin-top:22px}.dialog-actions .primary,.dialog-actions .outline{font-size:var(--text-body);min-height:47px;padding:11px 17px}.dialog-actions .danger{font-size:var(--text-label);min-height:46px}.dialog-toast{font-size:var(--text-label);padding:12px 14px}.dialog-toast button{font-size:var(--text-small);min-height:36px}
  .history-dialog .dialog-head h2{font-size:var(--text-section)}.history-subtitle{font-size:var(--text-small);margin-bottom:17px}.history-stats{padding:13px 15px;gap:23px;margin-bottom:18px;font-size:var(--text-small)}.history-stats b{font-size:var(--text-section)}.history-filters{gap:10px;margin-bottom:19px}.history-filters label{font-size:var(--text-small)}.history-filters input,.history-filters select{font-size:var(--text-body);height:44px;max-width:160px}.history-filters .outline{height:44px;min-height:44px;font-size:var(--text-small)}.history-dialog .mobile-cards{border:1px solid #e1e7ed;border-radius:11px;overflow:hidden}.history-dialog .sale-card:first-child{border-top:0}.history-dialog .sale-card{padding:14px}.history-dialog .sale-date{font-size:var(--text-body);font-weight:500;color:#758469}.seller-tag{font-size:var(--text-small);padding:5px 8px;margin-top:5px}.history-dialog .table-bottom{padding:14px 2px}.history-dialog .row-actions{gap:8px}
  #toast{left:50%;bottom:calc(87px + var(--safe-bottom));font-size:var(--text-label);max-width:calc(100vw - 28px);border-radius:10px;padding:14px 17px;line-height:1.8}#toast button{font-size:var(--text-small);min-height:35px;margin-left:12px}
  .login-screen{padding:68px 20px calc(35px + var(--safe-bottom));align-items:center;background:#f1f5f2}.login-form{width:100%;max-width:410px;padding:28px 25px;border-radius:18px}.login-form .brand{padding-bottom:26px}.login-form .brand-name{font-size:38px}.login-form .brand-label{font-size:var(--text-small);letter-spacing:3px}.login-form h1{font-size:23px;margin-bottom:22px}.login-form .field label{font-size:var(--text-label)}.login-form .field input,.login-form .field select{height:53px;font-size:var(--text-body)}.login-form .primary{min-height:52px;font-size:var(--text-body);border-radius:8px}.login-error{font-size:var(--text-small)}.login-form .muted{font-size:var(--text-small)}.login-form .demo-accounts{margin-top:24px;padding-top:22px}.demo-accounts strong{font-size:var(--text-small)}.account-links button{min-height:44px;font-size:var(--text-small);line-height:1.4;padding:7px}.login-screen .login-language{top:21px;right:21px}
}
@media(max-width:370px){.topbar{padding-inline:12px}.top-right{gap:5px}.mobile-brand strong{font-size:23px}.header-user{padding-left:5px;gap:1px}.header-user-name{font-size:var(--text-small);max-width:80px}.language{font-size:var(--text-small);padding-inline:5px}.install-icon{width:30px;min-height:34px}.header-user .logout{width:30px}.content{padding-inline:12px}.entry-card{padding:19px 17px}.date-field{gap:5px}.date-field label{font-size:var(--text-small)}.date-field input{width:143px}.stat{padding:12px 9px}.stat-label{font-size:var(--text-small)}.manager-heading>input{max-width:137px;font-size:var(--text-small)}.metric{padding:15px 13px}.metric>strong{font-size:28px}.metric>span{font-size:var(--text-small)}.account-avatar{display:none}.account-card{padding:17px 13px}.history-filters input,.history-filters select{max-width:145px}.import-fields{grid-template-columns:minmax(0,1fr) 90px}}
@media(display-mode:standalone){.install-icon{display:none}.topbar{background:#fff}}

/* Keep the number being entered in the centre of the sales screen. */
[data-view="desk"] .content{padding-top:0}
.entry-stage{min-height:calc(100svh - 85px);display:flex;align-items:center;justify-content:center;padding:32px 0}
.centered-entry{width:100%;max-width:510px;padding:28px;border-radius:17px}
.centered-entry .fields{grid-template-columns:1fr;gap:23px}
.centered-entry .quantity label{text-align:center;font-size:var(--text-label);color:#87957b}
.centered-entry .quantity input,.centered-entry .quantity input::placeholder{font-size:42px;line-height:1.1;text-align:center;letter-spacing:-1px;height:75px;padding:3px 25px 20px;color:#426b49}
.centered-entry .quantity input::placeholder{color:#c6d3bc}
.centered-entry .quantity input::-webkit-inner-spin-button,.centered-entry .quantity input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.centered-entry .quantity input{appearance:textfield;-moz-appearance:textfield}
.centered-entry .quantity .input-suffix{left:0;right:0;bottom:7px;text-align:center;font-size:var(--text-small);color:#a0ad93;pointer-events:none}
.centered-entry label[for="client-search"]{font-size:var(--text-body);color:#62735c}
.centered-entry #client-search{height:68px;font-size:var(--text-emphasis);line-height:1.35;font-weight:500;padding-left:48px;padding-right:14px}
.centered-entry #client-search::placeholder{font-size:var(--text-emphasis);font-weight:400;color:#7d8978}
.centered-entry #client-search + .input-icon{width:20px;height:20px;left:17px;bottom:24px}
.centered-entry #client-suggestions{top:calc(100% + 6px)}
.centered-entry .suggestion{font-size:var(--text-body);min-height:58px}
.centered-entry .suggestion span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.centered-entry .suggestion small,.centered-entry .suggestion-header{font-size:var(--text-small)}
.centered-entry .save-row .primary{width:100%;min-height:54px;font-size:var(--text-body)}
.today-summary{display:flex;gap:20px;justify-content:space-between;margin:0 0 23px;padding:14px 2px;border-bottom:1px solid #e0e7ee;font-size:var(--text-small);color:#91a0ad}
.today-summary>span{display:flex;gap:10px;align-items:center}.today-summary strong{font-weight:600;color:#5b7896;font-size:var(--text-body);white-space:nowrap}
.month-summary .bar-row{grid-template-columns:90px minmax(0,1fr) 60px}
@media(max-width:880px){
  [data-view="desk"] .content{padding-top:0}
  .entry-stage{min-height:calc(100svh - 63px - 72px - var(--safe-bottom) - env(safe-area-inset-top,0px));padding:calc(24px + 12svh) 0 24px}
  .centered-entry{padding:23px 20px;border-radius:17px}
  .centered-entry .fields{gap:25px}
  .centered-entry .quantity label{font-size:var(--text-label)}
  .centered-entry .quantity input,.centered-entry .quantity input::placeholder{font-size:44px;height:78px;padding-bottom:20px}
  .centered-entry .quantity .input-suffix{bottom:7px;font-size:var(--text-small)}
  .centered-entry .save-row{margin-top:16px;padding-top:16px}
  .today-summary{gap:15px;font-size:var(--text-small);flex-wrap:wrap;margin-bottom:21px;padding:13px 1px}
  .today-summary>span{gap:9px}.today-summary strong{font-size:var(--text-label)}
}
@media(max-width:880px) and (max-height:700px){.entry-stage{padding-top:calc(20px + 6svh);padding-bottom:20px}}

.entry-client-actions{display:flex;justify-content:flex-end;margin-bottom:14px}.entry-client-actions .outline{min-height:44px;background:#fff;border-color:#d8e3d7;color:#456d4b;font-size:var(--text-label);padding:10px 15px;border-radius:9px}
.generated-code input{font-size:30px!important;font-weight:650;letter-spacing:4px;text-align:center;color:#335e49;background:#f2f7f1;border-color:#d9e5d7;min-height:65px;user-select:text}.generated-code-row{display:flex;align-items:stretch;gap:8px}.generated-code-row input{flex:1;min-width:0;width:0}.generated-code-row .copy-client-code{flex:0 0 52px;min-height:52px;margin:0;padding:0;justify-content:center;color:#335e49;border-color:#d9e5d7}.copy-client-code svg{width:21px;height:21px}.client-form-error{font-size:var(--text-small);color:#a45f55;line-height:1.7}.client-form-error:empty{display:none}.created-client-name{font-size:var(--text-emphasis);font-weight:550;color:#4c6552;margin:0 0 20px;overflow-wrap:anywhere}.copy-code-status{font-size:var(--text-label);color:#56774d;text-align:center;line-height:1.8;margin-top:12px}.copy-code-status:empty{display:none}
@media(max-width:880px){.generated-code input{font-size:32px!important;min-height:68px}}

.import-error{background:#fff4ef;border:1px solid #efd6ca;color:#984f3a;padding:14px;border-radius:9px;font-size:var(--text-label);line-height:1.8;margin-top:18px}.import-error details{margin-top:10px}.import-error p,.import-issues p{overflow-wrap:anywhere}.import-differences{margin:20px 0;border:1px solid #e8d6ba;background:#fffbf2;border-radius:10px;padding:16px}.import-differences .section-head{margin-bottom:13px}.import-difference-list{max-height:330px;overflow:auto}.import-difference{padding:12px 0;border-top:1px solid #efe4d4;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;font-size:var(--text-small);color:#806c50}.import-difference strong{font-weight:550;overflow-wrap:anywhere}.import-difference>span{font-size:var(--text-small)}.import-difference>div{font-variant-numeric:tabular-nums}.import-difference small{grid-column:1/-1;font-size:var(--text-small);color:#a27862}.replace-import{display:flex;gap:12px;align-items:center;font-size:var(--text-label);line-height:1.6;color:#735a37;margin-top:17px;min-height:44px}.replace-import input{width:22px;height:22px;flex-shrink:0;accent-color:#827049}.import-differences .preview-note{font-size:var(--text-small);margin-bottom:0}

.manager-panel>.review-list{max-height:340px;overflow:auto;padding-right:7px}.review-row strong{overflow-wrap:anywhere}

/* Shared readable type scale. Numeric entry and headline metrics retain their sizes. */
:root{--text-small:14px;--text-label:16px;--text-body:18px;--text-emphasis:20px;--text-section:22px;font-size:18px}
body{font-size:var(--text-body);line-height:1.5}
.primary,.outline,.text-button{line-height:1.4}
.field label,.date-field,.dashboard-filters label,.history-filters label{font-size:var(--text-label)}
.field input,.field select,.filterbar input,.filterbar select,.dashboard-filters select,.history-filters input,.history-filters select{font-size:var(--text-body)}
.field input::placeholder{font-size:var(--text-label)}
.client-name,.customer-cell .client-name{font-size:var(--text-body);overflow-wrap:anywhere}
td{font-size:var(--text-label)}.record-date{font-size:var(--text-label)}
.records-heading,.record-actions,.manager-heading,.section-head,.dialog-actions{flex-wrap:wrap;gap:12px}
.records-heading h2,.section-head h2{font-size:var(--text-body)}
.manager-heading .primary{font-size:var(--text-label)}
.header-user-name{font-size:var(--text-small);line-height:1.25}
.dialog-head h2{min-width:0;overflow-wrap:anywhere}.dialog-head>button{flex-shrink:0}
.account-links button{font-size:var(--text-label);flex:1 1 120px;min-height:48px}
.demo-accounts strong{font-size:var(--text-label)}
.centered-entry #client-search,.centered-entry #client-search::placeholder{font-size:var(--text-emphasis)}
.centered-entry .quantity .input-suffix{font-size:var(--text-small);line-height:1.1;bottom:6px}
.date-field input{height:48px}.today-button{font-size:var(--text-label)}
.chart-axis{display:grid;grid-template-columns:repeat(var(--chart-days),minmax(0,1fr));gap:0;padding-top:6px;color:#687d96;font-size:var(--text-small);line-height:1.4}
.chart-axis span{grid-row:1;white-space:nowrap}
.metric>span{min-height:42px}.metric>small{font-size:var(--text-small)}
.review-row p,.performance-detail,.performance-last,.chart-period,.preview-note,.imported-file small{color:#6e7b6a}
@media(max-width:880px){
  .topbar{gap:8px;padding-inline:12px}.top-right{flex:1;min-width:0;gap:5px;justify-content:flex-end}
  .mobile-brand{flex-shrink:0}.mobile-brand strong{font-size:25px}
  .header-user{min-width:0;padding-left:4px;gap:3px}.header-user-name{max-width:115px;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
  .header-user .logout{width:32px;flex-shrink:0}.language{flex-shrink:0;font-size:var(--text-small);padding-inline:6px}.install-icon{flex-shrink:0}
  .nav button{font-size:var(--text-small);line-height:1.25}
  .primary,.outline{min-height:48px}.entry-client-actions .outline{font-size:var(--text-label)}
  .filterbar{flex-wrap:wrap}.filterbar #month-filter,.filterbar input[type=search],.filterbar .filter-select{flex:1 1 100%;width:100%;max-width:none;min-width:0;min-height:50px}
  .history-filters{display:grid;grid-template-columns:minmax(0,1fr)}.history-filters>div{min-width:0}.history-filters input,.history-filters select{width:100%;max-width:none;height:50px}
  .monthly-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.monthly-stats .stat:last-child{grid-column:1/-1}.stat-label{min-height:0;font-size:var(--text-small)}
  .client-card-bottom>span{min-width:0;overflow-wrap:anywhere}.table-bottom{flex-wrap:wrap;gap:12px}
  .dialog-actions .primary,.dialog-actions .outline{font-size:var(--text-body)}
  .account-controls .outline{font-size:var(--text-small);min-height:44px}
  .import-fields{grid-template-columns:minmax(0,1fr) 105px}.preview-metrics span{font-size:var(--text-small)}
}
@media(max-width:600px){.dashboard-filters,.import-fields{grid-template-columns:minmax(0,1fr)}.dashboard-filters select{min-height:50px}}
@media(max-width:360px){.topbar{padding-inline:8px;gap:6px}.mobile-brand strong{font-size:23px}.top-right{gap:4px}.header-user{padding-left:2px;gap:2px}.header-user-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}}
/* One-time passwords are 14 characters, longer than a 4-digit customer code. */
.generated-code input#new-password,.generated-code input#new-password:focus{font-size:22px!important;letter-spacing:1px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;min-width:0}
@media(max-width:880px){.generated-code input#new-password{font-size:21px!important}}
