/* Shared finishing layer for the archive and Account-TLM forms. */
:root{--radius:16px;--line:#e3e9f2;--bg:#f5f7fb}
.skip-link{position:fixed;top:12px;left:12px;z-index:100;background:#fff;padding:12px 18px;border-radius:10px;box-shadow:0 4px 20px #0f172a20;transform:translateY(-180%)}
.skip-link:focus{transform:none}
.sidebar{padding-top:28px;padding-bottom:20px}
.sidebar-caption{margin-top:27px;letter-spacing:0;color:#a5b4c8}
.sidebar nav{gap:4px}
.sidebar nav a{min-height:43px;align-items:center;border-radius:10px;transition:background .15s,color .15s}
.sidebar nav a span{width:20px;height:20px;flex-shrink:0}
.sidebar nav svg{width:20px;height:20px;display:block}
.nav-group{margin:16px 12px 5px;color:#a5b4c8;font-size:11px}
.sidebar .shell-settings{margin-top:9px;border-top:1px solid #ffffff15;padding-top:7px}
.sidebar-bottom{margin-top:18px}
.topbar{position:sticky;top:0;z-index:15;height:76px;background:#fffffff5;box-shadow:0 2px 12px #0f172a03}
.topbar-actions{gap:10px}
.period-control{display:flex;align-items:center;background:#f8fafc;border:1px solid var(--line);border-radius:11px;padding:3px}
.period-control #period{width:160px;min-height:38px;border:0;border-radius:7px;padding:7px 8px;background:transparent;font-size:13px}
.period-arrow{border:0;background:transparent;border-radius:7px;width:34px;min-height:38px;color:#475569;font:25px/1 system-ui}
.period-arrow:hover:not(:disabled){background:#e8eef8;color:var(--primary)}
.period-arrow:disabled{opacity:.3;cursor:default}
.page-head{gap:24px;margin-bottom:27px}
.page-head h1{font-size:28px;letter-spacing:-.5px;margin-bottom:6px}
.eyebrow{font-size:11px;letter-spacing:1px;color:#526780}
.page-head p{line-height:1.8}
.card,.account-content .card{border-radius:var(--radius);box-shadow:0 3px 16px #16203304}
.card-head{margin-bottom:20px}
.card-head h2{font-size:18px}
.dashboard-work{grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr)}
.button{min-height:42px;border-radius:9px;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:background .15s,border-color .15s,box-shadow .15s}
.button.small{min-height:36px;font-size:12px}
.button.primary{box-shadow:0 3px 8px #2563eb18}
.button:hover,.step-card:hover{text-decoration:none}
.button:disabled{box-shadow:none}
.metric{padding:23px 24px;overflow:hidden;box-shadow:0 3px 16px #16203304}
.metric:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--primary)}
.metric.income:before{background:var(--green)}
.metric.expense:before{background:#e48673}
.metric.expense{background:#fff}
.metric.net{background:#edf4ff;border-color:#d7e6fc}
.metric label{font-size:13px;color:#475569}
.metric strong{font-size:30px;font-variant-numeric:tabular-nums;letter-spacing:-.6px;overflow-wrap:anywhere}
.metric small{font-size:12px;line-height:1.65;display:block}
.step-card{position:relative;padding:21px 22px;transition:border-color .15s,box-shadow .15s}
.step-card:after{content:"↗";position:absolute;right:18px;top:16px;color:#7892af;font:19px/1 system-ui}
.step-card:hover{border-color:#93b5ec;box-shadow:0 5px 18px #2563eb0b}
.step-card>span{padding-right:20px;font-size:12px}
.step-card h3{font-size:14px}
.step-card p{font-size:12px;line-height:1.75}
.tabs{background:#f3f6fa;border-radius:10px;padding:4px;gap:3px}
.tab{min-height:36px;font-size:12px;border-radius:7px}
.tab.active{background:#fff;color:#1d4ed8;box-shadow:0 1px 5px #0f172a10}
.tab:hover:not(.active){background:#e8eef6;color:#334155}
.table-scroll{border:1px solid var(--line);border-radius:11px}
.table{min-width:610px}
.table th{font-size:12px;color:#526780;font-weight:600;padding-top:14px;padding-bottom:14px}
.table tbody tr:hover{background:#f8fbff}
.table td small{font-size:12px;line-height:1.6}
.table .number{font-variant-numeric:tabular-nums}
.table td.title .link{font-weight:600;text-align:left;line-height:1.7}
.pill{border-radius:7px;font-size:11px}
.pill.warn{color:#85550b;background:#fff4db}
.pill.expense{color:#9d4737;background:#fbeee9}
.doc-icon{background:#eef4ff;color:#3961a0;border:1px solid #dce7fa}
.document-category{border-radius:14px;box-shadow:0 2px 10px #16203303}
.document-category.active{background:#eef5ff;border-color:#8bafe9}
.document-category>span{font-size:13px}
.document-category strong{font-variant-numeric:tabular-nums}
.check-row small,.timeline small{font-size:12px;line-height:1.7}
.check-row a{color:#334155;font-weight:600}
.check-row a:hover{color:var(--primary)}
.check-row{align-items:center}
.notice{line-height:1.8}
.empty{padding:44px 24px}
.empty .empty-icon{width:64px;margin:0 auto 16px;border-radius:18px;background:#f0f5fc;color:#7697c1}
dialog{scrollbar-width:thin}
.modal-head h2{font-size:20px;line-height:1.6}
.close{width:38px;height:38px;flex-shrink:0}
.close:hover{background:#e2e8f0;color:#334155}
.form-actions{position:sticky;bottom:-1px;background:#fff;z-index:2;padding-bottom:4px}
.account-content .expense-side{top:92px}
.account-content .expense-check{display:flex;align-items:center;margin-top:0;min-height:48px}
.account-content .expense-check span{font-size:13px;line-height:1.6}
.account-content .expense-payee-details{border:1px solid var(--line);border-radius:10px;background:#f8fafc;overflow:hidden}
.account-content .expense-payee-details summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:13px 15px;color:#334155;font-size:13px;font-weight:600}
.expense-payee-details summary::-webkit-details-marker{display:none}
.expense-payee-details summary small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:3px}
.expense-details-chevron{font:20px/1 system-ui;color:var(--muted)}
.expense-payee-details[open] .expense-details-chevron{transform:rotate(180deg)}
.expense-payee-details[open] summary{border-bottom:1px solid var(--line)}
.expense-payee-details>.expense-grid{padding:16px}
.expense-payee-details summary:hover{background:#eef3f9}
.expense-payee-details summary:focus-visible{outline:3px solid #93c5fd;outline-offset:-3px}
.expense-required-mark{color:#b45309;font-weight:600}
.account-content .expense-save-guide{margin:0;color:#475569;font-size:12px;line-height:1.65}
.account-content .expense-save-guide.is-ready{color:var(--success)}
.account-content .expense-mobile-actions .expense-save-guide{margin-bottom:8px}
.account-content .expense-mobile-actions .expense-save-guide{margin-bottom:8px}
@media(max-width:1440px){.dashboard-work{grid-template-columns:1fr}}
@media(max-width:1150px){.metric strong{font-size:26px}.sidebar nav a{font-size:12px}.topbar{gap:12px}}
@media(max-width:800px){
  .sidebar{padding:15px 16px}
  .sidebar .brand{font-size:18px}
  .shell-menu-button{top:19px;padding:6px 10px;border:1px solid #ffffff25;border-radius:8px;color:#e2e8f0}
  .nav-group{grid-column:1/-1;margin:12px 10px 3px}
  .sidebar .shell-settings{margin-top:5px}
  .sidebar-bottom{margin-top:0}
  .topbar{height:auto;min-height:76px;padding:12px 16px;flex-wrap:wrap;gap:8px}
  #company-title{max-width:none;width:100%;font-size:12px}
  .topbar-actions{justify-content:space-between;width:100%;gap:8px}
  .period-control{flex:1;min-width:0;max-width:230px}
  .period-control #period{flex:1;width:142px;min-width:0;min-height:38px;font-size:12px}
  .period-arrow{width:29px;flex-shrink:0}
  .topbar-actions .button{min-height:44px;font-size:12px;padding:9px 12px}
  .page-head{flex-wrap:wrap;gap:14px;margin-bottom:22px}
  .page-head h1{font-size:25px}
  .page-head>.actions{flex-direction:row;flex-wrap:wrap}
  .metric{padding:17px 18px;grid-template-columns:1fr;gap:2px}
  .metric strong{grid-column:auto;grid-row:auto;text-align:left;font-size:28px;margin:4px 0}
  .metric small{font-size:12px}
  .three-column{grid-template-columns:1fr;gap:10px;margin-bottom:20px}
  .step-card{padding:17px 18px;margin-bottom:0}
  .step-card>span{font-size:12px;margin-bottom:7px}
  .step-card h3{font-size:14px}
  .step-card p{font-size:12px}
  .step-card strong{font-size:24px}
  .card{padding:19px 16px}
  .toolbar .tabs{width:100%;flex-wrap:nowrap;overflow-x:auto}
  .tab{white-space:nowrap;flex-shrink:0;min-height:40px;padding:8px 11px}
  .table{font-size:13px}
  .table td{padding:14px 12px}
  .table th{padding:12px}
  .document-category>span{font-size:12px}
  .document-category{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;min-height:68px;padding:12px}
  .document-category>span{min-height:0}
  .document-category strong{font-size:22px;white-space:nowrap}
  .card-head{flex-wrap:wrap;gap:10px}
  .form-actions{flex-wrap:wrap;padding-top:15px}
  .form-actions .button{min-height:44px}
}
@media(prefers-reduced-motion:reduce){.button,.step-card,.sidebar nav a{transition:none}}
@media(max-width:640px){.account-content .expense-page{margin-bottom:150px}}
@media(max-width:640px){.account-content .expense-page{margin-bottom:150px}}
@media print{
  .skip-link{display:none!important}
  .card,.metric,.step-card{box-shadow:none}
  .metric:before,.step-card:after{display:none}
  .table-scroll{border:0;border-radius:0;overflow:visible}
  .table{min-width:0}
  .form-actions{position:static}
}
