:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#203149;background:#eef2f7;font-size:14px;color-scheme:light}
*{box-sizing:border-box}body{margin:0}main{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.topbar{height:56px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 20px;background:#203b5e;color:white;border-bottom:1px solid #172d49}
h1{margin:0;font-size:20px;font-weight:650;letter-spacing:-.3px}.topbar>span{font-size:12px;color:#cfdaea}
.tables-layout{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}
.table-panel{min-width:0;min-height:0;display:flex;flex-direction:column;background:white;border:1px solid #d5deea;border-radius:8px;padding:12px;overflow:hidden}
.panel-controls{display:flex;align-items:center;gap:12px;flex-shrink:0;margin-bottom:12px}.panel-label{font-weight:650;font-size:15px}.row-count{margin-left:auto;color:#5c6c80;font-size:12px;text-align:right}
button{width:110px;min-width:110px;height:36px;flex-shrink:0;padding:0 7px;border:1px solid #b9c9dc;border-radius:6px;background:#f1f5fa;color:#23466f;font-family:inherit;font-size:12px;font-weight:600;line-height:1.15;cursor:pointer}
button:hover{background:#e1ebf6;border-color:#8ca8c9}button:disabled{cursor:default;opacity:.5}button:focus-visible,input:focus-visible{outline:3px solid #99c5f4;outline-offset:2px}
.toolbar{display:grid;grid-template-columns:1fr;gap:12px;flex-shrink:0}.suppliers-panel .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(80px,.55fr)}.toolbar label{min-width:0;font-size:12px;font-weight:600;color:#52647a}
input{display:block;width:100%;height:36px;border:1px solid #bdcadb;border-radius:6px;padding:7px 10px;margin-top:5px;font:inherit;font-size:14px;background:white;color:#203149}
.panel-status{flex-shrink:0;height:34px;overflow:auto;margin:8px 0;color:#586b82;font-size:12px;line-height:17px}.panel-status.error,.row-message.error{color:#b42318}
.table-wrap{flex:1;min-height:0;overflow:auto;border:1px solid #dae2ed;border-radius:6px;overscroll-behavior:contain;scrollbar-gutter:stable}
table{width:100%;border-collapse:separate;border-spacing:0;text-align:left}th{position:sticky;top:0;z-index:1;background:#eaf0f7;padding:8px 10px;color:#52647a;font-size:12px;font-weight:650;border-bottom:1px solid #d5deea}th button span{margin-left:3px}
td{padding:10px;border-bottom:1px solid #e5ebf3;vertical-align:middle;font-size:14px}tbody tr:last-child td{border-bottom:0}tbody tr:nth-child(even){background:#f8fafc}
.suppliers-table{table-layout:fixed;min-width:580px}.supplier-key-column{width:64px}.supplier-account-column{width:170px}.supplier-actions-column{width:130px}
.suppliers-table th:first-child button{width:44px;min-width:44px;padding:0 2px}
.suppliers-table td:first-child{font-weight:650;font-variant-numeric:tabular-nums}.supplier-key{display:block;width:3ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.suppliers-table td:nth-child(2){overflow-wrap:anywhere}.suppliers-table td:nth-child(3),.suppliers-table td:last-child{min-width:0}
td input{margin:0;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.save,.reset{display:block}.reset{margin-top:6px}.row-message{display:block;font-size:12px;margin-top:6px;color:#267345;max-width:180px}
tr.dirty,tr.dirty:nth-child(even){background:#fff8e9}tr.dirty input{border-color:#c69b3e}
.accounts-table td:first-child{min-width:240px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:650;font-size:13px}.accounts-table td:nth-child(2){min-width:220px}.accounts-table td.account-match{min-width:90px;width:90px;text-align:center}
.catalog-cell{display:flex;align-items:center;justify-content:space-between;gap:12px}.catalog-cell>span{overflow-wrap:anywhere}.account-number{white-space:nowrap;user-select:all}
.accounts-table td:nth-child(2){min-width:246px}.catalog-name-cell{flex-direction:column;align-items:flex-start;gap:6px}.catalog-search-actions{display:flex;gap:6px}
.account-match span{display:inline-block;font-size:20px;font-weight:700}.match-found{color:#267345}.match-missing{color:#8190a1}.clipboard-helper{position:fixed;left:-9999px;top:0}
.panel-help{flex-shrink:0;height:32px;overflow:auto;margin:8px 0 0;font-size:11px;line-height:16px;color:#65768b}.empty{text-align:center;padding:32px;color:#65768b}
@media(max-width:850px){.tables-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;padding:8px}.table-panel{padding:8px}.panel-controls{margin-bottom:8px;gap:8px}.panel-label{font-size:13px}.panel-status{height:17px;margin:5px 0}.panel-help{display:none}.topbar{height:48px;padding:0 12px}.topbar>span{display:none}.row-count{font-size:11px}}

/* Office 2007 blue theme */
:root{font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:#15345b;background:#b7cce8}
body{background:linear-gradient(180deg,#9eb9df 0,#d9e5f5 180px,#c5d5eb 100%)}
.topbar{background:linear-gradient(180deg,#c9dcf7 0%,#a8c5eb 45%,#88acd9 46%,#b9d0ef 100%);color:#163963;border-bottom:1px solid #648bbf;box-shadow:inset 0 1px #eff6ff,0 1px 3px #597eae55}
h1{font-size:19px;font-weight:600;letter-spacing:0;text-shadow:0 1px #f1f7ff;display:flex;align-items:center;gap:12px}
.office-emblem{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:23px;line-height:1;color:#fff8dc;background:radial-gradient(circle at 35% 20%,#fff9ce 0,#eed086 22%,#ba8a37 65%,#866025 100%);border:1px solid #8b733f;box-shadow:inset 0 1px 2px #fff,0 1px 2px #42669888;text-shadow:0 1px 1px #76571e}
.topbar>span{color:#254873;text-shadow:0 1px #e8f1fd}
.table-panel{border:1px solid #7596c2;border-radius:5px;background:linear-gradient(180deg,#d8e7f9 0,#eaf1fb 170px,#f5f8fd 100%);box-shadow:inset 0 1px #fff,0 1px 3px #6584ae33}
.panel-controls{background:linear-gradient(180deg,#e2edfc,#c3d8f4 48%,#b0caee 49%,#d1e1f7);border-bottom:1px solid #8aa9ce;margin:-12px -12px 10px;padding:10px 12px;box-shadow:inset 0 1px #fff}
.panel-label{color:#214a7c;text-shadow:0 1px #f7fbff;font-size:14px}.row-count{color:#3d5b80}
button{color:#17365d;border-color:#7f9db9;border-radius:3px;background:linear-gradient(180deg,#fff 0%,#eef4fc 46%,#d8e6f7 47%,#e6effb 100%);box-shadow:inset 0 0 0 1px #ffffffb0,0 1px 1px #728aab22;font-weight:500;text-shadow:0 1px #fff}
button:hover{border-color:#c68c35;background:linear-gradient(180deg,#fff9e9 0%,#ffedbc 46%,#ffd777 47%,#ffe8a7 100%);box-shadow:inset 0 0 0 1px #fff7d7,0 1px 2px #ae804633}
button:active:not(:disabled){border-color:#9a6c27;background:linear-gradient(180deg,#f3bd61,#ffe6a8);box-shadow:inset 0 1px 3px #9e6f3466}
button:disabled{opacity:1;color:#8392a7;border-color:#b0bfd3;background:linear-gradient(180deg,#f4f7fb,#e1e8f2);text-shadow:0 1px #fff;box-shadow:inset 0 0 0 1px #f8faff}
button:focus-visible,input:focus-visible{outline:2px solid #d6a34a;outline-offset:2px}
.toolbar{background:linear-gradient(180deg,#e6effb,#d9e6f7);padding:8px;border:1px solid #a6bddc;border-radius:3px;box-shadow:inset 0 1px #f9fcff}.toolbar label{color:#345277;font-weight:500}
input{border-color:#809dbc;border-radius:2px;background:#fff;color:#172f50;box-shadow:inset 0 1px 2px #254b751a}
input:hover{border-color:#527cab}input:focus{border-color:#d8a44d;background:#fffef8}
.panel-status{color:#446287}.table-wrap{border-color:#86a4ca;border-radius:2px;background:#fff;box-shadow:inset 0 0 0 1px #fff}
th{background:linear-gradient(180deg,#e8f1fd 0,#d3e2f6 48%,#bfd3ee 49%,#d6e4f7 100%);color:#294b78;border-bottom-color:#7f9fc7;border-right:1px solid #a3bddf;font-weight:600}
th:last-child{border-right:0}th[aria-sort="ascending"],th[aria-sort="descending"]{background:linear-gradient(180deg,#fff1ca,#ffdf91)}
td{color:#1d3350;border-bottom-color:#d0dcec;border-right:1px solid #e0e8f2}td:last-child{border-right:0}tbody tr:nth-child(even){background:#f0f5fc}tbody tr:hover{background:#fff6da}
tr.dirty,tr.dirty:nth-child(even),tr.dirty:hover{background:#fff1c8}tr.dirty input{border-color:#c1943f;background:#fffdf4}
.match-found,.row-message{color:#2b6e37}.match-missing{color:#8294ac}.panel-status.error,.row-message.error{color:#a42a23}
.panel-help{color:#446080;border-top:1px solid #b8cbe5;padding-top:5px;margin-top:8px;height:32px}.empty{color:#617e9f}
.table-wrap{scrollbar-color:#a9c1e1 #e7eef9;scrollbar-width:auto}
.table-wrap::-webkit-scrollbar{width:14px;height:14px}.table-wrap::-webkit-scrollbar-track{background:#e7eef9;border:1px solid #c4d4e9}.table-wrap::-webkit-scrollbar-thumb{border:1px solid #809fc7;background:linear-gradient(90deg,#deebfc,#abc5e7);border-radius:2px}.table-wrap::-webkit-scrollbar-thumb:hover{background:#b9d0ef}.table-wrap::-webkit-scrollbar-corner{background:#dce7f6}
@media(max-width:850px){.panel-controls{margin:-8px -8px 8px;padding:8px}.topbar h1{font-size:17px}.office-emblem{width:30px;height:30px;font-size:21px}.panel-help{display:none}.toolbar{padding:6px}}

/* Compact single-line rows and controls. */
button{width:88px;min-width:88px;height:22px;padding:0 4px;font-size:11px;line-height:20px;white-space:nowrap}
th{height:29px;padding:3px 6px;font-size:11px;line-height:12px}
th button{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:auto;min-width:0;max-width:100%;padding:0 5px;line-height:18px}th button span{flex:0 0 auto;margin-left:0;line-height:1}
td{height:29px;padding:3px 6px;font-size:13px;line-height:22px;white-space:nowrap}
td input{height:22px;padding:1px 5px;font-size:13px;line-height:18px}
.suppliers-table{min-width:590px}.supplier-key-column{width:54px}.supplier-account-column{width:150px}.supplier-actions-column{width:206px}
.suppliers-table td:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.supplier-actions{display:flex;align-items:center;gap:4px;height:22px}.save,.reset{display:inline-block;margin:0}
.row-message{display:inline-block;flex:0 0 12px;width:12px;max-width:12px;height:22px;margin:0;font-size:0;line-height:22px;white-space:nowrap}
.row-message:not(:empty)::before{content:attr(data-indicator);font-size:12px;font-weight:700}
.accounts-table{table-layout:fixed;min-width:590px}.catalog-account-column{width:210px}.catalog-match-column{width:58px}
.accounts-table td:first-child,.accounts-table td:nth-child(2),.accounts-table td.account-match{min-width:0;width:auto;font-size:12px}
.catalog-cell,.catalog-name-cell{flex-direction:row;align-items:center;gap:6px;height:22px;min-width:0}
.catalog-cell>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
.catalog-name-cell>span{flex:1}.catalog-search-actions{flex-shrink:0;gap:4px;height:22px}
.account-match span{font-size:16px;line-height:22px}
.panel-controls{padding-top:7px;padding-bottom:7px}.panel-help{line-height:16px}

.accounts-table td.account-match span{display:block}

.catalog-account-column{width:232px}.account-search-icon{width:24px;min-width:24px;display:inline-flex;align-items:center;justify-content:center}.account-search-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.session-controls{display:flex;align-items:center;gap:16px;font-size:12px;color:#254873}
.login-container{flex:1;display:grid;place-items:center;padding:24px;overflow:auto}.login-card{width:380px;max-width:100%;padding:24px;border:1px solid #7596c2;border-radius:5px;background:linear-gradient(180deg,#d8e7f9,#f5f8fd);box-shadow:inset 0 1px #fff,0 4px 16px #44648733}.login-card h2{margin:0 0 10px;color:#214a7c;font-size:20px}.login-card p{color:#446080;font-size:13px;line-height:1.5}.login-card form>label{display:block;margin:16px 0;font-size:13px}.login-card .remember-label{display:flex;align-items:center;gap:8px}.remember-label input{width:16px;height:16px;margin:0;box-shadow:none;accent-color:#345c8e}.login-card #login-status{color:#a42a23;min-height:20px;margin-bottom:0}.login-card button{height:28px}
@media(max-width:850px){.session-controls>span{display:none}}
