:root{--bg:#f6f7fb;--surface:#fff;--text:#182033;--muted:#788198;--line:#e8eaf1;--primary:#5b5bd6;--primary-dark:#4747b7;--sidebar:#16192a;--success:#168a62;--success-bg:#eaf8f2;--danger:#d55454;--danger-bg:#fff0f0;--warning:#b07714;--warning-bg:#fff6df;--blue:#3d7fce;--shadow:0 8px 28px rgba(28,36,62,.06);--radius:18px}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Vazirmatn,IRANSans,Tahoma,Arial,sans-serif;color:var(--text);background:var(--bg);font-size:14px}a{text-decoration:none;color:inherit}button,input,select{font:inherit}.app-shell{min-height:100vh;display:flex}.sidebar{width:260px;background:var(--sidebar);color:#fff;position:fixed;right:0;top:0;bottom:0;padding:24px 18px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 28px}.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#7778f2,#5253c9);display:grid;place-items:center;color:#fff;font-weight:800;font-size:20px;box-shadow:0 8px 18px rgba(83,84,213,.35)}.brand-mark.large{width:48px;height:48px;border-radius:15px;font-size:25px}.brand strong{font-size:19px;display:block;letter-spacing:.5px}.brand span{font-size:11px;color:#9da4bf;display:block;margin-top:2px}.nav-menu{display:flex;flex-direction:column;gap:6px}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:12px;color:#aeb4c8;transition:.18s}.nav-item:hover{color:#fff;background:#20243a}.nav-item.active{color:#fff;background:linear-gradient(90deg,#5a5bd3,#4f50bd);box-shadow:0 8px 18px rgba(0,0,0,.15)}.nav-icon{width:23px;text-align:center;font-size:19px}.nav-caption{font-size:11px;color:#717991;padding:22px 14px 6px}.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding-top:18px}.mini-user,.user-cell{display:flex;align-items:center;gap:10px}.mini-user{padding:6px 3px 15px}.mini-user div,.user-cell div,.file-cell div{min-width:0}.mini-user strong,.mini-user span,.user-cell strong,.user-cell span,.file-cell strong,.file-cell span{display:block}.mini-user strong{font-size:12px}.mini-user span{font-size:10px;color:#8e96b1;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}.avatar{width:36px;height:36px;border-radius:11px;background:#2b304a;display:grid;place-items:center;color:#dfe2ff;font-weight:700}.logout-btn{width:100%;background:transparent;border:0;border-radius:10px;color:#9299b0;text-align:right;padding:10px;cursor:pointer}.logout-btn:hover{background:#20243a;color:#fff}.main-shell{margin-right:260px;min-height:100vh;width:calc(100% - 260px)}.topbar{height:92px;background:rgba(255,255,255,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 34px;gap:18px;position:sticky;top:0;z-index:20}.topbar h1{font-size:19px;margin:0 0 5px}.breadcrumb{font-size:11px;color:var(--muted)}.topbar .primary-btn{margin-right:auto}.content{padding:30px 34px 50px;max-width:1500px;margin:0 auto}.menu-toggle{display:none;background:none;border:0;font-size:23px}.primary-btn,.secondary-btn{border:0;border-radius:11px;padding:11px 18px;display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;font-weight:700}.primary-btn{background:var(--primary);color:#fff;box-shadow:0 7px 16px rgba(91,91,214,.18)}.primary-btn:hover{background:var(--primary-dark)}.primary-btn.compact{padding:9px 14px;font-size:12px}.primary-btn.full{width:100%;padding:13px}.secondary-btn{background:#fff;color:#4c5467;border:1px solid var(--line)}.secondary-btn:hover{background:#f8f9fb}.secondary-btn.small{padding:7px 11px;font-size:12px}.danger-link{background:none;border:0;color:var(--danger);cursor:pointer;padding:8px}.text-link,.back-link{color:var(--primary);font-weight:700;font-size:12px}.welcome-row,.page-actions{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.welcome-row h2,.page-actions h2{font-size:23px;margin:5px 0 7px}.muted{color:var(--muted);margin:0;line-height:1.8}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.4px;color:#b9bdf1;font-weight:800}.eyebrow.dark{color:var(--primary)}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:19px;display:flex;align-items:center;gap:15px;box-shadow:var(--shadow)}.stat-card>div span,.stat-card small{display:block;color:var(--muted)}.stat-card>div span{font-size:12px}.stat-card strong{display:block;font-size:22px;margin:5px 0 2px}.stat-card small{font-size:10px}.stat-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:18px}.stat-icon.purple{background:#eeeeff;color:#5858d2}.stat-icon.green{background:#e9f8f2;color:#168a62}.stat-icon.red{background:#fff0f0;color:#d55454}.stat-icon.blue{background:#edf5ff;color:#3d7fce}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card-head{padding:21px 23px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line)}.card-head h2,.card-head h3{margin:4px 0 5px;font-size:18px}.card-head h3{font-size:15px}.card-head p{margin:0;color:var(--muted);font-size:11px}.table-wrap{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;min-width:760px}.data-table th{padding:13px 18px;color:#8a91a3;font-weight:600;font-size:11px;text-align:right;background:#fafbfc;border-bottom:1px solid var(--line)}.data-table td{padding:14px 18px;border-bottom:1px solid #f0f1f5;color:#50586c;font-size:12px}.data-table tbody tr:hover{background:#fbfbfd}.file-cell{display:flex;align-items:center;gap:11px}.file-icon{width:34px;height:38px;border-radius:9px;background:#eaf8f2;color:#15815c;display:grid;place-items:center;font-weight:900}.file-cell strong{color:var(--text);font-size:12px;max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-cell span{font-size:9px;color:#9ca2b2;margin-top:3px}.status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:800}.status.ready{background:var(--success-bg);color:var(--success)}.status.failed{background:var(--danger-bg);color:var(--danger)}.status.processing{background:var(--warning-bg);color:var(--warning)}.status.large{padding:8px 13px;font-size:11px}.icon-btn{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center}.empty-inline{padding:32px;display:flex;align-items:center;justify-content:center;gap:14px}.empty-inline>span{font-size:25px;color:#aab0c0}.empty-inline strong{display:block}.empty-inline p{margin:4px 0;color:var(--muted)}.empty-inline .secondary-btn{margin-right:20px}.alert{padding:12px 16px;border-radius:11px;margin-bottom:18px;border:1px solid}.alert.success{background:var(--success-bg);color:#146f52;border-color:#cdeee2}.alert.error{background:var(--danger-bg);color:#ae3f3f;border-color:#ffd7d7}.table-card{overflow:hidden}.table-toolbar{padding:15px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.search-box{width:min(370px,70%);border:1px solid var(--line);background:#fafbfc;border-radius:10px;display:flex;align-items:center;padding:0 11px}.search-box input{width:100%;border:0;outline:0;background:transparent;padding:9px;color:var(--text)}.toolbar-note{color:var(--muted);font-size:11px}.row-actions{display:flex;align-items:center;gap:5px}.empty-state{text-align:center;padding:70px 25px}.empty-state.compact{border:0;box-shadow:none}.empty-icon{width:60px;height:60px;border-radius:18px;background:#f1f1ff;color:var(--primary);font-size:24px;display:grid;place-items:center;margin:0 auto 15px}.empty-state h2,.empty-state h3{margin:0 0 8px}.empty-state p{color:var(--muted);margin:0 0 18px}.upload-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(290px,1fr);gap:18px}.upload-card{overflow:hidden}.form-stack{padding:22px;display:flex;flex-direction:column;gap:16px}.dropzone{min-height:280px;border:1.5px dashed #c9cce0;border-radius:16px;background:#fbfbfe;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;cursor:pointer;transition:.2s}.dropzone.dragging,.dropzone:hover{border-color:var(--primary);background:#f7f7ff}.dropzone input{display:none}.dropzone strong{font-size:14px;margin:12px 0 7px}.dropzone>span{color:var(--muted);font-size:11px}.drop-icon{width:54px;height:54px;border-radius:16px;background:#ededff;color:var(--primary)!important;display:grid!important;place-items:center;font-size:26px!important}.selected-file{margin-top:18px;padding:9px 13px;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--text);font-size:11px}.form-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:4px}.info-panel{padding:23px;height:max-content}.info-panel h3{margin:0 0 8px}.info-panel p{color:var(--muted);font-size:11px;line-height:1.8}.sheet-mini-list{display:flex;flex-wrap:wrap;gap:7px;margin:17px 0}.sheet-mini-list span,.header-chips span{background:#f3f4f8;border:1px solid #eceef3;border-radius:8px;padding:6px 9px;color:#555e72;font-size:10px}.tip{border-radius:12px;background:#f4f4ff;padding:13px;color:#5556bf;display:flex;flex-direction:column;gap:5px}.tip span{font-size:10px;line-height:1.7}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:11px;font-weight:800;color:#50586b}.field input,.field select{height:43px;border:1px solid #dfe1e8;border-radius:10px;padding:0 12px;background:#fff;outline:0;color:var(--text)}.field input:focus,.field select:focus{border-color:#8b8ce4;box-shadow:0 0 0 3px rgba(91,91,214,.08)}.field span,.field-error{color:var(--danger);font-size:10px}.validation-summary{color:var(--danger);font-size:11px}.validation-summary ul{margin:0;padding-right:18px}.narrow-page{max-width:650px;margin:0 auto}.form-card{overflow:hidden}.switch-row{display:flex;align-items:center;gap:11px;padding:12px;background:#fafbfc;border-radius:12px;cursor:pointer}.switch-row input{display:none}.switch{width:40px;height:23px;border-radius:20px;background:#cfd3dd;position:relative;transition:.2s}.switch:after{content:"";position:absolute;width:17px;height:17px;right:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}.switch-row input:checked+.switch{background:var(--primary)}.switch-row input:checked+.switch:after{right:20px}.switch-row div strong,.switch-row div small{display:block}.switch-row div small{font-size:10px;color:var(--muted);margin-top:2px}.user-cell strong{color:var(--text);font-size:12px}.user-cell span{color:var(--muted);font-size:10px;margin-top:2px}.table-avatar{width:34px;height:34px;background:#efeffe;color:var(--primary)}.role-badge{background:#f2f3f7;color:#636b7f;border-radius:7px;padding:5px 8px;font-size:10px}.summary-strip{background:#fff;border:1px solid var(--line);border-radius:var(--radius);display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:22px;overflow:hidden}.summary-strip>div{padding:18px 22px;border-left:1px solid var(--line)}.summary-strip>div:last-child{border-left:0}.summary-strip span,.summary-strip strong{display:block}.summary-strip span{color:var(--muted);font-size:10px}.summary-strip strong{font-size:19px;margin-top:5px}.section-head{margin:25px 0 12px}.section-head h3{margin:0 0 4px}.section-head p{margin:0;color:var(--muted);font-size:11px}.sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sheet-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;box-shadow:0 5px 16px rgba(28,36,62,.035)}.sheet-card-head{display:flex;gap:11px;align-items:center}.sheet-symbol{width:40px;height:40px;border-radius:11px;background:#eaf8f2;color:#168a62;display:grid;place-items:center;font-size:17px}.sheet-card h4{margin:0 0 4px}.sheet-card-head span{font-size:10px;color:var(--muted)}.sheet-meta{display:flex;gap:12px;margin:13px 0;color:#8a91a3;font-size:9px}.header-chips{display:flex;flex-wrap:wrap;gap:5px}.header-chips .more{background:#ededff;color:var(--primary)}.file-title{margin:7px 0!important;word-break:break-word}.back-link{display:inline-block;margin-bottom:2px}.login-page{background:#fff}.login-shell{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}.login-visual{background:radial-gradient(circle at 18% 18%,rgba(104,105,229,.35),transparent 28%),linear-gradient(145deg,#171a31,#22264a 62%,#292d56);color:#fff;padding:48px 7vw;display:flex;flex-direction:column;position:relative;overflow:hidden}.login-visual:after{content:"";width:340px;height:340px;border:1px solid rgba(255,255,255,.06);border-radius:50%;position:absolute;left:-100px;bottom:-100px;box-shadow:0 0 0 70px rgba(255,255,255,.018),0 0 0 140px rgba(255,255,255,.012)}.login-brand{display:flex;align-items:center;gap:12px;font-size:22px;letter-spacing:1px}.login-copy{margin:auto 0;max-width:560px;position:relative;z-index:2}.login-copy h1{font-size:38px;line-height:1.55;margin:12px 0 16px}.login-copy p{color:#b8bdd5;font-size:14px;line-height:2}.visual-card{position:relative;z-index:2;width:min(520px,90%);background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);border-radius:17px;padding:17px 20px;display:flex;align-items:center;gap:18px;backdrop-filter:blur(8px)}.visual-card strong,.visual-card span{display:block}.visual-card span{font-size:10px;color:#aeb5d2;margin-top:4px}.visual-chart{height:48px;display:flex;align-items:flex-end;gap:4px}.visual-chart i{width:6px;border-radius:3px;background:#8586ed;height:24%}.visual-chart i:nth-child(2){height:48%}.visual-chart i:nth-child(3){height:38%}.visual-chart i:nth-child(4){height:70%}.visual-chart i:nth-child(5){height:56%}.visual-chart i:nth-child(6){height:90%}.login-form-wrap{display:grid;place-items:center;padding:35px;background:#fbfbfd}.login-form-card{width:min(420px,100%)}.login-form-card h2{font-size:28px;margin:7px 0 4px}.login-form-card>.muted{margin-bottom:20px}.login-form-card .form-stack{padding:0;margin-top:24px}.password-wrap{display:flex;border:1px solid #dfe1e8;border-radius:10px;overflow:hidden}.password-wrap input{border:0!important;border-radius:0!important;flex:1}.password-wrap button{border:0;background:#f7f8fa;color:#777f91;padding:0 12px;cursor:pointer;font-size:10px}.check-row{display:flex;align-items:center;gap:7px;font-size:11px;color:#61697b}.login-note{text-align:center;color:#9aa1b1;font-size:10px;margin-top:20px}.mobile-brand{display:none}.sidebar-overlay{display:none}.field input[type=password]{direction:ltr}.field input[dir=ltr]{text-align:left}.form-stack select{cursor:pointer}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.upload-layout{grid-template-columns:1fr}.sheet-grid{grid-template-columns:1fr}.login-copy h1{font-size:31px}}
@media(max-width:820px){.sidebar{transform:translateX(100%);transition:.25s}.sidebar.open{transform:translateX(0)}.sidebar-overlay{display:block;position:fixed;inset:0;background:rgba(16,19,32,.38);opacity:0;pointer-events:none;transition:.2s;z-index:25}.sidebar-overlay.open{opacity:1;pointer-events:auto}.main-shell{margin-right:0;width:100%}.menu-toggle{display:block}.topbar{height:78px;padding:0 18px}.topbar .breadcrumb{display:none}.content{padding:22px 16px 35px}.login-shell{grid-template-columns:1fr}.login-visual{display:none}.login-form-wrap{min-height:100vh;padding:25px}.mobile-brand{display:flex;align-items:center;gap:10px;margin-bottom:50px}.welcome-row,.page-actions{align-items:flex-start;flex-direction:column}.welcome-row .primary-btn,.page-actions .primary-btn{align-self:stretch}.summary-strip{grid-template-columns:1fr}.summary-strip>div{border-left:0;border-bottom:1px solid var(--line)}.summary-strip>div:last-child{border-bottom:0}}
@media(max-width:540px){.stats-grid{grid-template-columns:1fr}.topbar>.primary-btn{display:none}.card-head{padding:18px}.form-stack{padding:18px}.dropzone{min-height:230px}.file-title{font-size:18px!important}.login-form-card h2{font-size:24px}.table-toolbar{align-items:stretch;gap:8px;flex-direction:column}.search-box{width:100%}}

.sheet-open{display:inline-flex;margin-top:14px;color:var(--primary);font-size:11px;font-weight:800}.sheet-data-card{overflow:hidden}.sheet-table-wrap{overflow:auto;max-height:68vh}.sheet-table{min-width:max-content}.sheet-table th,.sheet-table td{max-width:260px;min-width:125px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sheet-table thead th{position:sticky;top:0;z-index:3;background:#f8f9fc}.sheet-table .row-number{position:sticky;right:0;z-index:4;min-width:55px;max-width:55px;text-align:center;background:#fafbfc;color:#8a91a3}.sheet-table tbody .row-number{z-index:2}.pagination{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:18px}.pagination a,.pagination span{padding:8px 12px;border-radius:9px;border:1px solid var(--line);background:#fff;font-size:11px}.pagination a{color:var(--primary);font-weight:800}.page-size-select{display:flex;align-items:center;gap:5px;background:#fff;border:1px solid var(--line);padding:6px;border-radius:10px}.page-size-select span{font-size:10px;color:var(--muted);padding:0 6px}.page-size-select a{font-size:10px;padding:5px 8px;border-radius:7px}.page-size-select a.active{background:#ededff;color:var(--primary);font-weight:800}@media(max-width:820px){.sheet-page-head .page-size-select{align-self:stretch;justify-content:center}}

/* Kendo grids & search forms */
.filter-card{padding:16px 18px;margin-bottom:16px}.filter-form{display:grid;grid-template-columns:minmax(210px,1.5fr) repeat(4,minmax(135px,1fr)) auto;gap:12px;align-items:end}.filter-field{display:flex;flex-direction:column;gap:7px}.filter-field label{font-size:11px;font-weight:800;color:#50586b}.filter-field input,.filter-field select{height:40px;border:1px solid #dfe1e8;border-radius:9px;background:#fff;padding:0 11px;outline:0;color:var(--text)}.filter-field input:focus,.filter-field select:focus{border-color:#8b8ce4;box-shadow:0 0 0 3px rgba(91,91,214,.08)}.filter-actions{display:flex;gap:7px;align-items:center;white-space:nowrap}.kendo-card{padding:0;overflow:hidden}.hidden-form{display:none}.grid-delete-btn{border:0;background:transparent;cursor:pointer;font:inherit}.sheet-kendo-card{direction:rtl}.k-grid{border:0!important;font-family:inherit!important}.k-grid .k-grid-header{background:#f8f9fc}.k-grid th.k-header{font-weight:800;color:#555e72;font-size:11px}.k-grid td{font-size:11px;color:#555e72;border-color:#eef0f5}.k-grid tr:hover td{background:#fafaff}.k-grid .k-pager-wrap{border-color:#eceef3;background:#fff}.k-grid .k-link,.k-grid .k-pager-info{font-family:inherit}.k-grid .k-state-selected{background:var(--primary)!important;border-color:var(--primary)!important}.k-grid-content{min-height:180px}.pdp-default{z-index:10050!important}.pdp-blue{z-index:10050!important}.datetimepicker{direction:ltr;text-align:center}.k-grid .file-cell{min-width:220px}.k-grid .row-actions{white-space:nowrap}.k-grid .status{display:inline-flex}
@media(max-width:1100px){.filter-form{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:650px){.filter-form{grid-template-columns:1fr}.filter-actions{grid-column:auto;flex-direction:column;align-items:stretch}.filter-actions>*{width:100%}.k-grid{font-size:11px}}
/* Kendo icon fallbacks: project intentionally does not redistribute Kendo font files. */
.k-pager-wrap .k-icon:before,.k-grid-header .k-icon:before{font-family:Tahoma,Arial,sans-serif!important;font-size:13px!important}.k-i-arrow-60-left:before,.k-i-arrow-w:before{content:"‹"!important}.k-i-arrow-60-right:before,.k-i-arrow-e:before{content:"›"!important}.k-i-arrow-end-left:before,.k-i-seek-w:before{content:"|‹"!important;font-size:10px!important}.k-i-arrow-end-right:before,.k-i-seek-e:before{content:"›|"!important;font-size:10px!important}.k-i-refresh:before,.k-i-reload:before{content:"↻"!important}.k-i-sort-asc-sm:before,.k-i-sort-asc:before{content:"↑"!important}.k-i-sort-desc-sm:before,.k-i-sort-desc:before{content:"↓"!important}

/* Administration */
.report-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0 24px}.report-stat{padding:18px 20px;display:grid;gap:3px}.report-stat span{color:var(--muted);font-size:11px}.report-stat strong{font-size:20px;direction:ltr;text-align:right}.report-stat small{color:var(--muted);font-size:9px}.report-section-head{display:flex;align-items:end;justify-content:space-between}.report-section-head h3{margin:0 0 3px}.report-section-head p{margin:0}@media(max-width:800px){.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.report-summary{grid-template-columns:1fr}}

/* Administration */
.form-card{padding:24px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-field{display:flex;flex-direction:column;gap:7px}.form-field label{font-weight:700}.form-field input,.form-field select{min-height:42px;border:1px solid #dce2ea;border-radius:8px;padding:8px 11px;background:#fff}.form-field span.field-validation-error,.validation-summary{color:#b42318;font-size:13px}.checkbox-field{justify-content:end}.checkbox-field label{display:flex;align-items:center;gap:8px}.checkbox-field input{min-height:auto}.form-actions{display:flex;gap:10px;margin-top:22px}.permission-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.permission-card{padding:18px}.permission-card h3{margin:0 0 12px}.permission-item{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #eef1f5;cursor:pointer}.permission-item:last-child{border-bottom:0}.permission-item input{margin-top:5px}.permission-item span{display:flex;flex-direction:column;gap:2px}.permission-item small{direction:ltr;text-align:left;color:#667085}.sticky-actions{position:sticky;bottom:0;padding:14px 0;background:linear-gradient(transparent,#f7f8fa 30%)}
@media(max-width:800px){.form-grid,.permission-layout{grid-template-columns:1fr}}

/* ========================================================================== 
   TFA design system refresh
   Shared visual language for every MVC view and third-party Kendo surface.
   ========================================================================== */
:root {
    --bg: #f3f5fa;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --surface-tint: #f5f3ff;
    --text: #151b2d;
    --text-soft: #414a62;
    --muted: #727c94;
    --line: #e3e7f0;
    --line-strong: #d6dce8;
    --primary: #6157d9;
    --primary-dark: #4d43c0;
    --primary-soft: #efedff;
    --sidebar: #171a2c;
    --sidebar-soft: #20243b;
    --success: #087d5b;
    --success-bg: #e8f7f1;
    --danger: #c83e52;
    --danger-bg: #fff0f2;
    --warning: #a96508;
    --warning-bg: #fff4da;
    --blue: #2e71c7;
    --shadow-sm: 0 2px 8px rgba(24, 31, 54, .04);
    --shadow: 0 12px 34px rgba(24, 31, 54, .07);
    --shadow-lg: 0 24px 70px rgba(20, 25, 48, .13);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
}

html { scrollbar-color: #c9cede transparent; scrollbar-width: thin; }
body {
    background:
        radial-gradient(circle at 14% 4%, rgba(97, 87, 217, .055), transparent 25rem),
        var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: var(--primary); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #c9cede; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #aeb5c8; background-clip: padding-box; }

button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, label:focus-visible {
    outline: 3px solid rgba(97, 87, 217, .2);
    outline-offset: 2px;
}

/* App frame */
.sidebar {
    width: 272px;
    padding: 25px 17px 18px;
    background:
        radial-gradient(circle at 75% 3%, rgba(116, 105, 255, .18), transparent 13rem),
        linear-gradient(180deg, #171a2d 0%, #121522 100%);
    border-left: 1px solid rgba(255, 255, 255, .04);
    box-shadow: -12px 0 45px rgba(14, 17, 32, .08);
}
.brand { padding: 0 9px 27px; gap: 12px; }
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #8a80ff 0%, #5f55d9 62%, #473eae 100%);
    box-shadow: 0 10px 25px rgba(80, 69, 203, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.brand strong { font-size: 20px; line-height: 1.25; }
.brand span { color: #aeb5cf; font-size: 10px; margin-top: 3px; }
.nav-menu { gap: 5px; overflow-x: hidden; overflow-y: auto; padding: 2px 0 12px; }
.nav-caption {
    padding: 20px 13px 7px;
    color: #777f9c;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}
.nav-item {
    position: relative;
    min-height: 48px;
    padding: 11px 13px;
    color: #b7bdd1;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    transition: color .18s ease, background .18s ease, transform .18s ease, border-color .18s ease;
}
.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
    border-color: rgba(255, 255, 255, .045);
    transform: translateX(-2px);
}
.nav-item.active {
    color: #fff;
    background: linear-gradient(100deg, #675ddd, #554bc7);
    border-color: rgba(255, 255, 255, .1);
    box-shadow: 0 10px 28px rgba(41, 34, 130, .32);
}
.nav-item.active::after {
    content: "";
    position: absolute;
    right: -17px;
    width: 3px;
    height: 23px;
    border-radius: 3px 0 0 3px;
    background: #a89fff;
}
.nav-icon {
    width: 25px;
    color: #c8ccef;
    font-size: 18px;
    line-height: 1;
    filter: saturate(.8);
}
.sidebar-footer { padding-top: 16px; border-color: rgba(255, 255, 255, .075); }
.mini-user { padding: 6px 5px 12px; }
.avatar {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: linear-gradient(145deg, #343a5a, #252a43);
    border: 1px solid rgba(255, 255, 255, .08);
}
.logout-btn { color: #9ea6bf; padding: 9px 10px; transition: .18s ease; }
.logout-btn:hover { padding-right: 14px; background: rgba(255, 255, 255, .055); }

.main-shell { margin-right: 272px; width: calc(100% - 272px); }
.topbar {
    height: 88px;
    padding: 0 clamp(22px, 2.7vw, 42px);
    background: rgba(255, 255, 255, .82);
    border-color: rgba(220, 224, 234, .86);
    box-shadow: 0 3px 18px rgba(30, 37, 65, .025);
    backdrop-filter: blur(18px) saturate(140%);
}
.topbar h1 { margin-bottom: 3px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.breadcrumb { color: #8a92a7; font-size: 10px; }
.content { width: 100%; max-width: 1540px; padding: 34px clamp(22px, 2.7vw, 42px) 56px; }
.menu-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* Type and page headings */
.welcome-row, .page-actions { align-items: center; margin-bottom: 24px; }
.welcome-row h2, .page-actions h2 {
    margin: 3px 0 5px;
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.45;
    letter-spacing: -.025em;
}
.muted { color: var(--muted); }
.eyebrow { letter-spacing: .12em; }
.eyebrow.dark { color: var(--primary); }

/* Shared surfaces and controls */
.card {
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-head { padding: 22px 24px; border-color: var(--line); }
.card-head h2, .card-head h3 { color: var(--text); line-height: 1.5; }
.card-head p { color: var(--muted); line-height: 1.75; }
.primary-btn, .secondary-btn {
    min-height: 42px;
    padding: 9px 17px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.4;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.primary-btn {
    background: linear-gradient(135deg, #6a60df, #564bcb);
    box-shadow: 0 8px 20px rgba(88, 77, 203, .2), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.primary-btn:hover { background: linear-gradient(135deg, #5e54d1, #493fb7); box-shadow: 0 11px 25px rgba(88, 77, 203, .28); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .68; cursor: wait; pointer-events: none; box-shadow: none; transform: none; }
.primary-btn:active, .secondary-btn:active { transform: translateY(0); }
.primary-btn.compact, .secondary-btn.compact { min-height: 40px; padding: 8px 14px; }
.secondary-btn {
    color: var(--text-soft);
    border-color: var(--line-strong);
    background: #fff;
    box-shadow: 0 2px 5px rgba(30, 38, 64, .025);
}
.secondary-btn:hover { color: var(--primary); border-color: #c8c3ef; background: var(--surface-tint); transform: translateY(-1px); }
.secondary-btn.small { min-height: 34px; padding: 6px 11px; border-radius: 8px; }
.danger-link { border-radius: 8px; transition: background .16s ease; }
.danger-link:hover { background: var(--danger-bg); }
.text-link:hover, .back-link:hover, .sheet-open:hover { color: var(--primary-dark); }

.alert { position: relative; padding: 13px 17px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.alert.success { border-right: 4px solid var(--success); }
.alert.error { border-right: 4px solid var(--danger); }

/* Inputs and forms */
.field, .form-field, .filter-field { gap: 7px; }
.field label, .form-field label, .filter-field label { color: #444d63; font-size: 11px; font-weight: 800; }
.field input, .field select,
.form-field input, .form-field select, .form-field textarea,
.filter-field input, .filter-field select {
    min-height: 44px;
    padding: 8px 12px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: 0 1px 2px rgba(20, 27, 48, .02);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field input:hover, .field select:hover,
.form-field input:hover, .form-field select:hover, .form-field textarea:hover,
.filter-field input:hover, .filter-field select:hover { border-color: #bdc4d4; }
.field input:focus, .field select:focus,
.form-field input:focus, .form-field select:focus, .form-field textarea:focus,
.filter-field input:focus, .filter-field select:focus {
    outline: none;
    border-color: #8d84e6;
    box-shadow: 0 0 0 4px rgba(97, 87, 217, .1);
}
.field input::placeholder, .form-field input::placeholder, .filter-field input::placeholder { color: #a7adbc; }
.form-card { padding: clamp(20px, 2.4vw, 32px); overflow: visible; }
.form-card > form { max-width: 1050px; }
.form-grid { gap: 20px 22px; }
.company-form-card > form { max-width: 100%; }
.company-address-field { grid-column: 1 / -1; }
.form-field textarea { width: 100%; min-height: 108px; font: inherit; line-height: 1.8; resize: vertical; }
.form-actions { padding-top: 20px; margin-top: 6px; border-top: 1px solid var(--line); }
.checkbox-field label {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    cursor: pointer;
}
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); }
.validation-summary:not(:empty) { padding: 11px 14px; margin-bottom: 17px; border: 1px solid #ffd4da; border-radius: 10px; background: var(--danger-bg); }

/* Filters */
.filter-card { padding: 18px 20px; margin-bottom: 18px; }
.filter-form { gap: 14px; }
.tax-file-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tax-file-filter .wide { grid-column: span 2; }
.tax-file-filter .filter-actions { grid-column: span 2; justify-content: flex-end; }
.tfa-user-combobox.k-combobox { width: 100%; height: 44px; font-family: inherit; border: 1px solid var(--line-strong)!important; border-radius: var(--radius-sm)!important; background: #fff!important; box-shadow: 0 1px 2px rgba(20,27,48,.02); }
.tfa-user-combobox.k-combobox .k-dropdown-wrap { width: 100%; height: 42px; border: 0!important; border-radius: inherit; background: transparent!important; box-shadow: none!important; }
.tfa-user-combobox.k-combobox input.k-input,
.tfa-user-combobox.k-combobox input.k-input-inner { height: 42px!important; min-height: 0!important; padding: 0 12px!important; border: 0!important; border-radius: 0!important; outline: 0!important; background: transparent!important; box-shadow: none!important; text-align: right; color: var(--text); }
.tfa-user-combobox.k-combobox .k-input-button,
.tfa-user-combobox.k-combobox .k-select { width: 40px; height: 42px; min-width: 40px; padding: 0; border: 0!important; background-color: transparent!important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23596174' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important; background-repeat: no-repeat!important; background-position: center!important; box-shadow: none!important; }
.tfa-user-combobox.k-combobox .k-input-button .k-icon,
.tfa-user-combobox.k-combobox .k-select .k-icon { display: none!important; }
.tfa-user-combobox.k-combobox:hover { border-color: #bdc4d4!important; }
.tfa-user-combobox.k-combobox.k-focus,
.tfa-user-combobox.k-combobox.k-state-focused { border-color: #8d84e6!important; box-shadow: 0 0 0 4px rgba(97,87,217,.1); }
.tfa-dropdown.k-dropdown { width: 100%; height: 44px; font-family: inherit; border: 1px solid var(--line-strong)!important; border-radius: var(--radius-sm)!important; background: #fff!important; box-shadow: 0 1px 2px rgba(20,27,48,.02); }
.tfa-dropdown.k-dropdown .k-dropdown-wrap { width: 100%; height: 42px; display: flex; align-items: center; border: 0!important; border-radius: inherit; background: transparent!important; box-shadow: none!important; }
.tfa-dropdown.k-dropdown .k-input { height: auto!important; padding: 0 12px!important; line-height: 42px!important; text-align: right; color: var(--text); }
.tfa-dropdown.k-dropdown .k-select { width: 40px; height: 42px; min-width: 40px; padding: 0; border: 0!important; background-color: transparent!important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23596174' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important; background-repeat: no-repeat!important; background-position: center!important; }
.tfa-dropdown.k-dropdown .k-select .k-icon { display: none!important; }
.tfa-dropdown.k-dropdownlist.k-picker { width: 100%; min-height: 44px; font-family: inherit; border: 1px solid var(--line-strong)!important; border-radius: var(--radius-sm)!important; background: #fff!important; box-shadow: 0 1px 2px rgba(20,27,48,.02); }
.tfa-dropdown.k-dropdownlist.k-picker .k-input-inner { min-height: 42px; padding: 0 12px!important; display: flex; align-items: center; text-align: right; color: var(--text); }
.tfa-dropdown.k-dropdownlist.k-picker .k-input-button { width: 40px; min-width: 40px; min-height: 42px; padding: 0; border: 0!important; background-color: transparent!important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23596174' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important; background-repeat: no-repeat!important; background-position: center!important; box-shadow: none!important; }
.tfa-dropdown.k-dropdownlist.k-picker .k-input-button .k-icon { display: none!important; }
.tfa-dropdown.k-dropdownlist.k-picker:hover { border-color: #bdc4d4!important; }
.tfa-dropdown.k-dropdownlist.k-picker.k-focus { border-color: #8d84e6!important; box-shadow: 0 0 0 4px rgba(97,87,217,.1); }
.tfa-dropdown.k-dropdown:hover { border-color: #bdc4d4!important; }
.tfa-dropdown.k-dropdown.k-focus,
.tfa-dropdown.k-dropdown.k-state-focused { border-color: #8d84e6!important; box-shadow: 0 0 0 4px rgba(97,87,217,.1); }
.tfa-dropdown-popup.k-list-container { max-height: 280px!important; padding: 5px!important; overflow: hidden!important; border: 1px solid var(--line-strong)!important; border-radius: 10px!important; background: #fff!important; box-shadow: 0 14px 35px rgba(24,31,54,.16)!important; font-family: inherit!important; }
.tfa-dropdown-popup .k-list-scroller { max-height: 260px!important; overflow-x: hidden!important; overflow-y: auto!important; }
.tfa-dropdown-popup .k-list { padding: 0!important; }
.tfa-dropdown-popup .k-list .k-item { min-height: 38px!important; padding: 8px 11px!important; display: flex!important; align-items: center!important; white-space: normal!important; line-height: 1.7!important; text-align: right!important; border-radius: 7px!important; }
.tfa-dropdown-popup .k-list .k-item.k-state-selected,
.tfa-dropdown-popup .k-list .k-item.k-state-focused { color: var(--primary-dark)!important; background: var(--primary-soft)!important; }
.k-list-container.k-rtl .k-list .k-item { text-align: right; }
.range-fields { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 6px; }
.range-fields > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.range-fields select { width: 100%; min-width: 0; padding: 0 7px; }
.upload-period-grid { margin: 0; }
.summary-strip { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.details-back { margin-bottom: 12px; }
.details-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 26px; margin-bottom: 18px; overflow: hidden; position: relative; }
.details-hero::after { content: ""; position: absolute; left: -55px; bottom: -75px; width: 190px; height: 190px; border-radius: 50%; background: rgba(97,87,217,.045); pointer-events: none; }
.details-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.details-file-icon { width: 58px; height: 64px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg,#e8f8f1,#d9f2e8); color: var(--success); font-size: 23px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(22,138,98,.08); }
.details-file-heading { min-width: 0; }
.details-file-heading .file-title { margin-top: 5px!important; }
.details-file-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.details-file-meta bdi, .details-file-meta span { unicode-bidi: isolate; }
.details-meta-separator { width: 4px; height: 4px; border-radius: 50%; background: #c5c9d5; }
.file-title bdi { display: inline-block; max-width: 100%; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.details-hero-status { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.details-status-label { color: var(--muted); font-size: 10px; }
.details-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.details-metric { min-width: 0; min-height: 94px; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.details-metric-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; font-size: 18px; font-weight: 800; }
.details-metric-icon.purple { color: var(--primary); background: #efedff; }
.details-metric-icon.blue { color: var(--blue); background: #edf5ff; }
.details-metric-icon.green { color: var(--success); background: var(--success-bg); }
.details-metric-icon.amber { color: #b47716; background: #fff5df; }
.details-metric span:not(.details-metric-icon), .details-metric strong { display: block; }
.details-metric div { min-width: 0; }
.details-metric div > span { color: var(--muted); font-size: 10px; }
.details-metric strong { margin-top: 5px; font-size: 17px; color: var(--text); overflow-wrap: anywhere; }
.details-data-card { overflow: hidden; }
.details-data-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.details-data-head h3 { margin: 4px 0 4px; font-size: 17px; }
.details-data-head p { margin: 0; color: var(--muted); font-size: 11px; }
.details-dataset-count { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #f0efff; color: var(--primary); font-size: 10px; font-weight: 800; }
.details-data-body { padding: 18px; }
.details-sheet-grid { grid-template-columns: 1fr; }
.details-sheet-block + .details-sheet-block { margin-top: 18px; }
.details-sheet-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.details-sheet-summary h4 { margin: 0 0 4px; font-size: 14px; }
.details-sheet-summary span { color: var(--muted); font-size: 10px; }
.details-inline-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.dashboard-report-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-stat-card { position: relative; min-width: 0; align-items: flex-start; padding-bottom: 34px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.dashboard-stat-card:hover { transform: translateY(-2px); border-color: #d6d2f2; box-shadow: 0 12px 28px rgba(36,41,76,.09); }
.dashboard-stat-content { flex: 1; min-width: 0; }
.dashboard-stat-content > span:first-child, .dashboard-stat-content > strong, .dashboard-stat-content > small { display: block; }
.dashboard-stat-content > strong { font-variant-numeric: tabular-nums; }
.dashboard-report-link { position: absolute; left: 16px; bottom: 13px; color: var(--primary); font-size: 9px; font-weight: 800; }
.stat-icon.amber { background: #fff5df; color: #b47716; }
@media(max-width:1050px){.dashboard-report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.dashboard-report-stats{grid-template-columns:1fr}}
.details-sheet-card { display: grid; grid-template-columns: minmax(210px, .65fr) minmax(0, 1.35fr) auto; align-items: center; gap: 20px; padding: 18px; box-shadow: none; background: var(--surface-soft); }
.details-sheet-card .header-chips { align-content: center; }
.details-sheet-card .sheet-open { margin-top: 0; white-space: nowrap; color: #fff; }
@media(max-width:1050px){.details-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.details-sheet-card{grid-template-columns:minmax(190px,.7fr) minmax(0,1.3fr)}.details-sheet-card .sheet-open{grid-column:1/-1;justify-self:start}}
@media(max-width:820px){.details-hero{align-items:flex-start}.details-sheet-card{grid-template-columns:1fr}.details-sheet-card .sheet-open{justify-self:stretch}.details-file-meta{flex-wrap:wrap}}
@media(max-width:540px){.details-hero{padding:20px;flex-direction:column}.details-hero-main{align-items:flex-start}.details-file-icon{width:48px;height:54px}.details-hero-status{width:100%;align-items:flex-start;padding-top:14px;border-top:1px solid var(--line)}.details-metrics{grid-template-columns:1fr}.details-data-head{align-items:flex-start;flex-direction:column}.details-data-body{padding:12px}}
.filter-actions { gap: 8px; }
.datetimepicker { direction: rtl; text-align: right; }

/* Dashboard */
.stats-grid { gap: 18px; margin-bottom: 24px; }
.stat-card {
    position: relative;
    min-height: 112px;
    padding: 20px;
    border-color: var(--line);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card::after {
    content: "";
    position: absolute;
    left: -24px;
    bottom: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(97, 87, 217, .035);
}
.stat-card:hover { transform: translateY(-3px); border-color: #d9d4f6; box-shadow: 0 16px 38px rgba(29, 35, 61, .09); }
.stat-card strong { color: var(--text); font-size: 24px; letter-spacing: -.02em; }
.stat-icon { width: 48px; height: 48px; border-radius: 15px; }

/* Native tables */
.table-card { border-radius: var(--radius); }
.table-toolbar { padding: 16px 20px; }
.data-table th { padding: 14px 18px; color: #667087; background: var(--surface-soft); }
.data-table td { padding: 15px 18px; color: var(--text-soft); }
.data-table tbody tr:nth-child(even) { background: #fcfcfe; }
.data-table tbody tr:hover { background: var(--surface-tint); }
.row-actions { gap: 7px; }
.status { gap: 5px; padding: 5px 10px; border: 1px solid transparent; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(128, 128, 128, .08); }
.status.ready { border-color: #ccebdd; }
.status.failed { border-color: #ffd3da; }
.status.processing { border-color: #f5dfae; }

/* Kendo grids */
.kendo-card { border-radius: var(--radius); }
.k-grid {
    height: auto !important;
    min-height: 260px;
    color: var(--text-soft);
    background: #fff;
}
.k-grid .k-grid-header { border-color: var(--line) !important; background: var(--surface-soft); }
.k-grid .k-grid-header-wrap { border-color: var(--line) !important; }
.k-grid th.k-header {
    height: 48px;
    padding: 12px 15px;
    color: #626c83;
    border-color: var(--line) !important;
    background: var(--surface-soft);
    font-size: 10px;
    letter-spacing: .01em;
}
.k-grid th.k-header > .k-link { color: inherit; }
.k-grid td {
    height: 52px;
    padding: 10px 15px;
    color: #465067;
    border-color: #edf0f5 !important;
    background: #fff;
    font-size: 11px;
    vertical-align: middle;
}
.k-grid tbody tr:nth-child(even) td { background: #fcfcfe; }
.k-grid tr:hover td { background: #f7f6ff !important; }
.k-grid-content { min-height: 0; overflow-y: visible; }
.k-grid .k-pager-wrap {
    min-height: 54px;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
}
.k-pager-wrap .k-link, .k-pager-wrap .k-state-selected {
    min-width: 32px;
    height: 32px;
    border-color: transparent;
    border-radius: 8px;
}
.k-pager-wrap .k-link:hover { color: var(--primary); border-color: #dedaf8; background: var(--surface-tint); }
.k-grid .k-state-selected { box-shadow: 0 5px 12px rgba(97, 87, 217, .2); }
.k-grid .k-pager-sizes .k-dropdown { border-radius: 8px; }
.k-grid-norecords td { height: 150px; color: var(--muted); text-align: center; }
.sheet-data-card .k-grid, .sheet-kendo-card .k-grid { min-height: 420px; }
.sheet-data-card .k-grid-content, .sheet-kendo-card .k-grid-content { overflow: auto; }

/* Upload, details, and permissions */
.upload-layout { gap: 20px; }
.dropzone {
    min-height: 300px;
    border: 2px dashed #cbd0df;
    background: linear-gradient(145deg, #fbfbfe, #f7f7fc);
}
.dropzone:hover, .dropzone.dragging { border-color: #8177df; background: var(--surface-tint); transform: translateY(-1px); }
.drop-icon { width: 60px; height: 60px; border-radius: 18px; background: #ebe8ff; }
.tip { border: 1px solid #e3dffc; background: #f7f5ff; color: #5147b7; }
.info-panel { position: sticky; top: 110px; padding: 25px; }
.sheet-mini-list span, .header-chips span { border-color: var(--line); background: var(--surface-soft); }
.summary-strip { border-color: var(--line); box-shadow: var(--shadow-sm); }
.sheet-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.sheet-card:hover { transform: translateY(-2px); border-color: #d8d3f3; box-shadow: var(--shadow); }
.permission-layout { gap: 18px; }
.permission-card { padding: 21px; }
.permission-card h3 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.permission-item { margin: 0 -8px; padding: 11px 8px; border-radius: 9px; }
.permission-item:hover { background: var(--surface-tint); }
.permission-item small { color: #81899d; }
.sticky-actions { z-index: 8; padding: 20px 0 10px; background: linear-gradient(transparent, var(--bg) 35%); }

/* Login */
.login-shell { grid-template-columns: minmax(450px, 1.05fr) minmax(430px, .95fr); }
.login-visual {
    background:
        radial-gradient(circle at 16% 16%, rgba(135, 124, 255, .36), transparent 25rem),
        radial-gradient(circle at 92% 78%, rgba(72, 182, 182, .12), transparent 22rem),
        linear-gradient(145deg, #15182b, #212546 60%, #2a2e58);
}
.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, transparent, #000 35%, transparent);
}
.login-copy h1 { max-width: 680px; font-size: clamp(32px, 3vw, 44px); letter-spacing: -.03em; }
.visual-card { border-color: rgba(255, 255, 255, .13); box-shadow: 0 18px 50px rgba(8, 10, 25, .2); }
.login-form-wrap { background: radial-gradient(circle at 90% 10%, rgba(97,87,217,.07), transparent 19rem), #fbfbfd; }
.login-form-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.9); box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); }
.password-wrap { min-height: 44px; border-color: var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.password-wrap:focus-within { border-color: #8d84e6; box-shadow: 0 0 0 4px rgba(97,87,217,.1); }
.password-wrap button { min-width: 62px; border-right: 1px solid var(--line); background: var(--surface-soft); }

/* Responsive behavior */
@media (max-width: 1100px) {
    .content { padding-inline: 24px; }
    .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .sidebar { width: min(290px, 86vw); box-shadow: -18px 0 55px rgba(8, 11, 24, .28); }
    .main-shell { width: 100%; margin-right: 0; }
    .topbar { height: 74px; padding-inline: 15px; }
    .topbar h1 { font-size: 16px; }
    .content { padding: 22px 15px 38px; }
    .welcome-row, .page-actions { gap: 15px; }
    .page-actions > .primary-btn, .welcome-row > .primary-btn { width: 100%; }
    .info-panel { position: static; }
    .login-shell { grid-template-columns: 1fr; }
    .login-form-wrap { padding: 20px; }
    .login-form-card { padding: 27px; }
    .mobile-brand { margin-bottom: 38px; }
}

@media (max-width: 650px) {
    .filter-card { padding: 15px; }
    .filter-form { grid-template-columns: 1fr; }
    .filter-actions { grid-column: auto; }
    .filter-actions > * { width: 100%; }
    .form-card { padding: 18px; }
    .form-actions { flex-direction: column; }
    .form-actions > * { width: 100%; }
    .kendo-card { margin-inline: -15px; border-right: 0; border-left: 0; border-radius: 0; }
    .k-grid { min-height: 230px; }
    .k-grid .k-pager-wrap { justify-content: center; }
    .k-pager-info { display: none; }
}

/* Account security */
.account-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin-bottom: 4px;
    padding: 9px 10px;
    color: #aab1c8;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.account-link:hover,
.account-link.active {
    color: #fff;
    border-color: rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .055);
}
.account-password-form {
    padding: 0;
    margin: 0;
}
.account-password-form .password-wrap input {
    width: 100%;
    min-width: 0;
    background: transparent;
}
.password-hint {
    padding: 11px 13px;
    color: #6259b8;
    border: 1px solid #e3dffc;
    border-radius: 10px;
    background: #f7f5ff;
    font-size: 10px;
    line-height: 1.8;
}

@media (max-width: 540px) {
    .stats-grid { gap: 12px; }
    .stat-card { min-height: 96px; padding: 16px; }
    .card-head { padding: 18px; }
    .login-form-wrap { padding: 14px; }
    .login-form-card { padding: 23px 19px; border-radius: 18px; }
    .dropzone { min-height: 240px; padding: 22px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Compact Kendo rows and a stable RTL pager. */
.kendo-card:not(.sheet-kendo-card) .k-grid {
    min-height: 0;
}
.kendo-card:not(.sheet-kendo-card) .k-grid-content {
    height: auto !important;
    min-height: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}
.kendo-card:not(.sheet-kendo-card) .k-grid-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.kendo-card:not(.sheet-kendo-card) .k-grid-header-wrap {
    margin: 0 !important;
    border-left: 0 !important;
}
.k-grid th.k-header {
    height: auto !important;
    padding: 10px 12px !important;
    line-height: 1.35;
}
.k-grid th.k-header:not(:last-child),
.k-grid td:not(:last-child) {
    border-left: 1px solid #e2e6ef !important;
}
.k-grid td {
    height: auto !important;
    padding: 8px 12px !important;
    line-height: 1.4;
}
.k-grid div.k-grid-norecords {
    position: relative;
    min-height: 160px;
    height: 160px !important;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
}
.k-grid div.k-grid-norecords > .k-grid-norecords-template {
    position: static !important;
    width: auto;
    height: auto;
    margin: 0 !important;
    line-height: 1.8;
}
.k-grid tr.k-grid-norecords td {
    height: 150px !important;
    padding: 40px 20px !important;
    color: var(--muted);
    text-align: center !important;
    vertical-align: middle;
}
.k-grid .secondary-btn.small {
    min-height: 30px;
    padding: 5px 10px;
}
.k-grid .danger-link {
    min-height: 30px;
    padding: 5px 8px;
}
.k-grid .status {
    padding: 4px 9px;
}
.k-grid .k-pager-wrap {
    display: flex !important;
    min-height: 48px;
    padding: 7px 12px;
    gap: 3px;
    direction: rtl;
    align-items: center;
    flex-wrap: wrap;
}
.k-pager-wrap .k-link,
.k-pager-wrap .k-state-selected {
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 30px;
}
.k-pager-wrap .k-pager-numbers {
    margin: 0 3px;
}
.k-pager-wrap .k-pager-numbers .k-link,
.k-pager-wrap .k-pager-numbers .k-state-selected {
    margin: 0 2px;
}
.k-pager-wrap .k-pager-sizes {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 10px;
    white-space: nowrap;
    float: none;
}
.k-pager-wrap .k-pager-sizes .k-dropdown {
    width: 62px;
}
.k-pager-wrap .k-dropdown-wrap {
    min-height: 32px;
    display: flex;
    align-items: center;
    border-color: var(--line-strong);
    border-radius: 8px;
    background: #fff;
}
.k-pager-wrap .k-dropdown-wrap .k-input {
    height: auto;
    padding: 5px 10px;
    line-height: 1.4;
}
.k-pager-wrap .k-dropdown-wrap .k-select {
    width: 20px;
    border: 0;
    background: transparent;
}
.k-pager-wrap .k-dropdown-wrap .k-select .k-icon {
    width: 16px;
    overflow: visible;
    color: var(--muted);
}
.k-pager-wrap .k-i-arrow-60-down::before,
.k-pager-wrap .k-i-arrow-s::before {
    content: "⌄" !important;
    font-family: Tahoma, Arial, sans-serif !important;
    font-size: 12px !important;
}
.k-pager-wrap .k-pager-info {
    margin-right: auto;
    color: var(--muted);
    white-space: nowrap;
    float: none;
}
.k-pager-wrap > .k-link.k-pager-refresh {
    margin-right: 8px;
}
.k-pager-wrap .k-i-arrow-end-left::before,
.k-pager-wrap .k-i-seek-w::before {
    content: "«" !important;
}
.k-pager-wrap .k-i-arrow-end-right::before,
.k-pager-wrap .k-i-seek-e::before {
    content: "»" !important;
}

@media (max-width: 650px) {
    .k-grid th.k-header { padding: 9px 10px !important; }
    .k-grid td { padding: 7px 10px !important; }
    .k-grid .k-pager-wrap { justify-content: center; padding: 8px; }
    .k-pager-wrap .k-pager-sizes { order: 2; width: 100%; justify-content: center; margin-top: 4px; }
}

/* Taxpayer report filters */
.report-loading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 14px 18px; border-radius: var(--radius); background: rgba(97, 87, 217, .08); color: var(--primary); font-weight: bold; }
.report-loading[hidden] { display: none; }
.report-loading-spinner { width: 20px; height: 20px; flex-shrink: 0; border: 3px solid rgba(97, 87, 217, .2); border-top-color: var(--primary); border-radius: 50%; animation: report-loading-spin .8s linear infinite; }
#taxpayerReportGrid[aria-busy="true"] { opacity: .55; pointer-events: none; }
@keyframes report-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .report-loading-spinner { animation: none; } }
.performance-totals { margin-top: 18px; padding: 20px; }
.performance-totals h3 { margin: 0 0 4px; }
.performance-totals > p { margin: 0 0 14px; color: var(--muted); }
.performance-totals-scroll { overflow-x: auto; }
.performance-totals-table { width: 100%; min-width: 1000px; border-collapse: collapse; }
.performance-totals-table th, .performance-totals-table td { padding: 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.performance-totals-table thead th { background: var(--primary); color: white; }
.performance-totals-table td { font-variant-numeric: tabular-nums; }
.performance-totals-table tbody tr:last-child { font-weight: bold; background: var(--bg); }

.report-filter-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -18px -20px 18px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(135deg, rgba(97, 87, 217, .07), rgba(75, 160, 190, .035));
}
.report-filter-head-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #7469e7, #554bc5);
    box-shadow: 0 7px 16px rgba(91, 81, 204, .2);
    font-size: 21px;
    font-weight: 800;
}
.report-filter-head h3 { margin: 0 0 3px; font-size: 14px; }
.report-filter-head p { margin: 0; color: var(--muted); font-size: 10px; }
.report-filter.filter-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 13px;
    align-items: stretch;
}
.report-filter .filter-field {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #eceef5;
    border-radius: 13px;
    background: #fafbfe;
}
.report-filter .filter-field:focus-within {
    border-color: #d7d2f5;
    background: #fcfbff;
}
.report-filter.has-user-filter .report-filter-view,
.report-filter.has-user-filter .report-filter-type,
.report-filter.has-user-filter .report-filter-user,
.report-filter.has-user-filter .report-filter-company { grid-column: span 3; }
.report-filter.without-user-filter .report-filter-view,
.report-filter.without-user-filter .report-filter-type,
.report-filter.without-user-filter .report-filter-company { grid-column: span 4; }
.report-filter .report-filter-range { grid-column: span 6; }
.report-filter .report-filter-search { grid-column: span 8; }
.report-filter .filter-actions {
    grid-column: span 4;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    gap: 9px;
    padding: 12px 0;
}
.report-filter .filter-actions button { min-height: 44px; white-space: nowrap; }
.report-filter .filter-actions button > span { font-size: 17px; line-height: 1; }
.report-filter .range-fields { gap: 10px; }
.report-filter .range-fields > span {
    min-width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--primary);
    background: #eeecff;
}

@media (max-width: 1100px) {
    .report-filter.filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filter.has-user-filter .report-filter-view,
    .report-filter.has-user-filter .report-filter-type,
    .report-filter.has-user-filter .report-filter-user,
    .report-filter.has-user-filter .report-filter-company,
    .report-filter.without-user-filter .report-filter-view,
    .report-filter.without-user-filter .report-filter-type,
    .report-filter.without-user-filter .report-filter-company,
    .report-filter .report-filter-range,
    .report-filter .report-filter-search { grid-column: span 1; }
    .report-filter .filter-actions { grid-column: 1 / -1; padding-top: 2px; }
}

@media (max-width: 650px) {
    .report-filter-head { margin: -15px -15px 15px; padding: 15px; }
    .report-filter.filter-form { grid-template-columns: 1fr; }
    .report-filter .filter-actions { grid-column: auto; grid-template-columns: 1fr; padding-bottom: 0; }
    .report-filter .range-fields { grid-template-columns: 1fr; }
    .report-filter .range-fields > span { width: 36px; margin: -3px auto; }
}

/* NikLine palette shared by login and every panel page. */
.login-page, .app-theme {
    --bg: #f5f7fa;
    --surface: #fff;
    --surface-soft: #f8fafc;
    --surface-tint: #fff4f5;
    --text: #202733;
    --text-soft: #4a5566;
    --muted: #788393;
    --line: #e8edf2;
    --line-strong: #dce3eb;
    --primary: #df142b;
    --primary-dark: #b80d21;
    --primary-soft: #fff0f2;
    --sidebar: #1e222b;
    --success: #15966d;
    --success-bg: #e8f7f1;
    --danger: #d91d35;
    --danger-bg: #fff0f2;
    --blue: #1676d2;
    --accent-cyan: #0e91a7;
    --shadow: 0 8px 26px rgba(31, 48, 68, .055);
    --shadow-lg: 0 20px 55px rgba(31, 48, 68, .11);
    --radius: 13px;
    --radius-lg: 18px;
    background: var(--bg);
}
.login-page .brand-mark, .app-theme .brand-mark {
    background: linear-gradient(145deg, #f22d43, #cf0d25);
    box-shadow: 0 8px 18px rgba(209, 18, 42, .22);
}
.brand > div:last-child { min-width: 0; }
.brand strong { font-size: 14px; letter-spacing: 0; white-space: nowrap; }
.brand span { font-size: 9px; white-space: nowrap; }
.login-brand strong { font-size: 20px; letter-spacing: 0; }
.mobile-brand > div strong, .mobile-brand > div span { display: block; }
.mobile-brand > div strong { font-size: 16px; }
.mobile-brand > div span { color: var(--muted); font-size: 11px; margin-top: 2px; }
.login-page .primary-btn, .app-theme .primary-btn {
    background: linear-gradient(110deg, #e31a31, #ce0d26);
    box-shadow: 0 8px 18px rgba(216, 17, 42, .17);
}
.login-page .primary-btn:hover, .app-theme .primary-btn:hover {
    background: linear-gradient(110deg, #ce0f27, #ae0a1d);
    box-shadow: 0 10px 22px rgba(216, 17, 42, .24);
}
.login-page .field input:focus, .login-page .password-wrap:focus-within {
    border-color: #e35162;
    box-shadow: 0 0 0 4px rgba(223, 20, 43, .1);
}

.login-shell { direction: ltr; grid-template-columns: minmax(390px, 1fr) minmax(430px, 1fr); }
.login-visual, .login-form-wrap { direction: rtl; }
.login-visual {
    min-height: 100vh;
    padding: 36px clamp(34px, 5vw, 90px);
    color: var(--text);
    background:
        radial-gradient(circle at 10% 72%, rgba(38, 119, 212, .11), transparent 28%),
        linear-gradient(135deg, #fff 0%, #f3f7fb 52%, #eef3f8 100%);
    border-left: 1px solid var(--line);
}
.login-visual::before {
    opacity: .58;
    background-image: linear-gradient(125deg, transparent 42%, rgba(209, 220, 232, .3) 43%, transparent 44%);
    background-size: 180px 180px;
    mask-image: none;
}
.login-visual::after {
    border-color: rgba(59, 124, 183, .08);
    box-shadow: 0 0 0 70px rgba(59, 124, 183, .025), 0 0 0 140px rgba(59, 124, 183, .016);
}
.login-brand { position: relative; z-index: 2; font-size: 21px; }
.login-copy { margin: auto 0 18px; }
.login-copy .eyebrow { color: var(--primary); }
.login-copy h1 { max-width: 590px; font-size: clamp(29px, 3vw, 42px); line-height: 1.5; }
.login-copy p { max-width: 520px; color: #697788; }
.login-feature-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; position: relative; z-index: 2; margin: 0 0 28px; }
.feature-pill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px; background: #fff; box-shadow: 0 9px 25px rgba(34, 72, 110, .1); font-size: 13px; font-weight: 900; }
.feature-pill span { font-size: 11px; font-weight: 700; }
.feature-pill.green { color: #10956b; }
.feature-pill.blue { color: #1676d2; margin-right: 25px; }
.feature-pill.red { color: #df142b; margin-right: 11px; }
.visual-card { width: min(520px, 100%); color: var(--text); background: rgba(255,255,255,.83); border-color: #e5ebf1; box-shadow: 0 12px 35px rgba(34, 72, 110, .07); }
.visual-card span { color: #788393; }
.visual-chart i { background: #e21a32; }
.visual-chart i:nth-child(even) { background: #1977d0; }
.login-form-wrap { background: #f8fafc; }
.login-form-card { background: #fff; border-color: #e8edf2; box-shadow: 0 18px 48px rgba(34, 53, 75, .09); }
.login-form-card h2 { color: var(--text); }
.login-form-card .field input { background: #f8fafc; }
.login-page .password-wrap { background: #f8fafc; }
.login-page .password-wrap button { background: #f3f6f9; }
.login-page input[type="checkbox"] { accent-color: var(--primary); }

.app-theme .sidebar { background: #1d222b; border-left-color: #303742; }
.app-theme .nav-item { color: #c3cad3; }
.app-theme .nav-item:hover { background: #2b323d; }
.app-theme .nav-item.active { background: #db142b; border-color: #ed384c; box-shadow: 0 8px 20px rgba(10, 13, 20, .15); }
.app-theme .nav-item.active::after { background: #ff7a89; }
.app-theme .nav-icon { color: #e7ebef; }
.app-theme .nav-caption { color: #8994a3; }
.app-theme .avatar { background: #333b47; }
.app-theme .topbar { background: rgba(255,255,255,.94); border-color: var(--line); }
.app-theme .stat-card { border-color: var(--line); box-shadow: var(--shadow); }
.app-theme .stat-card::after { background: rgba(31, 113, 193, .025); }
.app-theme .stat-card:hover { border-color: #f0b6be; }
.app-theme .stat-icon.purple { background: #fff0f2; color: #df142b; }
.app-theme .stat-icon.blue { background: #eaf3ff; color: #1676d2; }
.app-theme .stat-icon.green { background: #e8f7f1; color: #15966d; }
.app-theme .stat-icon.amber { background: #fff4e7; color: #cb7c1c; }
.app-theme .k-grid tr:hover td { background: #fff6f7 !important; }
.app-theme .k-grid .k-state-selected { box-shadow: 0 5px 12px rgba(223,20,43,.16); }
.app-theme .secondary-btn:hover { border-color: #f1b9c0; }
.app-theme .field input:focus, .app-theme .field select:focus,
.app-theme .form-field input:focus, .app-theme .form-field select:focus, .app-theme .form-field textarea:focus,
.app-theme .filter-field input:focus, .app-theme .filter-field select:focus,
.app-theme .password-wrap:focus-within {
    border-color: #e35162;
    box-shadow: 0 0 0 4px rgba(223, 20, 43, .1);
}
.app-theme .tfa-user-combobox.k-combobox.k-focus,
.app-theme .tfa-user-combobox.k-combobox.k-state-focused,
.app-theme .tfa-dropdown.k-dropdown.k-focus,
.app-theme .tfa-dropdown.k-dropdown.k-state-focused,
.app-theme .tfa-dropdown.k-dropdownlist.k-picker.k-focus {
    border-color: #e35162 !important;
    box-shadow: 0 0 0 4px rgba(223, 20, 43, .1);
}
.app-theme .tfa-dropdown-popup .k-list .k-item.k-state-selected,
.app-theme .tfa-dropdown-popup .k-list .k-item.k-state-focused { color: var(--primary-dark) !important; background: var(--primary-soft) !important; }
.app-theme .dropzone:hover, .app-theme .dropzone.dragging { border-color: var(--accent-cyan); background: #f0f9fb; }
.app-theme .drop-icon, .app-theme .empty-icon { background: #e9f7fa; color: var(--accent-cyan) !important; }
.app-theme .tip, .app-theme .password-hint { border-color: #ccecf0; background: #f0fafb; color: #087b8e; }
.app-theme .table-avatar { background: #eaf3ff; color: var(--blue); }
.app-theme .details-metric-icon.purple { color: var(--primary); background: var(--primary-soft); }
.app-theme .details-dataset-count { background: var(--primary-soft); }
.app-theme .report-filter-head { background: linear-gradient(135deg, #eef9fb, #f8fafc); }
.app-theme .report-filter-head-icon { background: linear-gradient(145deg, #24a5b8, #087f98); box-shadow: 0 7px 16px rgba(14, 145, 167, .19); }
.app-theme .report-filter .filter-field { background: #fbfdfe; border-color: var(--line); }
.app-theme .report-filter .filter-field:focus-within { background: #f4fafb; border-color: #b8e2e9; }
.app-theme .report-filter .range-fields > span { background: #e9f7fa; color: var(--accent-cyan); }
.app-theme .report-loading { background: #e9f7fa; color: #087b8e; }
.app-theme .report-loading-spinner { border-color: #b8e2e9; border-top-color: var(--accent-cyan); }
.app-theme .sheet-card:hover { border-color: #b8e2e9; }

@media (max-width: 820px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-form-wrap { min-height: 100vh; }
}

/* Company selection shared by every authenticated page. */
.header-company-filter { display: flex; align-items: center; gap: 9px; min-width: 0; margin-right: auto; }
.header-company-filter label { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.header-company-filter select {
    width: clamp(160px, 17vw, 240px);
    min-width: 0;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.header-company-filter select:focus { border-color: var(--accent-cyan); outline: 3px solid rgba(14,145,167,.14); }
.topbar .header-company-filter + .primary-btn { margin-right: 0; }
.global-company-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #b8e2e9;
    border-radius: 10px;
    background: #f0fafb;
    color: #087b8e;
    font-weight: 700;
}
.global-company-note small { color: #5c8490; font-size: 9px; font-weight: 500; white-space: nowrap; }
@media (max-width: 820px) {
    .topbar > div { min-width: 0; }
    .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .header-company-filter { margin-right: auto; }
    .header-company-filter label { display: none; }
    .header-company-filter select { width: min(37vw, 180px); }
}
