:root{
  --mobile-bg:#f7f8fa;
  --mobile-card:#ffffff;
  --mobile-text:#172033;
  --mobile-muted:#667085;
  --mobile-border:#e4e7ec;
  --mobile-navy:#1f3557;
  --mobile-accent:#d97706;
  --mobile-shadow:0 10px 24px rgba(16,24,40,.08);
}

html{min-width:0;overflow-x:hidden;-webkit-text-size-adjust:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body.mobile-shell{min-width:0;min-height:100vh;min-height:100dvh;background:var(--mobile-bg);color:var(--mobile-text);padding-bottom:calc(82px + env(safe-area-inset-bottom));overflow-x:hidden}
body.mobile-modal-open{overflow:hidden;touch-action:none}
body.mobile-list-page{background:#fff}
.mobile-only{display:none}
.mobile-page{max-width:1180px;margin:0 auto;padding:18px 16px 104px}
.list-page{max-width:920px;padding-top:0}
.list-header{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;background:#fff;border-bottom:1px solid var(--mobile-border);padding:calc(10px + env(safe-area-inset-top)) 0 10px;margin:0 0 12px}
body.mobile-list-page .list-header{display:grid!important}
.back-link,.new-link,.filter-toggle{min-height:44px;border:0;border-radius:10px;background:#fff;color:var(--mobile-navy);font-weight:950;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;padding:8px 10px}
.new-link,.section-head .section-action{box-sizing:border-box;width:104px!important;min-height:66px;padding:0 18px;background:var(--mobile-navy);color:#fff!important;border:1px solid var(--mobile-navy);border-radius:12px;box-shadow:0 16px 30px rgba(31,53,87,.18);font-weight:950;flex-direction:row}
.new-link:visited,.section-head .section-action:visited{color:#fff!important}
.new-link:hover,.section-head .section-action:hover{background:#172844;color:#fff!important}
.new-link:active,.section-head .section-action:active{background:#102038;color:#fff!important}
.section-head .section-action span{color:#e8eef7}
.section-head .section-action{flex:0 0 auto;white-space:nowrap}
.list-header-title{text-align:center}
.list-header-title h1{margin:0;color:var(--mobile-text);font-size:18px;letter-spacing:.08em}
.list-header-title p{margin:2px 0 0;color:var(--mobile-muted);font-size:12px;font-weight:900}
.list-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:10px}
.list-controls .mobile-search{margin:0}
.filter-toggle{border:1px solid var(--mobile-border);box-shadow:none}
.filter-panel{display:none;background:#f8fafc;border:1px solid var(--mobile-border);border-radius:12px;padding:12px;margin-bottom:12px}
.filter-panel.open{display:grid;gap:10px}
.filter-panel label{display:grid;gap:5px;color:var(--mobile-muted);font-size:12px;font-weight:900}
.filter-panel select,.filter-panel input{min-height:42px;border:1px solid #cfd4dc;border-radius:9px;background:#fff;color:var(--mobile-text);font:inherit;padding:8px 10px}
.month-group{display:grid;gap:0;margin-bottom:8px;border:1px solid var(--mobile-border);border-radius:12px;overflow:hidden;background:#fff}
.month-header{background:#eef7f0;color:#1f3557;font-size:12px;font-weight:950;letter-spacing:.08em;padding:9px 12px;border-bottom:1px solid var(--mobile-border)}
.list-document-row{display:grid;gap:8px;padding:13px 12px;border-bottom:1px solid var(--mobile-border)}
.list-document-row:last-child{border-bottom:0}
.row-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.row-client{margin:0;color:var(--mobile-text);font-size:16px;font-weight:950;line-height:1.25;overflow-wrap:anywhere}
.row-number{margin:4px 0 0;color:#475467;font-size:13px;font-weight:900}
.row-project{margin:3px 0 0;color:var(--mobile-muted);font-size:13px;font-weight:800;line-height:1.35;overflow-wrap:anywhere}
.row-right{text-align:right;display:grid;justify-items:end;gap:5px}
.row-amount{color:var(--mobile-text);font-size:16px;font-weight:950;white-space:nowrap}
.row-date{color:var(--mobile-muted);font-size:12px;font-weight:900}
.row-history{display:grid;gap:3px;color:#667085;font-size:12px;font-weight:800;line-height:1.35}
.row-balance{color:#475467;font-size:13px;font-weight:900}
.row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.document-action-button,
.row-actions a,
.row-actions button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:0;min-height:44px;height:44px;padding:0 18px;border-radius:12px;border:1px solid var(--mobile-border);background:#fff;color:var(--mobile-navy);font-size:16px;font-weight:700;line-height:1;white-space:nowrap;text-decoration:none;box-sizing:border-box;font-family:inherit;cursor:pointer}
.row-actions .primary-row-action{background:#f8fafc}
.row-actions .success-row-action{background:#ecfdf3;color:#027a48;border-color:#abefc6}
.row-actions .options-row-action{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:0;min-height:40px;height:40px;padding:0 14px;border-radius:12px;background:#f3f4f6;color:#1d4ed8;border:1px solid #d1d5db;font-size:16px;font-weight:600;line-height:1;letter-spacing:normal;white-space:nowrap}
.row-actions .options-row-action:hover{background:#e5e7eb}
.row-actions .options-row-action:active{background:#dce2ea}
.options-sheet{position:fixed;inset:0;z-index:90;display:none}
.options-sheet.open{display:block}
.options-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.38)}
.options-panel{position:absolute;left:0;right:0;bottom:0;max-height:calc(100dvh - env(safe-area-inset-top) - 12px);overflow:auto;overscroll-behavior:contain;background:#fff;border-radius:18px 18px 0 0;padding:16px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(16,24,40,.18)}
.options-panel h2{margin:0;color:var(--mobile-text);font-size:18px}
.options-panel p{margin:4px 0 12px;color:var(--mobile-muted);font-weight:800}
.options-grid{display:grid;gap:8px}
.options-grid a,.options-grid button{min-height:46px;border:1px solid var(--mobile-border);border-radius:10px;background:#fff;color:var(--mobile-text);font-weight:950;padding:10px 12px;text-align:left;text-decoration:none;font:inherit}
.options-grid .danger{color:#b42318;background:#fff1f0;border-color:#fecdca}
.sheet-close-button{margin-top:10px;width:100%;min-height:46px;border:0;border-radius:10px;background:#f2f4f7;color:var(--mobile-navy);font-weight:950}
body.mobile-list-page .options-sheet .options-panel{display:flex;flex-direction:column;gap:10px;padding:16px 16px calc(16px + env(safe-area-inset-bottom));max-height:85vh;overflow-y:auto;background:#fff}
body.mobile-list-page .options-sheet .options-panel h2{margin:0}
body.mobile-list-page .options-sheet .options-panel p{margin:0;color:var(--mobile-muted)}
body.mobile-list-page .options-sheet .options-grid{display:flex;flex-direction:column;gap:10px;padding:0;margin:0}
body.mobile-list-page .options-sheet .options-grid a,
body.mobile-list-page .options-sheet .options-grid button{display:flex;align-items:center;justify-content:center;text-align:center;width:100%;height:48px;min-height:48px;max-height:48px;padding:0 14px;margin:0;box-sizing:border-box;border-radius:12px;border:1px solid #d8dee8;background:#f3f4f6;color:#1f3557;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;font-weight:600;line-height:1;white-space:normal;text-decoration:none}
body.mobile-list-page .options-sheet .options-grid .danger{display:flex;align-items:center;justify-content:center;text-align:center;height:48px;min-height:48px;max-height:48px;background:#fff4f3;color:#b42318;border:1px solid #fecaca}
body.mobile-list-page .options-sheet .sheet-close-button{display:flex;align-items:center;justify-content:center;text-align:center;width:100%;height:48px;min-height:48px;max-height:48px;margin:0;padding:0 14px;box-sizing:border-box;border:none;border-radius:12px;background:#1f3557;color:#fff;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;font-weight:700;line-height:1}
.attachment-sheet{position:fixed;inset:0;z-index:100;display:none}
.attachment-sheet.open{display:block}
.attachment-panel{position:absolute;left:0;right:0;bottom:0;max-height:calc(100dvh - env(safe-area-inset-top) - 12px);overflow:auto;overscroll-behavior:contain;background:#fff;border-radius:18px 18px 0 0;padding:16px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(16,24,40,.18)}
.attachment-panel h2{margin:0;color:var(--mobile-text);font-size:20px;line-height:1.2}
.attachment-panel p{margin:5px 0 12px;color:var(--mobile-muted);font-weight:800;line-height:1.35}
.attachment-status{min-height:20px;color:var(--mobile-muted);font-size:13px;font-weight:900;margin:8px 0}
.attachment-status.success{color:#027a48}
.attachment-status.error{color:#b42318}
.attachment-login-action a{display:flex;align-items:center;justify-content:center;min-height:42px;border-radius:10px;background:#1f3557;color:#fff;text-decoration:none;font-weight:900;margin:4px 0 8px}
.attachment-pickers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 12px}
.attachment-picker{min-height:58px;border:1px solid var(--mobile-border);border-radius:12px;background:#f8fafc;color:var(--mobile-navy);font-weight:950;font-size:13px;line-height:1.2;padding:8px;font-family:inherit}
.attachment-list{display:grid;gap:9px;margin-top:10px}
.attachment-card{border:1px solid var(--mobile-border);border-radius:12px;background:#fff;padding:10px;display:grid;gap:8px}
.attachment-card.pending{background:#f8fafc}
.attachment-thumb{width:100%;max-height:150px;border-radius:10px;object-fit:cover;background:#eef2f6}
.attachment-thumb.empty{height:82px;display:flex;align-items:center;justify-content:center;color:var(--mobile-muted);font-weight:900}
.attachment-card strong{color:var(--mobile-text);font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.attachment-meta{color:var(--mobile-muted);font-size:12px;font-weight:800}
.attachment-caption{color:#475467;font-size:13px;line-height:1.35}
.attachment-file-buttons{display:flex;flex-wrap:wrap;gap:8px}
.attachment-file-buttons button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;border:1px solid var(--mobile-border);border-radius:10px;background:#fff;color:var(--mobile-navy);font:inherit;font-size:14px;font-weight:900;padding:8px 10px;white-space:nowrap}
.attachment-file-buttons .danger{color:#b42318;background:#fff1f0;border-color:#fecdca}
.attachment-empty{border:1px dashed #cfd4dc;border-radius:12px;padding:12px;color:var(--mobile-muted);font-weight:800;line-height:1.4}
.attachment-progress{height:6px;border-radius:999px;background:#eef2f6;overflow:hidden;margin:6px 0}
.attachment-progress span{display:block;height:100%;width:0;background:#1d4ed8;transition:width .18s ease}
.mobile-topbar{display:flex;align-items:center;gap:12px;margin:4px 0 18px}
.mobile-topbar img{width:54px;height:54px;border-radius:50%;object-fit:contain;flex:0 0 auto}
.mobile-title-block{min-width:0;flex:1}
.mobile-title-block p{margin:0;color:var(--mobile-muted);font-size:13px;font-weight:800;line-height:1.35}
.mobile-title-block h1{margin:2px 0 0;color:var(--mobile-text);font-size:24px;line-height:1.08;overflow-wrap:anywhere}
.mobile-icon-btn{width:44px;height:44px;border:1px solid var(--mobile-border);border-radius:999px;background:#fff;color:var(--mobile-navy);display:grid;place-items:center;font-weight:900;box-shadow:var(--mobile-shadow)}
.mobile-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.mobile-feature-card{min-height:128px;background:var(--mobile-card);border:1px solid var(--mobile-border);border-radius:12px;padding:14px;box-shadow:var(--mobile-shadow);display:flex;flex-direction:column;gap:8px;color:var(--mobile-text);text-decoration:none}
.mobile-feature-card:focus-visible,.bottom-nav a:focus-visible,.quick-action-button:focus-visible,.section-action:focus-visible{outline:3px solid rgba(217,119,6,.35);outline-offset:2px}
.feature-icon{width:40px;height:40px;border-radius:10px;background:#fff7ed;color:#9a3412;display:grid;place-items:center;font-weight:950}
.feature-title{font-weight:950;letter-spacing:.02em;text-transform:uppercase;font-size:14px;line-height:1.1}
.feature-subtitle{font-size:12px;color:var(--mobile-muted);font-weight:800}
.feature-count{margin-top:auto;font-size:13px;color:var(--mobile-navy);font-weight:900}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:4px 0 14px}
.section-head h1{margin:0;color:var(--mobile-text);font-size:30px;line-height:1}
.section-head p{margin:4px 0 0;color:var(--mobile-muted);font-weight:800}
.section-action{min-height:44px;border:0;border-radius:10px;background:var(--mobile-accent);color:#111827;font-weight:950;padding:10px 12px;display:inline-flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;text-align:center;text-decoration:none;white-space:normal;line-height:1.05}
.section-action span{display:block;font-size:12px;color:#4b2500;line-height:1.1}
.section-message{min-height:20px;margin:4px 0 10px;color:var(--mobile-muted);font-weight:900;font-size:13px}
.section-message.success{color:#027a48}
.section-message.error{color:#b42318}
.filter-row{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;margin:0 -16px 10px;padding-left:16px;padding-right:16px;scrollbar-width:none}
.filter-row::-webkit-scrollbar{display:none}
.filter-chip{border:1px solid var(--mobile-border);background:#fff;color:var(--mobile-navy);border-radius:999px;min-height:38px;padding:8px 12px;font-weight:900;white-space:nowrap}
.filter-chip.active{background:var(--mobile-navy);border-color:var(--mobile-navy);color:#fff}
.mobile-search{width:100%;min-height:46px;border:1px solid #cfd4dc;border-radius:10px;background:#fff;color:var(--mobile-text);padding:10px 12px;font:inherit;margin-bottom:12px}
.list-stack{display:grid;gap:12px}
.document-card{background:#fff;border:1px solid var(--mobile-border);border-radius:12px;padding:14px;box-shadow:var(--mobile-shadow)}
.doc-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.doc-number{font-size:13px;color:var(--mobile-navy);font-weight:950}
.doc-title{margin:4px 0 0;color:var(--mobile-text);font-weight:950;font-size:18px;line-height:1.2}
.doc-client{margin:3px 0 0;color:var(--mobile-muted);font-weight:800;overflow-wrap:anywhere}
.doc-total{text-align:right;font-weight:950;color:var(--mobile-text);white-space:nowrap}
.doc-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;color:var(--mobile-muted);font-size:13px;font-weight:800}
.doc-link-note{margin-top:10px;border:1px solid #ddd6fe;background:#f5f3ff;color:#5b21b6;border-radius:8px;padding:8px 10px;font-size:13px;font-weight:900}
.doc-actions{display:flex;flex-wrap:wrap;gap:8px;overflow:visible;margin-top:12px;padding-bottom:2px}
.doc-actions::-webkit-scrollbar{display:none}
.doc-actions a,.doc-actions button{min-height:40px;border-radius:8px;border:1px solid var(--mobile-border);background:#fff;color:var(--mobile-navy);font-weight:900;padding:8px 10px;white-space:nowrap;text-decoration:none;font:inherit}
.status-badge-mobile{display:inline-flex;align-items:center;border-radius:999px;padding:6px 9px;font-size:12px;font-weight:950;border:1px solid transparent;white-space:nowrap}
.status-draft{background:#f2f4f7;color:#344054;border-color:#d0d5dd}
.status-sent{background:#eff8ff;color:#175cd3;border-color:#b2ddff}
.status-viewed{background:#f0fdfa;color:#0f766e;border-color:#99f6e4}
.status-approved,.status-paid,.status-signed{background:#ecfdf3;color:#027a48;border-color:#abefc6}
.status-declined,.status-void,.status-cancelled{background:#fff1f0;color:#b42318;border-color:#fecdca}
.status-expired,.status-overdue,.status-partial{background:#fffaeb;color:#b54708;border-color:#fedf89}
.status-converted{background:#f5f3ff;color:#5b21b6;border-color:#ddd6fe}
.status-archived{background:#f8fafc;color:#475467;border-color:#e4e7ec}
.empty-state{background:#fff;border:1px dashed #cfd4dc;border-radius:12px;padding:18px;color:var(--mobile-muted);font-weight:800;line-height:1.45}
.empty-state strong{display:block;color:var(--mobile-text);margin-bottom:4px}
.bottom-nav{display:none}
.desktop-app-nav{display:none}
.quick-create-sheet{position:fixed;inset:0;z-index:80;display:none}
.quick-create-sheet.open{display:block}
.sheet-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.38)}
.sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:calc(100dvh - env(safe-area-inset-top) - 12px);overflow:auto;overscroll-behavior:contain;background:#fff;border-radius:18px 18px 0 0;padding:16px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(16,24,40,.18)}
.sheet-panel h2{margin:0 0 12px;color:var(--mobile-text);font-size:20px}
.sheet-panel label{display:block;margin:0 0 10px;color:var(--mobile-text);font-size:14px;font-weight:900}
.sheet-panel input,.sheet-panel textarea,.sheet-panel select{display:block;width:100%;min-height:46px;margin-top:6px;border:1px solid var(--mobile-border);border-radius:10px;background:#fff;color:var(--mobile-text);font:inherit;padding:10px 12px;box-sizing:border-box}
.sheet-actions{display:grid;gap:8px}
.sheet-actions.two-up{grid-template-columns:1fr 1fr}
.sheet-actions a,
.sheet-actions button{min-height:48px;border:1px solid var(--mobile-border);border-radius:10px;padding:12px;color:var(--mobile-text);font-weight:950;text-decoration:none;background:#fff;font:inherit;text-align:left}
.sheet-actions.two-up button{text-align:center}
.sheet-actions button[data-signout]{color:#b42318;background:#fff4f3;border-color:#fecaca}
.sheet-close{margin-top:10px;width:100%;min-height:46px;border:0;border-radius:10px;background:#f2f4f7;color:var(--mobile-navy);font-weight:950}

@media(max-width:900px){
  .mobile-only{display:block}
  .desktop-app-nav{display:none!important}
  body.mobile-shell header{display:none}
  body.mobile-shell .desktop-main{display:none}
  .mobile-page{display:block}
  .mobile-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.mobile-shell input,
  body.mobile-shell textarea,
  body.mobile-shell select{min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
  body.mobile-shell input[type="date"],
  body.mobile-shell input[type="time"],
  body.mobile-shell input[type="datetime-local"]{width:100%;min-width:0;max-width:100%;-webkit-appearance:none;appearance:none}
  .bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;background:rgba(255,255,255,.97);border-top:1px solid var(--mobile-border);padding:5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));box-shadow:0 -6px 18px rgba(16,24,40,.07);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .bottom-nav a,.bottom-nav button{min-width:0;min-height:54px;border:0;border-radius:12px;background:transparent;color:var(--mobile-muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-family:inherit;font-size:11px;font-weight:800;line-height:1.1;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:4px 2px;cursor:pointer}
  .bottom-nav .active{color:var(--mobile-navy);background:var(--brand-primary-subtle,#eef2f6)}
  .bottom-nav .nav-icon{display:grid;place-items:center;width:22px;height:22px;line-height:1;color:var(--brand-accent,#d97706)}
  .bottom-nav .nav-icon svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .bottom-nav .nav-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

@media(max-width:350px){
  .bottom-nav a,.bottom-nav button{font-size:10px}
}

@media(min-width:901px){
  body.mobile-shell{padding-bottom:0;background:#f7f8fa}
  body.mobile-shell header:not(.desktop-app-nav){display:none}
  .mobile-only.mobile-page{display:none}
  .desktop-app-nav{position:sticky;top:0;z-index:70;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;background:#fff;border-bottom:1px solid var(--mobile-border);box-shadow:0 10px 30px rgba(16,24,40,.06);padding:10px 24px}
  .desktop-app-nav a{text-decoration:none}
  .desktop-brand{display:flex;align-items:center;gap:10px;color:var(--mobile-text);min-width:210px}
  .desktop-brand img{width:46px;height:46px;border-radius:50%;object-fit:contain}
  .desktop-brand span{display:grid;gap:1px;line-height:1.1}
  .desktop-brand strong{font-size:16px;font-weight:950;color:var(--mobile-text)}
  .desktop-brand small{font-size:12px;font-weight:800;color:var(--mobile-muted)}
  .desktop-app-nav nav{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0}
  .desktop-app-nav nav a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:6px 12px;border-radius:12px;color:#475467;font-weight:900;line-height:1.05}
  .desktop-nav-icon{display:grid;place-items:center;flex:0 0 19px;width:19px;height:19px;color:var(--brand-accent,#d97706)}
  .desktop-nav-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .desktop-nav-copy{display:grid;gap:1px}.desktop-nav-copy>span{font-size:14px}.desktop-nav-copy small{font-size:11px;color:var(--mobile-muted)}
  .desktop-app-nav nav a.active,.desktop-app-nav nav a:hover{background:#eef2f6;color:var(--mobile-navy)}
  .desktop-app-nav button{min-height:42px;border:1px solid #d8dee8;border-radius:12px;background:#f8fafc;color:#1f3557;font:inherit;font-size:14px;font-weight:900;padding:0 14px;cursor:pointer}
  .mobile-page{max-width:1280px;padding:26px 24px 56px}
  .list-page{max-width:1320px;padding-top:24px}
  .list-header{position:static;grid-template-columns:minmax(0,1fr) auto;gap:18px;background:transparent;border-bottom:0;padding:0;margin:0 0 18px}
  .list-header .back-link{display:none}
  .list-header-title{text-align:left}
  .list-header-title h1{font-size:34px;letter-spacing:.02em}
  .list-header-title p{font-size:14px}
  .new-link{min-height:66px;padding:0 18px}
  .list-controls{grid-template-columns:minmax(260px,420px) auto;margin-bottom:14px}
  .filter-panel.open{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}
  .month-group{border-radius:14px;box-shadow:var(--mobile-shadow);overflow:hidden}
  .month-header{padding:11px 16px}
  .list-document-row{padding:16px 18px}
  .row-main{grid-template-columns:minmax(0,1fr) minmax(180px,260px);gap:18px}
  .row-client{font-size:18px}
  .row-number,.row-project,.row-balance{font-size:14px}
  .row-actions{justify-content:flex-start}
  .document-action-button,
  .row-actions a,
  .row-actions button{height:42px;min-height:42px;font-size:15px}
  .row-actions .options-row-action{height:40px;min-height:40px}
  .options-panel,.attachment-panel,.sheet-panel{left:50%;right:auto;bottom:32px;width:min(520px,calc(100vw - 48px));border-radius:18px;transform:translateX(-50%)}
  .quick-create-sheet.open,.options-sheet.open,.attachment-sheet.open{display:block}
  .bottom-nav{display:none!important}
}

@media(min-width:901px){
  body.desktop-sidebar-shell{margin:0;overflow-x:hidden}
  body.desktop-sidebar-shell .desktop-app-nav{box-sizing:border-box;position:fixed;inset:0 auto 0 0;width:230px;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto;align-items:start;gap:20px;padding:24px 16px;background:var(--color-brand-primary,#1f3557);border:0;box-shadow:none;color:#fff}
  body.desktop-sidebar-shell .desktop-brand{min-width:0;color:#fff}body.desktop-sidebar-shell .desktop-brand img{background:#fff}body.desktop-sidebar-shell .desktop-brand strong,body.desktop-sidebar-shell .desktop-brand small{color:#fff}body.desktop-sidebar-shell .desktop-brand small{opacity:.72}
  body.desktop-sidebar-shell .desktop-app-nav nav{display:grid;align-content:start;justify-content:stretch;gap:4px;width:100%;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
  body.desktop-sidebar-shell .desktop-app-nav nav::-webkit-scrollbar{display:none}
  body.desktop-sidebar-shell .desktop-app-nav nav a{box-sizing:border-box;justify-content:flex-start;min-height:46px;padding:8px 11px;color:rgba(255,255,255,.84);border-radius:12px}
  body.desktop-sidebar-shell .desktop-nav-icon{color:rgba(255,255,255,.92)}body.desktop-sidebar-shell .desktop-nav-copy>span{font-size:14px}body.desktop-sidebar-shell .desktop-nav-copy small{color:rgba(255,255,255,.58)}
  body.desktop-sidebar-shell .desktop-app-nav nav a.active,body.desktop-sidebar-shell .desktop-app-nav nav a:hover{background:rgba(255,255,255,.15);color:#fff}
  body.desktop-sidebar-shell .desktop-app-nav button{width:100%;background:transparent;border-color:rgba(255,255,255,.28);color:#fff}
  body.desktop-sidebar-shell>.mobile-page{box-sizing:border-box;width:auto;max-width:none;margin-left:230px;padding-left:28px;padding-right:28px}
}

@media(min-width:901px) and (max-width:1260px){
  .desktop-app-nav{grid-template-columns:auto minmax(0,1fr) auto;gap:10px;padding:9px 14px}
  .desktop-brand{min-width:160px}
  .desktop-app-nav nav{justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
  .desktop-app-nav nav::-webkit-scrollbar{display:none}
  .desktop-app-nav nav a{padding:6px 10px}
  .desktop-app-nav nav a small{display:none}
}

@media(min-width:640px) and (max-width:900px){
  .mobile-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .doc-meta{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media(max-width:430px){
  .mobile-page{padding:16px 12px 104px}
  .feature-title{font-size:13px}
  .mobile-feature-card{padding:12px;min-height:122px}
  .section-head{display:grid}
  .section-action{width:100%}
  .doc-meta{grid-template-columns:1fr}
}

@media(max-width:390px){
  .document-action-button,
  .row-actions a,
  .row-actions button{padding:0 14px;font-size:15px}
}
