@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
:root{--blue:#1384b3;--blue-dark:#0b5d7e;--blue-light:#1da1d1;--navy:#0a192f;--ink:#183247;--muted:#647787;--line:#e0e8ee;--soft:#f0f7fa;--background:#f6f8fb;--sidebar-width:238px;font:14px/1.55 Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--background);font-synthesis:none}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled,input:disabled,select:disabled{cursor:not-allowed;opacity:.55}a{color:var(--blue-dark);text-decoration:none}a:hover{text-decoration:underline}img{max-width:100%}h1,h2,h3,h4,p{margin:0 0 1rem}h1,h2,h3,h4{line-height:1.25;letter-spacing:-.035em;color:var(--navy)}h1{font-size:30px;font-weight:700}h2{font-size:19px;font-weight:650}h3{font-size:15px;font-weight:650}p:last-child{margin-bottom:0}form{margin:0}fieldset{padding:0;margin:0;border:0}legend{font-size:15px;font-weight:650;margin-bottom:18px}small,.small{font-size:12px}.muted{color:var(--muted)}.text-right{text-align:right}.nowrap{white-space:nowrap}.full-width{width:100%}.spacer{flex:1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}:focus-visible{outline:3px solid var(--blue-light);outline-offset:3px}.skip-link{position:fixed;top:-80px;left:20px;z-index:100;padding:12px 20px;background:#fff;border:1px solid var(--blue);border-radius:6px}.skip-link:focus{top:12px}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex:none}.icon.small,.icon.sm{width:16px;height:16px}
.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);display:flex;flex-direction:column;padding:26px 18px 20px;background:#fff;border-right:1px solid var(--line);z-index:40;overflow-y:auto}.sidebar-brand{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;padding:0 15px 24px;margin-bottom:22px;border-bottom:1px solid #ecf0f4;text-decoration:none}.sidebar-brand:hover{text-decoration:none}.sidebar-brand img{width:132px;height:76px;object-fit:contain}.sidebar-brand span{color:#678092;font-size:10px;letter-spacing:.19em;text-transform:uppercase;font-weight:600}.sidebar-caption,.sidebar-label{font-size:9px;font-weight:650;letter-spacing:.13em;color:#8b9ba7;text-transform:uppercase;margin:5px 13px 12px}.nav-list,.sidebar nav{display:flex;flex-direction:column;gap:5px}.nav-item,.nav-link{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:7px;color:#617789;font-size:12px;font-weight:550;position:relative;text-decoration:none;min-height:44px}.nav-item:hover,.nav-link:hover{background:#f4f8fb;color:var(--blue-dark);text-decoration:none}.nav-item.active,.nav-link.active,.nav-link[aria-current=page],.nav-item[aria-current=page]{background:#eaf5fa;color:var(--blue-dark);font-weight:650}.nav-item.active:before,.nav-link.active:before,.nav-link[aria-current=page]:before,.nav-item[aria-current=page]:before{content:"";position:absolute;left:-18px;height:24px;width:3px;border-radius:0 3px 3px 0;background:var(--blue)}.nav-item .icon,.nav-link .icon{width:18px;height:18px}.nav-count{margin-left:auto;border-radius:4px;padding:1px 6px;background:#dfeff6;color:#32748e;font-size:10px;min-width:22px;text-align:center}.sidebar-bottom{margin-top:auto;padding:28px 5px 0}.sidebar-help,.sidebar-note{padding:17px 13px;border-radius:8px;background:var(--soft);border:1px solid #e6f0f5;font-size:11px;color:#6a8393;line-height:1.7}.sidebar-help strong,.sidebar-note strong{display:block;font-size:11px;color:#36566c;margin-bottom:5px}.sidebar-footer{padding:18px 10px 0;display:flex;align-items:center;gap:8px;font-size:10px;color:#8b9aa5}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#219079;flex:none}.workspace{grid-column:2;min-width:0}.topbar{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;gap:20px}.breadcrumb{display:flex;align-items:center;gap:10px;font-size:11px;color:#7b8d9b}.breadcrumb strong{font-weight:550;color:#365267}.breadcrumb .icon{width:14px;height:14px;color:#a6b3be}.topbar-actions,.user-menu{display:flex;align-items:center;gap:14px}.topbar-actions form{display:flex;align-items:center}.profile-name{font-size:11px;font-weight:650;color:#29465c}.profile-role{font-size:10px;color:#8a9aa6}.avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;width:34px;height:34px;background:#eaf4f8;color:var(--blue-dark);font-size:11px;font-weight:650;flex:none}.content,.page-content{max-width:1760px;padding:31px 36px 32px;margin:0 auto;min-width:0}.page-header,.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}.page-header h1,.page-heading h1{margin:0 0 7px;font-size:28px}.page-header p,.page-heading p{margin:0;color:#708696;font-size:12px}.page-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.eyebrow{font-size:9px;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:var(--blue);margin-bottom:10px}.page-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);margin-top:30px;padding-top:17px;gap:15px;font-size:10px;color:#8b9ba7}.page-footer strong{font-size:9px;letter-spacing:.12em;font-weight:650}.mobile-menu,.sidebar-overlay{display:none}
.btn,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 15px;min-height:40px;border:1px solid #d7e2e9;border-radius:7px;background:#fff;color:#32546b;font-size:11px;font-weight:600;line-height:1.5;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s,box-shadow .15s}.btn:hover,.button:hover{background:#f3f8fb;text-decoration:none;border-color:#bfdae6}.btn.primary,.button.primary{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 3px 7px #0b5d7e0c}.btn.primary:hover,.button.primary:hover{background:#0d759f;border-color:#0d759f}.btn.secondary,.button.secondary{background:#fff;color:#34566b}.btn.ghost,.button.ghost{border-color:transparent;box-shadow:none;background:transparent;color:#607e91}.btn.ghost:hover,.button.ghost:hover{background:var(--soft);color:var(--blue-dark)}.btn.danger,.button.danger{color:#ad3f3e;background:#fff7f7;border-color:#efcdcd}.btn.small,.button.small{min-height:32px;padding:6px 10px;font-size:10px}.btn.wide,.button.wide{width:100%}.btn .icon,.button .icon{width:16px;height:16px}.icon-btn{display:inline-flex;justify-content:center;align-items:center;width:33px;height:33px;padding:0;border:1px solid transparent;background:transparent;color:#7590a1;border-radius:6px}.icon-btn:hover{background:#eef5f8;color:var(--blue)}.text-link{display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:11px}.text-link .icon{width:14px;height:14px}
.stats-grid,.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:26px}.stat-card,.metric{padding:21px 22px 19px;background:#fff;border:1px solid var(--line);border-radius:10px;position:relative;min-width:0}.stat-label,.metric-label{font-size:11px;color:#6a8293;font-weight:500;margin:0 0 14px}.stat-value,.metric-value{font-size:30px;font-weight:650;letter-spacing:-.055em;color:#18344b;line-height:1.15;margin:0 0 9px;display:block;font-variant-numeric:tabular-nums}.stat-value small,.metric-value small{font-size:16px;font-weight:500;letter-spacing:-.02em;margin-left:4px;color:#7890a1}.stat-meta,.metric-note{font-size:10px;color:#879aa9;margin:0;line-height:1.65}.stat-icon,.metric-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:20px;top:18px;width:29px;height:29px;border-radius:7px;background:#f0f7fa;color:#76a9bf}.stat-icon .icon,.metric-icon .icon{width:15px;height:15px}.stat-card.accent,.metric.accent{border-color:#c8e2ed;background:linear-gradient(125deg,#f1f9fc,#fff)}.stat-card.accent .stat-value,.metric.accent .metric-value{color:var(--blue-dark)}
.panel{border:1px solid var(--line);border-radius:10px;background:#fff;margin-bottom:22px;min-width:0;overflow:hidden}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:21px 23px;border-bottom:1px solid #eaf0f4}.panel-header h2,.panel-header h3{margin:0;font-size:15px;letter-spacing:-.02em}.panel-header p{font-size:11px;color:#7b90a0;margin:5px 0 0}.panel-header .heading-icon{display:inline-flex;align-items:center;gap:9px}.panel-header .heading-icon .icon{color:var(--blue);width:18px;height:18px}.panel-body{padding:23px}.panel-body>.form-grid{margin-bottom:18px}.panel-body>:last-child{margin-bottom:0}.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px;gap:18px}.section-header h2{font-size:18px;margin:0}.section-header p{font-size:11px;color:#7b90a0;margin:5px 0 0}.content-grid,.columns-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:22px}.dashboard-grid>.panel{margin:0}.count{display:inline-flex;align-items:center;justify-content:center;padding:2px 6px;min-width:22px;background:#edf4f8;color:#7791a2;border-radius:4px;font-size:10px;font-weight:600;letter-spacing:0;margin-left:6px;vertical-align:middle}.notice{padding:14px 17px;border:1px solid #dfd0ad;border-radius:8px;background:#fff9ec;color:#886a33;font-size:12px;margin-bottom:22px;line-height:1.7}.notice.success{background:#eef8f2;border-color:#d1e9db;color:#327454}.notice.error{background:#fff2f1;border-color:#edcfcb;color:#a4463e}.notice.info{background:#eef7fc;border-color:#d0e6f0;color:#47788e}.notice .icon{width:17px;height:17px;margin-right:6px}.notice p{margin:0}.notice strong{font-weight:650}.info-box{display:flex;align-items:flex-start;gap:10px;padding:15px 17px;background:#f2f8fb;border:1px solid #dfeef5;border-radius:8px;color:#6d8a9b;font-size:11px;line-height:1.7;margin-bottom:20px}.info-box>.icon{color:#4e94b0;width:17px;height:17px;margin-top:1px}.info-box p{margin:0}.info-box strong{color:#466d83}
.toolbar,.filters{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 23px;border-bottom:1px solid #eaf0f4;flex-wrap:wrap}.toolbar form,.filters form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1}.toolbar input,.toolbar select,.filters input,.filters select{width:auto;min-width:130px;min-height:36px;padding:8px 11px;font-size:11px;border-color:#dde7ed}.toolbar .search-field,.filters .search-field{flex:1;max-width:340px;min-width:180px}.search-field{position:relative;display:flex;align-items:center}.search-field>.icon{position:absolute;left:11px;width:16px;height:16px;color:#92a6b3;pointer-events:none}.search-field input{padding-left:35px!important;width:100%;background:#fafcfd}.filter-group,.filter-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.filter-tabs{display:flex;gap:20px;padding:0 23px;border-bottom:1px solid #eaf0f4;overflow:auto}.filter-tab{padding:14px 0;font-size:11px;font-weight:550;color:#8395a3;border:0;border-bottom:2px solid transparent;background:transparent;white-space:nowrap;text-decoration:none}.filter-tab.active,.filter-tab[aria-current=page]{color:var(--blue-dark);border-bottom-color:var(--blue);font-weight:650}.filter-tab:hover{text-decoration:none;color:var(--blue-dark)}.table-wrap{width:100%;overflow-x:auto}.data-table{width:100%;border-collapse:collapse;font-size:11px;text-align:left}.data-table th{font-size:9px;letter-spacing:.055em;text-transform:uppercase;font-weight:650;color:#8295a3;background:#fafcfd;white-space:nowrap;padding:13px 18px;border-bottom:1px solid #e7eef2}.data-table td{padding:16px 18px;border-bottom:1px solid #edf2f5;vertical-align:middle;color:#526e80;line-height:1.6}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fcfdfe}.data-table th:first-child,.data-table td:first-child{padding-left:23px}.data-table th:last-child,.data-table td:last-child{padding-right:23px}.data-table td strong,.data-table .supplier-name{font-size:11px;font-weight:650;color:#29485e}.data-table td small{display:block;font-size:10px;color:#91a1ad;margin-top:3px}.data-table .amount{text-align:right;font-weight:600;color:#29485e;font-variant-numeric:tabular-nums;white-space:nowrap}.data-table .amount small{font-weight:400}.data-table .invoice-link{font-weight:600;color:#285c77}.data-table .row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.supplier-cell{display:flex;align-items:center;gap:11px}.supplier-icon{width:33px;height:33px;flex:none;border:1px solid #e1ebf1;background:#f4f8fb;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#5c8197}.table-footer{border-top:1px solid #edf2f5;padding:13px 23px;display:flex;justify-content:space-between;align-items:center;gap:14px;color:#8a9da9;font-size:10px}.pagination{display:flex;align-items:center;gap:7px}.pagination .btn,.pagination .button{min-height:29px;padding:5px 8px;font-size:10px}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;background:#edf3f7;color:#6c8597;border:1px solid transparent;border-radius:5px;font-size:9px;font-weight:550;line-height:1.45;white-space:nowrap}.badge.success,.badge.ready,.badge.approved,.badge.connected{background:#edf8f1;color:#357858}.badge.warning,.badge.review,.badge.pending,.badge.needs_review{background:#fff6df;color:#9b762c}.badge.info,.badge.processing{background:#edf7fc;color:#397d9b}.badge.danger,.badge.error,.badge.failed{background:#fff0ee;color:#b56860}.badge.neutral,.badge.muted,.badge.draft,.badge.disabled{background:#f1f4f7;color:#7e919e}.badge-dot{width:4px;height:4px;border-radius:50%;background:currentColor;display:inline-block}
.empty-state,.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:58px 25px 61px;min-height:245px}.empty-icon{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:13px;border:1px solid #dbeaf2;background:#f4f9fc;color:#73a3ba;margin-bottom:19px}.empty-icon>.icon{width:24px;height:24px}.empty-state h3,.empty h3,.empty-title{font-size:16px;color:#35566c;font-weight:600;margin:0 0 8px}.empty-state p,.empty p{font-size:12px;line-height:1.8;color:#8196a5;max-width:410px;margin:0 0 20px}.empty-state.compact,.empty.compact{padding:32px 22px;min-height:190px}.empty-state.compact .empty-icon{width:44px;height:44px;margin-bottom:15px}.empty-state.compact h3{font-size:14px}.empty-state.compact p{font-size:11px;margin-bottom:16px}.setup-banner{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:24px 27px;margin-bottom:25px;background:linear-gradient(115deg,#eaf5fb,#f6fbfd 72%,#e9f3f8);border:1px solid #dcecf4;border-radius:10px;overflow:hidden}.setup-banner h2{font-size:20px;margin-bottom:7px}.setup-banner p{font-size:12px;color:#7491a3;max-width:590px;margin:0}.setup-steps{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.setup-step{display:inline-flex;align-items:center;gap:7px;font-size:10px;color:#64859a}.setup-step span{display:flex;align-items:center;justify-content:center;width:19px;height:19px;border-radius:50%;border:1px solid #cadfe9;font-size:9px;background:#fff;color:#4b8da9}.activity-list{list-style:none;padding:0;margin:0}.activity-item{display:flex;align-items:flex-start;gap:12px;padding:14px 0;border-bottom:1px solid #edf2f5;font-size:11px;color:#5f7b8e}.activity-item:first-child{padding-top:0}.activity-item:last-child{padding-bottom:0;border-bottom:0}.activity-item strong{display:block;font-size:11px;font-weight:550;color:#36576d;margin-bottom:4px}.activity-item small{font-size:10px;color:#8ba0ae}.activity-icon{width:29px;height:29px;border-radius:7px;display:flex;align-items:center;justify-content:center;background:#eff6fa;color:#5998b3;flex:none}.activity-icon .icon{width:15px;height:15px}
.connection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:25px}.connection-card{border:1px solid var(--line);border-radius:10px;background:#fff;display:flex;flex-direction:column;min-width:0;padding:21px 21px 0;transition:border-color .15s,box-shadow .15s}.connection-card:hover{border-color:#bdd8e5;box-shadow:0 5px 18px #14364b05}.connection-top{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-bottom:17px}.connection-icon{width:42px;height:42px;border:1px solid #dceaf2;border-radius:10px;background:#f1f8fb;color:#4a90af;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:650;flex:none;letter-spacing:-.04em}.connection-icon .icon{width:22px;height:22px}.connection-title,.connection-card h3{font-size:14px;letter-spacing:-.02em;margin-bottom:7px;color:#284a61;font-weight:650}.connection-heading{display:flex;align-items:center;gap:13px;margin-bottom:15px}.connection-heading h3{margin-bottom:4px}.connection-description{color:#7b91a1;font-size:11px;line-height:1.8;margin-bottom:18px;min-height:40px}.connection-meta{display:grid;grid-template-columns:1fr auto;gap:8px 12px;color:#8b9da9;font-size:10px;margin:0 0 18px}.connection-meta dt,.connection-meta dd{margin:0}.connection-meta dd{text-align:right;color:#5b7a8e}.connection-footer{border-top:1px solid #eaf0f4;padding:14px 0;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto}.connection-footer .btn{min-height:31px;font-size:10px;padding:6px 10px}.connection-footer p{font-size:10px;color:#91a3ae;margin:0}.connection-card .field{margin-bottom:14px}.connection-card .field input{min-height:36px;font-size:11px}.connection-card .notice{font-size:10px;padding:10px 12px}.connection-footer form{display:flex;gap:7px;flex-wrap:wrap}
.field{min-width:0;margin-bottom:16px}.field label,label.field-label{display:block;font-size:11px;font-weight:550;color:#4c6a7f;margin:0 0 7px}input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea{display:block;width:100%;border:1px solid #d7e4ec;border-radius:6px;padding:10px 12px;min-height:40px;background:#fff;color:#36576c;font-size:12px;transition:border-color .15s,box-shadow .15s}input::placeholder,textarea::placeholder{color:#a0b0bc}input:not([type=hidden]):not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{border-color:#6fb3cf;box-shadow:0 0 0 3px #1384b30c;outline:none}input[type=checkbox],input[type=radio]{width:15px;height:15px;accent-color:var(--blue);margin:0;vertical-align:middle;flex:none}input[type=file]{padding:8px;line-height:1.5}input[type=file]::file-selector-button{background:var(--soft);border:1px solid #d8e8f1;border-radius:4px;color:#47768e;font:inherit;font-size:11px;padding:5px 9px;margin-right:10px;cursor:pointer}textarea{resize:vertical;min-height:100px}.field small,.field-hint{display:block;font-size:10px;color:#8ba0ae;line-height:1.7;margin:6px 0 0}.field-error{color:#b1524c!important}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 19px}.field.full,.span-2{grid-column:1/-1}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid #e8eff3;margin-top:7px;padding-top:20px;flex-wrap:wrap}.form-section{margin-bottom:24px;padding-bottom:8px;border-bottom:1px solid #edf2f5}.form-section:last-child{border-bottom:0;margin-bottom:0}.form-section h3{font-size:12px;font-weight:600;margin-bottom:17px}.checkbox-field{display:flex;align-items:flex-start;gap:9px;font-size:11px;color:#668398;line-height:1.7;margin:12px 0}.checkbox-field input{margin-top:3px}.checkbox-field label{margin:0;font-weight:400}.upload-zone{border:1px dashed #bbd8e6;border-radius:10px;background:linear-gradient(145deg,#fafcfe,#f5fafd);padding:39px 26px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;position:relative;margin-bottom:22px;transition:border-color .15s,background .15s}.upload-zone.is-dragging{background:#e9f5fc;border-color:var(--blue)}.upload-zone>.icon,.upload-icon{width:44px;height:44px;padding:10px;border:1px solid #d9eaf3;border-radius:10px;color:#73a6be;background:#fff;margin-bottom:16px}.upload-zone h3{font-size:16px;color:#345d75;margin:0 0 8px}.upload-zone p{font-size:12px;color:#819aaa;max-width:420px;margin:0 0 17px;line-height:1.8}.upload-zone input[type=file]{width:min(100%,400px);background:#fff;font-size:11px;margin:0 auto}.upload-zone [data-file-summary]{margin:14px 0 0;font-size:11px;color:#417e98}.upload-zone:focus-within{border-color:#6aaecd}.upload-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.detail-layout,.detail-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,1fr);gap:22px;align-items:start}.document-preview{background:#eaf0f4;border:1px solid #dbe5eb;border-radius:9px;overflow:hidden;min-width:0}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;padding:13px 17px;gap:12px;background:#fff;border-bottom:1px solid #dce7ed;font-size:11px;color:#708a9b}.preview-toolbar .btn{font-size:10px;min-height:30px;padding:5px 9px}.document-preview iframe,.document-preview object,.document-preview embed{width:100%;height:720px;display:block;border:0;background:#eaf0f4}.document-preview>img{display:block;width:100%;height:auto;object-fit:contain}.document-preview .preview-image{padding:24px;max-height:800px;overflow:auto}.document-preview .preview-image img{display:block;max-width:100%;margin:0 auto;box-shadow:0 2px 12px #183b4f15}.document-preview .empty-state{min-height:440px}.document-preview pre{padding:22px;font:11px/1.8 ui-monospace,Consolas,monospace;color:#476a80;white-space:pre-wrap;overflow-wrap:anywhere;max-height:720px;overflow:auto}.detail-fields,.detail-form{min-width:0}.detail-fields .panel,.detail-form .panel{margin-bottom:20px}.detail-fields .panel-header,.detail-form .panel-header{padding:18px 21px}.detail-fields .panel-body,.detail-form .panel-body{padding:21px}.detail-summary{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e6edf2;margin-top:4px;padding:16px 0 3px;font-size:12px;color:#78909f}.detail-summary strong{font-size:23px;color:#305a73;font-weight:650;letter-spacing:-.04em}.extraction-status{display:flex;align-items:center;gap:9px;font-size:11px;color:#7d95a4;margin:0 0 18px}.extraction-status .icon{color:#659eb7;width:16px;height:16px}.detail-list{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px 15px;margin:0;font-size:11px}.detail-list dt{color:#8a9eac}.detail-list dd{margin:0;color:#486b80;overflow-wrap:anywhere}.settings-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,1fr);gap:22px}.settings-item{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:17px 0;border-bottom:1px solid #edf2f5}.settings-item:first-child{padding-top:0}.settings-item:last-child{border-bottom:0;padding-bottom:0}.settings-item h3{font-size:12px;color:#42677f;margin:0 0 5px}.settings-item p{font-size:11px;line-height:1.8;color:#8aa0ae;margin:0}.steps{list-style:none;padding:0;margin:0;counter-reset:step}.steps li{counter-increment:step;padding:0 0 24px 37px;position:relative;font-size:11px;color:#7893a4;line-height:1.8}.steps li:last-child{padding-bottom:0}.steps li:before{content:counter(step);position:absolute;left:0;top:0;width:23px;height:23px;border-radius:50%;background:#eef7fb;color:#428aa7;font-size:10px;font-weight:600;display:flex;align-items:center;justify-content:center;border:1px solid #d9eaf2}.steps li strong{display:block;color:#456e85;font-weight:600;margin-bottom:4px}.code-note{font:11px/1.7 ui-monospace,Consolas,monospace;background:#f5f8fa;color:#55788e;border:1px solid #e5edf2;border-radius:6px;padding:12px 14px;overflow-wrap:anywhere}
.login-layout,.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(450px,1fr);background:#fff}.login-brand,.auth-aside{background:#0a2239;color:#fff;padding:58px 12%;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.login-brand:after,.auth-aside:after{content:"";position:absolute;right:-120px;top:20%;width:380px;height:800px;transform:skew(-22deg);background:#ffffff03;border-left:1px solid #ffffff06;pointer-events:none}.login-brand .brand-logo,.login-brand>img,.auth-aside>img{width:154px;background:#fff;border-radius:8px;padding:13px 12px}.login-brand h1,.auth-aside h1{font-size:43px;font-weight:600;line-height:1.15;color:#fff;max-width:470px;margin:21px 0;letter-spacing:-.045em}.login-brand h1 span,.auth-aside h1 span{color:#70c4e1}.login-brand p,.auth-aside p{color:#91adbf;font-size:13px;line-height:1.9;max-width:390px}.login-brand .eyebrow,.auth-aside .eyebrow{color:#6fbbd7}.login-brand small,.auth-aside small{font-size:10px;color:#64889f;letter-spacing:.03em}.login-panel,.auth-card{display:flex;align-items:center;justify-content:center;padding:50px 45px;min-width:0}.login-form{width:100%;max-width:360px}.login-form .eyebrow{font-size:9px;margin-bottom:15px}.login-form h1,.login-form h2{font-size:28px;margin-bottom:11px}.login-form>p{color:#7b919f;font-size:12px;line-height:1.8;margin-bottom:31px}.login-form form>label{display:block;margin:19px 0 7px;font-size:11px;font-weight:550;color:#4c6b80}.login-form form>button{width:100%;margin-top:24px}.login-form .field input{min-height:44px}.login-form .login-note{margin:24px 0 0;font-size:10px;color:#97a8b4;line-height:1.8}.login-form .notice{font-size:11px}.login-form .login-logo{width:130px;margin-bottom:30px}.login-footer{display:flex;align-items:center;gap:7px;margin-top:28px;color:#91a6b4;font-size:10px}.login-features{display:flex;gap:20px;flex-wrap:wrap;margin-top:28px}.login-features span{display:flex;align-items:center;gap:7px;color:#b8d5e3;font-size:10px}.login-features .icon{width:15px;height:15px;color:#79b7cf}.auth-fallback,body>main:not([class]){width:min(100% - 2rem,440px);margin:65px auto}.auth-fallback .brand,body>main:not([class])>.brand{display:block;font-size:25px;font-weight:700;color:var(--blue-dark);margin-bottom:28px}.auth-fallback .brand span,body>main:not([class])>.brand span{display:block;font-size:13px;font-weight:500;letter-spacing:0;color:#7d94a3}.card{padding:30px;background:#fff;border:1px solid var(--line);border-radius:12px}.card>h1{font-size:28px}.card>p{font-size:12px;color:#7690a1;line-height:1.8}.card form>label{display:block;font-size:11px;font-weight:550;color:#4c6b80;margin:16px 0 7px}.card form>button{display:block;width:100%;border:1px solid var(--blue);border-radius:6px;background:var(--blue);color:#fff;padding:11px 14px;margin-top:23px;font-size:12px;font-weight:600}.auth-fallback>footer,body>main:not([class])>footer{color:#8c9fab;font-size:10px;text-align:center;margin-top:23px}.status{background:#eef8f2;border:1px solid #d4eadc;border-radius:7px;color:#39775b;font-size:11px;padding:14px;margin:20px 0}.status span{margin-right:6px}
@media(min-width:1700px){.content,.page-content{padding-top:39px;padding-bottom:39px}.topbar{height:84px}.stats-grid,.metrics{gap:20px}.connection-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1200px){:root{--sidebar-width:214px}.sidebar{padding-left:15px;padding-right:15px}.nav-item.active:before,.nav-link.active:before,.nav-link[aria-current=page]:before,.nav-item[aria-current=page]:before{left:-15px}.topbar{padding:0 25px}.content,.page-content{padding:27px 25px}.stats-grid,.metrics{gap:12px}.stat-card,.metric{padding:19px 18px}.stat-icon,.metric-icon{right:15px;top:16px}.stat-label,.metric-label{font-size:10px}.stat-value,.metric-value{font-size:27px}.connection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-layout,.detail-grid{grid-template-columns:minmax(0,1fr) minmax(320px,1fr);gap:17px}.dashboard-grid{grid-template-columns:minmax(0,1.4fr) minmax(270px,1fr);gap:17px}.settings-grid{grid-template-columns:1fr}.login-brand,.auth-aside{padding:47px 10%}.login-brand h1,.auth-aside h1{font-size:36px}.document-preview iframe,.document-preview object,.document-preview embed{height:660px}}
@media(max-width:980px){.stats-grid,.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-card,.metric{padding:20px 21px}.stat-value,.metric-value{font-size:30px}.stat-label,.metric-label{font-size:11px}.detail-layout,.detail-grid,.dashboard-grid,.content-grid,.columns-2,.upload-options{grid-template-columns:1fr}.dashboard-grid{margin-bottom:23px}.detail-fields,.detail-form{order:-1}.page-header,.page-heading{align-items:flex-start}.page-actions{justify-content:flex-end}.page-header h1,.page-heading h1{font-size:26px}.toolbar,.filters{gap:10px}.toolbar form,.filters form{gap:9px}.toolbar .search-field,.filters .search-field{max-width:none;min-width:100%;flex-basis:100%}.toolbar input,.toolbar select,.filters input,.filters select{flex:1}.topbar-actions{gap:10px}.profile-role{display:none}.login-layout,.auth-shell{grid-template-columns:minmax(0,1fr) minmax(390px,1fr)}.login-brand,.auth-aside{padding:40px 34px}.login-brand h1,.auth-aside h1{font-size:32px}.login-brand p,.auth-aside p{font-size:12px}.login-panel,.auth-card{padding:40px 33px}.login-features{flex-direction:column;gap:12px}}
@media(max-width:760px){:root{font-size:13px}.app-shell{display:block}.sidebar{transform:translateX(-100%);width:245px;padding:26px 18px;transition:transform .18s ease;box-shadow:10px 0 40px #0a192f10}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-open{overflow:hidden}.sidebar-overlay{border:0;position:fixed;inset:0;background:#0a192f66;z-index:35;padding:0;border-radius:0;backdrop-filter:blur(2px)}.sidebar-open .sidebar-overlay{display:block}.nav-item.active:before,.nav-link.active:before,.nav-link[aria-current=page]:before,.nav-item[aria-current=page]:before{left:-18px}.workspace{width:100%}.mobile-menu{display:inline-flex;align-items:center;justify-content:center;flex:none}.topbar{padding:0 18px;height:66px;gap:12px}.topbar>.breadcrumb{margin-right:auto}.breadcrumb{font-size:10px;gap:7px}.topbar-actions{gap:8px}.profile-name,.profile-role{display:none}.topbar-actions .btn,.topbar-actions .button{font-size:10px;min-height:32px;padding:6px 8px}.avatar{width:30px;height:30px;font-size:10px}.content,.page-content{padding:24px 18px 27px}.page-header,.page-heading{margin-bottom:22px;flex-wrap:wrap;gap:15px}.page-header h1,.page-heading h1{font-size:26px}.page-header p,.page-heading p{font-size:11px}.page-actions{justify-content:flex-start;gap:8px}.page-actions .btn,.page-actions .button{font-size:10px;min-height:36px;padding:8px 12px}.stats-grid,.metrics{gap:11px;margin-bottom:22px}.stat-card,.metric{padding:17px 17px 16px}.stat-label,.metric-label{font-size:10px;margin-bottom:14px;padding-right:20px}.stat-value,.metric-value{font-size:27px}.stat-meta,.metric-note{font-size:9px}.stat-icon,.metric-icon{width:25px;height:25px;right:13px;top:12px}.stat-icon .icon,.metric-icon .icon{width:13px;height:13px}.panel{margin-bottom:20px}.panel-header{padding:18px;gap:12px;flex-wrap:wrap}.panel-header h2,.panel-header h3{font-size:14px}.panel-header p{font-size:10px}.panel-body{padding:19px 18px}.toolbar,.filters{padding:14px 18px}.toolbar form,.filters form{width:100%}.toolbar select,.filters select{flex:1;min-width:120px}.toolbar .btn,.filters .btn{min-height:36px}.filter-tabs{padding:0 18px;gap:18px}.filter-tab{font-size:10px;padding:12px 0}.data-table{font-size:10px;min-width:680px}.data-table th{font-size:8px;padding:11px 14px}.data-table td{padding:14px}.data-table th:first-child,.data-table td:first-child{padding-left:18px}.data-table th:last-child,.data-table td:last-child{padding-right:18px}.table-footer{padding:12px 18px;font-size:9px;flex-wrap:wrap}.connection-grid{gap:13px}.connection-card{padding:18px 17px 0}.connection-top{margin-bottom:14px}.connection-icon{width:36px;height:36px;border-radius:9px;font-size:13px}.connection-icon .icon{width:19px;height:19px}.connection-title,.connection-card h3{font-size:13px}.connection-description{font-size:10px;line-height:1.8}.connection-meta{font-size:9px}.connection-card .badge{font-size:8px;padding:3px 6px}.connection-footer{flex-wrap:wrap;padding:12px 0}.setup-banner{padding:22px 21px;align-items:flex-start;flex-direction:column;gap:18px}.setup-banner h2{font-size:20px}.setup-banner p{font-size:11px}.empty-state,.empty{padding:42px 22px;min-height:230px}.empty-state h3,.empty h3{font-size:15px}.empty-state p,.empty p{font-size:11px}.empty-icon{width:47px;height:47px;margin-bottom:17px}.page-footer{font-size:9px;margin-top:24px;flex-wrap:wrap}input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;min-height:43px}.toolbar input,.toolbar select,.filters input,.filters select{font-size:13px;min-height:38px}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.form-actions{justify-content:flex-start}.detail-fields .panel-body,.detail-form .panel-body{padding:19px 18px}.detail-fields .panel-header,.detail-form .panel-header{padding:18px}.detail-list{grid-template-columns:110px minmax(0,1fr);font-size:10px;gap:11px}.document-preview iframe,.document-preview object,.document-preview embed{height:550px}.upload-zone{padding:31px 20px}.upload-zone h3{font-size:15px}.upload-zone p{font-size:11px}.upload-zone input[type=file]{font-size:11px}.login-layout,.auth-shell{display:block}.login-brand,.auth-aside{padding:26px 30px 30px;gap:20px}.login-brand .brand-logo,.login-brand>img,.auth-aside>img{width:123px;padding:10px}.login-brand h1,.auth-aside h1{font-size:30px;margin:12px 0;max-width:430px}.login-brand p,.auth-aside p{font-size:11px;max-width:430px;margin:0}.login-brand small,.auth-aside small,.login-features{display:none}.login-panel,.auth-card{padding:33px 30px 45px}.login-form{max-width:430px}.login-form h1,.login-form h2{font-size:26px}.login-form>p{font-size:11px;margin-bottom:25px}}
@media(max-width:480px){.connection-grid{grid-template-columns:1fr}.connection-card{padding:21px 21px 0}.connection-description{min-height:0;font-size:11px}.connection-meta{font-size:10px}.connection-card .badge{font-size:9px}.connection-title,.connection-card h3{font-size:14px}.connection-footer{padding:14px 0}.content,.page-content{padding:22px 15px 24px}.topbar{padding:0 15px}.breadcrumb>span:first-child{display:none}.stats-grid,.metrics{gap:9px}.stat-card,.metric{padding:17px 14px}.stat-value,.metric-value{font-size:25px}.stat-label,.metric-label{font-size:9px;padding-right:23px}.stat-icon,.metric-icon{right:11px;top:12px;width:23px;height:23px}.form-grid,.form-grid.three{grid-template-columns:1fr;gap:0}.field.full,.span-2{grid-column:auto}.page-header h1,.page-heading h1{font-size:25px}.page-actions{width:100%}.page-actions>.btn,.page-actions>.button{flex:1}.page-footer{gap:8px}.detail-summary strong{font-size:21px}.preview-toolbar{flex-wrap:wrap}.document-preview iframe,.document-preview object,.document-preview embed{height:470px}.login-brand,.auth-aside{padding:25px}.login-panel,.auth-card{padding:30px 25px 40px}.login-brand h1,.auth-aside h1{font-size:28px}.auth-fallback,body>main:not([class]){margin:28px auto}.card{padding:25px}.toolbar select,.filters select{min-width:110px}.setup-steps{gap:10px 15px}.section-header{align-items:flex-start}.section-header h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}
/* Shared templates: restrained editorial accents and server-rendered empty states. */
.page-header .eyebrow,.page-heading .eyebrow{font-size:9px;letter-spacing:.16em;font-weight:700;color:var(--blue);margin:0 0 10px}.login-brand>a{align-self:flex-start}.login-brand>a>img{display:block;width:154px;background:transparent;border-radius:8px;padding:13px 12px;filter:brightness(0) invert(1)}.login-form .eyebrow{color:var(--blue);margin-bottom:15px;font-size:9px}.form-grid>.full{grid-column:1/-1}.login-form>.muted.small{font-size:10px;line-height:1.8;color:#8b9fac;margin:24px 0 0}
.topbar-start{display:flex;align-items:center;gap:14px;min-width:0}.icon-button{display:inline-flex;justify-content:center;align-items:center;width:33px;height:33px;padding:0;border:1px solid transparent;background:transparent;color:#7590a1;border-radius:6px;text-decoration:none}.icon-button:hover{background:#eef5f8;color:var(--blue);text-decoration:none}.icon-button .icon{width:18px;height:18px}.icon-button.mobile-menu{display:none}.sidebar-backdrop{display:none}.sidebar-brand .sidebar-caption{margin:0;font-size:9px;letter-spacing:.17em}.sidebar-note{display:flex;gap:10px;align-items:center;font-size:10px;line-height:1.6}.sidebar-note>.icon{width:19px;height:19px;flex:none;color:#7ca7bc}.sidebar-note small{display:block;font-size:9px;color:#8b9fae;margin-top:3px}.sidebar-bottom>.nav-item{margin-top:12px;font-size:10px;padding-left:10px}.inline-form{display:inline-flex}.stat-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.stat-top .stat-label{margin:0}.stat-top>.icon{width:17px;height:17px;color:#80a9bd}.stat-card:hover{text-decoration:none;border-color:#bad9e8}.stat-top~.stat-value{margin-bottom:10px}.welcome-panel{display:grid;grid-template-columns:1.35fr 1fr;gap:50px;padding:29px 31px;margin-bottom:26px;background:linear-gradient(115deg,#eaf5fa,#f6fbfd);border:1px solid #dbeaf2;border-radius:10px}.welcome-panel .eyebrow{display:block;font-size:9px;margin-bottom:13px}.welcome-panel h2{font-size:25px;line-height:1.25;max-width:420px;margin-bottom:12px}.welcome-panel>div>p{font-size:12px;line-height:1.85;color:#7290a2;max-width:460px;margin-bottom:20px}.welcome-panel .btn{font-size:10px;min-height:36px;padding:8px 12px}.welcome-panel .setup-steps{display:flex;flex-direction:column;justify-content:center;margin:0;gap:17px}.setup-steps>div{display:flex;align-items:center;gap:13px}.step-number{display:flex;align-items:center;justify-content:center;width:33px;height:33px;border-radius:8px;background:#ffffffbf;border:1px solid #dbe9f0;font-size:10px;font-weight:600;color:#6195ae;flex:none}.setup-steps p{margin:0}.setup-steps strong{display:block;font-size:11px;font-weight:600;color:#416a82;margin-bottom:3px}.setup-steps small{display:block;font-size:10px;color:#819ba9}.dashboard-grid .panel-body>p{font-size:12px;line-height:1.85;color:#7e96a6;margin-bottom:20px}.channel-list{padding-top:6px;padding-bottom:6px}.channel-list>a{display:flex;align-items:center;gap:13px;padding:17px 0;border-bottom:1px solid #eaf0f4;text-decoration:none}.channel-list>a:last-child{border:0}.channel-list>a>span:nth-child(2){flex:1}.channel-list strong{display:block;font-size:12px;font-weight:600;color:#45687d;margin-bottom:4px}.channel-list small{display:block;font-size:10px;color:#8aa0ae}.channel-list .connection-icon{width:34px;height:34px;border-radius:8px}.channel-list .connection-icon .icon{width:17px;height:17px}.channel-list>a>.icon{color:#8baab9;width:16px;height:16px}.heading-count{display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;letter-spacing:0;color:#7d98a8;background:#e9f1f6;border-radius:5px;padding:3px 7px;vertical-align:middle;margin-left:5px}.table-primary{display:block;font-size:11px;color:#2e5870;font-weight:600}.table-secondary{display:block;color:#8a9eab;font-size:10px;margin-top:3px}.source-label{color:#7c94a4;font-size:10px}.form-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding-top:6px}.form-footer p{font-size:10px;line-height:1.7;margin:0}.form-footer.field{margin-bottom:0}.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.info-grid h3{display:flex;align-items:center;gap:9px;font-size:13px;color:#456d84}.info-grid h3 .icon{width:17px;height:17px;color:#5c9dbb}.info-grid p{font-size:11px;line-height:1.85;color:#8198a7}.section-heading{margin:29px 0 19px}.section-heading h2{font-size:19px;margin:0 0 7px}.section-heading p{color:#839aa9;font-size:12px;margin:0}.featured-connections{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:27px}.connection-card h2{font-size:17px;margin-bottom:9px}.connection-card p.connection-meta{display:block;line-height:1.8}.instruction-list{padding-left:19px;font-size:12px;line-height:1.85;color:#6c899d;margin:0 0 23px}.instruction-list li{padding-left:3px;margin:0 0 13px}.instruction-list+p{font-size:11px;line-height:1.8;color:#8aa0ae}.connection-grid>.panel.panel-body{margin:0}.connection-grid>.panel.panel-body .connection-icon{margin-bottom:20px}.connection-grid>.panel.panel-body h2{font-size:16px;margin-bottom:12px}.connection-grid>.panel.panel-body p{font-size:11px;line-height:1.85;color:#8298a8}.settings-list{margin:0}.settings-list>div{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #edf2f5;padding:16px 0;font-size:11px}.settings-list>div:first-child{padding-top:0}.settings-list>div:last-child{padding-bottom:0;border-bottom:0}.settings-list dt{font-weight:550;color:#587b91}.settings-list dd{margin:0;color:#8a9eac;text-align:right}.app-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);margin-top:30px;padding-top:18px;color:#94a6b2;font-size:9px;gap:15px}.upload-zone h2{font-size:19px;margin:0 0 10px;color:#3b657c}.upload-zone label.btn{margin-bottom:17px}.upload-zone .upload-hint{font-size:10px;margin:17px 0 0;color:#90a6b4}
@media(max-width:980px){.welcome-panel{gap:28px;padding:25px}.welcome-panel h2{font-size:23px}.welcome-panel>div>p{font-size:11px}.setup-steps small{font-size:9px}.setup-steps strong{font-size:10px}.info-grid{gap:17px}.featured-connections{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.icon-button.mobile-menu{display:inline-flex}.sidebar-open .sidebar-backdrop{display:block;position:fixed;inset:0;border:0;padding:0;border-radius:0;background:#0a192f66;z-index:35;backdrop-filter:blur(2px)}.welcome-panel{grid-template-columns:1fr;gap:25px;padding:25px}.welcome-panel h2{font-size:24px;max-width:380px}.welcome-panel .setup-steps{gap:15px;border-top:1px solid #dbe9f0;padding-top:21px}.setup-steps strong{font-size:11px}.setup-steps small{font-size:10px}.info-grid{grid-template-columns:1fr;gap:0}.settings-list>div{align-items:flex-start;font-size:10px}.settings-list dd{max-width:56%;font-size:10px}.settings-list .text-link{font-size:10px}.app-footer{font-size:8px;margin-top:24px}.form-footer{gap:15px}.form-footer .btn{min-height:40px}.topbar-start{gap:8px}.section-heading p{font-size:11px}html:not(.js) .sidebar{position:static;transform:none;width:auto;box-shadow:none;padding:15px;border-bottom:1px solid var(--line)}html:not(.js) .sidebar-brand{padding:0;margin:0;border:0}html:not(.js) .sidebar-brand img{width:85px;height:auto}html:not(.js) .sidebar nav{flex-direction:row;overflow:auto;margin-top:15px}html:not(.js) .sidebar .nav-item{white-space:nowrap;padding:9px 10px;font-size:10px}html:not(.js) .sidebar-label,html:not(.js) .sidebar-bottom{display:none}html:not(.js) .mobile-menu{display:none}}
@media(max-width:480px){.featured-connections{grid-template-columns:1fr}.app-footer{flex-wrap:wrap;gap:7px}.welcome-panel{padding:23px}.welcome-panel h2{font-size:23px}.table-footer .page-actions{width:auto}.form-footer>button{width:100%}}
/* Legible financial data: secondary text keeps contrast on white and pale CBS surfaces. */
:root{--muted:#5c7081}.page-header p,.page-heading p,.stat-label,.metric-label,.stat-meta,.metric-note,.panel-header p,.section-header p,.section-heading p,.table-secondary,.data-table td small,.data-table th,.table-footer,.source-label,.profile-role,.breadcrumb,.sidebar-caption,.sidebar-label,.sidebar-brand span,.sidebar-footer,.sidebar-note,.sidebar-note small,.sidebar-help,.connection-description,.connection-meta,.connection-footer p,.field small,.field-hint,.empty-state p,.empty p,.upload-zone p,.upload-zone .upload-hint,.settings-item p,.settings-list dd,.page-footer,.app-footer,.welcome-panel>div>p,.setup-steps small,.channel-list small,.dashboard-grid .panel-body>p,.info-grid p,.connection-grid>.panel.panel-body p,.instruction-list+p,.detail-list dt,.extraction-status,.form-footer p,.setup-banner p,.login-form>.muted.small{color:#5c7081}.page-header .eyebrow,.page-heading .eyebrow{color:var(--blue-dark)}.eyebrow{color:var(--blue-dark)}.login-brand .eyebrow{color:#6fbbd7}.login-form .eyebrow{color:var(--blue-dark)}.btn.primary,.button.primary{background:#0d759f;border-color:#0d759f}.btn.primary:hover,.button.primary:hover{background:#0b5d7e;border-color:#0b5d7e}.badge.warning,.badge.review,.badge.pending,.badge.needs_review{color:#856018}.badge.neutral,.badge.muted,.badge.draft,.badge.disabled{color:#5c7081}.badge.danger,.badge.error,.badge.failed{color:#9b5149}.stat-label,.metric-label{font-size:12px}.stat-meta,.metric-note,.sidebar-note,.sidebar-note small,.table-secondary,.source-label,.data-table td small,.field small,.field-hint,.table-footer,.app-footer,.page-footer,.profile-role,.setup-steps small,.channel-list small{font-size:11px}.data-table,.data-table td strong,.data-table .supplier-name,.table-primary{font-size:12px}.data-table th{font-size:10px}.connection-description,.connection-meta,.connection-footer p,.info-grid p,.connection-grid>.panel.panel-body p,.instruction-list+p{font-size:12px}.connection-card .badge,.badge{font-size:10px}.login-form>p,.page-header>div>p:not(.eyebrow),.page-heading>div>p:not(.eyebrow){font-size:13px}.empty-state p,.empty p,.form-footer p{font-size:12px}.field label{font-size:12px}
.table-wrap{position:relative}.login-form>p,.btn.ghost,.button.ghost,.connection-meta dd,.activity-item small{color:#5c7081}input::placeholder,textarea::placeholder{color:#607383}.invoice-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding-top:19px;padding-bottom:19px}.invoice-toolbar .filter-row{display:flex;align-items:flex-end;gap:12px;width:100%;min-width:0}.invoice-toolbar .search-field{flex:1;max-width:none;min-width:200px;flex-basis:auto}.invoice-toolbar .filter-row-main>.filter-control{flex:0 1 185px;min-width:140px}.invoice-toolbar .filter-control{flex:1 1 0;min-width:0}.invoice-toolbar .filter-control label{display:block;font-size:11px;color:#5c7081;font-weight:500;margin:0 0 6px}.invoice-toolbar .filter-control .sr-only{position:absolute;margin:-1px}.invoice-toolbar input,.invoice-toolbar select{width:100%;min-width:0;font-size:12px;min-height:39px;padding:9px 11px}.invoice-toolbar .search-field input{padding-left:35px}.invoice-toolbar .filter-submit{display:flex;gap:7px;align-items:center;flex:none}.invoice-toolbar .filter-submit .btn{min-height:39px}.invoice-toolbar .filter-row-details{padding-top:13px;border-top:1px solid #edf2f5}.invoice-toolbar .filter-row-details>.filter-control:first-child{flex:1.1 1 0}.invoice-toolbar .filter-row-details>.filter-control:not(:first-child){flex:1 1 0}
@media(max-width:980px){.invoice-toolbar .filter-row-main{flex-wrap:wrap}.invoice-toolbar .filter-row-main>.search-field{flex:1 0 100%;min-width:0}.invoice-toolbar .filter-row-main>.filter-control{flex:1 1 0;min-width:0}.invoice-toolbar .filter-row-details{flex-wrap:wrap}.invoice-toolbar .filter-row-details>.filter-control:first-child{flex:1 0 100%}.invoice-toolbar .filter-row-details>.filter-control:not(:first-child){flex:1 1 calc(50% - 6px)}.invoice-toolbar .filter-submit{width:100%;justify-content:flex-end}.stat-label,.metric-label{font-size:11px}}
@media(max-width:760px){.invoice-toolbar{padding:16px 18px;gap:12px}.invoice-toolbar .filter-row{gap:10px}.invoice-toolbar .filter-control label{font-size:11px}.invoice-toolbar input,.invoice-toolbar select{min-height:41px;font-size:14px}.invoice-toolbar .filter-submit{justify-content:flex-start}.invoice-toolbar .filter-submit>.btn{flex:1}.data-table{min-width:690px}.table-footer .page-actions{width:auto}.stat-meta,.metric-note{font-size:10px}.connection-description,.connection-meta,.connection-footer p{font-size:12px}.connection-card .badge{font-size:10px}.sidebar-label{font-size:10px}.app-footer,.page-footer{font-size:10px}.page-header>div>p:not(.eyebrow),.page-heading>div>p:not(.eyebrow){font-size:12px}.settings-list>div,.settings-list dd,.settings-list .text-link{font-size:11px}.login-form>p{font-size:12px}}
@media(max-width:480px){.invoice-toolbar .filter-row-main>.filter-control{flex:1 0 100%}.invoice-toolbar .filter-row-details>.filter-control:not(:first-child){flex:1 1 calc(50% - 5px)}.invoice-toolbar input[type=date]{font-size:13px;padding:9px 7px}.stat-label,.metric-label{font-size:10px}.stat-top{gap:5px}.stat-top .stat-label{padding-right:0}.connection-card .badge{font-size:10px}}
.pdf-viewer{min-width:0;background:#eaf0f4}.pdf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 16px;background:#f8fbfd;border-bottom:1px solid #dbe5ec}.pdf-toolbar>span{font-size:11px;color:#5c7081;text-align:center}.pdf-surface{padding:18px;min-height:360px;max-height:800px;overflow:auto;position:relative}.pdf-surface canvas{display:block;width:100%;height:auto;background:#fff;box-shadow:0 2px 12px #17384d12}.pdf-status{padding:90px 25px;font-size:12px;line-height:1.9;color:#5c7081;text-align:center;margin:0}.pdf-error .pdf-status{color:#795d45}.pdf-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 16px;border-top:1px solid #dbe5ec;background:#fff;font-size:10px;color:#5c7081}.pdf-footer .text-link{font-size:10px}.pdf-viewer[aria-busy=true] .pdf-toolbar>span{color:#6b8292}@media(max-width:760px){.pdf-surface{min-height:270px;max-height:650px;padding:13px}.pdf-toolbar{padding:10px 12px}.pdf-toolbar .btn{font-size:10px;min-height:35px}.pdf-footer{padding:13px 12px;flex-wrap:wrap}.pdf-status{padding:65px 20px;font-size:12px}}
@media print{.sidebar,.topbar,.page-actions,.toolbar,.filters,.filter-tabs,.btn,.button,.page-footer,.app-footer,.sidebar-overlay,.sidebar-backdrop{display:none!important}.app-shell{display:block}.workspace{width:100%}.content,.page-content{padding:0;max-width:none}.panel,.stat-card,.metric,.connection-card{break-inside:avoid;box-shadow:none}.data-table{min-width:0;font-size:9px}.data-table th,.data-table td{padding:8px}body{background:white}.detail-layout,.detail-grid{display:block}.document-preview{display:none}}

/* Portal workspaces: readable controls, clear next actions, and responsive records.
   Scoped to the authenticated application so the existing CBS sign-in stays intact. */
.app-shell {
    font-size:14px;
    --muted:#536b7d;
    --line:#dce6ed;
    --surface-radius:12px;
}
.app-shell .content {padding:28px 32px 36px;max-width:1680px}
.app-shell .topbar {height:72px;padding:0 32px}
.app-shell .sidebar {padding-top:20px;padding-bottom:16px}
.app-shell .sidebar-brand {gap:8px;padding-bottom:17px;margin-bottom:15px}
.app-shell .sidebar-brand img {width:124px;height:68px}
.app-shell .sidebar-caption,.app-shell .sidebar-label {font-size:10px;color:#607587}
.app-shell .sidebar nav {gap:3px}
.app-shell .nav-item {font-size:13px;min-height:44px;padding:10px;gap:9px;border-radius:8px}
.app-shell .sidebar-bottom {padding-top:18px}
.app-shell .sidebar-note {padding:12px 10px;line-height:1.5}
.app-shell .sidebar-note small {line-height:1.5}
.app-shell .sidebar-bottom>.nav-item {margin-top:8px}
.app-shell .nav-item .icon {width:19px;height:19px}
.app-shell .nav-count {font-size:12px;padding:1px 7px;min-width:24px}
.app-shell .sidebar-note,.app-shell .sidebar-note small,.app-shell .sidebar-bottom>.nav-item {font-size:12px}
.app-shell .breadcrumb,.app-shell .profile-name {font-size:12px}
.app-shell .avatar {height:36px;width:36px;font-size:13px}
.app-shell .page-header {gap:20px;margin-bottom:24px}
.app-shell .page-header h1 {font-size:30px;font-weight:700;letter-spacing:-.04em;margin-bottom:8px}
.app-shell .page-header p:not(.eyebrow) {font-size:14px;color:var(--muted);line-height:1.6}
.app-shell .page-header .eyebrow {font-size:10px;letter-spacing:.12em;margin-bottom:8px}
.app-shell .page-actions {gap:8px}
.app-shell .btn,.app-shell .button {font-size:13px;min-height:44px;padding:10px 15px;border-radius:8px}
.app-shell .btn.small,.app-shell .button.small {font-size:12px;min-height:40px;padding:8px 12px}
.app-shell .btn.primary {background:var(--blue-dark);border-color:var(--blue-dark);box-shadow:0 2px 5px #0a192f0a}
.app-shell .btn.primary:hover {background:#084b66;border-color:#084b66}
.app-shell .btn .icon {height:18px;width:18px}
.app-shell .icon-button,.app-shell .icon-btn {height:44px;width:44px;flex:none}
.app-shell .text-link {font-size:13px;min-height:36px;line-height:1.5}
.app-shell .text-link .icon {width:17px;height:17px}
.app-shell a,.app-shell button,.app-shell summary {scroll-margin-top:24px}
.app-shell :focus-visible {outline:3px solid #1384b3;outline-offset:3px}
.app-shell .panel,.app-shell .connection-card {border-radius:var(--surface-radius);box-shadow:0 2px 4px #0a192f02}
.app-shell .panel-header {padding:20px 22px;gap:15px}
.app-shell .panel-header h2,.app-shell .panel-header h3 {font-size:17px;font-weight:650}
.app-shell .panel-header p {font-size:13px;line-height:1.6;color:var(--muted)}
.app-shell .panel-body {padding:22px}
.app-shell .small,.app-shell small {font-size:13px}
.app-shell .notice {font-size:14px;padding:15px 18px;margin-bottom:20px;line-height:1.65}
.app-shell .notice.info {background:#f0f7fa;color:#34576c;border-color:#d0e5ef}
.app-shell .notice.success {color:#256341}
.app-shell .badge {font-size:12px;padding:4px 8px;border-radius:6px;font-weight:550}
.app-shell .badge.review {color:#80590c;background:#fff5dc}
.app-shell .badge.approved,.app-shell .badge.connected {color:#2d6c4b;background:#edf8f1}
.app-shell .heading-count {font-size:14px;min-width:29px;padding:4px 8px;border-radius:7px}
.app-shell .section-heading {margin:30px 0 18px}
.app-shell .section-heading h2 {font-size:21px}
.app-shell .section-heading p {font-size:14px}
.app-shell .app-footer {font-size:12px;color:#607587;line-height:1.6}

/* The dashboard puts the next useful task ahead of supporting statistics. */
.focus-panel {
    display:flex;align-items:center;gap:20px;
    padding:25px 27px;margin-bottom:20px;
    border:1px solid #c9e2ed;border-radius:var(--surface-radius);
    background:linear-gradient(115deg,#edf7fb 0%,#f8fcfd 100%);
}
.focus-panel .focus-icon {display:flex;align-items:center;justify-content:center;flex:none;width:54px;height:54px;border-radius:13px;color:var(--blue-dark);background:#fff;border:1px solid #d5e8f1}
.focus-panel .focus-icon .icon {width:26px;height:26px}
.focus-panel .focus-copy {flex:1;min-width:0}
.focus-panel h2 {font-size:23px;line-height:1.25;letter-spacing:-.035em;margin:0 0 7px}
.focus-panel p {font-size:14px;color:#426378;line-height:1.6;margin:0;max-width:620px}
.focus-panel .focus-actions {display:flex;align-items:center;gap:10px;flex:none}
.focus-panel .eyebrow {font-size:10px;letter-spacing:.1em;margin-bottom:8px}
.app-shell .stats-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}
.app-shell .stat-card {padding:17px 18px 16px;border-radius:10px;display:flex;flex-direction:column;min-height:120px}
.app-shell .stat-top {margin-bottom:10px;gap:9px;align-items:flex-start}
.app-shell .stat-top .stat-label {font-size:13px;line-height:1.45;color:#4e6a7d;padding:0}
.app-shell .stat-top>.icon {width:18px;height:18px;margin-top:1px;color:#6f9db3}
.app-shell .stat-value,.app-shell .stat-top~.stat-value {font-size:29px;line-height:1.15;margin:0 0 7px;letter-spacing:-.045em}
.app-shell .stat-meta {font-size:12px;line-height:1.5;color:#607587}
.app-shell .dashboard-grid {grid-template-columns:minmax(0,1.85fr) minmax(280px,1fr);gap:20px;align-items:start}
.app-shell .dashboard-grid>.panel {margin-bottom:0}
.app-shell .channel-list {padding-top:3px;padding-bottom:3px}
.app-shell .channel-list>a {gap:12px;padding:18px 0}
.app-shell .channel-list strong {font-size:14px;color:#23465c;line-height:1.5;margin-bottom:3px}
.app-shell .channel-list small {font-size:13px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
.app-shell .channel-list .connection-icon {width:38px;height:38px}
.app-shell .channel-list>a>.icon {width:18px;height:18px}
.app-shell .dashboard-grid .panel-body>p {font-size:14px;line-height:1.7;color:var(--muted)}
.app-shell .welcome-panel {padding:27px;gap:30px}
.app-shell .welcome-panel>div>p,.app-shell .setup-steps small {font-size:13px;line-height:1.6}
.app-shell .setup-steps strong {font-size:14px}
.app-shell .welcome-panel .btn {font-size:13px;min-height:44px}

/* Search is always visible; secondary filters use a native disclosure. */
.app-shell .invoice-toolbar {display:block;padding:18px 22px}
.filter-search-row {display:flex;gap:10px;align-items:center;width:100%}
.app-shell .invoice-toolbar .filter-search-row .search-field {flex:1;min-width:0;max-width:none}
.app-shell .invoice-toolbar .filter-search-row .search-field input {min-width:0;width:100%}
.app-shell .invoice-toolbar input,.app-shell .invoice-toolbar select {font-size:14px;min-height:44px;padding:10px 12px}
.app-shell .invoice-toolbar .search-field input {padding-left:40px!important}
.app-shell .search-field>.icon {width:19px;height:19px;left:13px;color:#6e8899}
.filter-details {margin-top:12px;border-top:1px solid #e6edf2}
.filter-details>summary {font-size:13px;font-weight:600;color:var(--blue-dark);padding:12px 2px;min-height:44px;cursor:pointer;width:fit-content}
.filter-details>summary::marker,.invoice-details>summary::marker {color:var(--blue)}
.filter-details[open]>summary {margin-bottom:4px}
.filter-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;padding:3px 0 8px;align-items:end}
.filter-grid .filter-control {min-width:0}
.app-shell .filter-grid label {display:block;font-size:13px;font-weight:550;line-height:1.5;color:#415e73;margin:0 0 7px}
.filter-grid .filter-submit {display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1;margin-top:2px}
.filter-summary {font-size:13px;line-height:1.6;color:var(--muted);padding-top:10px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.filter-summary p {margin:0}
.filter-summary a {font-size:13px;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.app-shell .filter-tabs {gap:24px;padding:0 22px}
.app-shell .filter-tab {font-size:13px;min-height:46px;padding:13px 0}

/* A table on wide surfaces, a labelled record list when its own panel is narrow. */
.app-shell .table-wrap {container-type:inline-size}
.app-shell .data-table {font-size:13px;min-width:0}
.app-shell .data-table th {font-size:11px;font-weight:650;letter-spacing:.025em;padding:13px 15px;background:#f8fafc;color:#536b7d}
.app-shell .data-table td {padding:17px 15px;line-height:1.55;color:#405f74}
.app-shell .data-table th:first-child,.app-shell .data-table td:first-child {padding-left:22px}
.app-shell .data-table th:last-child,.app-shell .data-table td:last-child {padding-right:22px}
.app-shell .table-primary,.app-shell .data-table td strong {font-size:14px;font-weight:600;color:#224b64;line-height:1.5}
.app-shell .table-secondary,.app-shell .source-label,.app-shell .data-table td small {font-size:12px;line-height:1.5;color:#607587;overflow-wrap:anywhere}
.app-shell .data-table .amount {font-size:14px;color:#173b53;font-weight:650}
.app-shell .data-table tbody tr:hover {background:#f8fbfd}
.invoice-open {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:7px 10px;font-size:13px;font-weight:600;border:1px solid #d8e6ee;border-radius:7px;background:#fff;white-space:nowrap}
.invoice-open:hover {text-decoration:none;background:#ecf6fb;border-color:#a9cedf}
.invoice-open .icon {width:16px;height:16px}
.app-shell .table-footer {font-size:13px;padding:16px 22px;flex-wrap:wrap}
.app-shell .pagination .btn {min-height:40px;font-size:13px;padding:8px 12px}
.app-shell .empty-state {padding:45px 25px;min-height:220px}
.app-shell .empty-state h3 {font-size:20px;margin-bottom:9px}
.app-shell .empty-state p {font-size:14px;line-height:1.7;color:var(--muted);max-width:450px}
@container (max-width:680px) {
    .app-shell .invoice-table {display:block;width:100%;min-width:0}
    .app-shell .invoice-table thead {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
    .app-shell .invoice-table tbody {display:block;padding:0 20px}
    .app-shell .invoice-table tbody tr {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;padding:15px 0;border-bottom:1px solid #e6edf2;align-items:start}
    .app-shell .invoice-table tbody tr:last-child {border-bottom:0}
    .app-shell .invoice-table tbody tr:hover {background:transparent}
    .app-shell .invoice-table td,.app-shell .invoice-table td:first-child,.app-shell .invoice-table td:last-child {display:block;min-width:0;padding:0;border:0;text-align:left;overflow-wrap:anywhere;white-space:normal}
    .app-shell .invoice-table td::before {content:attr(data-label);display:block;font-size:11px;line-height:1.5;font-weight:500;color:#63798a;margin-bottom:3px}
    .app-shell .invoice-table td:first-child {grid-column:1/-1;grid-row:1;padding-right:0}
    .app-shell .invoice-table td:first-child::before,.app-shell .invoice-table td:last-child::before {display:none}
    .app-shell .invoice-table td:first-child .table-primary {font-size:15px}
    .app-shell .invoice-table td:last-child {justify-self:end;align-self:start;grid-column:3;grid-row:1;padding-left:12px;background:linear-gradient(90deg,#ffffff00,#fff 12px)}
    .app-shell .invoice-table td:first-child {padding-right:105px;min-height:42px}
    .app-shell .invoice-table .invoice-open {min-height:40px;padding:7px 10px}
    .app-shell .invoice-table.compact tbody tr {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px}
}
@container (max-width:440px) {
    .app-shell .invoice-table tbody tr,.app-shell .invoice-table.compact tbody tr {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}
    .app-shell .invoice-table td:last-child {grid-column:2}
    .app-shell .invoice-table td:first-child .table-primary {font-size:14px}
}

/* Connection health and provider search stay understandable at every width. */
.app-shell .connection-grid {gap:18px}
.app-shell .connection-card {padding:21px 21px 0}
.app-shell .connection-card h3,.app-shell .connection-title {font-size:16px;line-height:1.4;color:#23485f}
.app-shell .connection-card h2 {font-size:19px;line-height:1.4}
.app-shell .connection-top {margin-bottom:14px;align-items:flex-start;gap:10px;flex-wrap:wrap}
.app-shell .connection-description,.app-shell .connection-meta,.app-shell .connection-footer p {font-size:13px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.app-shell .connection-meta {gap:7px 12px}
.app-shell .connection-meta dd {color:#36586e}
.app-shell .connection-footer {padding:15px 0;gap:10px;flex-wrap:wrap}
.app-shell .connection-footer .btn {font-size:13px;min-height:42px;padding:9px 12px}
.app-shell .connection-card .badge {font-size:12px;max-width:100%;white-space:normal}
.connection-summary {padding:17px 0;border-bottom:1px solid #e6edf2;display:flex;gap:14px;align-items:center;justify-content:space-between}
.connection-summary:first-child {padding-top:0}
.connection-summary:last-child {border-bottom:0;padding-bottom:0}
.connection-summary strong {font-size:14px;color:#294d65;display:block;line-height:1.5}
.connection-summary p,.connection-summary small {font-size:13px;color:var(--muted);line-height:1.6;margin:4px 0 0;overflow-wrap:anywhere}
.connection-summary .connection-meta {display:block;margin:5px 0 0}
.connection-summary .page-actions {flex:none;gap:8px}
.catalog-tools {display:flex;gap:16px;align-items:center;justify-content:space-between;margin:0 0 19px}
.catalog-tools .search-field {width:100%;max-width:480px}
.catalog-tools .search-field input {padding-left:40px!important;min-height:46px;background:#fff}
.catalog-tools p,.catalog-tools small {font-size:13px;color:var(--muted);margin:0}
.app-shell .instruction-list {font-size:14px;line-height:1.75}
.app-shell .instruction-list+p,.app-shell .connection-grid>.panel.panel-body p {font-size:13px;line-height:1.7}

/* Grouped invoice review: essentials first, optional data behind disclosures. */
.app-shell input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
.app-shell select,.app-shell textarea {min-height:44px;font-size:14px;border-color:#cbdbe5;border-radius:7px;color:#23475e;padding:10px 12px}
.app-shell input::placeholder,.app-shell textarea::placeholder {color:#687f8f}
.app-shell input:not([type=hidden]):not([type=checkbox]):not([type=radio]):focus,
.app-shell select:focus,.app-shell textarea:focus {border-color:#1384b3;box-shadow:0 0 0 3px #1384b31a}
.app-shell .field label,.app-shell label.field-label {font-size:13px;line-height:1.5;color:#36566c;font-weight:550;margin-bottom:7px}
.app-shell .field small,.app-shell .field-hint {font-size:12px;line-height:1.6;color:#607587}
.app-shell .field {margin-bottom:18px}
.app-shell .form-grid {gap:0 18px}
.app-shell .form-footer p,.app-shell .info-grid p,.app-shell .settings-list>div,.app-shell .settings-list dd,.app-shell .settings-list .text-link {font-size:13px;line-height:1.65}
.app-shell .info-grid h3 {font-size:16px}
.app-shell .upload-zone {padding:36px 25px;border-radius:12px}
.app-shell .upload-zone h2 {font-size:22px}
.app-shell .upload-zone p,.app-shell .upload-zone [data-file-summary] {font-size:14px;line-height:1.7}
.app-shell .upload-zone .upload-hint {font-size:13px}
.app-shell .upload-zone input[type=file] {font-size:13px}
.app-shell .upload-zone input[type=file]::file-selector-button {font-size:13px;padding:8px 10px}
.app-shell .detail-layout {grid-template-columns:minmax(0,1fr) minmax(410px,1fr);gap:22px;align-items:start}
.detail-jump-nav {display:flex;gap:10px;margin:-7px 0 20px;flex-wrap:wrap}
.detail-jump-nav a {display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #d4e3ec;border-radius:7px;font-size:13px;min-height:42px;background:#fff;font-weight:600}
.detail-jump-nav a:hover {text-decoration:none;background:#edf7fb}
.app-shell .document-preview {position:sticky;top:20px;border-radius:12px;scroll-margin-top:20px}
.app-shell .detail-fields {order:0;scroll-margin-top:20px;overflow:visible}
.app-shell .detail-fields .panel {overflow:visible}
.app-shell .detail-fields .panel-header {padding:20px 22px}
.app-shell .preview-toolbar {padding:14px 18px;font-size:13px}
.app-shell .pdf-toolbar {padding:10px 14px;gap:10px}
.app-shell .pdf-toolbar>span {font-size:13px}
.app-shell .pdf-toolbar .btn {font-size:12px;min-height:40px;padding:8px 10px}
.app-shell .pdf-surface {padding:18px;max-height:calc(100vh - 220px);min-height:300px}
.app-shell .pdf-status {font-size:14px;line-height:1.75;padding:70px 20px}
.app-shell .pdf-footer {font-size:12px;padding:12px 16px;flex-wrap:wrap}
.app-shell .pdf-footer .text-link {font-size:13px}
.app-shell .document-preview .preview-image {max-height:calc(100vh - 180px);padding:18px}
.app-shell .document-preview .empty-state {min-height:300px}
.invoice-edit-form {padding:0}
.invoice-fieldset {padding:22px 22px 4px;border:0;margin:0;border-bottom:1px solid #e5edf2;min-width:0}
.invoice-fieldset>legend {display:flex;align-items:center;gap:10px;float:left;width:100%;font-size:16px;line-height:1.4;letter-spacing:-.02em;color:#153d55;font-weight:650;padding:0;margin:0 0 19px}
.invoice-fieldset>legend+.form-grid,.invoice-fieldset>legend+.field {clear:both}
.section-step {display:inline-flex;align-items:center;justify-content:center;flex:none;width:27px;height:27px;border-radius:8px;background:#edf6fa;color:var(--blue-dark);font-size:12px;font-weight:650;letter-spacing:0}
.required-hint {font-size:11px;font-weight:400;color:#607587;margin-left:5px;white-space:nowrap}
.amount-total {padding:13px;background:#f2f8fb;border:1px solid #d7e8f1;border-radius:8px}
.amount-total label {color:#214f68!important}
.amount-total input {font-weight:650;font-variant-numeric:tabular-nums}
.invoice-details {margin:0;border-bottom:1px solid #e5edf2}
.invoice-details>summary {cursor:pointer;font-size:14px;font-weight:600;color:#365970;padding:19px 22px;line-height:1.5;min-height:58px}
.invoice-details>summary:hover {background:#f8fbfd}
.invoice-details .details-caption {display:block;font-size:12px;font-weight:400;line-height:1.55;color:#63798a;margin:5px 0 0 17px}
.invoice-details[open]>summary {border-bottom:1px solid #edf2f5;background:#f8fbfd}
.invoice-details .details-content {padding:22px 22px 5px}
.app-shell .review-completeness {font-size:13px;margin:20px 22px 0;display:flex;align-items:flex-start;gap:9px}
.review-completeness>.icon {margin-top:2px;flex:none}
.review-completeness p {margin-bottom:8px}
.review-completeness ul {margin:7px 0 0;padding-left:22px;display:flex;flex-wrap:wrap;gap:3px 25px}
.review-completeness a {font-weight:550;text-decoration:underline;text-underline-offset:3px}
.invoice-actions {position:sticky;bottom:12px;z-index:5;display:flex;flex-direction:column;gap:13px;padding:17px 20px;margin:0;background:#fff;border-top:1px solid #d7e4ed;border-radius:0 0 12px 12px;box-shadow:0 -6px 18px #0a192f08}
.invoice-actions-copy {font-size:12px;line-height:1.5;color:#607587;display:flex;gap:6px 15px;justify-content:space-between;flex-wrap:wrap}
.invoice-actions-copy strong {font-size:13px;color:#365970;font-weight:600}
.invoice-actions-buttons {display:flex;justify-content:flex-end;align-items:center;gap:9px;flex-wrap:wrap}
.app-shell .invoice-actions-buttons .btn {font-size:12px;white-space:normal;text-align:center;min-height:44px}

@media(min-width:1201px) {
    .detail-jump-nav {display:none}
}
@media(min-width:1500px) {
    .app-shell .content {padding:34px 40px 40px}
    .app-shell .topbar {padding:0 40px}
    .app-shell .detail-layout {grid-template-columns:minmax(0,1.15fr) minmax(440px,1fr)}
    .invoice-actions-buttons .btn {font-size:13px}
}
@media(max-width:1200px) {
    .app-shell .content {padding:26px 24px 32px}
    .app-shell .topbar {padding:0 24px}
    .app-shell .dashboard-grid {grid-template-columns:minmax(0,1fr)}
    .app-shell .dashboard-grid>.panel {margin-bottom:0}
    .app-shell .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
    .app-shell .stat-card {min-height:108px;padding:15px 18px}
    .app-shell .stat-top {margin-bottom:7px}
    .app-shell .stat-value {font-size:27px}
    .focus-panel {padding:20px 22px;gap:12px 16px;display:grid;grid-template-columns:44px minmax(0,1fr) auto}
    .focus-panel .focus-icon {width:44px;height:44px;grid-column:1;grid-row:1;align-self:start}
    .focus-panel .focus-copy {grid-column:2/-1;grid-row:1}
    .focus-panel h2 {font-size:21px;margin-bottom:5px}
    .focus-panel .focus-copy>.eyebrow {margin-bottom:5px;font-size:10px}
    .focus-panel .focus-copy>p:last-child {font-size:13px;line-height:1.5}
    .focus-panel>.btn {grid-column:2;grid-row:2;justify-self:start}
    .focus-panel .focus-actions {padding-left:70px}
    .app-shell .detail-layout {grid-template-columns:minmax(0,1fr)}
    .app-shell .document-preview {position:static;max-width:100%}
    .app-shell .pdf-surface {max-height:360px;min-height:240px}
    .app-shell .document-preview .preview-image {max-height:360px}
    .app-shell .document-preview>img {max-height:360px;object-fit:contain}
    .app-shell .document-preview iframe,.app-shell .document-preview object,.app-shell .document-preview embed {height:360px}
    .app-shell .document-preview .empty-state {min-height:230px;padding:25px}
    .app-shell .detail-fields {order:0}
    .invoice-actions {bottom:10px}
}
@media(min-width:761px) and (max-width:1200px) {
    .focus-panel {grid-template-columns:44px minmax(0,1fr) auto;gap:15px;padding:21px}
    .focus-panel .focus-copy {grid-column:2;grid-row:1}
    .focus-panel .focus-copy>.eyebrow {display:none}
    .focus-panel>.btn {grid-column:3;grid-row:1;align-self:center;justify-self:end;font-size:12px;padding:10px 12px}
    .focus-panel h2 {font-size:20px;line-height:1.3}
    .app-shell .stats-grid {gap:10px;margin-bottom:20px}
    .app-shell .stat-card {display:grid;grid-template-columns:43px minmax(0,1fr);grid-template-rows:auto auto;gap:3px 12px;min-height:78px;padding:13px 16px;align-content:center}
    .app-shell .stat-top {grid-column:2;grid-row:1;margin:0}
    .app-shell .stat-top>.icon {display:none}
    .app-shell .stat-top .stat-label {font-size:13px;line-height:1.4}
    .app-shell .stat-value,.app-shell .stat-top~.stat-value {grid-column:1;grid-row:1/3;margin:0;align-self:center;font-size:28px}
    .app-shell .stat-meta {grid-column:2;grid-row:2;font-size:12px;line-height:1.45}
}
@media(max-width:980px) {
    .app-shell .page-header {flex-wrap:wrap;gap:16px}
    .app-shell .page-header h1 {font-size:28px}
    .app-shell .page-header .page-actions {justify-content:flex-start}
    .filter-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
    .connection-summary {align-items:flex-start;flex-wrap:wrap}
    .connection-summary .page-actions {width:100%}
    .app-shell .featured-connections {grid-template-columns:1fr}
}
@media(max-width:760px) {
    .app-shell {font-size:14px}
    .app-shell .topbar {height:64px;padding:0 18px;gap:10px}
    .app-shell .content {padding:23px 18px 28px}
    .app-shell .breadcrumb {font-size:12px;gap:8px}
    .app-shell .topbar-start {gap:7px}
    .app-shell .topbar-actions {gap:3px}
    .app-shell .avatar {height:32px;width:32px;font-size:12px}
    .app-shell .sidebar {width:270px;padding:22px 18px}
    .app-shell .sidebar .nav-item {font-size:14px;min-height:48px}
    .app-shell .page-header {margin-bottom:20px}
    .app-shell .page-header h1 {font-size:27px}
    .app-shell .page-header p:not(.eyebrow) {font-size:14px}
    .app-shell .page-actions .btn {font-size:13px;min-height:44px;padding:10px 13px}
    .app-shell .stats-grid {gap:10px;margin-bottom:20px}
    .app-shell .stat-card {padding:15px;min-height:112px}
    .app-shell .stat-top .stat-label {font-size:12px}
    .app-shell .stat-value,.app-shell .stat-top~.stat-value {font-size:27px;margin-bottom:5px}
    .app-shell .stat-meta {font-size:12px}
    .app-shell .panel-header,.app-shell .panel-body {padding:18px}
    .app-shell .panel-header h2 {font-size:17px}
    .focus-panel {padding:20px;gap:13px;display:flex;flex-wrap:wrap}
    .focus-panel h2 {font-size:22px}
    .focus-panel p {font-size:14px}
    .focus-panel .focus-icon {width:44px;height:44px;border-radius:10px}
    .focus-panel .focus-copy {flex-basis:calc(100% - 60px)}
    .focus-panel .focus-actions {padding-left:57px}
    .focus-panel>.btn {margin-left:57px}
    .app-shell .invoice-toolbar {padding:16px 18px}
    .filter-search-row {gap:8px}
    .filter-search-row>.btn {padding-left:13px;padding-right:13px}
    .app-shell input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
    .app-shell select,.app-shell textarea {font-size:16px;min-height:46px}
    .app-shell .filter-grid input,.app-shell .filter-grid select {font-size:16px;min-height:46px}
    .filter-grid {gap:14px 12px}
    .app-shell .filter-grid label {font-size:13px}
    .app-shell .filter-details>summary {font-size:13px}
    .app-shell .table-footer {padding:15px 18px;font-size:13px;gap:13px}
    .app-shell .table-footer .page-actions {width:auto}
    .app-shell .connection-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
    .app-shell .connection-card {padding:19px 18px 0}
    .app-shell .featured-connections {grid-template-columns:1fr}
    .app-shell .connection-card .badge {font-size:12px}
    .catalog-tools {align-items:stretch;flex-direction:column;gap:8px}
    .catalog-tools .search-field {max-width:none}
    .app-shell .detail-layout {gap:19px}
    .app-shell .detail-fields .panel-header {padding:18px}
    .app-shell .review-completeness {margin:18px 18px 0}
    .invoice-fieldset {padding:20px 18px 3px}
    .invoice-fieldset>legend {font-size:16px;margin-bottom:18px}
    .invoice-details>summary {padding:18px}
    .invoice-details .details-content {padding:20px 18px 3px}
    .invoice-actions {padding:15px 18px;bottom:0}
    .invoice-actions-buttons {justify-content:stretch}
    .invoice-actions-buttons>.btn {flex:1}
    .app-shell .pdf-surface {padding:13px;max-height:320px;min-height:220px}
    .app-shell .pdf-toolbar>span {font-size:12px}
    .app-shell .pdf-footer {font-size:12px}
    .app-shell .app-footer {font-size:12px;flex-wrap:wrap}
    .app-shell .notice {font-size:13px}
    .app-shell .info-grid p,.app-shell .settings-list>div,.app-shell .settings-list dd {font-size:13px}
}
@media(max-width:480px) {
    .app-shell .content {padding:22px 14px 28px}
    .app-shell .topbar {padding:0 10px}
    .app-shell .topbar .avatar {display:none}
    .app-shell .page-header h1 {font-size:26px}
    .app-shell .page-header .page-actions {width:100%}
    .app-shell .page-header .page-actions>.btn {flex:1}
    .app-shell .stat-card {padding:14px 13px;min-height:112px}
    .app-shell .stat-top>.icon {width:16px;height:16px}
    .app-shell .stat-meta {font-size:12px;line-height:1.4}
    .focus-panel {padding:19px 17px;gap:12px}
    .focus-panel h2 {font-size:21px}
    .focus-panel .focus-icon {display:none}
    .focus-panel {grid-template-columns:minmax(0,1fr)}
    .focus-panel .focus-copy {flex-basis:100%;grid-column:1;grid-row:1}
    .focus-panel>.btn {grid-column:1;grid-row:2;width:100%}
    .focus-panel .focus-actions {padding:0;width:100%}
    .focus-panel .focus-actions>.btn {width:100%}
    .focus-panel>.btn {margin-left:0;width:100%}
    .app-shell .panel-header {gap:10px}
    .filter-search-row {flex-wrap:wrap}
    .app-shell .invoice-toolbar .filter-search-row .search-field {flex-basis:100%}
    .filter-search-row>.btn {width:100%}
    .filter-grid {grid-template-columns:1fr}
    .filter-grid .filter-submit>.btn {flex:1}
    .app-shell .connection-grid {grid-template-columns:1fr}
    .app-shell .connection-card {padding:21px 20px 0}
    .connection-summary .page-actions {width:100%}
    .connection-summary .page-actions>.btn {flex:1}
    .app-shell .form-grid,.app-shell .form-grid.three {grid-template-columns:1fr}
    .required-hint {font-size:11px;margin-left:4px}
    .invoice-actions-buttons {flex-direction:column;align-items:stretch}
    .invoice-actions-buttons>.btn {width:100%;min-height:44px}
    .invoice-actions-copy {font-size:12px}
    .detail-jump-nav {gap:8px}
    .detail-jump-nav a {flex:1;justify-content:center;font-size:12px;padding:9px}
    .app-shell .pdf-toolbar {flex-wrap:wrap;padding:10px}
    .app-shell .pdf-toolbar>span {flex:1}
    .app-shell .pdf-toolbar .btn {font-size:12px;padding:8px}
    .app-shell .table-footer .page-actions {width:100%}
    .app-shell .table-footer .page-actions>.btn {flex:1}
}
@media print {
    .focus-panel,.detail-jump-nav,.invoice-actions,.filter-details,.catalog-tools,.invoice-open {display:none!important}
    .app-shell .content {padding:0}
    .app-shell .data-table {font-size:10px}
    .app-shell .document-preview {display:none}
    .app-shell .detail-layout {display:block}
    .app-shell .panel {overflow:visible}
    .app-shell .invoice-table tbody tr {display:table-row}
    .app-shell .invoice-table {display:table;width:100%}
    .app-shell .invoice-table tbody {display:table-row-group;padding:0}
    .app-shell .invoice-table thead {display:table-header-group;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal}
    .app-shell .invoice-table td {display:table-cell;padding:8px!important}
    .app-shell .invoice-table td::before {display:none}
}
/* Invoice filters and permission-aware forms. */
.filter-grid.invoice-main-filters { margin-top: 16px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.filter-actions { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:16px; }
.invoice-permission-fields { border:0; padding:0; margin:0; min-width:0; }
.invoice-permission-fields:disabled input, .invoice-permission-fields:disabled textarea, .invoice-permission-fields:disabled select { opacity:1; color:var(--text,#183c50); background:#f5f8fa; cursor:default; -webkit-text-fill-color:currentColor; }
@media (max-width:1050px) { .filter-grid.invoice-main-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .filter-grid.invoice-main-filters { grid-template-columns:1fr; } }

/* Supplier learning controls and template overview. */
.invoice-learning {padding:23px 22px;border-top:1px solid #dce8f0;background:#f5fafd}
.invoice-learning h3 {font-size:16px;margin:0 0 8px;color:var(--navy,#0a192f)}
.invoice-learning>p {font-size:13px;line-height:1.65;margin:0 0 15px;color:#526e81}
.invoice-learning .learning-hint,.learning-hint {font-size:12px;line-height:1.65;color:#63798a}
.invoice-learning>.learning-hint:last-child {margin:15px 0 0}
.learning-choice {display:flex;align-items:flex-start;gap:10px;min-height:36px;line-height:1.5;font-size:13px;color:#365970;cursor:pointer;padding:7px 0}
.learning-choice input[type=checkbox] {width:17px;height:17px;margin-top:2px;flex:none}
.learning-choice input:focus-visible {outline:3px solid #1384b3;outline-offset:3px}
.learning-opt-in {font-weight:600;font-size:14px;margin:0 0 8px}
.learning-options {margin-top:15px;border:1px solid #dbe8f0;border-radius:8px;background:#fff}
.learning-options>summary {cursor:pointer;padding:14px 16px;min-height:48px;font-size:13px;font-weight:600;color:#365970}
.learning-options>summary::marker {color:var(--blue,#1384b3)}
.learning-options>summary:focus-visible {outline:3px solid #1384b3;outline-offset:2px;border-radius:8px}
.learning-options[open]>summary {border-bottom:1px solid #e5edf2}
.learning-fieldset {border:0;min-width:0;padding:16px;margin:0}
.learning-fieldset>legend {float:left;width:100%;padding:0 0 10px;font-size:12px;font-weight:600;color:#526e81}
.learning-choices {clear:both;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
.learning-choice span {min-width:0;overflow-wrap:anywhere}
.learning-supplier-marker {margin:0;padding:0 16px 16px}
.learning-optional {font-weight:400;color:#63798a}
.learning-result .panel-body>h3 {font-size:14px;margin:0 0 10px}
.learning-result .panel-body>h3:not(:first-child) {margin-top:22px}
.learning-field-list {margin:0 0 20px}
.learning-field-list>div {padding:11px 0;border-bottom:1px solid #e8eff3}
.learning-field-list>div:first-child {padding-top:0}
.learning-field-list dt {font-size:13px;font-weight:600;color:#365970;margin:0 0 4px}
.learning-field-list dd {font-size:13px;line-height:1.6;color:#63798a;margin:0;overflow-wrap:anywhere}
.learning-explanation p {margin:7px 0 0;line-height:1.65}
.learning-summary {font-size:13px;color:#63798a;margin:0 0 15px}
.learning-profile-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.learning-profile-grid .learning-profile {margin:0;min-width:0}
.learning-profile .panel-header {align-items:flex-start;flex-wrap:wrap}
.learning-profile .panel-header>div {min-width:0;flex:1}
.learning-profile .panel-header h2 {overflow-wrap:anywhere}
.learning-profile-actions {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}
.learning-profile-actions form {margin:0}
@media (max-width:1050px) {.learning-profile-grid {grid-template-columns:1fr}}
@media (max-width:760px) {.invoice-learning {padding:20px 18px}.learning-profile-grid {gap:16px}}
@media (max-width:480px) {.learning-choices {grid-template-columns:1fr}.learning-profile-actions {align-items:stretch;flex-direction:column}.learning-profile-actions form>.btn {width:100%}}
@media print {.invoice-learning,.learning-profile-actions form {display:none!important}}
