.history-dialog{width:min(1100px,calc(100% - 40px));max-height:92vh;padding:0;overflow:auto}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px 30px;background:white;border-bottom:1px solid var(--line)}
.history-heading h2{margin:0;font-size:28px;letter-spacing:-.5px}
.history-heading-actions{display:flex;align-items:center;gap:16px}
.history-content{padding:28px 30px;background:#f7f8fb}
.dashboard-tabs{display:flex;gap:6px;padding:6px;margin:0 0 26px;border:1px solid var(--line);border-radius:10px;background:white}
.dashboard-tabs button{flex:1;min-height:44px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:14px;font-weight:650}
.dashboard-tabs button[aria-selected=true]{color:var(--blue);background:var(--accent-soft,#eef1ff)}
.dashboard-tabs button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.dashboard-settings-intro{margin-bottom:22px}.dashboard-settings-intro h3{font-size:20px;margin:0 0 7px}.dashboard-settings-intro p{font-size:13px;color:var(--muted);margin:0}
.history-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}
.history-intro h3{font-size:20px;margin:0 0 7px}
.history-intro p{font-size:13px;line-height:1.6;color:var(--muted);margin:0}
.history-count{display:block;padding:7px 11px;border-radius:7px;background:#eaf0ff;color:var(--blue);font-weight:650;font-size:13px;white-space:nowrap}
.history-search{display:block;font-size:13px;font-weight:600;margin-bottom:22px}
.history-search input{display:block;width:100%;font-size:16px;padding:13px 15px;margin-top:8px;outline-offset:1px}
.history-list{display:grid;gap:10px;min-height:160px}
.history-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:20px;border:1px solid var(--line);border-radius:10px;background:white}
.history-file{font-size:11px;letter-spacing:.02em;font-weight:750;color:var(--blue);width:40px;height:48px;display:grid;place-items:center;border:1px solid #d6dfff;border-radius:5px;background:#f3f6ff}
.history-document{min-width:0}.history-document h3{font-size:16px;margin:0 0 5px;overflow-wrap:anywhere}.history-document p{font-size:14px;margin:0 0 7px;overflow-wrap:anywhere}.history-document>span,.history-amount>span{font-size:12px;color:var(--muted);line-height:1.6}
.history-amount{text-align:right}.history-amount strong{display:block;font-size:18px;margin-bottom:6px;white-space:nowrap}.history-amount>span{display:block}
.history-row-actions{display:flex;flex-direction:column;align-items:center;gap:9px}.history-row-actions button{padding:9px 12px;font-size:13px}.history-download{font-size:12px;font-weight:600;color:var(--blue);padding:3px}
.history-empty{text-align:center;padding:45px 20px;background:white;border:1px dashed #d9deea;border-radius:10px}.history-empty>span{font-size:36px;color:var(--blue)}.history-empty h3{font-size:20px;margin:15px 0 10px}.history-empty p{max-width:440px;line-height:1.7;font-size:14px;color:var(--muted);margin:0 auto 22px}
.history-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px}.history-footer p{font-size:13px;line-height:1.6;color:var(--muted);margin:0}.history-pages{display:flex;gap:8px}
.history-note{font-size:12px;color:var(--muted);line-height:1.6;margin:22px 0 0}
.pdf-dialog[open]{display:flex;flex-direction:column}.pdf-dialog .pdf-toolbar,.pdf-dialog .pdf-fallback{flex-shrink:0}.pdf-dialog iframe{flex:1;min-height:0;height:auto}.pdf-archive-state{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 20px;background:#f0f7f3;border-bottom:1px solid #d8e8de}.pdf-archive-state p{font-size:13px;line-height:1.5;margin:0;color:#306347}.pdf-archive-state.is-error{background:#fff5ec}.pdf-archive-state.is-error p{color:#81522c}.pdf-archive-state button{flex-shrink:0}
@media(max-width:720px){.history-dialog{width:calc(100% - 16px);max-height:94vh}.history-heading{padding:20px 18px;gap:12px}.history-heading h2{font-size:24px}.history-heading-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}.history-content{padding:22px 16px}.history-intro{flex-direction:column;gap:13px}.history-intro h3{font-size:20px}.history-row{grid-template-columns:34px minmax(0,1fr);gap:13px;padding:16px}.history-file{width:32px;height:43px}.history-document h3{font-size:15px}.history-document p{font-size:14px}.history-amount{grid-column:2;text-align:left}.history-amount strong{font-size:18px}.history-row-actions{grid-column:2;flex-direction:row;gap:20px;justify-content:flex-start}.history-footer{align-items:flex-start;flex-direction:column;gap:14px}.history-pages{width:100%;justify-content:space-between}.history-empty{padding:34px 14px}.pdf-archive-state{padding:10px 14px;gap:10px;flex-wrap:wrap}.pdf-archive-state p{font-size:12px}}
.history-heading{position:sticky;top:0;z-index:2}
.history-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 26px}
.history-overview>div{border:1px solid var(--line);background:white;border-radius:10px;padding:18px 20px;min-width:0}
.history-overview span{display:block;color:var(--muted);font-size:12px;margin-bottom:9px}
.history-overview strong{font-size:24px;font-weight:650;letter-spacing:-.4px;overflow-wrap:anywhere}
.history-tools{display:grid;grid-template-columns:minmax(200px,1fr) 145px 145px 175px;gap:12px;align-items:end}
.history-tools label{display:block;font-size:12px;font-weight:600;min-width:0;margin:0}
.history-tools input,.history-tools select{display:block;width:100%;min-width:0;height:46px;font-size:14px;padding:10px 11px;margin-top:8px;background:white}
.history-tools-footer{display:flex;align-items:center;justify-content:flex-end;gap:20px;margin:14px 0 22px;min-height:22px}
.history-tools-footer p{color:#a62c2c;font-size:12px;line-height:1.5;margin:0 auto 0 0}
.history-tools-footer button{font-size:12px;white-space:nowrap}
.history-document .history-number{font-size:13px;color:var(--muted)}
.history-document .history-owner{display:block;margin-top:7px;font-size:11px;color:var(--muted)}
.history-document .history-reference{display:block;margin-top:5px;font-size:12px}
.history-document .history-confirmed{display:block;margin-top:7px;font-size:12px;color:#306347}
.quote-account-note{font-size:12px;line-height:1.65;color:var(--muted);margin:15px 0 4px}
.account-connected #open-dashboard::before{content:'';display:inline-block;width:6px;height:6px;background:#35a165;border-radius:50%;margin-right:7px;vertical-align:middle}
@media(max-width:960px){.history-tools{grid-template-columns:minmax(180px,1fr) 135px 135px}.history-tools>label:last-child{grid-column:1/-1}.history-overview strong{font-size:21px}}
@media(max-width:720px){.history-heading{align-items:flex-start}.history-heading-actions{gap:10px;max-width:210px}.history-heading-actions .primary-button{font-size:12px;padding:9px 10px}.history-heading-actions .text-button{font-size:12px}.history-heading-actions .close-button{width:28px;height:28px;font-size:20px}.history-intro{flex-direction:row;align-items:center;gap:10px}.history-intro h3{font-size:18px}.history-count{font-size:11px;white-space:normal;text-align:right}.history-overview{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:22px}.history-overview>div{padding:13px 12px}.history-overview>div:last-child{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px}.history-overview>div:last-child span{margin:0}.history-overview strong{font-size:19px}.history-overview span{font-size:11px}.history-tools{grid-template-columns:1fr 1fr;gap:14px 10px}.history-tools .history-search{grid-column:1/-1}.history-tools input,.history-tools select{font-size:16px}.history-tools-footer{gap:12px;flex-wrap:wrap}.history-tools-footer p{width:100%}}

.history-folders{display:flex;gap:6px;margin:4px 0 18px;border-bottom:1px solid var(--line);padding-bottom:9px}
.history-folders button{padding:9px 14px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:13px;font-weight:600}
.history-folders button[aria-pressed="true"]{background:#eaf0ff;color:var(--blue)}
.history-folders span{margin-left:5px;font-size:11px}
.history-bulk-tools{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 14px;min-height:36px}
.history-select-page,.history-select{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.history-select input,.history-select-page input{width:18px;height:18px;margin:0;padding:0;accent-color:var(--blue);cursor:pointer;flex-shrink:0}
.history-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}
.history-bulk-actions>span{font-size:12px;color:var(--muted)}
.history-bulk-actions button{font-size:12px;padding:9px 12px}
.history-delete-button{border:1px solid #eed6d6;border-radius:7px;color:#a32b2b;background:#fff4f4}
.history-action-status{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 14px}
.history-action-status:empty{display:none}
.history-row{grid-template-columns:20px 44px minmax(0,1fr) auto auto}
.history-row.is-checked{border-color:#9facf6;background:#f7f9ff}
.history-select{min-height:32px;justify-content:center}
.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}
@media(max-width:720px){.history-bulk-tools{align-items:flex-start;flex-direction:column;gap:8px}.history-bulk-actions{justify-content:flex-start;gap:8px}.history-select-page{min-height:32px}.history-row{grid-template-columns:20px minmax(0,1fr);gap:10px}.history-row .history-file{display:none}.history-select{grid-column:1;grid-row:1 / span 3;align-self:start}.history-document{grid-column:2}.history-bulk-actions button{padding:10px;font-size:12px}}
@media(max-width:720px){.dashboard-tabs{margin-bottom:22px}.history-overview>div:last-child{grid-column:auto;display:block}.history-overview>div:last-child span{margin-bottom:9px}.dashboard-settings-intro h3{font-size:18px}.theme-section h4{padding:16px}}
