/* ÜLDINE: põhivärvid, kirjatüüp ja ühised vormielemendid. */
:root{--bg:#fff;--ink:#36434a;--muted:#7b898f;--green:#80b741;--line:#dfe5e7;--card:#fff}
*{box-sizing:border-box}
body{margin:0;background:#fafbfb;color:var(--ink);font:13px/1.55 Arial,"Segoe UI",sans-serif}
a{color:#5f94ac;text-decoration:none}
a:hover{text-decoration:underline}
button,.button{border:0;background:#70a8bd;color:#fff;border-radius:2px;padding:9px 15px;font:600 12px Arial,sans-serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;line-height:1.5;gap:8px}
button:hover,.button:hover{filter:brightness(.95);text-decoration:none}
/* Sisemine piirjoon eristab nupud taustast nende mõõte muutmata. */
.invoice-tool:not(:focus-visible){outline:2px solid #263b4bcc;outline-offset:-2px}
.invoice-tool:hover:not(:focus-visible){outline-color:#203242}
.secondary{background:#edf0f1;border:1px solid #d3dce0;color:#516b78}
.subtle{background:transparent;color:var(--muted);padding:5px 7px}
.page-shell{max-width:1450px;margin:auto;background:#fff;min-height:100vh;border-left:1px solid #eef0f0;border-right:1px solid #eef0f0;padding:0 10px}
/* PÄIS: logo ja paremal olev ettevõtte/kasutaja valik. */
.site-header{display:flex;align-items:center;justify-content:space-between;gap:20px;height:86px;padding:10px 15px}
.brand{display:flex;align-items:center;gap:10px;font-size:34px;letter-spacing:-1.8px;color:#1f282b;font-weight:400}
.brand:hover{text-decoration:none}
.brand-mark{font-size:24px;color:#fff;display:inline-flex;background:#80b741;width:42px;height:34px;align-items:center;justify-content:center;font-weight:600;letter-spacing:-1px}
.header-account{text-align:right}
.company-switch{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.company-switch label{display:none}
.company-switch select{border:0;font-size:14px;color:#86aa58;font-weight:600;text-align:right;width:auto;max-width:300px;padding:3px}
.account-details{font-size:11px;color:#888}
.account-details a{color:#7a858a;margin-left:15px}
/* MENÜÜ: roheline põhiriba ja avanevad alamvalikud. */
.main-menu{background:var(--green);display:flex;align-items:center;gap:0;min-height:38px;padding:0 5px;position:relative;z-index:10}
.main-menu>a,.menu-dropdown>summary{color:white;padding:10px 13px;font-size:12px;line-height:18px;cursor:pointer;list-style:none}
.main-menu>a:hover,.menu-dropdown>summary:hover,.main-menu>a.active{background:#73a237;text-decoration:none}
.menu-dropdown>summary::-webkit-details-marker{display:none}
.menu-dropdown{position:relative}
.dropdown-panel{position:absolute;left:0;top:38px;min-width:205px;box-shadow:0 6px 15px #0002;background:#fff;border:1px solid #ccd5d9;display:flex;flex-direction:column;padding:5px 0}
.dropdown-panel>a{padding:9px 16px;color:#43555c;font-size:12px}
.dropdown-panel>a:hover{background:#edf2f4;text-decoration:none}
.logout{margin-left:auto}
.logout button{background:transparent;color:#fff;font-weight:400;padding:10px}
/* TÖÖALA: külgmenüü, sisu ja lehe pealkiri. */
.work-area{display:flex;gap:18px;padding-top:10px}
.side-menu{width:170px;flex-shrink:0;background:#f0f3f3;align-self:flex-start;padding-bottom:15px}
.side-menu h3{font-size:13px;font-weight:400;color:#344a56;background:#d1dcdf;margin:0 0 3px;padding:5px 8px}
.side-menu h3:not(:first-child){margin-top:10px}
.side-menu a{display:block;padding:7px 8px;font-size:12px;color:#4e5d63}
.side-menu a:hover{background:#e4ecee;text-decoration:none}
.content{flex:1;min-width:0;padding:0 0 30px;min-height:calc(100vh - 180px)}
.page-heading{background:#78a7ba;min-height:65px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 16px;margin-bottom:14px;color:white}
.page-heading h1{font-size:24px;font-weight:400;line-height:1.25;margin:0;letter-spacing:0}
.page-heading .eyebrow{display:none}
.page-heading .muted,.page-heading .back{color:#e3eef2}
.page-heading p{margin:5px 0 0}
.page-heading>.button{background:#5795ad;border:1px solid #a6c5d1}
.page-dashboard .page-heading{background:#d1dde0;color:#405b66;min-height:50px;padding:10px 14px}
.page-dashboard .page-heading h1{font-size:19px;font-weight:600}
.page-dashboard .page-heading p{display:none}
/* AVALEHT: ettevõtte arvud ja kiirvalikud. */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:20px 0}
.stats section{background:#fff;border:1px solid #e7ecee;padding:18px}
.stats span{color:#789291;font-size:13px}
.stats strong{font-size:26px;font-weight:400;display:block;margin:6px 0;color:#80aa49;font-variant-numeric:tabular-nums}
.stats strong small{font-size:11px;color:#74848b;margin-left:10px}
.stats p{font-size:11px;color:var(--muted);margin:0}
.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:18px 0 22px}
.quick-actions a{background:#f0f4f4;color:#536c76;display:flex;align-items:center;gap:12px;padding:15px}
.quick-actions a>span{font-size:23px;color:#81ab47}
.quick-actions a strong{font-size:12px;font-weight:400;display:block}
.quick-actions a small{font-size:10px;color:#8c989e}
.quick-actions a b{margin-left:auto;font-weight:400}
.panel{background:var(--card);border:1px solid #e2e8ea;margin-bottom:18px;overflow:hidden}
.padded{padding:20px}
.panel-heading{padding:10px 13px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#d1dde0}
.panel-heading h2{margin:0;font-size:15px}
.panel-heading a,.panel-heading span{font-size:11px}
.padded>h2{padding-bottom:8px;border-bottom:1px solid #d9e2e6;margin-bottom:18px}
h2{font-size:17px;font-weight:400;margin-top:0}
p{margin-top:0}
.eyebrow{font-size:10px;letter-spacing:1px;color:#83ad47;margin:12px 0}
.muted,small{color:var(--muted)}
small{font-size:11px}
.strong{font-weight:600}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}
th{background:#d2e0e5;color:#506c79;padding:11px 12px;font-size:11px;font-weight:400;text-transform:uppercase;white-space:nowrap;border:1px solid #c4d5dc}
td{padding:11px 12px;border:1px solid #e2e6e8;overflow-wrap:anywhere}
tbody tr:nth-child(even){background:#f8fafa}
tbody tr:hover{background:#f0f5f6}
td small{display:block;font-size:10px;margin-top:3px}
.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.badge{display:inline-block;background:#eaf0f3;color:#62899a;border-radius:2px;padding:4px 7px;font-size:10px;white-space:nowrap}
.badge.draft{background:#f6f0dd;color:#a39459}
.badge.overdue{background:#fbe9df;color:#c48260}
.badge.paid{background:#edf3e3;color:#83a948}
.notice{padding:12px 15px;background:#eef5e6;border:1px solid #d5e5c3;margin-bottom:15px;font-size:12px}
.notice.error{background:#fff0e9;border-color:#efd4c8;color:#ab6241}
.empty{text-align:center;padding:40px;color:var(--muted)}
input,select,textarea{font:inherit;background:#fff;border:1px solid #ccd6dc;color:#3f505a;border-radius:1px;padding:8px 9px;min-width:0;width:100%}
input:focus,select:focus,textarea:focus{outline:2px solid #a9c6d3;outline-offset:1px}
input[readonly]{background:#eef1f4}
label{font-size:12px;color:#546975;display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
textarea{resize:vertical}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0 24px}
.filter-bar{display:flex;gap:13px;align-items:flex-end;margin-bottom:12px;background:#f3f5f5;padding:13px}
.filter-bar label{margin:0;min-width:170px}
.filter-bar label:first-of-type{flex:1}
.table-summary{padding:12px;background:#edf2f3;font-size:11px;color:#658190;text-align:right}
.line-table th,.line-table td{padding:7px}
.line-table td:first-child{width:45%;min-width:240px}
.line-table td:nth-child(2),.line-table td:nth-child(3),.line-table td:nth-child(4){min-width:90px}
.remove-line{background:#eef1f2;color:#8a9da6;font-size:19px;padding:3px 9px}
.invoice-bottom{padding:18px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.totals{width:280px;margin:0}
.totals>div{display:flex;justify-content:space-between;gap:20px;margin:0 0 9px;font-size:12px}
.totals dd{margin:0;font-variant-numeric:tabular-nums}
.totals .grand{border-top:1px solid #cdd9de;padding-top:11px;font-size:17px;font-weight:600}
.invoice-totals{margin:25px 0 0 auto}
.form-actions,.actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.actions a[href*="page=pdf"]{background:#e7b548;color:#fff;border:0}
.actions a[href*="invoice_new"]{background:#8f6ab1;color:#fff;border:0}
.back{font-size:11px;display:block;margin:0 0 5px}
.invoice-meta{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:30px;background:#edf0f2;padding:18px;margin:-20px -20px 20px}
.invoice-meta p{font-size:12px;margin:6px 0}
.invoice-meta h2{font-size:16px;margin:5px 0}
.invoice-amount{font-size:26px;margin-top:6px}
.note-text{margin-top:25px;overflow-wrap:anywhere}
.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.two-columns .form-grid{grid-template-columns:1fr 1fr}
.contact-layout{display:grid;grid-template-columns:1.7fr 1fr;gap:18px;align-items:start}
.company-card{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e3e8ea;padding:14px 0;gap:15px}
.company-card small{display:block}
.check{flex-direction:row;align-items:flex-start;gap:8px}
.check input{width:16px;margin-top:3px}
footer{display:flex;justify-content:space-between;border-top:1px solid #e3e9eb;padding:16px 5px;font-size:10px;color:#8b999f}
/* SISSELOGIMINE JA INSTALLER. */
.login{max-width:390px;width:calc(100% - 30px);margin:10vh auto;background:#fff;padding:35px;border:1px solid #dce5e8;box-shadow:0 10px 50px #203e4610}
.login .brand-mark{margin-bottom:20px}
.login h1{font-size:34px;font-weight:400;letter-spacing:-1px;margin:0 0 10px}
.login form{margin:25px 0}
.login button{width:100%}
.login>small{display:block;text-align:center}
.installer{max-width:960px;padding:40px 24px;margin:auto}
.installer>.brand-mark{margin-bottom:20px}
.installer h1{font-weight:400}
.installer .panel p{margin-bottom:8px}
button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:1000px){.site-header{padding:10px}
.brand{font-size:28px}
.main-menu>a,.menu-dropdown>summary{padding:10px 9px;font-size:11px}
.form-grid{grid-template-columns:1fr 1fr}
.contact-layout{grid-template-columns:1fr}
.quick-actions{grid-template-columns:1fr}
.two-columns{grid-template-columns:1fr}
.stats strong{font-size:22px}
.side-menu{width:155px}
.work-area{gap:12px}
}
@media(max-width:700px){.page-shell{padding:0 7px}
.site-header{height:auto;min-height:90px;align-items:flex-start;gap:8px}
.brand{font-size:24px}
.brand-mark{width:30px;height:29px;font-size:20px}
.company-switch{flex-wrap:wrap;gap:0}
.company-switch select{font-size:12px;max-width:170px}
.company-switch button{font-size:10px}
.account-details{font-size:9px}
.main-menu{flex-wrap:wrap}
.main-menu>a,.menu-dropdown>summary{font-size:10px;padding:8px}
.logout button{font-size:9px;padding:8px}
.dropdown-panel{top:34px}
.side-menu{display:none}
.page-heading{flex-wrap:wrap;gap:12px}
.page-heading h1{font-size:22px}
.stats{grid-template-columns:1fr;gap:10px;margin:12px 0}
.stats section{padding:13px}
.stats strong{font-size:25px}
.quick-actions{display:none}
.form-grid,.two-columns .form-grid{grid-template-columns:1fr}
.invoice-meta{grid-template-columns:1fr;gap:12px}
.invoice-bottom{flex-wrap:wrap}
.totals{width:100%}
.filter-bar{flex-wrap:wrap}
.filter-bar label{min-width:0;width:100%}
.page-heading .actions{flex-wrap:wrap}
.padded{padding:15px}
.invoice-meta{margin:-15px -15px 15px}
.page-dashboard .page-heading>.button{font-size:10px}
.account-details a{margin-left:4px}
.installer{padding:25px 15px}
}

.clickable-row{cursor:pointer}
.registry-lookup{padding:0 0 16px;margin-bottom:20px;border-bottom:1px solid #d9e2e6;max-width:720px}
.registry-controls{display:flex;gap:10px}
.registry-result{display:flex;flex-direction:column;align-items:flex-start;white-space:normal;text-align:left;width:100%;padding:10px 12px;background:#f0f5f7;color:#466271;border-bottom:1px solid #d5e0e5}
.registry-result:hover{background:#e0edf1}
.registry-result small{font-weight:400;margin-top:3px}
#registry-status{font-size:11px;margin:8px 0 0}

.company-logo-preview{max-width:250px;max-height:90px;display:block;margin:10px 0 16px}

/* Invoice editor: reference layout */
/* DOKUMENDIAKNAD: tume taust, päis ja vormi paigutus. */
.invoice-shade{position:relative;margin:-4px -8px;padding:12px 0 35px;background:#7778;min-height:700px}
.invoice-dialog{position:relative;max-width:1200px;margin:0 auto;background:#fff;border:5px solid #f5f5f5;box-shadow:0 2px 10px #5553;color:#111;font:12px Arial,sans-serif}
.invoice-dialog form{margin:0}
.invoice-dialog input,.invoice-dialog select,.invoice-dialog textarea{border:1px solid #cbd2db;border-radius:0;box-shadow:none;background:white;color:#101010;font:12px Arial,sans-serif;padding:5px;min-height:30px;width:100%;margin:0}
.invoice-dialog input:focus,.invoice-dialog textarea:focus{outline:1px solid #75a8bb;outline-offset:-1px}
.invoice-dialog input[readonly]{background:#eee}
.invoice-title{display:flex;background:#76a7ba;height:64px;gap:3px;align-items:stretch}
.invoice-title h1{font:24px Arial,sans-serif;color:white;margin:9px 7px;flex:1}
.invoice-tool{width:64px;flex:0 0 64px;text-align:center;color:white!important;padding:8px 0 3px!important;border:0;border-radius:0;text-decoration:none;font:12px Arial!important;display:flex;flex-direction:column;justify-content:space-between;align-items:center}
.invoice-tool b{font-size:25px;font-weight:normal;line-height:28px}
.invoice-tool{min-width:max-content;padding-left:8px!important;padding-right:8px!important;white-space:nowrap}
.invoice-tool.new{background:#4b9ed0}
.invoice-tool.save{background:#89b443}
.invoice-close{width:29px;font:28px Arial;color:#888;background:#fff;text-align:center;text-decoration:none}
.counterparty{background:#dedede;margin:10px 0 0;padding:10px 8px;min-height:54px;display:flex;align-items:center;gap:20px}
.counterparty>label{font:18px Arial;color:#4e6570;margin:0}
.contact-combobox{position:relative;width:240px;flex-shrink:0}
.contact-combobox input{min-height:27px;border:0}
.counterparty #contact-details{color:#555;font-size:11px}
#contact-options{position:absolute;z-index:20;left:0;top:100%;width:380px;background:#fff;border:1px solid #9aaeb7;box-shadow:0 4px 8px #0003;max-height:250px;overflow:auto}
#contact-options button{display:block;text-align:left;border:0;border-bottom:1px solid #ddd;border-radius:0;background:#fff;color:#333;width:100%;padding:9px 10px;font:12px Arial}
#contact-options button small{display:block;color:#777;margin-top:3px}
#contact-options button:hover,#contact-options button[aria-selected=true]{background:#d7e7eb}
#contact-options .no-contact{display:block;padding:10px;color:#555}
.invoice-fields{display:grid;grid-template-columns:repeat(4,1fr);padding:13px 3px;gap:8px}
.invoice-fields>div{display:flex;flex-direction:column;gap:6px}
.invoice-fields label{display:flex;align-items:center;gap:6px;margin:0;font-size:12px;color:#111}
.invoice-fields label>span{width:95px;flex:0 0 95px}
.invoice-fields input,.invoice-fields select{width:103px;min-height:30px;height:30px}
.invoice-fields input[type=date]{padding:3px;width:125px}
.invoice-grid-wrap{overflow-x:auto}
.invoice-grid{width:100%;table-layout:fixed;border-collapse:collapse;min-width:930px}
.invoice-grid .article{width:10%}
.invoice-grid .description{width:31%}
.invoice-grid .quantity{width:8%}
.invoice-grid .price{width:8%}
.invoice-grid .discount{width:5%}
.invoice-grid .sum{width:6%}
.invoice-grid .extra{width:3%}
.invoice-grid .tax{width:12%}
.invoice-grid .account{width:6%}
.invoice-grid .object{width:6%}
.invoice-grid .delete{width:28px}
.invoice-grid th{height:43px;padding:6px 5px;color:#4d6877;font:14px Arial;text-align:left;background:#cedee3;border:1px solid #bfcbd0;white-space:nowrap}
.invoice-grid td{border:1px solid #ddd;padding:0;height:42px;vertical-align:top}
.invoice-grid td input,.invoice-grid td textarea{border:0;min-height:40px;height:40px;resize:vertical;padding:8px 6px;display:block}
.invoice-grid td input[data-number]{text-align:right}
.invoice-grid td.calculated{background:#eee;text-align:right;padding:12px 6px;font-weight:bold}
.invoice-grid td.extra-cell{padding-top:12px;text-align:center;color:#999}
.invoice-grid .remove-line{border:0;border-radius:0;color:#ff8b35;background:#fff;padding:9px 5px;font-size:16px;min-width:0}
.invoice-calculations{display:flex;justify-content:space-between;align-items:flex-start;min-height:145px;padding:5px 3px 8px}
.invoice-calculations #add-line{background:#559ed0;border:0;border-radius:0;font:12px Arial;padding:11px 17px;color:#fff}
.smart-totals{width:238px;margin:0;padding-top:3px}
.smart-totals>div{display:flex;align-items:center;justify-content:space-between;min-height:32px;gap:8px}
.smart-totals dt{font-weight:normal;flex:1;text-align:right}
.smart-totals dd{width:82px;margin:0;text-align:right;padding-right:6px}
.smart-totals dd input{width:75px;min-height:29px;text-align:right}
.smart-totals dd input[type=checkbox]{width:15px;min-height:15px;height:15px;accent-color:#51b278}
.smart-totals dt label{font-size:12px;margin:0}
.smart-totals .grand{border-top:1px solid #ccc;font-size:17px;color:#4d4d4d;min-height:36px}
.smart-totals .grand dt,.smart-totals .grand dd{font-weight:bold}
.invoice-lower{display:grid;gap:18px;background:#f4f4f4;padding:16px 14px;align-items:start}
.invoice-lower.sale{grid-template-columns:repeat(3,minmax(0,1fr))}
.invoice-lower.purchase{grid-template-columns:repeat(2,minmax(0,1fr))}
.invoice-lower h2{font:18px Arial;font-weight:bold;color:#4c606b;margin:0 0 10px}
.payment-box,.pdf-options{background:#fff;padding:6px}
.payment-box table{width:100%;border-collapse:collapse;table-layout:fixed}
.payment-box th{background:white;color:#6a92b2;font:13px Arial;padding:10px 4px;border-bottom:1px solid #ddd}
.payment-box th:last-child{text-align:right}
.payment-box td{border:1px solid #ddd;padding:5px;font-size:12px}
.payment-box td:first-child{border-left:0}
.payment-box td:last-child{width:28%;border-right:0}
.payment-box select{width:100%;padding:4px}
.payment-box input{text-align:right}
.payment-hint{font-size:11px;color:#777;margin:10px 4px}
.unpaid{text-align:right;font-weight:bold;padding:12px 4px 0}
.unpaid strong{display:inline-block;min-width:85px}
.pdf-options{padding:11px 10px 16px}
.pdf-options label{display:flex;align-items:flex-start;gap:10px;margin:0 0 12px}
.pdf-options label>span{width:98px;flex-shrink:0;padding-top:7px;font:12px Arial;color:#111}
.pdf-options textarea{resize:vertical;min-height:119px}
.file-drop{position:relative;background:#fff;border:1px dashed #aab5bb;outline:5px solid white;min-height:111px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;margin:5px;font:14px Arial;color:#415967;text-align:center;cursor:pointer}
.file-drop.dragging{background:#e1edf1}
.file-drop input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.upload-symbol{font-size:40px;color:#cdd2d4;line-height:39px}
.file-drop small{font-size:10px;color:#8a979c;max-width:95%;overflow-wrap:anywhere}
.internal-title{margin-top:27px!important}
.attached-file{display:block;margin:10px 0}
.invoice-dialog .notice{margin:5px}
.page-invoice_new>.notice{position:relative;z-index:25}
.invoice-dialog textarea[name=internal_notes]{min-height:38px}
.invoice-dialog [hidden]{display:none!important}
@media(min-width:1500px){.invoice-shade{padding-top:22px}
}
@media(max-width:1000px){.invoice-fields{grid-template-columns:repeat(2,1fr);gap:14px}
.invoice-lower.sale{grid-template-columns:1fr 1fr}
.invoice-lower.sale>section:last-child{grid-column:1/-1}
.invoice-dialog{margin:0 5px}
.counterparty #contact-details{display:none}
}
@media(max-width:650px){.invoice-lower.sale,.invoice-lower.purchase{grid-template-columns:1fr}
.invoice-fields{grid-template-columns:1fr 1fr}
.invoice-fields label>span{width:80px;flex-basis:80px}
.invoice-fields input,.invoice-fields input[type=date]{width:110px}
.invoice-title h1{font-size:20px}
.invoice-tool{flex-basis:58px;width:58px}
.counterparty{gap:10px}
.contact-combobox{width:220px}
}

.invoice-fields label,.pdf-options label{flex-direction:row}
.invoice-fields label>span{align-self:center}
.invoice-grid td textarea{font:12px Arial,sans-serif}
.invoice-grid th{text-transform:none}

.invoice-read-fields{border:0;padding:0;margin:0;min-width:0}
.invoice-readonly .invoice-calculations #add-line,.invoice-readonly .remove-line,.invoice-readonly .file-drop{display:none}
.invoice-readonly input:disabled,.invoice-readonly textarea:disabled,.invoice-readonly select:disabled{opacity:1;color:#222;background:transparent}
.invoice-readonly .invoice-grid textarea{resize:none}
.invoice-readonly .counterparty input{font-weight:bold}
.invoice-readonly .invoice-grid td input,.invoice-readonly .invoice-grid td textarea{border:0}
.invoice-readonly .attached-file{pointer-events:auto}
.invoice-tool.pdf{background:#e9b646}
.invoice-tool.edit{background:#8e6ab0}
.page-invoice>.invoice-shade{margin-bottom:16px}

.invoice-tool svg{width:25px;height:27px;fill:none;stroke:white;stroke-width:2}
.file-drop svg.upload-symbol{width:57px;height:43px;fill:none;stroke:#ccd1d3;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}

.invoice-readonly .smart-totals{margin-left:auto}
.invoice-readonly input:disabled,.invoice-readonly textarea:disabled,.invoice-readonly select:disabled{border-color:transparent}
.invoice-readonly input:disabled::placeholder{color:transparent}
.invoice-readonly .payment-box td:last-child{text-align:right}

.invoice-grid .delete{width:2.5%}
.invoice-grid.sale-grid .description{width:33.5%}
.invoice-grid.purchase-grid .description{width:38.5%}

/* Payments and offers follow the same document toolbar and compact grid. */
.page-sums{display:inline-block;margin-top:10px;padding:15px 20px;background:#eee;line-height:2;min-width:240px}
.payment-dialog{max-width:1100px}
.payment-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px;padding:20px 14px;line-height:2}
.payment-meta label{display:flex;flex-direction:row;gap:12px;align-items:center;margin:0 0 8px;white-space:nowrap}
.payment-meta input,.payment-meta select,.payment-meta textarea{width:65%}
.payment-total{text-align:right;padding:20px 10px;font-size:17px;border-top:1px solid #ddd;margin:35px 0 0;color:#4d5a62}
.payment-total b{margin-left:15px}
.payment-reverse{margin:25px 14px;background:#f6f6f6;padding:12px}
.payment-reverse summary{cursor:pointer;color:#638a9b}
.payment-reverse form{margin-top:15px}
.payment-reverse label{max-width:250px}
.payment-dialog .counterparty>select{width:180px}
.allocation-table td{padding:6px}
.allocation-table th{font-size:13px;padding:12px 6px}
.allocation-table input{max-width:125px;text-align:right}
.allocation-table input[type=checkbox]{width:16px;height:16px;accent-color:#80b741}
.allocation-table td:nth-last-child(2){width:130px}
.allocation-table a{color:#536771}
.payment-dialog #allocation-hint{margin:14px}
.contact-options{position:absolute;z-index:20;left:0;top:100%;width:380px;background:#fff;border:1px solid #9aaeb7;box-shadow:0 4px 8px #0003;max-height:250px;overflow:auto}
.contact-options button{display:block;text-align:left;border:0;border-bottom:1px solid #ddd;background:#fff;color:#333;width:100%;padding:10px;font:12px Arial}
.contact-options button:hover,.contact-options button[aria-selected=true]{background:#d7e7eb}
.contact-options .no-contact{display:block;padding:10px;color:#777}
.bank-upload{max-width:700px;margin:25px 5px}
.bank-upload .file-drop{min-height:130px}
.bank-upload button{margin:15px 0}
.bank-match-form>label{max-width:450px}
.bank-match-form>button{margin-top:10px}
.repeat-export{margin-top:20px}
.quote-dialog .sale-grid .description{width:39.5%}
.quote-dialog .invoice-fields select{width:150px}
.quote-convert{display:flex;gap:18px;align-items:center}
.quote-convert label{margin:0}
.quote-convert>span{max-width:450px}
.quote-lower .file-drop{min-height:111px}
[hidden]{display:none!important}
@media(max-width:900px){.payment-meta{grid-template-columns:1fr;gap:12px}
.payment-meta label{max-width:500px}
.quote-convert{flex-wrap:wrap}
.payment-dialog{margin:0 5px}
.payment-dialog .counterparty{flex-wrap:wrap}
.quote-lower>div{display:none}
.quote-lower.sale{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){.quote-lower.sale{grid-template-columns:1fr}
}

.quote-dialog .invoice-fields label>span{width:112px;flex-basis:112px;white-space:nowrap}
.payment-meta p{margin:0 0 8px}
.payment-meta small{font-size:10px}

.contact-delete-button{background:#ed944c;color:#fff}
.deleted-contact-fields{border:0;margin:0;padding:0;min-width:0}
.contact-deleted-filter{white-space:nowrap;min-width:auto!important}
.filter-bar .contact-deleted-filter{align-self:center}
.contact-deleted-filter input{width:16px;accent-color:#80b741}
#contact-delete{border-color:#e3b38e;background:#fffaf5;scroll-margin-top:12px}

/* Ühine dokumendiaken ja kontaktikaart. */
.invoice-shade{position:fixed;inset:0;z-index:50;overflow:auto;background:#0009;padding:70px 15px;margin:0;min-height:0}
.invoice-dialog{margin:0 auto}
.content>.notice:has(+.invoice-shade:not([hidden])),body:has(.invoice-shade:not([hidden])) .content>.notice{position:fixed;z-index:80;top:8px;left:50%;transform:translateX(-50%);width:min(1100px,94vw);max-height:55px;overflow:auto}
/* KONTAKTIKAART: kliendi ja hankija andmeveerud. */
.contact-dialog{max-width:1100px}
.invoice-tool.delete{background:#ff8f39}
.contact-registry{position:relative;display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:#dedede;padding:10px 8px;margin:10px 0;min-height:46px;color:#4c6370;font:17px Arial}
.contact-registry>label{display:block;margin:0;font:17px Arial}
.registry-combobox{position:relative}
.contact-registry #registry-query{width:100px;min-height:27px;height:27px;padding:3px;border:0}
.contact-registry #registry-results{position:absolute;top:100%;left:0;width:430px;max-width:80vw;max-height:300px;overflow:auto;z-index:5;box-shadow:0 3px 9px #0003}
.contact-registry .registry-result{font-size:12px}
.contact-balance{margin-left:auto;color:#4e6470;font:17px Arial;white-space:nowrap}
.registry-status{width:100%;font:11px Arial;margin:0!important}
.registry-status:empty{display:none}
.contact-card-body{background:#f4f4f4;padding:16px 14px 24px}
.contact-top-grid{display:grid;grid-template-columns:28% 28% 1fr;gap:28px;align-items:start}
.contact-dialog h2{font:18px Arial;font-weight:bold;color:#536b78;margin:0 0 10px}
.contact-top-grid>section:nth-child(n+2)>h2{color:#6d98ae;font-weight:normal}
.contact-white{background:#fff;padding:10px}
.contact-white>label,.registration-field>label,.contact-credit>label:not(.check){display:flex;flex-direction:row;align-items:center;gap:7px;margin:0 0 12px;min-height:30px;color:#111;font:12px Arial}
.contact-white label>span:not(.ledger-combobox){flex:0 0 92px;width:92px}
.contact-dialog input,.contact-dialog select,.contact-dialog textarea{font:12px Arial;min-height:31px}
.contact-white .contact-name{margin-bottom:12px}
.registration-field{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.registration-field>label{margin:0;flex:1;min-width:0}
.registration-field input{width:80px}
.registration-field>a{white-space:nowrap;font-size:11px}
.contact-white>label:last-of-type{margin-bottom:0}
.contact-white label>input[name=group_name]{max-width:80px}
.contact-credit{display:flex;align-items:center;gap:4px;margin:0 0 12px}
.contact-credit>label:not(.check){margin:0;gap:7px}
.contact-credit input:not([type=checkbox]){width:80px}
.contact-credit label.check{display:flex;flex-direction:row;align-items:center;gap:3px;margin:0;color:#111;font:12px Arial}
.contact-credit input[type=checkbox]{width:15px;height:15px;min-height:15px;padding:0;accent-color:#58b581}
.contact-details-white{padding:10px 6px;overflow:hidden}
.contact-details-table{table-layout:fixed}
.contact-details-table .contact-type{width:77px}
.contact-details-table .contact-remove{width:28px}
.contact-details-table th{border:0;background:#fff;color:#718fa2;padding:6px 3px;font:13px Arial}
.contact-details-table td{padding:0;border:1px solid #eee}
.contact-details-table input,.contact-details-table select{border:0;min-height:32px;height:32px;padding:3px;font-size:12px;display:block}
.contact-details-table select{padding-right:0}
.contact-details-table .remove-contact-detail{color:#ff903c;background:white;border:0;font-size:21px;padding:2px 5px;min-height:30px;line-height:1}
.add-contact-detail{float:right;clear:both;border:0;border-radius:0;color:white;background:#559fc7;font:22px Arial;padding:0 2px;line-height:21px;margin:8px 3px 0}
.contact-details-white:after{content:'';display:block;clear:both}
.contact-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:65px}
.contact-defaults>label>span:not(.ledger-combobox){width:54%;flex-basis:54%;white-space:normal}
.contact-defaults>label>input,.contact-defaults>label>select{max-width:120px}
.contact-white input[type=checkbox]{width:15px;height:15px;min-height:15px;accent-color:#58b581}
.contact-defaults .contact-note{display:block}
.contact-defaults .contact-note>span{display:block;margin-bottom:7px}
.contact-ledger label>span:not(.ledger-combobox){width:32%;flex-basis:32%}
.contact-ledger select{width:200px}
.contact-internal,.contact-files{margin-top:35px}
.contact-files .file-drop{min-height:112px;margin:5px}
.contact-history{margin-top:30px}
.contact-history table{background:#fff}
.contact-history th{background:#fff;border-color:#eee}
.contact-history td{font-size:12px}
.contact-dialog .deleted-contact-fields{border:0;padding:0;margin:0}
.counterparty{flex-wrap:wrap}
.counterparty #contact-details:not(:empty){order:5;width:100%;flex-basis:100%}
.credit-warning{padding:8px 12px;background:#fff3dc;margin:8px;color:#8b5b20;font:12px Arial}
.invoice-dialog #contact-balance{font-size:17px}
@media(max-width:1000px){.invoice-shade{padding:25px 10px}
.contact-top-grid{grid-template-columns:1fr 1fr;gap:22px}
.contact-top-grid>section:last-child{grid-column:1/-1}
.contact-dialog{max-width:850px}
.contact-details-table .contact-type{width:100px}
.contact-bottom-grid{margin-top:35px}
.contact-white label>span:not(.ledger-combobox){flex-basis:90px;width:90px}
}
@media(max-width:650px){.invoice-shade{padding:10px 5px}
.contact-top-grid,.contact-bottom-grid{grid-template-columns:1fr;gap:25px}
.contact-top-grid>section:last-child{grid-column:auto}
.contact-balance{font-size:13px}
.contact-registry{gap:8px}
.contact-registry>label{font-size:14px}
.contact-defaults>label>span:not(.ledger-combobox){flex-basis:50%;width:50%}
.counterparty .contact-balance{font-size:12px!important}
.contact-card-body{padding:12px}
.contact-ledger select{width:65%}
}

body:has(.invoice-shade:not([hidden])){overflow:hidden}
/* LOENDID: päised, otsingufiltrid, tabelid ja leheküljed. */
.smart-list-heading{padding:0 0 0 10px;height:65px;margin-bottom:14px}
.smart-list-heading .invoice-tool{align-self:stretch;margin-left:auto;border-left:0}
.smart-list-filter{display:flex;align-items:center;gap:9px;margin-bottom:9px;flex-wrap:wrap}
.smart-list-filter>input,.smart-list-filter>select{width:111px;height:30px;font-size:12px;padding:4px}
.smart-list-filter>input[type=date]{width:125px}
.smart-list-filter>button{background:#559ec8;border-radius:0;padding:7px 14px;font-weight:400}
.filter-reset{font-size:22px;color:#8e989d}
.smart-invoice-list th{font-size:13px;font-weight:400;white-space:nowrap;padding:12px 5px}
.smart-invoice-list td{padding:11px 5px;font-size:12px;overflow-wrap:normal}
.smart-invoice-list th a{color:#536d7b}
.smart-invoice-list td small{display:inline;font-size:10px}
.page-sums>span{display:block;font-size:15px;border-bottom:1px solid #ccc;margin-bottom:12px;padding-bottom:3px}
.page-sums dl{font-size:12px;margin:0;min-width:240px}
.page-sums dl>div{display:flex;justify-content:space-between;gap:30px;margin-bottom:6px}
.page-sums dd{margin:0}
.list-pager{display:flex;align-items:center;gap:5px;justify-content:flex-end;margin:10px 0}
.list-pager a{padding:2px 8px;border:1px solid #cbd7dc}
.list-pager a.selected{background:#74a4b7;color:#fff}
.list-pager span{font-size:11px;color:#999}
.contact-dialog label.check{white-space:nowrap}

.site-header{height:73px}
.smart-invoice-list td{color:#111}
.smart-invoice-list td.muted{color:#aaa}
.smart-invoice-list .overdue-date{color:#d56767}
.smart-invoice-list .sent-marker{color:#8d989c;font-size:16px}
.smart-invoice-list .invoice-party{min-width:165px}
.smart-invoice-list .invoice-creator{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.smart-list-filter .check{margin:0;white-space:nowrap}
.smart-list-filter .check input{width:auto}
.contact-balance b{font-variant-numeric:tabular-nums}


.bank-import-actions{display:flex;align-items:center;gap:20px;margin:20px 0 10px}
.bank-import-actions h2{margin:0}
.bank-import-actions>form{margin-left:auto}
.delete-selected{background:#ff923c;border-radius:0}
.restore-selected{background:#8bb541;border-radius:0}
.bank-row-action{margin:0}
.bank-row-action button{padding:0;width:22px;height:22px;border-radius:0;font-size:20px;line-height:1;background:#ff923c}
.bank-row-action .restore-row{background:#8bb541}
[data-bank-row-selection],[data-select-bank-rows]{width:16px;height:16px;vertical-align:middle}
.bank-import-actions button:disabled{opacity:.45;cursor:default}


.smart-list-filter>.article-search{width:200px}
.smart-list-filter>.article-status{width:200px}
/* ARTIKLID: kahe veeruga kaart ning ostu/müügi väljad. */
.article-dialog{max-width:850px}
.article-shade{padding-top:155px}
.article-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:45px 30px;padding:15px 15px 40px;background:#f5f5f5;margin-top:10px}
.article-card-grid>section{min-width:0}
.article-basics,.article-sale,.article-purchase{background:#fff;padding:10px}
.article-card-grid label:not(.check):not(.file-drop){display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 12px;color:#111;font-size:12px}
.article-card-grid label:not(.check):not(.file-drop)>span{flex:0 0 75px}
.article-basics textarea{resize:vertical}
.article-card-grid input,.article-card-grid select{padding:5px;height:30px}
.article-basics [name=article_type]{max-width:120px}
.article-basics [name=unit]{max-width:100px}
.article-card-grid h2{font-size:18px;font-weight:600;margin:0 0 8px}
.article-notes>textarea{height:40px;margin-bottom:22px}
.article-notes .file-drop{min-height:110px;text-align:center;margin:0;padding:12px}
.article-notes .file-drop input{height:100%}
.article-active{display:flex;flex-direction:row;gap:4px;align-items:center;font-size:16px;font-weight:600;margin-bottom:12px}
.article-active input{width:16px;height:16px;accent-color:#55b984;margin:0}
.article-card-grid [name=sale_price],.article-card-grid [name=purchase_price],.article-card-grid [name=own_price]{max-width:100px;text-align:right}
.article-sale,.article-purchase{align-self:start}
.article-price-copy{display:flex;align-items:start;gap:4px}
.article-price-copy label{flex:1}
.article-price-copy button{background:transparent;color:#6291a9;font-weight:400;padding:6px 0;font-size:11px}
.article-card-grid small{font-size:11px}
.invoice-tool.copy{background:#4aa18c}
.article-list td:nth-child(2){min-width:240px}
@media(max-height:850px){.article-shade{padding-top:40px}
}
@media(max-width:700px){.article-card-grid{grid-template-columns:1fr;gap:20px}
.article-shade{padding-top:20px}
}


.article-card-grid h2{color:#526b78}
.article-notes .file-drop{display:flex;flex-direction:column;gap:5px;justify-content:center;align-items:center}
.article-price-copy label{flex:0 0 180px}
.article-price-copy button{margin-top:2px}
.article-card-grid>.article-basics{align-self:start}
.article-basics label:last-child{margin-bottom:0}


/* E RAAMAT: täislogo päises, sisselogimisel ja paigaldajas. Ettevõtte arvelogo on eraldi. */
.brand .brand-logo{display:block;width:280px;height:auto;max-height:52px;object-fit:contain;object-position:left center}
.brand-heading{margin:0 0 22px!important;line-height:1}
.login .brand-logo{display:block;width:100%;height:auto}
.installer-logo{display:block;width:320px;max-width:100%;height:auto;margin-bottom:24px}
@media(max-width:700px){.brand .brand-logo{width:185px;max-width:40vw;height:auto}
.login .brand-logo{max-width:320px}
}


/* Arve kustutamise/taastamise kinnitus asub sama arveakna sees. */
.invoice-lifecycle{background:#fff5e9;border:1px solid #ebd2b4;margin:15px 10px}
.invoice-lifecycle label{max-width:200px}
.invoice-lifecycle-history{margin:15px 10px}
.invoice-lifecycle-history summary{cursor:pointer;color:#526b78}
.invoice-dialog>.panel,.invoice-dialog>.two-columns{margin:15px 10px}
.bank-upload{max-width:none!important;width:100%}
.bank-upload .file-drop{width:100%}
.bank-upload[aria-busy=true] .file-drop{opacity:.65;pointer-events:none}
#bank-upload-status:empty{display:none}


/* ARTIKLIOTSING ARVEL: 450 px aken, sinine päis ja triibulised tulemused. */
.invoice-grid .article{width:13%}
.invoice-grid .description{width:28%}
.article-input{display:flex;align-items:center;position:relative;min-width:0}
.invoice-grid .article-input input{flex:1;min-width:0;width:0;padding-right:2px}
.invoice-grid .article-input button{flex:none;background:#fff;color:#5f7c8b;border:0;border-radius:0;padding:0 3px;gap:0;min-width:20px;height:40px;font-size:18px;line-height:9px;font-weight:400}
.invoice-grid .article-input .article-toggle{font-size:14px;display:block;min-width:15px}
.invoice-grid .article-input [hidden]{display:none}
.article-picker{position:fixed;z-index:1100;width:450px;border:5px solid #76a9ba;border-top:0;box-shadow:2px 3px 6px #0003;background:white;color:#111;font:12px Arial}
.article-picker[hidden]{display:none}
.article-picker-header{display:flex;height:31px;align-items:stretch;margin:0 -5px;background:#76a9ba;color:#fff}
.article-picker-header>span{flex:1;padding:8px 7px}
.article-picker-header>button{background:transparent;border:0;border-left:1px solid white;border-radius:0;padding:0 9px;color:white;font:12px Arial;gap:0}
.article-picker-header>button:last-child{font-size:25px;width:30px;padding:0}
.article-picker-results{overflow-y:auto;max-height:200px;overscroll-behavior:contain}
.article-picker-results>button{display:block;width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fff;color:#222;border:0;border-radius:0;min-height:25px;padding:5px 4px;font:12px Arial;font-weight:400}
.article-picker-results>button:nth-child(even){background:#f7f7f7}
.article-picker-results>button:hover,.article-picker-results>button[aria-selected=true]{background:#dcecf1;filter:none}
.article-picker-empty{padding:8px 4px}
.article-editor-layer>.article-shade{z-index:1200;padding-top:45px;background:#0004}
.invoice-readonly .article-toggle,.invoice-readonly .article-edit{display:none}

/* Arve ülemine tööriistariba ja teisel real Rohkem-toimingud. */
.invoice-heading{flex:1;min-width:70px;padding:0 7px;color:white}
.invoice-heading h1{font:24px Arial;margin:9px 0 3px}
.invoice-heading small{font:11px Arial;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.invoice-tool.send{background:#36aeae}
.invoice-tool.more{background:#72a8c1}
.invoice-corner{display:flex;flex:0 0 29px;flex-direction:column;background:white}
.invoice-corner .invoice-close{height:32px;line-height:29px}
.invoice-help{border:0;border-radius:0;width:29px;height:32px;min-height:0;padding:0;background:#cbd7dc;color:#7b8285;font:20px Arial}
.invoice-more{display:flex;gap:3px;background:white;border-top:3px solid white;min-height:34px}
.invoice-more[hidden]{display:none}
.invoice-more>a,.invoice-more>button{flex:1;display:flex;align-items:center;justify-content:center;gap:14px;min-height:30px;margin:0;padding:6px 8px;border:0;border-radius:0;background:#76a7ba;color:white;font:14px Arial;white-space:nowrap;text-decoration:none}
.invoice-more>button:disabled{cursor:default;opacity:.58}
.invoice-journal{padding:16px;background:#f5f5f5;scroll-margin-top:8px}
.invoice-journal h2{font:20px Arial;color:#526b78}
#invoice-send{scroll-margin-top:8px}
@media(max-width:900px){.invoice-more{flex-wrap:wrap}.invoice-more>a,.invoice-more>button{flex:1 1 130px}.invoice-heading h1{font-size:20px}}

.invoice-heading small{color:#fff}
.invoice-readonly .article-input .article-toggle,.invoice-readonly .article-input .article-edit{display:none}

/* PDF-nupu all avaneb kollane Prindi valik. */
.invoice-pdf-tool{position:relative;flex:0 0 64px;width:64px;display:flex}
.invoice-pdf-menu{display:none;position:absolute;top:100%;left:-5px;min-width:96px;padding:3px;background:#dce0e2;z-index:1120}
.invoice-pdf-menu a{display:flex;align-items:center;gap:14px;background:#e9b646;color:white;text-decoration:none;padding:5px 9px;font:14px Arial;white-space:nowrap}
.invoice-pdf-tool:hover .invoice-pdf-menu,.invoice-pdf-tool:focus-within .invoice-pdf-menu{display:block}
@media(max-width:700px){.invoice-pdf-tool{flex-basis:58px;width:58px}}

/* Tööriistanuppe eraldavad 3 px valged vahed, värvilise nupu pind on 64 px. */
.invoice-title{gap:0}
.invoice-title>.invoice-tool{width:67px;flex:0 0 67px;border-left:0}
.invoice-title>.invoice-pdf-tool{width:67px;flex:0 0 67px;border-left:0}
.invoice-pdf-tool>.invoice-tool{width:64px;flex:0 0 64px}
.invoice-title>.invoice-corner{flex:0 0 32px;border-left:0}

.export-visibility{margin:10px 0}
.bank-export-delete{position:relative;min-width:60px}
.bank-export-delete>summary{color:#ed863d;cursor:pointer;list-style:none}
.bank-export-delete>form{position:absolute;right:0;bottom:100%;width:310px;padding:12px;background:white;border:1px solid #ccd7dc;box-shadow:0 3px 10px #0002;z-index:20}
.bank-export-delete p{margin:0 0 10px;font-size:12px;line-height:1.5}

/* Maksete valik ja kaheosaline maksefaili eelvaade. */
.export-heading{padding:0;gap:3px;flex-wrap:nowrap;min-height:64px;background:#76a7ba}
.export-heading h1{flex:1;padding:10px}
.export-heading .invoice-tool{margin:0;flex:0 0 64px;width:64px;height:64px;min-height:64px;border:0;border-radius:0;font:12px Arial;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:white}
.export-heading .invoice-tool b{font:26px Arial}.export-heading .save{background:#8bb440}.export-heading .export-help{background:#8ba2ad}
.export-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 18px}.export-filters input,.export-filters select{width:112px;min-height:30px;margin:0;font-size:12px;padding:5px}.export-filters input[name=q]{width:200px}.export-filters .check{display:flex;align-items:center;gap:7px;font-size:12px;margin:0;white-space:nowrap}.export-filters input[type=checkbox]{width:15px;min-height:15px}.export-filters button{font-size:12px;padding:8px 20px}
.export-invoices input[data-export-amount],.export-invoices input[data-export-remaining]{width:80px;min-width:65px;margin:0;text-align:right;padding:6px;font:12px Arial;min-height:30px}.export-invoices input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0}.export-invoices small{display:block;margin-top:4px}.export-invoices [hidden]{display:none}.export-status{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#e9ad39;color:white;font:12px Arial}.export-status.ready{background:#65bd70}.export-selection-summary{position:fixed;bottom:0;right:20px;padding:14px 20px;background:#76a7ba;color:white;z-index:900;min-width:240px;font:16px Arial}.export-selection-summary[hidden]{display:none}.export-selection-summary>div{display:flex;gap:12px;align-items:center;margin-bottom:12px}.export-selection-summary button{background:#eee;color:#42627a;font:12px Arial;padding:4px 25px;min-height:0}.export-selection-summary strong{display:flex;justify-content:space-between;gap:30px}
.export-preview-shade{position:fixed;inset:0;margin:0;padding:24px;min-height:0;z-index:1100;background:#0009;display:flex;align-items:center;justify-content:center}.export-preview-shade[hidden]{display:none}.export-preview-dialog{width:1100px;max-width:100%;max-height:95vh;overflow:auto;margin:0}.export-preview-options{background:#e0e0e0;padding:20px 8px;margin-top:10px}.export-bank{display:flex;align-items:center;gap:7px;font:18px Arial;color:#42627a;margin:0 0 14px}.export-preview-dialog .export-bank select{width:110px;font:12px Arial}.export-toggle{display:flex;align-items:center;gap:5px;font:12px Arial;margin:12px 0;color:#122c40}.export-preview-dialog .export-toggle input{appearance:none;position:relative;width:26px;height:16px;min-height:16px;padding:0;border:1px solid white;border-radius:12px;background:#a5bac3;cursor:pointer}.export-toggle input:before{content:'';position:absolute;top:1px;left:1px;width:12px;height:12px;border-radius:50%;background:white}.export-toggle input:checked:before{left:11px}.export-preview-dialog .export-toggle input:checked{background:#648b9c}.export-date-link{background:none;border:0;color:#4a98bc;font:12px Arial;padding:0;min-height:0}.export-preview-dialog [data-export-fixed-date]{width:150px;margin-top:8px}.export-preview-total{text-align:right;padding:10px;margin:14px 0;font:16px Arial;color:#486174}.export-preview-total strong{margin-left:18px}.export-transfers th,.export-transfers td{padding:8px 6px}.export-transfers td:nth-child(3){white-space:nowrap}.export-transfers td:nth-child(4){width:33%}.export-transfers td:nth-child(6){min-width:120px}.export-transfers td:last-child{text-align:right}.export-preview-dialog input[hidden],.export-ready[hidden],#export-help-text[hidden],#export-selection-error[hidden]{display:none}
.export-preview-options .export-bank,.export-preview-options .export-toggle{flex-direction:row;justify-content:flex-start;text-align:left}.export-preview-options .export-toggle{width:max-content;max-width:100%}.export-preview-options .export-bank{width:max-content}
.export-filters .check{flex-direction:row;justify-content:flex-start}
/* Dokumendimallide kaks veergu, lülitid ja kompaktsed värvivalikud. */
.template-save-notice{padding:13px;background:#f7f8f9;border:1px solid #ddd;color:#555;margin:0 0 10px}.document-settings-columns{display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:12px 10px}.document-settings-columns h2,.template-notes h2{font:600 18px Arial;color:#53636c;border-bottom:1px solid #ccc;padding-bottom:7px;margin-bottom:12px}.document-setting-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;min-height:44px;margin:0;font:14px Arial;color:#111}.document-setting-row>label{flex:1;margin:0;font-size:14px}.document-setting-row input[type=color]{width:36px;height:30px;padding:3px;margin:0;min-height:0;border:1px solid #cdd5db}.document-setting-row input[type=checkbox]{appearance:none;position:relative;width:40px;height:20px;min-height:20px;flex:0 0 40px;padding:0;margin:0 12px;background:#c8d8df;border:0;border-radius:14px;cursor:pointer}.document-setting-row input[type=checkbox]:before{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;background:#fff;border-radius:50%}.document-setting-row input:checked{background:#97c367}.document-setting-row input:checked:before{left:22px}.color-reset{background:none;color:#7a858a;border:0;font:24px Arial;padding:2px;min-height:0}.template-notes{padding:10px}.template-notes textarea{width:100%;margin:8px 0}.template-assets{margin-top:20px}.template-assets h2{font-size:16px}.template-assets h2 a{float:right;font-size:12px}.template-create{position:relative}.template-create>form{position:absolute;right:0;top:100%;padding:15px;background:white;color:#222;border:1px solid #ccc;z-index:30;width:300px;box-shadow:0 3px 10px #0002}.template-identity{display:flex;gap:20px;align-items:center;padding:10px}.template-identity .check{flex-direction:row}.mail-settings-form .check{display:flex;flex-direction:row;align-items:center;gap:8px}.mail-settings-form input[type=checkbox]{width:16px;min-height:16px;margin:0}@media(max-width:850px){.document-settings-columns{grid-template-columns:1fr;gap:16px}.template-identity{flex-wrap:wrap}}

/* Maksete seaded: neli konto ja makseviisi jaotist ning kompaktne kontokaart. */
.payment-settings-section{margin-bottom:26px}.payment-settings-heading{padding:0 0 0 10px;min-height:64px;align-items:stretch;gap:3px}.payment-settings-heading h1{flex:1;align-self:center}.payment-settings-heading .invoice-tool{margin:0}.payment-settings-section tbody tr:nth-child(even){background:#f7f7f7}.payment-settings-dialog{max-width:800px}.payment-settings-fields{padding:22px;display:grid;grid-template-columns:1fr 1fr;gap:15px 24px;background:#f5f5f5}.payment-settings-fields label{margin:0}.payment-settings-fields .check{align-self:center}.payment-ledger-hint{font-size:11px;margin:0;align-self:center}.payment-defaults input{max-width:140px}.payment-defaults td:first-child{width:45%}@media(max-width:650px){.payment-settings-fields{grid-template-columns:1fr}.payment-defaults td{padding:7px 4px}}

.payment-settings-fields{border:0;margin:0;min-width:0}.payment-settings-deleted{text-align:right;margin:0 0 8px}.page-payment_settings .invoice-title h1{flex:1}.payment-defaults td{white-space:normal}

.payment-settings-fields label.check{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px}.payment-settings-dialog input[type=checkbox]{width:16px;height:16px;min-height:16px;flex:0 0 16px;margin:0}

/* Äriregistri kompaktne nimeotsing sinise päisega aknas. */
.contact-registry #registry-results:empty{display:none}

/* PANGAKONTO: kasutaja pildi järgi kaks veergu, ühes reas sildid ja väljad. */
.bank-account-dialog{max-width:850px}.bank-account-fields{border:0;padding:22px 8px 0;margin:0;min-width:0;background:#fff}.bank-account-columns{display:grid;grid-template-columns:1fr 1fr;gap:65px;padding:5px 10px 18px}.bank-account-columns>section{min-width:0}.bank-account-columns label:not(.check){display:flex;flex-direction:row;align-items:center;gap:8px;margin:0 0 12px;font:12px Arial;color:#111;min-height:30px}.bank-account-left label>span{flex:0 0 82px}.bank-account-right label:not(.check)>span{flex:0 0 122px}.bank-account-columns input,.bank-account-columns select,.bank-account-columns textarea{min-width:0;flex:1;width:0}.bank-account-right .check{display:flex;flex-direction:row;align-items:center;gap:7px;margin:0 0 20px;font:12px Arial;color:#111;min-height:18px}.bank-account-right .check input{accent-color:#4bb883}.bank-account-right abbr{display:inline-block;border:1px solid #b4b4b4;color:#999;border-radius:50%;width:11px;height:11px;font:9px Arial;text-align:center;text-decoration:none}.bank-connection h2{font:600 18px Arial;color:#53636b;margin:14px 0 10px}.bank-connection-status{border-radius:22px;background:#eee;padding:9px 14px;color:#444;font:14px Arial}.bank-connection-status span{display:inline-block;background:#34afa4;color:#fff;border-radius:50%;font:15px Arial;text-align:center;width:16px;height:16px;line-height:15px}.bank-connection p{font:12px Arial;color:#111;padding:4px 12px 8px}.bank-auto-ledger{font:11px Arial;color:#8a8a8a}.bank-card-help{padding:10px;background:#edf4f5;margin:0}.bank-account-columns label .check{width:auto}.bank-account-columns input[type=hidden]{display:none}.article-card-grid select[name=sale_account],.article-card-grid select[name=purchase_account]{flex:1;width:0;min-width:0;max-width:none}.article-card-grid .article-sale,.article-card-grid .article-purchase{min-width:0}.article-card-grid .article-price-copy label{min-width:0}.article-card-grid .article-active input{flex:0 0 16px;min-height:16px;width:16px;height:16px}@media(max-width:700px){.bank-account-columns{grid-template-columns:1fr;gap:12px}.bank-account-right label:not(.check)>span{flex-basis:122px}}

/* Ühine kontode valik: 404 px laiune sinise päisega otsinguaken. */
.ledger-combobox{display:inline-flex;position:relative;flex:1;min-width:0;max-width:100%;align-items:center}.ledger-combobox .ledger-original{display:none!important}.ledger-combobox input.ledger-search{min-width:0;width:100%;flex:1;margin:0;height:30px;font:12px Arial;padding:5px;border:1px solid #cbd2db;background:#fff;color:#111}.ledger-picker{position:fixed;z-index:5000;border:4px solid #78a7ba;box-shadow:0 2px 4px #0004;background:#fff;font:12px Arial;color:#111}.ledger-picker[hidden]{display:none}.ledger-picker-header{display:flex;align-items:center;justify-content:space-between;height:27px;background:#78a7ba;color:#fff;font:12px Arial;padding:0 3px}.ledger-picker-header button{font:24px Arial;color:#fff;background:transparent;border:0;padding:0 3px;min-height:0;line-height:24px}.ledger-picker-results{max-height:193px;overflow:auto;background:#fff}.ledger-picker-results>button{display:block;width:100%;border:0;border-radius:0;min-height:25px;padding:5px 4px;background:#fff;color:#111;text-align:left;white-space:nowrap;font:12px Arial;font-weight:400;overflow:hidden;text-overflow:ellipsis}.ledger-picker-results>button:nth-child(even){background:#f6f6f6}.ledger-picker-results>button:hover,.ledger-picker-results>button[aria-selected=true]{background:#83bfd6;color:#fff}.ledger-picker-empty{padding:8px}.article-card-grid label:not(.check):not(.file-drop)>.ledger-combobox{flex:1;min-width:0}.bank-account-columns{grid-template-columns:340px 380px;gap:84px}.bank-account-columns label>.ledger-combobox{flex:1}.bank-account-columns .ledger-combobox input{width:100%}.invoice-grid .ledger-combobox{display:flex;width:100%}.payment-defaults .ledger-combobox{min-width:220px}.contact-ledger .ledger-combobox{flex:1}@media(max-width:850px){.bank-account-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:35px}}@media(max-width:700px){.bank-account-columns{grid-template-columns:1fr;gap:12px}}

/* Pangakaardi tsentreerimine, kohustusliku välja märgis ja ruudukujulised valikud. */
.invoice-shade:has(>.bank-account-dialog){display:flex;align-items:center;justify-content:center;padding:20px 15px}.bank-account-dialog{margin:auto;width:100%}.bank-required{position:relative}.bank-required:before{content:"";position:absolute;left:84px;top:-3px;width:6px;height:6px;border-radius:50%;background:#f67b24}.bank-account-right input[type=checkbox]{appearance:none;border:0;border-radius:0;background:#ddd;width:15px;height:15px;flex:0 0 15px}.bank-account-right input[type=checkbox]:checked{background:#4bb883}.bank-account-right input[type=checkbox]:checked:after{content:"";display:block;width:9px;height:5px;border-left:1.5px solid white;border-bottom:1.5px solid white;transform:translate(3px,3px) rotate(-45deg)}

.bank-account-right input[type=checkbox]{padding:0;position:relative}.bank-account-right input[type=checkbox]:checked:after{position:absolute;left:0;top:0}

/* Kontaktikaardi konto otsing on vormiväli, mitte fikseeritud laiusega silditekst. */
.contact-bottom-grid>section,.contact-bottom-grid>div,.contact-bottom-grid label{min-width:0}.contact-defaults>label>.ledger-combobox{flex:0 1 120px;width:120px;max-width:120px}.contact-ledger label>.ledger-combobox{flex:1;width:0;min-width:0}.contact-bottom-grid .ledger-combobox input.ledger-search{width:100%;max-width:100%;box-sizing:border-box}

/* Äriregistri tulemuste varasem hele kaart: tugev nimi ja väiksem aadress. Kontovaliku sinine loend jääb eraldi. */
.contact-registry .registry-result{border-radius:0;font:12px/1.5 Arial,sans-serif;gap:8px}.contact-registry .registry-result strong{font-size:13px;font-weight:700}.contact-registry .registry-result small{display:block;font-size:11px;color:#7b898f}.contact-registry .registry-result:focus-visible{outline:2px solid #78a7ba;outline-offset:-2px;background:#e0edf1}
/* E-kirjamallide loend ja 850 px kaart; SMTP ühendus seadistatakse eraldi. */
.email-template-list-heading{margin-bottom:0}.email-template-deleted{font-size:11px;text-align:right;margin:5px 0}.email-template-table{table-layout:fixed}.email-template-table th:nth-child(1){width:20%}.email-template-table th:nth-child(2){width:26%}.email-template-table th:nth-child(4){width:16%}.email-template-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:50px}.email-template-table tbody tr:nth-child(even){background:#f7f7f7}.email-active-tag{display:inline-block;background:#8fb551;color:white;font:12px Arial;padding:7px 8px;margin:2px}.email-smtp-heading{margin-top:28px}.email-template-shade{padding:25px 15px}.email-template-dialog{max-width:860px;width:100%;background:white}.email-template-dialog .invoice-title h1{font-size:24px}.email-template-fields{border:0;margin:0;padding:0 0 20px;min-width:0;background:white}.email-template-name{background:#d7e5e8;padding:10px 42px 10px 5px;margin:10px 0}.email-template-dialog label:not(.check){display:flex;flex-direction:row;align-items:center;gap:5px;font:12px Arial;color:#111;margin:0 0 14px;min-width:0}.email-template-dialog label:not(.check)>span{flex:0 0 80px}.email-template-dialog input:not([type=checkbox]),.email-template-dialog select{height:30px;min-height:30px;font:12px Arial;flex:1;width:0;min-width:0;padding:5px;border:1px solid #cbd2db}.email-template-name label:not(.check){margin:0}.email-template-main{padding:0 42px 0 5px}.email-template-main textarea{font:12px/1.5 Arial;min-height:264px;flex:1;min-width:0;width:0;padding:5px;border:1px solid #cbd2db}.email-template-dialog label.email-body-label{align-items:flex-start}.email-body-label>span{padding-top:8px}.email-template-bottom{display:grid;grid-template-columns:1fr 1fr;gap:25px;padding:7px 20px 0 15px}.email-template-bottom h2{font:600 18px Arial;color:#536b78;margin:0 0 16px}.email-template-bottom section{min-width:0}.email-template-bottom .check{display:flex;flex-direction:row;align-items:center;gap:7px;color:#111;font:12px Arial;margin:0 0 14px}.email-template-bottom input[type=checkbox]{appearance:none;width:15px;height:15px;min-height:15px;flex:0 0 15px;background:#ddd;padding:0;border:0;border-radius:0;position:relative}.email-template-bottom input[type=checkbox]:checked{background:#4bb883}.email-template-bottom input[type=checkbox]:checked:after{content:"";position:absolute;left:3px;top:3px;width:9px;height:5px;border-left:1.5px solid white;border-bottom:1.5px solid white;transform:rotate(-45deg)}.email-template-bottom .email-xml-option{margin-left:10px}.email-template-bottom label:not(.check)>span{flex-basis:140px}.email-help-dot{display:inline-flex;border:1px solid #a7adb0;border-radius:50%;width:12px;height:12px;min-height:0;padding:0;align-items:center;justify-content:center;color:#8a9298;background:white;font:9px Arial;float:right}.email-template-bottom h2 .email-help-dot{float:none;vertical-align:middle}.email-send-preview{border:1px solid #d9e2e6;padding:10px;margin:10px 0}.email-send-preview [data-email-body]{white-space:pre-wrap}.email-send-preview p{overflow-wrap:anywhere}.email-template-dialog .invoice-corner{flex:0 0 32px}.email-template-help{font-size:12px;line-height:1.5}@media(max-width:650px){.email-template-main,.email-template-name{padding-right:10px}.email-template-bottom{grid-template-columns:1fr}.email-template-shade{padding:10px 5px}.email-template-table th:nth-child(3),.email-template-table td:nth-child(3){display:none}}
/* Kontaktide import/eksport: Rohkem-menüü ja failipõhine kolmesammuline töövoog. */
.contact-list-heading h1{flex:1}.contact-export-shortcuts{display:flex;gap:15px;align-self:center;margin-right:18px}.contact-export-shortcuts a{color:white}.contact-more-menu{position:relative;align-self:stretch;z-index:12}.contact-more-menu>summary{height:100%;list-style:none;cursor:pointer;min-height:64px}.contact-more-menu>summary::-webkit-details-marker{display:none}.contact-more-actions{position:absolute;right:0;top:100%;background:#73a5b9;min-width:145px;box-shadow:0 2px 5px #0003;display:flex;flex-direction:column}.contact-more-actions a{color:white;padding:10px 14px;border-top:2px solid white;font:12px Arial}.contact-more-actions a:hover{background:#5999b1}.contact-list-heading>.invoice-tool.new{margin-left:0}.contact-import-heading{margin-bottom:20px}.contact-import-upload h2,.contact-import-subtitle{font:600 18px Arial;color:#536b78;margin:0 0 18px}.contact-import-upload{padding:0 5px 30px}.contact-import-upload label:not(.contact-upload-button){display:flex;flex-direction:row;align-items:center;gap:12px;font:12px Arial;color:#111;margin:0 0 12px}.contact-import-upload label>span{flex:0 0 220px}.contact-import-upload select{width:130px;height:30px;min-height:30px;padding:4px}.contact-upload-button{position:relative;display:inline-flex;overflow:hidden;background:#559fc6;color:white;padding:10px 12px;font:12px Arial;cursor:pointer;width:max-content}.contact-upload-button input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.contact-import-upload .has-js .contact-upload-fallback{display:none}.contact-import-options{display:flex;gap:30px;flex-wrap:wrap;margin:15px 0}.contact-import-options .check,.contact-import-preview .check{display:flex;flex-direction:row;gap:7px;align-items:center;margin:0;font:12px Arial}.contact-import-mapping{margin:15px 0}.contact-import-mapping th{padding:5px}.contact-import-mapping select{min-width:165px;width:100%;font:12px Arial;background:white;height:31px;padding:3px}.contact-import-mapping td{min-width:180px;max-width:300px;overflow-wrap:anywhere;white-space:normal;font:12px/1.5 Arial}.contact-import-preview{font:12px Arial}.contact-import-preview td{max-width:300px;overflow-wrap:anywhere}.contact-import-error{background:#fff2df}.contact-import-restart{margin-top:20px}.contact-import-next{min-width:85px}@media(max-width:650px){.contact-export-shortcuts{gap:8px;margin-right:8px}.contact-import-upload label>span{flex-basis:150px}.contact-import-options{gap:15px}}

/* IMPORDITUD ARVE: tavalise arvedialoogi loetav, muutmatu kokkuvõte. */
.invoice-summary-mark{padding:8px 8px 0}.invoice-summary-source{margin:16px 14px}.invoice-summary-source summary{cursor:pointer}.invoice-grid td.invoice-summary-empty{padding:16px 8px;color:#667983;text-align:left}.invoice-summary-source table{margin-top:10px}
/* Administraatori ligipääsu eemaldamine: rea sees avanev kinnitus. */
.membership-remove>summary{cursor:pointer}.membership-remove form{max-width:360px;margin:10px 0 0}.membership-remove p{line-height:1.5;white-space:normal}

/* E-arve vastuvõtu sinine märgis kliendiloendis. */
.client-einvoice-mark{display:inline-block;min-width:22px;text-align:center;color:#8799a5;font-size:12px}.client-einvoice-mark.available{color:#589fc1;font-size:15px;font-weight:bold;letter-spacing:-2px}body[data-theme=dark] .client-einvoice-mark.available{color:#91cef7}

/* Arveloend: e-post ja Bilnexi kinnitatud e-arve on eraldi märgid. */
.smart-invoice-list .sent-marker{white-space:nowrap}.invoice-sent-icon+.invoice-sent-icon{margin-left:5px}.invoice-sent-icon.einvoice{color:#3984a8;font-size:15px;font-weight:bold}.invoice-sent-icon.test{font-size:11px}body[data-theme=dark] .invoice-sent-icon.einvoice{color:#91cef7}

/* Väljaabi püsib dialoogi kohal ja ekraani piirides; .help-* on piltidega abikeskus. */
.email-help-popover{position:fixed;z-index:10000;width:410px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;box-sizing:border-box;background:#707070;color:#fff;padding:12px 10px;box-shadow:1px 2px 5px #0004;font:12px/1.35 Arial,sans-serif;text-align:left;overflow-wrap:anywhere}.email-help-popover[hidden]{display:none}.email-help-popover p{margin:14px 0 0}.email-help-popover dl{margin:0}.email-help-popover dl>div{display:block}.email-help-popover dt,.email-help-popover dd{display:inline;margin:0}.email-help-popover strong{font-weight:700}.email-help-dot:focus-visible{outline:2px solid #2574bb;outline-offset:3px}.email-guide-link{padding:8px 15px;margin:8px 0}
.help-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:22px;align-items:start}.help-nav{display:flex;flex-direction:column;border:1px solid var(--border,#d1dde0);background:var(--surface,#fff)}.help-nav a{padding:12px 14px;border-bottom:1px solid var(--border,#d1dde0);line-height:1.4}.help-nav a[aria-current=page]{font-weight:bold;background:var(--soft,#eef4f6);box-shadow:inset 3px 0 #78a7ba}.help-article{min-width:0;line-height:1.65}.help-article h2{font-size:24px;line-height:1.3}.help-article figure{margin:22px 0}.help-article img{display:block;width:100%;height:auto;border:1px solid var(--border,#d1dde0)}.help-article figcaption{font-size:12px;color:var(--muted,#596b77);margin-top:6px}.help-steps{padding-left:26px}.help-steps li{padding:4px 0 12px 7px}.help-steps h3{font-size:17px;margin:0 0 6px}.help-steps p{margin:0}.help-article table td{white-space:normal}.help-notes{background:var(--soft,#f1f5f7);padding:14px 18px;margin:22px 0}.help-notes h3{margin:0}.help-related{display:flex;gap:12px;flex-wrap:wrap}.help-related a{border:1px solid var(--border,#d1dde0);padding:8px 12px}body[data-theme=dark] .help-nav a{color:var(--text)}
@media(max-width:750px){.help-layout{grid-template-columns:1fr}.help-nav{flex-direction:row;flex-wrap:wrap}.help-nav a{flex:1 1 130px;font-size:12px}.help-article{padding:16px}.help-article h2{font-size:21px}}@media print{.help-nav,.help-related{display:none}.help-layout{display:block}}

/* Lehe tööriba Abi: hall plokk teiste toimingute kõrval, valge vahe nagu põhivaatel. */
.page-heading:has(>.page-help-button){padding:0 0 0 12px;gap:3px;align-items:stretch}.page-heading:has(>.page-help-button)>h1{flex:1;align-self:center}.page-heading:has(>.page-help-button)>div:first-child:not(.contact-export-shortcuts){flex:1;align-self:center}.page-heading:has(>.page-help-button)>.button,.page-heading:has(>.page-help-button)>details:not(.contact-more-menu){align-self:center;margin-right:8px}.page-heading>.page-help-button{background:#8ba2ad;color:#fff!important;border-left:0;align-self:stretch;min-height:65px;margin-left:0}.smart-list-heading .invoice-tool~.invoice-tool{margin-left:0}.page-heading:has(>.page-help-button)>.invoice-tool{margin-left:0;border-left:0}.page-help-button:hover{background:#708c99}.page-help-button:focus-visible{outline:2px solid #123e60;outline-offset:-5px}.page-help-button b{font:26px/28px Arial}

@media(max-width:650px){.page-heading:has(>.page-help-button){height:auto;min-height:65px;flex-wrap:wrap;padding-left:8px}.page-heading:has(>.page-help-button)>h1{flex:1 1 100%;padding:8px 0}.page-heading:has(>.page-help-button)>.invoice-tool{min-height:60px}.page-heading:has(>.page-help-button)>.page-help-button{margin-left:auto}}

/* LIHTNE LADU: kolm selget toimingut ja artikli ajaloo tabel. */
.stock-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.stock-tabs a{padding:10px 16px;border:1px solid var(--border,#cbd9df);background:var(--surface,#fff);color:var(--ink)}.stock-tabs a[aria-current=page]{background:#dceaf0;font-weight:bold;color:#244568}.stock-search{display:flex;gap:8px;max-width:600px;margin-bottom:14px}.stock-search input{flex:1;min-width:0}.stock-table .stock-actions{white-space:nowrap}.stock-actions a{display:inline-block;margin:3px 10px 3px 0}.stock-form-panel{max-width:850px}.stock-form-panel small{font-weight:normal;color:var(--muted);font-size:12px}.stock-form-panel [data-stock-current]{padding:12px;background:var(--soft,#edf4f7);border-left:3px solid #78a7ba}.stock-accounting,.stock-reverse{padding:12px;margin:15px 0;border:1px solid var(--border,#d1dde0)}.stock-accounting summary,.stock-reverse summary{cursor:pointer;font-weight:bold}.stock-accounting label,.stock-reverse label{max-width:500px}.article-stock-link{grid-column:1/-1;padding:12px;background:var(--soft,#eef4f6)}body[data-theme=dark] .stock-tabs a{color:var(--text)}body[data-theme=dark] .stock-tabs a[aria-current=page]{background:#355976;color:#fff}

/* AVALEHE GRAAFIKUD: kohalik SVG, ilma välise teegita; PDF-malle ei mõjuta. */
.dashboard-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 16px;margin:24px 0 16px;background:var(--soft,#eaf0f3);border:1px solid var(--border,#d5e1e6);border-radius:8px;color:var(--text,var(--ink))}.dashboard-section-title h2{font-size:18px;margin:0}.dashboard-section-title>span{font-size:12px;color:var(--muted)}.dashboard-chart-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:20px}.dashboard-chart-panel,.dashboard-debt-panel{min-width:0;padding:22px;border-radius:12px;box-shadow:0 3px 16px #18375406;border:1px solid var(--border,#dbe4e9)}.dashboard-chart-panel>header,.dashboard-debt-panel>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.dashboard-chart-panel h2,.dashboard-debt-panel h2{font-size:19px;line-height:1.3;margin:0}.dashboard-chart-panel .eyebrow{margin:0 0 5px;font-size:10px;color:var(--muted);letter-spacing:1px}.dashboard-chart-unit{padding:4px 9px;border-radius:5px;background:var(--soft,#eff4f7);color:var(--muted);font-size:11px}.dashboard-bar-wrap{width:100%;min-width:0}.dashboard-bar-chart{display:block;width:100%;height:auto;overflow:visible}.dashboard-gridline{stroke:var(--border,#e0e8ed);stroke-width:1;stroke-dasharray:3 4}.dashboard-zero-line{stroke:var(--muted,#7b898f);stroke-width:1}.dashboard-axis{fill:var(--text,var(--ink));font:12px Arial}.dashboard-axis-year{fill:var(--muted);font:10px Arial}.dashboard-chart-legend{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;font-size:12px;margin:6px 0 12px}.dashboard-chart-legend span{display:inline-flex;align-items:center;gap:7px}.dashboard-chart-legend i,.dashboard-legend-row>i{display:inline-block;width:10px;height:10px;border-radius:50%;flex-shrink:0}.dashboard-chart-note{font-size:11px;color:var(--muted);line-height:1.55;margin:14px 0 0}.dashboard-chart-data{font-size:11px;margin-top:10px}.dashboard-chart-data summary{cursor:pointer;color:var(--muted)}.dashboard-chart-data table{margin-top:10px}.dashboard-chart-data td{font-size:11px}.dashboard-donut{display:grid;grid-template-columns:minmax(140px,185px) minmax(0,1fr);gap:14px;align-items:center;min-height:235px}.dashboard-ring{width:100%;height:auto;display:block;overflow:visible}.dashboard-ring-track{stroke:var(--soft,#edf2f5)}.dashboard-ring-value{fill:var(--text,var(--ink));font-weight:700}.dashboard-ring-caption{fill:var(--muted);font:11px Arial}.dashboard-ring-legend{min-width:0}.dashboard-legend-row{display:flex;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid var(--border,#edf1f4);font-size:12px;line-height:1.3}.dashboard-legend-row>i{margin-top:3px}.dashboard-legend-row>span{flex:1;min-width:0;overflow-wrap:anywhere}.dashboard-legend-row small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.dashboard-legend-row>b{font-size:11px;font-weight:600;white-space:nowrap}.dashboard-debt-grid{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(0,1.5fr);gap:28px;align-items:start}.dashboard-debt-grid .dashboard-donut{grid-template-columns:minmax(120px,160px) minmax(0,1fr)}.dashboard-debt-table{min-width:0}.dashboard-debt-table td{white-space:normal;font-size:12px;vertical-align:top;padding:12px 8px}.dashboard-debt-table td.num{white-space:nowrap}.dashboard-debt-table td.dashboard-overdue{color:var(--dashboard-danger,#bd5662)}.dashboard-overdue small{color:inherit}.dashboard-empty{padding:24px 8px;text-align:center;color:var(--muted)}.dashboard-tooltip{position:fixed;z-index:10020;max-width:min(320px,calc(100vw - 16px));padding:9px 12px;border-radius:7px;box-shadow:0 5px 20px #0003;background:#263d50;color:#fff;font:12px/1.5 Arial;pointer-events:none}.dashboard-tooltip[hidden]{display:none}[data-chart-tip]{transition:opacity .18s ease;cursor:help}[data-chart-tip]:hover,[data-chart-tip]:focus{opacity:.78;outline:none}rect[data-chart-tip]:focus{stroke:#244568;stroke-width:2}circle[data-chart-tip]:focus{stroke-width:28}
body[data-theme=dark]{--dashboard-danger:#ffa7ae}body[data-theme=dark] .dashboard-debt-table td.dashboard-overdue{color:var(--dashboard-danger)}body[data-theme=dark] .dashboard-chart-panel,body[data-theme=dark] .dashboard-debt-panel{background:var(--surface);border-color:var(--border)}body[data-theme=dark] .dashboard-chart-data,body[data-theme=dark] .dashboard-legend-row{color:var(--text)}
@media(max-width:1150px){.dashboard-chart-grid{grid-template-columns:1fr}.dashboard-debt-grid{grid-template-columns:1fr}.dashboard-debt-grid .dashboard-donut{max-width:550px;min-height:190px}}@media(max-width:650px){.dashboard-bar-wrap{overflow-x:auto}.dashboard-bar-chart{min-width:500px}.dashboard-chart-panel,.dashboard-debt-panel{padding:15px}.dashboard-section-title{align-items:flex-start;flex-direction:column;gap:4px}.dashboard-donut{grid-template-columns:130px minmax(0,1fr);gap:8px}.dashboard-debt-panel>header{align-items:flex-start;flex-direction:column}.dashboard-chart-legend{gap:13px}.dashboard-debt-table table{min-width:490px}.dashboard-debt-grid{gap:10px}.dashboard-chart-panel h2,.dashboard-debt-panel h2{font-size:17px}}

/* Kasutaja kustutamise kinnituse eristamine. */
.user-management button.danger{background:#b94c26;color:#fff}

/* Arveridade lisamine ja lao lisakulude jaotamine. */
.invoice-line-actions{display:flex;flex:1;flex-wrap:wrap;align-items:flex-start;gap:8px;min-width:0;padding-right:16px}
.extra-cost-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-left:auto}
.extra-cost-controls input{width:72px;text-align:right;box-sizing:border-box}
.extra-cost-controls button{padding:8px 10px;white-space:nowrap}
.extra-cost-account{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-basis:100%;font-size:12px}
.extra-cost-account select{max-width:330px;min-width:0}
.extra-cost-hint{flex-basis:100%;margin:0;text-align:right;color:var(--muted,#708396);font-size:11px;line-height:1.5}
#extra-cost-message{flex-basis:100%;margin:0;text-align:right;color:var(--text,#24536d)}
.invoice-grid td.extra-cell:has(input){padding:0}
.invoice-grid.purchase-grid col.extra{width:72px}
.invoice-readonly :is(.extra-cost-controls,.extra-cost-account,.extra-cost-hint,#extra-cost-message){display:none}
@media(max-width:900px){.invoice-calculations{flex-wrap:wrap;gap:12px}.invoice-line-actions{flex-basis:100%;padding-right:0}.extra-cost-controls{margin-left:0}.extra-cost-account{justify-content:flex-start}.extra-cost-hint{text-align:left}.invoice-calculations .smart-totals{margin-left:auto}}

.registration-field{flex-wrap:wrap}
.registration-field>[data-registry-refresh]{font-size:11px;padding:6px 8px;white-space:normal;margin-left:auto}

.registration-field>label{flex:1 1 180px}
.registration-field input{flex:1;min-width:80px}

.country-picker-panel{position:fixed;z-index:1300;background:var(--surface,#fff);color:var(--text,#24536c);border:1px solid var(--border,#c8dce5);box-shadow:0 10px 25px #1234;border-radius:8px;overflow:hidden;font-size:13px}
.country-picker-panel[hidden]{display:none}
.country-picker-head{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background:var(--soft,#edf6fb)}
.country-picker-head button{padding:3px 9px}
.country-picker-panel [role=listbox]{overflow-y:auto}
.country-picker-panel [role=option]{display:block;width:100%;border:0;border-radius:0;text-align:left;padding:10px 12px;background:transparent;color:inherit;min-height:36px}
.country-picker-panel [role=option]:hover,.country-picker-panel [aria-selected=true]{background:var(--soft,#e4f0f6)}
.country-picker-panel p{padding:0 12px}
.contact-white label:has(.country-picker-toggle) input{min-width:0;flex:1}
.country-picker-toggle{padding:5px 8px;flex:none}

/* Inventuuri nupu tekst mahub ka kitsamas päises. */
.smart-list-heading .invoice-tool.pdf[href*="stock_pdf"]{min-width:112px;width:auto;padding-inline:10px;white-space:nowrap}
.stock-writeoff-table{min-width:950px}.stock-writeoff-table td{vertical-align:top}.stock-writeoff-table td:first-child{width:30%}.stock-writeoff-table td:nth-child(2){width:100px}.stock-writeoff-table td:nth-child(3){width:155px}.stock-writeoff-table small{display:block;max-width:350px;white-space:normal;margin-top:6px;color:var(--muted)}.stock-writeoff-table [data-writeoff-remove]{padding:5px 10px}.stock-writeoff-panel .check{display:flex;align-items:center;gap:10px;margin:18px 0}.stock-writeoff-panel .check input{width:16px;height:16px;min-height:0;margin:0;flex:0 0 16px}.writeoff-act-link{display:inline-block;margin:4px 16px 4px 0}

/* Arve saajad: kompaktne, vasakjoondatud kontaktide valik kõigis kujundustes. */
#invoice-send .invoice-recipient-list{display:flex;flex-direction:column;gap:4px;min-width:0;margin:12px 0;padding:8px 10px;border:1px solid var(--border,#d7e2e8);border-radius:6px;background:var(--surface,#fff)}
#invoice-send .invoice-recipient-list legend{padding:0 5px;font-size:12px;color:inherit}
#invoice-send .invoice-recipient-choice{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:9px;width:100%;min-height:32px;margin:0;padding:6px 4px;box-sizing:border-box;text-align:left;cursor:pointer;color:inherit}
#invoice-send .invoice-recipient-choice input[type=checkbox]{appearance:auto;flex:0 0 16px;width:16px;max-width:16px;min-width:16px;height:16px;min-height:16px;margin:1px 0 0;padding:0;box-shadow:none;cursor:pointer}
#invoice-send .invoice-recipient-text{display:flex;flex:1;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:4px 8px;min-width:0;line-height:1.4;overflow-wrap:anywhere}
#invoice-send .invoice-recipient-text small{display:block;margin:0;font-size:11px;color:var(--muted,#6c8290)}
#invoice-send .invoice-recipient-choice:focus-within{outline:2px solid var(--primary,#4b9fc5);outline-offset:1px;border-radius:3px}

.bank-match-state{display:flex;align-items:flex-start;gap:7px;line-height:1.4}
.bank-match-state>span:first-child{display:inline-flex;justify-content:center;align-items:center;flex:0 0 18px;height:18px;border-radius:50%;color:#fff;font:bold 14px Arial}
.bank-match-state.ready>span:first-child{background:#278145}
.bank-match-state.blocked>span:first-child{background:#c43c3c}
.page-heading [data-create-bank-payments]{margin:0;flex:0 0 auto}

.smart-invoice-list .bank-import-account{display:inline-block;margin:0 0 0 12px;font-size:10px;line-height:1.4;color:var(--muted,#6c8290);overflow-wrap:anywhere}

.invoice-print-frame{position:fixed;left:-10000px;top:0;width:210mm;height:297mm;border:0;opacity:0;pointer-events:none}

.invoice-export-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0}
.invoice-export-actions .check{display:flex;flex-direction:row;align-items:center;gap:7px;margin:0}
.invoice-export-actions input[type=checkbox],.smart-invoice-list input[data-invoice-zip-row],.smart-invoice-list input[data-invoice-select-page]{width:16px;height:16px;min-height:16px;margin:0;flex:0 0 16px;padding:0}

.recurring-editor .check{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:8px}.recurring-editor .check input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-height:16px;margin:0;padding:0}

.writeoff-history-table td:nth-child(2),.writeoff-history-table td:nth-child(4),.writeoff-history-table td:nth-child(5),.writeoff-history-table td:nth-child(6){white-space:nowrap}

input.field-invalid,textarea.field-invalid,select.field-invalid{border:2px solid #c33232!important;background-color:#fff4f3!important;color:#742020!important}.field-error-message{display:block!important;color:#b42318!important;font-size:12px!important;line-height:1.4;margin-top:5px;white-space:normal}.article-dialog .field-error-message{margin:0 0 10px 80px;max-width:calc(100% - 80px)}.article-price-copy:has(.field-error-message){flex-wrap:wrap}.article-price-copy>.field-error-message{flex:0 0 calc(100% - 80px);order:3}.article-dialog .notice.error{margin:8px 0}

.help-search-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}.help-search-controls input{flex:1 1 250px;min-width:0;margin:0}.help-search-results article+article{border-top:1px solid var(--border,#d1dde0);margin-top:16px;padding-top:16px}.help-search-results h3{margin:0 0 6px}.help-search-results p{margin:0;line-height:1.6}.help-steps li[id]{scroll-margin-top:24px}.software-info dl{display:grid;grid-template-columns:auto 1fr;gap:10px 24px}.software-info dd{margin:0;font-weight:600}@media print{.help-search{display:none}}

.invoice-reminder-pause{border-top:1px solid var(--border,#d1dde0);margin-top:22px;padding-top:16px}.invoice-reminder-pause .check{display:flex;gap:9px;align-items:flex-start}.invoice-reminder-pause .check input{flex:0 0 auto;width:auto;margin:3px 0 0}

.main-menu>.logout{flex-shrink:0}.main-menu>.logout>button{white-space:nowrap}
.invoice-payment-dialog{width:min(520px,calc(100vw - 32px));max-height:90vh;overflow:auto;padding:24px;border:1px solid #cbd8e2;border-radius:12px;color:var(--text,#17324b);background:var(--panel,#fff)}
.invoice-payment-dialog::backdrop{background:rgba(15,30,45,.55)}
.invoice-payment-dialog .form-grid{display:grid;grid-template-columns:1fr;gap:16px;margin:20px 0}
.invoice-payment-dialog label{display:grid;gap:6px}
.invoice-payment-dialog input,.invoice-payment-dialog select{width:100%;min-height:40px}
.invoice-payment-actions{display:flex;gap:10px;flex-wrap:wrap}
.dashboard-exchange{display:flex;align-items:center;flex-wrap:wrap;gap:10px 24px;margin:22px 0 0;padding:15px 18px;border:1px solid var(--border,#d5e1e6);border-radius:10px;background:var(--card,var(--surface,#fff));color:var(--text,var(--ink,#244b60));font-size:12px}
.dashboard-exchange-heading{display:flex;flex-direction:column;gap:4px}.dashboard-exchange-heading strong{font-size:14px}.dashboard-exchange-heading>span{color:var(--muted,#557486)}
.dashboard-exchange dl{display:grid;grid-template-columns:repeat(6,minmax(60px,1fr));gap:12px 20px;flex:1;margin:0}.dashboard-exchange dl>div{display:flex;flex-direction:column;gap:4px}.dashboard-exchange dt{font-size:11px;color:var(--muted,#557486)}.dashboard-exchange dd{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;margin:0}
.dashboard-exchange-source{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--muted,#557486)}.dashboard-exchange>small,.dashboard-exchange>p{flex-basis:100%;font-size:10px;color:var(--muted,#557486);margin:0}.dashboard-exchange>p{font-size:12px}
@media(max-width:760px){.dashboard-exchange{gap:14px;padding:14px}.dashboard-exchange-heading{flex-basis:100%;flex-direction:row;justify-content:space-between}.dashboard-exchange dl{grid-template-columns:repeat(3,minmax(0,1fr));flex-basis:100%;gap:14px}.dashboard-exchange-source{flex-direction:row;flex-wrap:wrap;gap:6px 14px}}

/* Valuutaarve: kurss, selge EUR-võrdlus ja pangamakse algvaluuta jaotus. */
[data-currency-fields]{margin-top:8px;padding:8px;border:1px solid var(--border,#d5e1e6);border-radius:5px;min-width:0}
[data-currency-fields] p{font-size:11px;line-height:1.45;margin:7px 0 0}[data-currency-fields] .secondary{font-size:11px;padding:6px 9px}
.invoice-currency-book{clear:both;text-align:right;font-size:12px;color:var(--text,var(--ink));margin:8px 12px 18px}
.currency-allocation{display:block;font-size:11px;margin-top:6px}.currency-allocation input{display:block;max-width:145px;margin-top:4px}

.invoice-fields select[name=currency]{width:165px;max-width:100%}

.invoice-native-amount{display:block;font-size:10px;color:var(--muted,#557486);margin-top:3px}

.dashboard-exchange dt{display:flex;align-items:center;gap:6px}.dashboard-exchange dt img{display:block;flex:0 0 21px;border-radius:2px;box-shadow:0 0 0 1px #0002}
