*{box-sizing:border-box}
:root{
  --navy:#0D3B66;
  --blue:#1565C0;
  --teal:#00796B;
  --green:#2E7D32;
  --orange:#E65100;
  --amber:#E65100;
  --red:#C62828;
  --purple:#6A1B9A;
  --violet:#6A1B9A;
  --cyan:#00796B;
  --gold:#F57F17;
  --bg:#F4F6F9;
  --card:#fff;
  --border:#E0E6ED;
  --ink:#1C2B40;
  --muted:#6B7A90;
  --line:#E0E6ED;
  --soft:#F4F6F9;
  --panel:#fff;
  --shadow:none;
}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}
button,input,select,textarea{font:inherit}
.app-loading{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;background:radial-gradient(circle at 50% 38%,#ffffff 0,#f4f8fb 44%,#e8eef4 100%);transition:opacity .28s ease,visibility .28s ease}
.app-loading.hide{opacity:0;visibility:hidden;pointer-events:none}
.loading-stage{position:relative;width:min(420px,76vw);aspect-ratio:1;display:grid;place-items:center;isolation:isolate}
.loading-halo{position:absolute;inset:15%;border-radius:50%;background:linear-gradient(135deg,rgba(13,59,102,.08),rgba(0,121,107,.1));animation:loadingPulse 2.2s ease-in-out infinite}
.loading-tent{position:relative;z-index:2;width:86%;height:86%;object-fit:contain;filter:drop-shadow(0 24px 34px rgba(13,59,102,.18));clip-path:inset(0 0 0 0);animation:tentReveal 1.8s ease-out both,tentFloat 3.2s ease-in-out 1.8s infinite}
.loading-line{position:absolute;z-index:3;left:12%;right:12%;bottom:18%;height:2px;border-radius:99px;background:linear-gradient(90deg,transparent,#0d3b66,#00a58f,transparent);animation:loadingScan 1.35s ease-in-out infinite}
.loading-copy{position:absolute;left:0;right:0;bottom:9vh;text-align:center;color:#0d2f4d;display:flex;flex-direction:column;gap:5px;letter-spacing:0}
.loading-copy strong{font-size:18px;font-weight:800}
.loading-copy span{font-size:13px;color:#5b6d80;font-weight:600}
@keyframes tentReveal{0%{opacity:0;clip-path:inset(0 100% 0 0);transform:translateY(12px) scale(.96)}58%{opacity:1}100%{opacity:1;clip-path:inset(0 0 0 0);transform:translateY(0) scale(1)}}
@keyframes tentFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes loadingScan{0%{transform:translateX(-18%) scaleX(.35);opacity:.25}45%{opacity:1}100%{transform:translateX(18%) scaleX(1);opacity:.25}}
@keyframes loadingPulse{0%,100%{transform:scale(.96);opacity:.72}50%{transform:scale(1.04);opacity:1}}
.shell{min-height:100vh;display:flex;align-items:stretch}
.sidebar{width:240px;height:100vh;position:sticky;top:0;background:linear-gradient(180deg,#0B2F55 0%,#0D3B66 100%);color:#fff;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto}
.brand{padding:18px 16px 14px;border-bottom:1px solid rgba(255,255,255,.1)}
.brand strong{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;letter-spacing:0}
.brand strong:before{content:"⛺"}
.brand span{display:block;color:rgba(255,255,255,.4);font-size:10px;margin-top:2px}
nav{padding:8px 0;overflow:auto}
.nav-group{font-size:9px;text-transform:uppercase;letter-spacing:1.2px;color:rgba(255,255,255,.3);font-weight:700;padding:14px 16px 4px}
.nav-item{width:calc(100% - 6px);border:0;background:transparent;color:rgba(255,255,255,.62);display:flex;align-items:center;gap:10px;text-align:left;padding:8px 16px;cursor:pointer;border-left:3px solid transparent;border-radius:0 6px 6px 0;margin-right:6px;font-size:13px;transition:all .15s}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-item.active{background:rgba(255,255,255,.14);color:#fff;border-left-color:#4FC3F7}
.nav-icon{width:17px;text-align:center;font-size:14px;flex-shrink:0}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:46px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:8px 22px;position:sticky;top:0;z-index:50;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.topbar h1{font-size:15px;margin:0;font-weight:700}
.topbar p{display:none}
.top-actions{display:flex;gap:7px;align-items:center}
.view{padding:18px 22px 34px;display:flex;flex-direction:column;gap:14px;min-height:calc(100vh - 46px)}
.page-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.page-head h2{font-size:19px;margin:0;font-weight:700}
.page-head p{margin:1px 0 0;color:var(--muted);font-size:12px}
.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.btn{border:0;border-radius:7px;padding:6px 13px;font-weight:500;cursor:pointer;display:inline-flex;gap:5px;align-items:center;justify-content:center;min-height:0;font-size:13px;white-space:nowrap;transition:all .14s}
.btn:hover{opacity:.88;transform:translateY(-1px)}
.btn.primary{background:var(--navy);color:#fff}
.btn.success{background:var(--green);color:#fff}
.btn.warn{background:var(--orange);color:#fff}
.btn.danger{background:var(--red);color:#fff}
.btn.secondary{background:transparent;color:#374151;border:1px solid #CBD5E0}
.btn.ghost{background:transparent;color:var(--muted)}
.btn.ghost:hover{color:var(--ink);background:#F1F5F9}
.btn.small{font-size:12px;padding:5px 10px;min-height:0}
.btn.icon{width:30px;padding:0}
.pill{display:inline-flex;align-items:center;border-radius:20px;padding:3px 10px;font-size:11px;font-weight:600;background:var(--bg);color:var(--muted)}
.badge{display:inline-flex;align-items:center;border-radius:20px;padding:2px 8px;font-size:11px;font-weight:600;background:#F3F4F6;color:#6B7280}
.badge.ok{background:#DCFCE7;color:#166534}.badge.wait{background:#FEF3C7;color:#92400E}.badge.bad{background:#FEE2E2;color:#991B1B}.badge.info{background:#DBEAFE;color:#1E40AF}.badge.neutral{background:#F3F4F6;color:#6B7280}
.badge.crm-stage{background:color-mix(in srgb,var(--crm-stage-color) 18%,#fff);border:1px solid color-mix(in srgb,var(--crm-stage-color) 45%,#fff);color:#1C2B40;max-width:140px;white-space:normal;line-height:1.15}
.grid{display:grid;gap:12px}
.kpis{grid-template-columns:repeat(5,1fr);gap:11px}
.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.card{background:#fff;border:1px solid var(--border);border-radius:11px;box-shadow:none;overflow:hidden}
.card-head{padding:11px 15px;border-bottom:1px solid #F1F5F9;display:flex;justify-content:space-between;align-items:center;gap:10px;background:#FAFBFC}
.card-head h3{font-size:13px;margin:0;font-weight:600}
.card-body{padding:14px}
.kpi{background:#fff;border:1px solid var(--border);border-radius:11px;padding:13px 15px;box-shadow:none;position:relative;overflow:hidden}
.ki{width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:16px;margin-bottom:7px;flex-shrink:0}
.ki-b{background:#DBEAFE}.ki-g{background:#DCFCE7}.ki-r{background:#FEE2E2}.ki-o{background:#FFEDD5}.ki-p{background:#EDE9FE}.ki-t{background:#CCFBF1}.ki-y{background:#FEF9C3}
.kpi label{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.5px;font-weight:600}
.kpi strong{display:block;margin-top:2px;font-size:19px;font-weight:800;line-height:1.2}
.kpi span{display:block;margin-top:3px;font-size:10px;color:var(--muted)}
.toolbar{background:#fff;border:1px solid var(--border);border-radius:11px;padding:10px 11px;display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.toolbar input,.toolbar select{width:195px}
input,select,textarea{border:1px solid #D1D5DB;border-radius:7px;padding:7px 10px;background:#fff;color:var(--ink);min-width:0;font-size:13px}
input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 3px rgba(13,59,102,.1);border-color:var(--navy)}
textarea{resize:vertical;min-height:70px}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;background:#fff}
th{font-size:11px;text-align:left;text-transform:none;letter-spacing:0;color:#4A5568;background:#F8FAFC;border-bottom:1px solid var(--border);padding:8px 10px;white-space:nowrap;font-weight:600}
th.sortable{padding:0}
th.sortable button{width:100%;height:100%;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;text-align:left;padding:8px 10px;display:inline-flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap}
th.sortable button:hover{background:#EEF4FB;color:var(--navy)}
th.sortable.active button{color:var(--navy)}
th.sortable button span{font-size:10px;color:var(--muted)}
th.num.sortable button{justify-content:flex-end;text-align:right}
td{border-bottom:1px solid #F1F5F9;padding:8px 10px;vertical-align:middle}
tr:hover td{background:#FAFCFF}
.num{text-align:right;font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.money-ok{color:var(--green);font-weight:750}.money-bad{color:var(--red);font-weight:750}.money-warn{color:var(--amber);font-weight:750}
.payment-debt-cell span{display:block;margin-top:2px;font-size:10px;font-weight:700;text-transform:uppercase}
.payment-debt-cell.is-paid{color:var(--green)}
.payment-debt-cell.is-debt{color:var(--red)}
.payment-row.is-paid td{background:#F7FCF8}
.payment-row.is-debt td{background:#FFF8F8}
.payment-row:hover td{filter:brightness(.985)}
.payment-contract-picker{gap:8px}
.payment-selected{border:1px solid #D1D5DB;border-radius:8px;padding:9px 11px;background:#F8FAFC;color:var(--muted);font-weight:700}
.payment-selected.is-paid{border-color:#A7D7AE;background:#EFFAF1;color:var(--green)}
.payment-selected.is-debt{border-color:#F1AAA7;background:#FFF1F1;color:var(--red)}
.payment-contract-list{display:grid;gap:7px;max-height:260px;overflow:auto;padding-right:3px}
.payment-contract-option{width:100%;border:1px solid #E5E7EB;border-left-width:5px;border-radius:8px;background:#fff;color:var(--ink);display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;text-align:left;padding:9px 10px;cursor:pointer}
.payment-contract-option span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payment-contract-option strong{font-variant-numeric:tabular-nums}
.payment-contract-option em{font-style:normal;font-size:10px;font-weight:800;text-transform:uppercase;border-radius:20px;padding:3px 8px}
.payment-contract-option.is-paid{border-left-color:var(--green)}
.payment-contract-option.is-paid strong{color:var(--green)}
.payment-contract-option.is-paid em{background:#DCFCE7;color:#166534}
.payment-contract-option.is-debt{border-left-color:var(--red)}
.payment-contract-option.is-debt strong{color:var(--red)}
.payment-contract-option.is-debt em{background:#FEE2E2;color:#991B1B}
.payment-contract-option:hover,.payment-contract-option.selected{border-color:#94A3B8;box-shadow:0 0 0 3px rgba(13,59,102,.08)}
.access-card .table-wrap{max-height:calc(100vh - 240px)}
.access-card table{min-width:2600px}
.access-card th:first-child,.access-card td:first-child{position:sticky;left:0;z-index:2;background:#fff;min-width:220px}
.access-card th:first-child{z-index:3;background:#F8FAFC}
.access-cell{min-width:118px;text-align:center;white-space:nowrap}
.access-cell label{display:inline-flex;align-items:center;gap:3px;margin:0 3px;color:var(--muted);font-size:11px;font-weight:700}
.access-cell input{width:15px;height:15px;padding:0;accent-color:var(--navy)}
.access-user-meta{margin-top:2px;color:var(--muted);font-size:10px}
.access-login-meta{margin-top:5px;color:#315a87;font-size:10px;font-weight:700}
.privacy-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.privacy-kpis div{background:#fff;border:1px solid var(--border);border-radius:10px;padding:14px 16px;box-shadow:var(--shadow)}
.privacy-kpis span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:800;letter-spacing:.04em}
.privacy-kpis b{display:block;margin-top:6px;font-size:22px;color:var(--navy)}
.access-log-card{margin-top:14px}
.access-log-card table{min-width:980px}
.access-agent{display:inline-block;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.access-disabled{opacity:.45;cursor:not-allowed}
.no-access-card{max-width:560px;margin:44px auto}
.no-access-card .card-body{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.no-access-card h2{margin:0;font-size:20px}
.no-access-card p{margin:0;color:var(--muted);line-height:1.45}
.progress{height:6px;border-radius:20px;background:#E5E7EB;overflow:hidden;min-width:60px}
.progress span{display:block;height:100%;background:var(--green);border-radius:99px}
.progress span.mid{background:#D97706}.progress span.low{background:#DC2626}
.bars{display:flex;flex-direction:column;gap:9px}
.bar-row{display:grid;grid-template-columns:130px 1fr 105px;gap:10px;align-items:center}
.bar-track{height:6px;background:#E5E7EB;border-radius:20px;overflow:hidden}
.bar-fill{height:100%;background:var(--blue);border-radius:99px}
.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.day-name{font-size:10px;color:var(--muted);font-weight:600;text-align:center;padding:4px}
.day{min-height:72px;background:#fff;border:1px solid var(--border);border-radius:6px;padding:4px 6px;font-size:11px}
.day.today{outline:0;border-color:var(--navy);background:#EFF6FF}
.event{display:block;margin-top:1px;border-radius:3px;padding:1px 4px;background:#DCFCE7;color:#166534;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line)}
.tab{background:transparent;border:0;padding:8px 15px;cursor:pointer;color:var(--muted);font-weight:500;border-bottom:2px solid transparent;font-size:13px}
.tab.active{color:var(--navy);border-bottom-color:var(--navy)}
.overlay{display:none;position:fixed;inset:0;background:rgba(12,20,30,.48);z-index:1000;align-items:center;justify-content:center;padding:18px}
.overlay.open{display:flex}
.modal{background:#fff;border-radius:13px;box-shadow:0 24px 64px rgba(0,0,0,.22);width:min(660px,95vw);max-height:90vh;display:flex;flex-direction:column}
.modal-head,.modal-foot{padding:15px 20px;border-bottom:1px solid #eee;display:flex;justify-content:space-between;align-items:center;gap:10px}
.modal-foot{padding:11px 20px;border-top:1px solid #eee;border-bottom:0;justify-content:flex-end;background:#FAFAFA}
.modal-head h3{margin:0;font-size:16px;font-weight:700}
.modal-body{padding:18px;overflow:auto}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:flex;flex-direction:column;gap:5px}
.field.full{grid-column:1/-1}
.field label{font-size:11px;font-weight:700;color:#374151}
.section-label{grid-column:1/-1;color:#9CA3AF;font-size:10px;text-transform:uppercase;letter-spacing:.9px;font-weight:700;border-bottom:1px solid #EEE;padding:9px 0 4px}
.toast{position:fixed;right:18px;bottom:18px;background:#12263a;color:#fff;padding:10px 13px;border-radius:8px;box-shadow:var(--shadow);opacity:0;transform:translateY(8px);transition:.18s;z-index:1200}
.toast.show{opacity:1;transform:translateY(0)}
.empty{padding:34px;text-align:center;color:var(--muted)}
.user-pill{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auth-screen{min-height:calc(100vh - 100px);display:grid;place-items:center;padding:24px}
.auth-panel{width:min(520px,100%);background:#fff;border:1px solid var(--border);border-radius:11px;padding:28px;box-shadow:0 18px 48px rgba(13,59,102,.08);text-align:center}
.auth-mark{width:46px;height:46px;margin:0 auto 14px;border-radius:10px;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;letter-spacing:0}
.auth-panel h2{margin:0 0 8px;font-size:24px}
.auth-panel p{margin:0 auto 18px;color:var(--muted);line-height:1.5;max-width:410px}
.auth-login{min-width:210px}
.auth-error{margin:0 auto 16px;padding:10px 12px;border-radius:8px;background:#FEE2E2;color:#991B1B;text-align:left}
.auth-config{display:flex;flex-direction:column;gap:8px;text-align:left}
.auth-config div{border:1px solid var(--border);border-radius:8px;padding:9px 11px;background:#F8FAFC}
.auth-config strong{display:block;font-size:11px;color:#374151;margin-bottom:3px}
.auth-config span{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.production-flow{display:grid;grid-template-columns:repeat(7,minmax(118px,1fr));gap:8px;overflow:auto}
.flow-step{border:1px solid var(--border);border-radius:8px;padding:10px;background:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-height:94px}
.flow-step strong{display:block;font-size:12px}
.flow-step span{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.production-board{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px}
.production-column{border:1px solid var(--border);border-radius:8px;background:#fff;padding:10px;display:flex;flex-direction:column;gap:9px;min-width:0}
.production-column-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.production-column-head strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-column-head span{font-size:11px;color:var(--muted);font-weight:700}
.production-stage-list{display:flex;flex-direction:column;gap:5px}
.stage-chip{border:1px solid #E5E7EB;background:#F8FAFC;color:#374151;border-radius:6px;padding:5px 7px;display:flex;justify-content:space-between;gap:8px;cursor:pointer;text-align:left;font-size:11px}
.stage-chip:hover{border-color:#CBD5E0;background:#EFF6FF}
.gantt{min-width:980px;display:flex;flex-direction:column;gap:5px}
.gantt-scale{height:20px;position:relative;margin-left:230px;border-bottom:1px solid var(--border);color:var(--muted);font-size:10px}
.gantt-scale span{position:absolute;top:0;transform:translateX(-1px);text-transform:uppercase}
.gantt-row{display:grid;grid-template-columns:220px 1fr;gap:10px;align-items:center;min-height:30px}
.gantt-label{min-width:0}
.gantt-label strong{display:block;font-size:11px}
.gantt-label span{display:block;color:var(--muted);font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gantt-track{height:24px;position:relative;background:repeating-linear-gradient(90deg,#F8FAFC 0,#F8FAFC 56px,#EEF2F7 57px);border:1px solid #E5E7EB;border-radius:6px;overflow:hidden}
.gantt-segment{position:absolute;top:3px;height:16px;border-radius:4px;color:#fff;font-size:9px;line-height:16px;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gantt-segment.design{background:var(--blue)}
.gantt-segment.procurement{background:var(--orange)}
.gantt-segment.production{background:var(--green)}
.gantt-segment.logistics{background:var(--teal)}
.gantt-segment.installation{background:var(--purple)}
.production-app{display:flex;flex-direction:column;gap:14px}
.production-notice{border:1px solid var(--border);border-radius:8px;padding:9px 12px;font-weight:600}
.production-notice.ok{background:#ECFDF5;color:#166534;border-color:#BBF7D0}
.production-notice.bad,.production-warning{background:#FEF2F2;color:#991B1B;border:1px solid #FECACA;border-radius:8px;padding:9px 12px}
.production-warning.full{grid-column:1/-1}
.production-filters input,.production-filters select{width:190px}
.link-button{border:0;background:transparent;color:var(--blue);font-weight:700;cursor:pointer;padding:0;text-align:left}
.link-button:hover{text-decoration:underline}
.actions.compact{gap:5px;flex-wrap:nowrap}
.production-row-overdue td{background:#FFF7F7}
.production-form-card{overflow:visible}
.production-header{overflow:visible}
.production-header h2{margin:2px 0 3px;font-size:21px}
.production-header p{margin:0;color:var(--muted)}
.production-header-grid{display:grid;grid-template-columns:minmax(260px,1.6fr) auto minmax(160px,1fr) auto auto auto auto;gap:14px;align-items:center}
.production-header-grid strong{display:block;margin-top:3px}
.production-tabs{display:flex;gap:4px;overflow:auto;background:#fff;border:1px solid var(--border);border-radius:9px;padding:0 8px}
.production-tab-panel{display:block}
.production-checklist{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.production-check-row{display:grid;grid-template-columns:minmax(230px,1fr) auto minmax(260px,1.2fr);gap:10px;align-items:center;border:1px solid #EEF2F7;border-radius:8px;padding:8px 10px;background:#fff}
.production-check-row label,.check-field{display:flex;align-items:center;gap:8px;font-weight:600;color:#374151}
.check-field{border:1px solid #EEF2F7;border-radius:8px;padding:9px 10px;background:#fff}
.production-inline-form{display:grid;grid-template-columns:1.3fr 1fr 1fr repeat(4,150px) 150px 94px 1fr auto;gap:8px;align-items:end;margin-bottom:12px}
.production-inline-form input,.production-inline-form select{width:100%}
.production-comment-form{display:grid;grid-template-columns:230px 1fr auto;gap:8px;align-items:start;margin-bottom:12px}
.production-comment-form textarea{min-height:42px}
.production-comments{display:flex;flex-direction:column;gap:8px}
.production-comment{border:1px solid #EEF2F7;border-radius:8px;padding:10px 12px;background:#fff}
.production-comment div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.production-comment span{color:var(--muted);font-size:12px}
.production-comment p{margin:7px 0 0;line-height:1.45}
.production-local-modal{position:fixed;inset:0;background:rgba(12,20,30,.48);z-index:1100;display:flex;align-items:center;justify-content:center;padding:18px}
.production-pill-danger{background:#FEE2E2;color:#991B1B}
.production-kanban-head{align-items:center}
.production-kanban-filters input,.production-kanban-filters select{width:180px}
.production-kanban-scroll{overflow-x:auto;overflow-y:hidden;padding-bottom:6px}
.production-kanban-board{display:flex;gap:12px;align-items:flex-start;min-width:max-content}
.production-kanban-skeleton{display:flex;gap:12px;overflow:hidden}
.production-kanban-column{width:310px;min-width:310px;max-height:calc(100vh - 230px);background:#F8FAFC;border:1px solid var(--border);border-radius:9px;display:flex;flex-direction:column;overflow:hidden}
.production-kanban-column.skeleton{height:520px;background:linear-gradient(90deg,#F3F4F6,#E5E7EB,#F3F4F6);background-size:220% 100%}
.production-kanban-column-head{padding:10px 11px 8px;border-bottom:1px solid #E5E7EB;background:#fff;display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.production-kanban-column-head strong{display:block;font-size:13px;line-height:1.25}
.production-kanban-column-head span{display:block;margin-top:4px;color:var(--muted);font-size:11px}
.production-kanban-column-progress{padding:8px 11px;background:#fff;border-bottom:1px solid #EEF2F7}
.production-drop-zone{display:flex;flex-direction:column;gap:8px;padding:10px;overflow-y:auto;min-height:210px}
.production-drop-zone.drag-over{background:#EFF6FF;box-shadow:inset 0 0 0 2px #93C5FD}
.production-kanban-card{background:#fff;border:1px solid #E1E8F0;border-left:4px solid var(--blue);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px;cursor:grab;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.production-kanban-card:hover{border-color:#B6C5D6;box-shadow:0 8px 18px rgba(15,23,42,.08)}
.production-kanban-card.dragging{opacity:.58;cursor:grabbing}
.production-kanban-card.overdue{border-left-color:var(--red);background:#FFF7F7}
.production-kanban-card.due-soon{border-left-color:#D97706}
.production-kanban-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
.production-kanban-card-top strong{font-size:13px;color:var(--navy)}
.production-kanban-card-sub,.production-kanban-card-desc{color:var(--muted);font-size:11px;line-height:1.35}
.production-kanban-card-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.production-kanban-client{font-weight:700;line-height:1.3}
.production-kanban-meta{display:flex;justify-content:space-between;gap:8px;color:#374151;font-size:11px}
.production-kanban-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-kanban-card-money{font-weight:800;color:#111827}
.production-kanban-card-flags{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.production-kanban-empty{border:1px dashed #CBD5E1;border-radius:8px;background:#fff;color:var(--muted);padding:18px 10px;text-align:center;font-size:12px}
.production-bitrix-board{gap:8px}
.production-bitrix-column{width:300px;min-width:300px;background:rgba(248,250,252,.78)}
.production-bitrix-column-ribbon{min-height:42px;padding:10px 12px;background:var(--stage-color);color:#061827;display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:800;clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%)}
.production-bitrix-column-ribbon strong{font-size:13px;line-height:1.2}
.production-bitrix-column-ribbon span{font-size:12px;font-weight:600}
.production-bitrix-column-total{background:rgba(255,255,255,.72);padding:12px 13px 8px;font-size:24px;font-weight:300;color:#31465F}
.production-bitrix-drop-zone{display:flex;flex-direction:column;gap:8px;padding:8px;overflow-y:auto;min-height:210px}
.production-bitrix-card{border-left:0;cursor:default;border-radius:8px;gap:7px}
.production-bitrix-card .production-kanban-card-top strong{font-size:13px;line-height:1.25}
.production-bitrix-owner{color:#1264b0;font-size:13px;font-weight:600}
.production-bitrix-finance{border:1px solid #E2E8F0;border-radius:8px;background:#F8FAFC;padding:8px;display:flex;flex-direction:column;gap:7px}
.production-bitrix-finance.debt{border-color:#F3C5C5;background:#FFF8F8}
.production-bitrix-finance.paid{border-color:#B7DFC1;background:#F4FBF6}
.production-bitrix-finance.missing{border-color:#F2D18B;background:#FFFBEB}
.production-bitrix-finance-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;font-weight:800;color:#123D68}
.production-bitrix-finance-head span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-bitrix-finance-head a{font-size:10px;text-decoration:none;color:#1264b0;border:1px solid #BFDBFE;border-radius:999px;padding:2px 6px;background:#EFF6FF}
.production-bitrix-finance-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;align-items:center;font-size:11px;color:#64748B}
.production-bitrix-finance-grid b{font-size:11px;color:#111827;font-variant-numeric:tabular-nums;text-align:right}
.production-bitrix-pay-progress .progress{height:6px}
.production-bitrix-pay-progress b{font-size:11px}
.production-bitrix-files{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.production-bitrix-files a{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:11px;text-decoration:none}
.production-bitrix-files img{width:88px;height:58px;object-fit:cover;background:#EEF2F7;border:1px solid #E5E7EB}

.calculator-app{display:flex;flex-direction:column;gap:14px}
.calculator-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:14px;align-items:start}
.calculator-main,.calculator-side{display:flex;flex-direction:column;gap:14px;min-width:0}
.calculator-card{overflow:visible}
.calculator-form{display:flex;flex-direction:column;gap:14px}
.calculator-options{display:flex;flex-direction:column;gap:8px}

.portal-hero{background:#fff;border:1px solid var(--border);border-radius:11px;padding:16px 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:18px;overflow:hidden;position:relative}
.portal-hero:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(180deg,var(--teal),var(--blue))}
.portal-hero.dashboard{background:linear-gradient(135deg,#fff 0%,#F6FAFC 60%,#EDF7F4 100%)}
.portal-hero h2{margin:3px 0 4px;font-size:23px;line-height:1.12}
.portal-hero p{margin:0;color:var(--muted);max-width:660px;line-height:1.45}
.portal-kicker{font-size:10px;text-transform:uppercase;letter-spacing:1px;font-weight:800;color:var(--teal)}
.portal-hero .actions{justify-content:flex-end}
.portal-hero .actions input{width:260px}
.portal-quick{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.portal-form textarea{min-height:96px}
.portal-form input[type="color"]{height:35px;padding:4px}
.portal-color{width:13px;height:13px;border-radius:4px;display:inline-block;margin-right:7px;vertical-align:-2px;border:1px solid rgba(0,0,0,.12)}
.portal-org-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.portal-unit{background:#fff;border:1px solid var(--border);border-radius:11px;padding:14px;min-height:124px;display:flex;flex-direction:column;gap:6px}
.portal-unit strong{font-size:14px;color:var(--navy)}
.portal-unit span{font-size:12px;color:var(--teal);font-weight:700}
.portal-unit p{margin:0;color:var(--muted);font-size:12px;line-height:1.35;flex:1}
.portal-unit b{font-size:12px}
.portal-flow{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;overflow:auto}
.portal-step{background:#fff;border:1px solid var(--border);border-radius:11px;padding:12px;min-height:112px;display:flex;flex-direction:column;gap:6px;position:relative}
.portal-step:after{content:"";position:absolute;right:-10px;top:50%;width:10px;height:1px;background:var(--border)}
.portal-step:last-child:after{display:none}
.portal-step span{width:26px;height:26px;border-radius:8px;background:#E0F2FE;color:var(--navy);display:grid;place-items:center;font-size:11px;font-weight:800}
.portal-step strong{font-size:13px;line-height:1.25}
.portal-step p{margin:0;color:var(--muted);font-size:12px;flex:1}
.portal-step em{font-style:normal;color:var(--teal);font-size:11px;font-weight:800}
.portal-mini-flow{display:flex;gap:8px;align-items:center;overflow:auto;padding:2px}
.portal-mini-flow span{flex:1;min-width:120px;border:1px solid #DCE7F0;border-radius:8px;background:#F8FAFC;padding:10px 11px;font-size:12px;font-weight:700;color:#31465F;position:relative}
.portal-mini-flow span:not(:last-child):after{content:"→";position:absolute;right:-12px;color:var(--muted)}
.card td b + .muted,.table-wrap td span.muted{display:block;margin-top:2px;font-size:11px;line-height:1.25}
.modal:has(.portal-reader){width:min(1180px,96vw)}
.portal-reader{display:flex;flex-direction:column;gap:18px}
.portal-reader header{border:1px solid #DCE7F0;border-radius:11px;background:linear-gradient(135deg,#F8FAFC,#FFFFFF);padding:18px 20px}
.portal-reader header span{display:inline-flex;border-radius:20px;background:#DCFCE7;color:#166534;font-size:11px;font-weight:800;padding:3px 9px;margin-bottom:8px}
.portal-reader header h2{margin:0;font-size:25px;line-height:1.15;color:var(--navy)}
.portal-reader header p{margin:8px 0 12px;color:var(--muted);line-height:1.5}
.portal-reader header div{display:flex;gap:16px;flex-wrap:wrap;color:#374151;font-size:12px}
.portal-reader header b{color:var(--ink)}
.portal-reader-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}
.portal-reader-toc{position:sticky;top:64px;border:1px solid var(--border);border-radius:11px;background:#fff;padding:14px;max-height:calc(100vh - 190px);overflow:auto}
.portal-reader-toc strong{display:block;margin-bottom:9px;color:var(--navy)}
.portal-reader-toc span{display:block;border-left:3px solid #DCE7F0;padding:6px 0 6px 9px;color:#4B5F77;font-size:12px;line-height:1.25}
.portal-reader-content{border:1px solid var(--border);border-radius:11px;background:#fff;padding:24px 30px;line-height:1.68;color:#243246}
.portal-reader-content h2{font-size:26px;line-height:1.16;margin:4px 0 14px;color:var(--navy)}
.portal-reader-content h3{font-size:19px;line-height:1.25;margin:28px 0 10px;padding-top:18px;border-top:1px solid #EEF2F7;color:var(--navy)}
.portal-reader-content h4{font-size:15px;margin:20px 0 8px;color:#0F766E}
.portal-reader-content p{margin:8px 0}
.portal-reader-content .lead{font-size:15px;color:#374151;font-weight:700}
.portal-reader-bullet{position:relative;padding-left:22px}
.portal-reader-bullet:before{content:"";position:absolute;left:4px;top:.8em;width:7px;height:7px;border-radius:99px;background:var(--teal)}
.portal-reader-number{font-weight:650;color:#31465F}
.portal-doc-table-wrap{
  overflow:auto;
  margin:18px 0 22px;
  border:1px solid #d9e2ee;
  border-radius:12px;
  background:#fff;
}
.portal-doc-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:12px;
  line-height:1.45;
}
.portal-doc-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f0f5fb;
  color:#173966;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:900;
  padding:11px 12px;
  border-bottom:1px solid #cbd8e8;
  border-right:1px solid #dbe5f1;
  vertical-align:top;
}
.portal-doc-table td{
  padding:11px 12px;
  border-bottom:1px solid #edf2f7;
  border-right:1px solid #edf2f7;
  vertical-align:top;
  color:#243246;
}
.portal-doc-table th:last-child,
.portal-doc-table td:last-child{border-right:0}
.portal-doc-table tbody tr:nth-child(even) td{background:#fbfdff}
.portal-doc-table tbody tr:hover td{background:#f6f9fd}
.portal-file-chip{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  margin-top:6px;
  border-radius:999px;
  background:#e4eef8;
  color:#1a5fa0;
  padding:3px 9px;
  font-size:11px;
  font-weight:800;
}
.portal-attachment-viewer{
  border:1px solid #d9e2ee;
  border-radius:14px;
  overflow:hidden;
  background:#f8fbfe;
  margin-bottom:20px;
}
.portal-attachment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background:#fff;
  border-bottom:1px solid #e6edf5;
}
.portal-attachment-head span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:900;color:#8a9ab4}
.portal-attachment-head strong{display:block;margin-top:2px;color:#0f1f38;font-size:14px}
.portal-attachment-head em{display:block;margin-top:2px;font-style:normal;color:#66758d;font-size:11px}
.portal-attachment-frame{width:100%;height:min(72vh,760px);border:0;background:#fff;display:block}
.portal-attachment-fallback{padding:28px;background:#fff;color:#4a5a72}
.portal-attachment-fallback b{display:block;color:#0f1f38;margin-bottom:6px}

.knowledge-hero{
  display:flex;justify-content:space-between;gap:22px;align-items:flex-end;
  border:1px solid var(--portal-border,#dbe3ec);border-radius:12px;
  background:linear-gradient(135deg,#0f213c 0%,#163e66 54%,#16715d 100%);
  color:#fff;padding:26px;margin-bottom:14px;box-shadow:0 14px 32px rgba(15,35,65,.12)
}
.knowledge-hero h2{margin:8px 0 10px;max-width:900px;font-size:30px;line-height:1.12;letter-spacing:0}
.knowledge-hero p{margin:0;max-width:900px;color:rgba(255,255,255,.78);font-size:15px;line-height:1.55}
.knowledge-kicker{display:inline-flex;border:1px solid rgba(255,255,255,.28);border-radius:999px;padding:6px 10px;background:rgba(255,255,255,.12);font-weight:800;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.knowledge-hero-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;min-width:270px}
.knowledge-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:14px}
.knowledge-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px 210px 180px;gap:10px;margin-bottom:14px}
.knowledge-toolbar input,.knowledge-toolbar select{width:100%}
.knowledge-map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.knowledge-map-card{border:1px solid var(--portal-border,#dbe3ec);border-radius:12px;background:#fff;padding:15px;box-shadow:0 6px 18px rgba(15,35,65,.05)}
.knowledge-map-card>span{display:block;color:#7a8da8;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.knowledge-map-card strong{display:block;color:#11223c;font-size:18px;margin:5px 0 12px}
.knowledge-map-card div{display:flex;gap:7px;flex-wrap:wrap}
.knowledge-map-card em{font-style:normal;border-radius:999px;background:#eef5fd;color:#1f5f9f;padding:5px 8px;font-size:12px;font-weight:800}
.knowledge-results{border:1px solid var(--portal-border,#dbe3ec);border-radius:12px;background:#fff;padding:16px}
.knowledge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.knowledge-doc-card{border:1px solid #dfe8f1;border-radius:12px;background:#fff;padding:15px;display:flex;flex-direction:column;gap:12px;min-height:280px}
.knowledge-doc-card:hover{border-color:#9fc3e8;box-shadow:0 10px 22px rgba(21,101,192,.08)}
.knowledge-doc-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.knowledge-doc-type{display:inline-flex;border-radius:999px;background:#eef5fd;color:#155da0;padding:5px 9px;font-size:12px;font-weight:900}
.knowledge-doc-card h3{margin:0;color:#10203a;font-size:19px;line-height:1.2}
.knowledge-doc-card p{margin:0;color:#52627a;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.knowledge-doc-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:auto}
.knowledge-doc-meta span{border:1px solid #edf2f7;border-radius:9px;background:#fbfdff;padding:8px;color:#40536d;font-size:12px}
.knowledge-doc-meta b{display:block;color:#8a9ab1;text-transform:uppercase;font-size:10px;margin-bottom:3px}
.knowledge-doc-tags{display:flex;gap:6px;flex-wrap:wrap;min-height:24px}
.knowledge-doc-tags em{font-style:normal;background:#f3f6fa;border:1px solid #e2e9f2;border-radius:999px;padding:4px 8px;color:#586b84;font-size:12px;font-weight:700}
.knowledge-file{border-left:4px solid #1f7a63;background:#f0fbf7;border-radius:8px;padding:8px 10px;color:#184f42;font-weight:800;font-size:12px}
.knowledge-file span{margin-left:6px;color:#5d756e;font-weight:700}
.knowledge-doc-actions{display:flex;gap:8px;flex-wrap:wrap}
.kb-converted-site{display:flex;flex-direction:column;gap:18px}
.kb-converted-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;border-radius:14px;background:linear-gradient(135deg,#10233f,#175c7a);color:#fff;padding:26px}
.kb-converted-hero span{display:inline-flex;border:1px solid rgba(255,255,255,.28);border-radius:999px;padding:5px 9px;background:rgba(255,255,255,.12);font-size:12px;font-weight:900;text-transform:uppercase}
.kb-converted-hero h1{margin:9px 0 8px;font-size:34px;line-height:1.08;letter-spacing:0}
.kb-converted-hero p{margin:0;color:rgba(255,255,255,.78);line-height:1.5}
.kb-converted-hero a{display:inline-flex;white-space:nowrap;border-radius:9px;background:#fff;color:#123054;padding:10px 12px;font-weight:900;text-decoration:none}
.kb-converted-passport{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.kb-converted-passport div{border:1px solid #dfe8f1;border-radius:10px;background:#fbfdff;padding:10px}
.kb-converted-passport b{display:block;font-size:11px;text-transform:uppercase;color:#7b8da5;margin-bottom:4px}
.kb-converted-passport span{font-weight:800;color:#14243d}
.kb-converted-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px;align-items:start}
.kb-converted-toc{position:sticky;top:64px;border:1px solid #dfe8f1;border-radius:12px;background:#fff;padding:13px;display:flex;flex-direction:column;gap:7px}
.kb-converted-toc strong{color:#10233f;margin-bottom:4px}
.kb-converted-toc a{display:flex;gap:8px;padding:8px;border-radius:8px;color:#31475f;text-decoration:none;font-weight:800}
.kb-converted-toc a:hover{background:#eef5fd;color:#1565c0}
.kb-converted-toc span{color:#8a9ab1;font-size:11px}
.kb-converted-content{display:flex;flex-direction:column;gap:14px}
.kb-converted-remember,.kb-converted-section{border:1px solid #dfe8f1;border-radius:12px;background:#fff;padding:20px}
.kb-converted-remember{border-left:5px solid #17805f;background:#f8fdfb}
.kb-converted-section h2,.kb-converted-remember h2{margin:0 0 12px;color:#10233f}
.section-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#a36300;font-weight:900;margin-bottom:5px}
.kb-converted-section table{border-collapse:separate;border-spacing:0;width:100%;border:1px solid #dfe8f1;border-radius:10px;overflow:hidden;margin:12px 0}
.kb-converted-section td,.kb-converted-section th{border-right:1px solid #dfe8f1;border-bottom:1px solid #dfe8f1;padding:9px 11px;vertical-align:top}
.kb-converted-section tr:last-child td,.kb-converted-section tr:last-child th{border-bottom:0}
.kb-converted-section td:last-child,.kb-converted-section th:last-child{border-right:0}
.kb-converted-section th,.kb-converted-section tr:first-child td{background:#eef5fd;color:#102f55;font-weight:900}

@media(max-width:1200px){
  .knowledge-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .knowledge-map{grid-template-columns:repeat(2,minmax(0,1fr))}
  .knowledge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .knowledge-hero,.kb-converted-hero{display:block}
  .knowledge-hero-actions{margin-top:16px;justify-content:flex-start}
  .knowledge-kpis,.knowledge-map,.knowledge-grid,.kb-converted-passport{grid-template-columns:1fr}
  .knowledge-toolbar{grid-template-columns:1fr}
  .kb-converted-layout{grid-template-columns:1fr}
  .kb-converted-toc{position:static}
}
.modal:has(.reg-site),.modal:has(.reg-html-form){width:min(1380px,97vw)}
.reg-site{
  --reg-navy:#0f1f38;
  --reg-blue:#1e6fbf;
  --reg-teal:#2bbfa4;
  --reg-bg:#f3f6fa;
  --reg-border:#d9e2ee;
  --reg-muted:#66758d;
  display:flex;
  flex-direction:column;
  gap:18px;
  color:var(--reg-navy);
}
.reg-hero{
  border-radius:16px;
  padding:30px 34px;
  color:#fff;
  background:linear-gradient(135deg,#0f1f38 0%,#173966 58%,#1e6fbf 100%);
  position:relative;
  overflow:hidden;
}
.reg-hero:after{
  content:"";
  position:absolute;
  right:-90px;
  top:-120px;
  width:320px;
  height:320px;
  border:54px solid rgba(255,255,255,.06);
  border-radius:50%;
}
.reg-hero-kicker{
  display:inline-flex;
  padding:4px 10px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  color:rgba(255,255,255,.72);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.reg-hero h2{margin:14px 0 8px;font-size:36px;line-height:1.05;letter-spacing:-.4px;max-width:760px}
.reg-hero p{margin:0;max-width:780px;color:rgba(255,255,255,.78);font-size:15px;line-height:1.65}
.reg-meta-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
.reg-meta-row span{
  display:inline-flex;
  border-radius:8px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.12);
  padding:7px 10px;
  color:rgba(255,255,255,.82);
  font-size:12px;
  font-weight:700;
}
.reg-nav{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  background:rgba(255,255,255,.94);
  border:1px solid var(--reg-border);
  border-radius:12px;
  padding:8px;
}
.reg-nav a{
  text-decoration:none;
  color:var(--reg-muted);
  border-radius:8px;
  padding:7px 12px;
  font-size:12px;
  font-weight:800;
}
.reg-nav a:hover{background:#eef4fb;color:var(--reg-navy)}
.reg-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.reg-metric{
  background:#fff;
  border:1px solid var(--reg-border);
  border-radius:14px;
  padding:16px;
  min-height:112px;
}
.reg-metric strong{display:block;font-size:28px;line-height:1;color:var(--reg-navy);letter-spacing:-.3px}
.reg-metric span{display:block;margin-top:9px;font-size:12px;font-weight:800;color:#233858}
.reg-metric em{display:block;margin-top:5px;font-style:normal;font-size:11px;color:var(--reg-muted);line-height:1.35}
.reg-section{
  background:#fff;
  border:1px solid var(--reg-border);
  border-radius:16px;
  padding:22px;
}
.reg-section-head{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:14px;
  align-items:start;
  margin-bottom:18px;
}
.reg-section-head>span{
  width:44px;
  height:44px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#edf4fb;
  color:var(--reg-blue);
  font-weight:900;
  font-family:"JetBrains Mono",monospace;
}
.reg-section h3{margin:0;font-size:20px;line-height:1.2;color:var(--reg-navy)}
.reg-section p{margin:5px 0 0;color:var(--reg-muted);font-size:13px;line-height:1.55}
.reg-process-map{
  display:grid;
  grid-template-columns:repeat(7,minmax(126px,1fr));
  gap:10px;
}
.reg-process-node{
  position:relative;
  min-height:126px;
  border:1px solid #dbe5f1;
  border-radius:12px;
  padding:12px;
  background:linear-gradient(180deg,#fff,#f8fbfe);
}
.reg-process-node:after{
  content:"";
  position:absolute;
  top:50%;
  right:-10px;
  width:10px;
  height:2px;
  background:#c6d4e4;
}
.reg-process-node:nth-child(7n):after,
.reg-process-node:last-child:after{display:none}
.reg-process-node b{
  display:inline-flex;
  font-family:"JetBrains Mono",monospace;
  color:var(--reg-blue);
  background:#e6f0fa;
  border-radius:999px;
  padding:2px 7px;
  font-size:10px;
}
.reg-process-node strong{display:block;margin-top:8px;font-size:12px;line-height:1.25;color:var(--reg-navy)}
.reg-process-node span{display:block;margin-top:6px;font-size:10px;font-weight:800;color:var(--reg-muted);line-height:1.25}
.reg-process-node em{
  display:inline-flex;
  margin-top:8px;
  font-style:normal;
  font-size:10px;
  font-weight:800;
  color:#1a8a76;
  background:#e3fbf6;
  border-radius:999px;
  padding:3px 7px;
}
.reg-table-wrap{overflow:auto;border:1px solid var(--reg-border);border-radius:12px}
.reg-table{width:100%;border-collapse:collapse;font-size:12px}
.reg-table th{
  background:#f3f6fa;
  color:#475873;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.05em;
  padding:10px 12px;
  border-bottom:1px solid var(--reg-border);
}
.reg-table td{padding:12px;border-bottom:1px solid #eef2f7;vertical-align:top;color:#243246;line-height:1.45}
.reg-table tr:last-child td{border-bottom:0}
.reg-crm-flow{
  display:flex;
  gap:8px;
  overflow:auto;
  padding:2px 0 14px;
  margin-bottom:14px;
}
.reg-crm-flow div{
  min-width:122px;
  border:1px solid var(--reg-border);
  border-radius:12px;
  padding:10px;
  background:#f8fbfe;
}
.reg-crm-flow b{display:block;font-family:"JetBrains Mono",monospace;font-size:10px;color:var(--reg-blue)}
.reg-crm-flow span{display:block;margin-top:5px;font-size:12px;font-weight:800;line-height:1.25}
.reg-role-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.reg-role-card{
  border:1px solid var(--reg-border);
  border-radius:14px;
  padding:14px;
  background:#fbfdff;
}
.reg-role-card>div{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.reg-role-card>div span{font-size:20px}
.reg-role-card h4{margin:0;font-size:13px;line-height:1.25;color:var(--reg-navy)}
.reg-role-card p{font-size:11px;margin:0 0 9px;color:var(--reg-muted)}
.reg-role-card ul{margin:0;padding-left:16px;color:#34445d;font-size:11px;line-height:1.55}
.reg-diagram-lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.reg-lane{
  border:1px solid var(--reg-border);
  border-radius:14px;
  padding:14px;
  background:#fbfdff;
}
.reg-lane h4{margin:0 0 10px;color:var(--reg-navy);font-size:13px}
.reg-lane span{
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 0;
  border-top:1px solid #edf2f7;
  color:#33445c;
  font-size:12px;
  font-weight:700;
}
.reg-lane span:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--reg-teal);flex-shrink:0}
.reg-close-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.reg-check{
  border:1px solid var(--reg-border);
  border-radius:14px;
  background:#fbfdff;
  padding:16px;
}
.reg-check b{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e3fbf6;
  color:#1a8a76;
  margin-bottom:10px;
}
.reg-check strong{display:block;font-size:13px;color:var(--reg-navy)}
.reg-check span{display:block;margin-top:6px;color:var(--reg-muted);font-size:12px;line-height:1.45}
.reg-full-section{padding:0;overflow:hidden}
.reg-full-section .reg-section-head{padding:22px 22px 0}
.reg-full-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:0 22px 18px 80px;
}
.reg-full-meta span{
  display:inline-flex;
  border-radius:999px;
  background:#eef4fb;
  color:#31465f;
  padding:5px 10px;
  font-size:11px;
  font-weight:800;
}
.reg-full-layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:0;
  border-top:1px solid var(--reg-border);
  background:#fff;
}
.reg-full-layout .portal-reader-toc{
  position:sticky;
  top:0;
  max-height:calc(90vh - 120px);
  border:0;
  border-right:1px solid var(--reg-border);
  border-radius:0;
  background:#f8fbfe;
}
.reg-full-content{
  padding:28px 38px 38px;
  max-width:980px;
  color:#243246;
  line-height:1.72;
}
.reg-full-content h2{
  margin:30px 0 14px;
  padding-top:22px;
  border-top:1px solid #e6edf5;
  color:var(--reg-navy);
  font-size:24px;
  line-height:1.2;
  letter-spacing:-.2px;
}
.reg-full-content h2:first-child{margin-top:0;padding-top:0;border-top:0}
.reg-full-content h3{
  margin:24px 0 10px;
  color:#173966;
  font-size:18px;
  line-height:1.3;
}
.reg-full-content h4{
  margin:18px 0 8px;
  color:#1a8a76;
  font-size:14px;
}
.reg-full-content p{margin:8px 0}
.reg-full-content .lead{
  font-size:15px;
  color:#17263d;
  font-weight:800;
}
.reg-full-content .portal-reader-bullet{
  margin:7px 0;
  padding:8px 10px 8px 28px;
  background:#fbfdff;
  border:1px solid #edf2f7;
  border-radius:9px;
}
.reg-full-content .portal-reader-bullet:before{left:12px;top:1.15em}
.reg-full-content .portal-reader-number{
  padding:8px 10px;
  border-left:3px solid var(--reg-blue);
  background:#f6f9fd;
  border-radius:0 8px 8px 0;
}
.reg-full-content .portal-doc-table-wrap{
  box-shadow:0 1px 0 rgba(15,31,56,.03);
}
.reg-html-edit-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border:1px solid var(--reg-border,var(--border));
  border-radius:14px;
  background:#f8fbfe;
  padding:16px 18px;
}
.reg-html-edit-panel strong{display:block;color:var(--reg-navy,var(--navy));font-size:14px}
.reg-html-edit-panel span{display:block;margin-top:4px;color:var(--reg-muted,var(--muted));font-size:12px;line-height:1.45}
.reg-html-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.reg-site-editing{
  outline:3px solid rgba(30,111,191,.28);
  outline-offset:6px;
}
.reg-site-editing [contenteditable="false"]{user-select:none}
.reg-site-editing :is(h1,h2,h3,h4,p,span,strong,em,td,th,li,b):focus{
  outline:2px solid rgba(30,111,191,.55);
  outline-offset:2px;
}
.reg-html-form{display:flex;flex-direction:column;gap:12px}
.reg-html-help{
  display:flex;
  flex-direction:column;
  gap:4px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#F8FAFC;
  padding:12px 14px;
}
.reg-html-help strong{color:var(--navy);font-size:14px}
.reg-html-help span{color:var(--muted);font-size:12px;line-height:1.45}
.reg-html-form textarea{
  min-height:62vh;
  resize:vertical;
  font-family:"JetBrains Mono","SFMono-Regular",Consolas,monospace;
  font-size:12px;
  line-height:1.55;
  tab-size:2;
  white-space:pre;
}

body.corporate-portal-theme{
  --portal-navy:#0f1f38;
  --portal-navy-mid:#1a3055;
  --portal-navy-light:#264a7a;
  --portal-blue:#1e6fbf;
  --portal-accent:#2bbfa4;
  --portal-accent-dim:#1a8a76;
  --portal-bg:#f2f5f9;
  --portal-sidebar:#e8edf4;
  --portal-text:#0f1f38;
  --portal-text-2:#4a5a72;
  --portal-text-3:#8a9ab4;
  --portal-border:rgba(30,60,100,.1);
  --portal-border-2:rgba(30,60,100,.18);
  --portal-success:#1a8a3a;
  --portal-success-bg:#e8f5ed;
  --portal-warn:#a06000;
  --portal-warn-bg:#fff4dc;
  --portal-danger:#b52a2a;
  --portal-danger-bg:#fceaea;
  --portal-info:#1a5fa0;
  --portal-info-bg:#e4eef8;
  --portal-radius:10px;
  --portal-radius-sm:6px;
  background:var(--portal-bg);
  color:var(--portal-text);
  font-family:"Golos Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
body.corporate-portal-theme .shell{display:block;min-height:100vh;background:var(--portal-bg)}
body.corporate-portal-theme .brand{
  position:fixed;left:0;top:0;z-index:101;width:220px;height:54px;
  padding:0 20px;background:linear-gradient(180deg,#0B2F55 0%,#0D3B66 100%);border:0;display:flex;flex-direction:column;justify-content:center;
}
body.corporate-portal-theme .brand strong{font-size:15px;color:#fff;font-weight:700;letter-spacing:-.2px;gap:10px}
body.corporate-portal-theme .brand strong:before{
  content:"⛺";width:auto;height:auto;border-radius:0;background:transparent;
  display:inline-flex;align-items:center;justify-content:center;font-size:15px;
}
body.corporate-portal-theme .brand span{color:rgba(255,255,255,.4);font-size:10px;margin-left:0;margin-top:2px}
body.corporate-portal-theme .sidebar{
  position:fixed;top:54px;left:0;bottom:0;width:220px;height:auto;z-index:90;
  background:linear-gradient(180deg,#0B2F55 0%,#0D3B66 100%);border-right:0;color:#fff;
  padding:12px 0;overflow-y:auto;
}
body.corporate-portal-theme nav{padding:0}
body.corporate-portal-theme .nav-group{
  font-size:10px;font-weight:700;color:rgba(255,255,255,.3);letter-spacing:.07em;
  padding:10px 16px 4px;
}
body.corporate-portal-theme .nav-item{
  width:100%;margin:0;border-radius:0;border-left:3px solid transparent;
  padding:8px 16px;color:rgba(255,255,255,.62);font-size:13px;gap:9px;background:transparent;
}
body.corporate-portal-theme .nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
body.corporate-portal-theme .nav-item.active{
  background:rgba(255,255,255,.14);color:#fff;border-left-color:#4FC3F7;font-weight:600;
}
body.corporate-portal-theme .nav-icon{width:18px;font-size:16px;filter:none}
body.corporate-portal-theme .main{display:block;margin-left:220px;min-height:100vh;background:var(--portal-bg)}
body.corporate-portal-theme .topbar{
  position:fixed;left:220px;right:0;top:0;z-index:100;height:98px;
  background:var(--portal-navy);border:0;border-bottom:1px solid rgba(255,255,255,.06);
  box-shadow:none;padding:10px 20px;color:#fff;
}
body.corporate-portal-theme .topbar>div:first-child{display:none}
body.corporate-portal-theme .top-actions{width:100%;gap:0;justify-content:stretch;align-items:stretch}
body.corporate-portal-theme .portal-topbar-content{width:100%;min-width:0;display:flex;flex-direction:column;gap:10px}
body.corporate-portal-theme .portal-topnav{
  display:flex;align-items:center;gap:6px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin;
}
body.corporate-portal-theme .portal-topnav-item{
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:rgba(255,255,255,.72);
  border-radius:7px;padding:6px 10px;font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:6px;
  white-space:nowrap;line-height:1;min-height:30px;
}
body.corporate-portal-theme .portal-topnav-item:hover{background:rgba(255,255,255,.11);color:#fff}
body.corporate-portal-theme .portal-topnav-item.active{background:#fff;color:var(--portal-navy);border-color:#fff}
body.corporate-portal-theme .portal-topbar-tools{display:flex;align-items:center;gap:16px;min-width:0}
body.corporate-portal-theme .topbar-search{
  margin-right:auto;display:flex;align-items:center;gap:8px;width:360px;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);
  border-radius:8px;padding:6px 14px;color:rgba(255,255,255,.45);font-size:13px;
}
body.corporate-portal-theme .topbar-notif{position:relative;color:rgba(255,255,255,.6);font-size:18px}
body.corporate-portal-theme .notif-dot{
  position:absolute;top:0;right:0;width:8px;height:8px;background:#e74c3c;border-radius:50%;border:2px solid var(--portal-navy);
}
body.corporate-portal-theme .topbar-user{display:flex;align-items:center;gap:8px}
body.corporate-portal-theme .user-avatar{
  width:32px;height:32px;border-radius:50%;background:var(--portal-blue);display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:12px;font-weight:700;
}
body.corporate-portal-theme .user-name{color:rgba(255,255,255,.8);font-size:13px}
body.corporate-portal-theme .top-actions .pill{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.72)}
body.corporate-portal-theme .top-actions .btn.secondary{color:rgba(255,255,255,.72);border-color:rgba(255,255,255,.18);background:transparent}
body.corporate-portal-theme .top-actions .btn.primary{background:var(--portal-blue);border-color:var(--portal-blue);color:#fff}
body.corporate-portal-theme .view{padding:24px;gap:0;min-height:calc(100vh - 98px);padding-top:122px}

body.corporate-portal-theme .page-header{margin-bottom:22px}
body.corporate-portal-theme .page-title{font-size:20px;font-weight:700;color:var(--portal-text);margin-bottom:3px;letter-spacing:-.2px}
body.corporate-portal-theme .page-sub{font-size:13px;color:var(--portal-text-2)}
body.corporate-portal-theme .card input[data-filter],
body.corporate-portal-theme .card select[data-filter]{
  width:260px;border:1px solid var(--portal-border-2);border-radius:var(--portal-radius-sm);
  padding:8px 12px;background:#fff;color:var(--portal-text);font-size:13px;
}
body.corporate-portal-theme .kpi-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}
body.corporate-portal-theme .kpi-card,
body.corporate-portal-theme .kpi{
  background:#fff;border:1px solid var(--portal-border);border-radius:var(--portal-radius);
  padding:14px 16px;box-shadow:none;
}
body.corporate-portal-theme .kpi-label{font-size:11px;color:var(--portal-text-3);margin-bottom:5px;text-transform:uppercase;letter-spacing:.04em;font-weight:700}
body.corporate-portal-theme .kpi-val{font-size:24px;font-weight:700;color:var(--portal-text);line-height:1;margin-bottom:6px}
body.corporate-portal-theme .kpi-delta{font-size:11px;color:var(--portal-text-3)}
body.corporate-portal-theme .kpi-delta.up{color:var(--portal-success)}
body.corporate-portal-theme .kpi-delta.dn{color:var(--portal-danger)}
body.corporate-portal-theme .kpi-delta.neu{color:var(--portal-text-3)}
body.corporate-portal-theme .alert{
  display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:var(--portal-radius-sm);font-size:13px;
}
body.corporate-portal-theme .alert-warn{background:var(--portal-warn-bg);color:var(--portal-warn);border:1px solid #f0d080}
body.corporate-portal-theme .alert-info{background:var(--portal-info-bg);color:var(--portal-info);border:1px solid #b0d0f0}
body.corporate-portal-theme .two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:16px}
body.corporate-portal-theme .three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}
body.corporate-portal-theme .card{
  background:#fff;border:1px solid var(--portal-border);border-radius:var(--portal-radius);
  padding:18px 20px;margin-bottom:16px;box-shadow:none;overflow:hidden;
}
body.corporate-portal-theme .card-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;
  padding:0;border:0;background:transparent;
}
body.corporate-portal-theme .card-title,
body.corporate-portal-theme .card-head h3{
  font-size:14px;font-weight:700;color:var(--portal-text);display:flex;align-items:center;gap:7px;margin:0;
}
body.corporate-portal-theme .card-actions{display:flex;gap:7px}
body.corporate-portal-theme .table-wrap{overflow-x:auto}
body.corporate-portal-theme table{width:100%;border-collapse:collapse;font-size:13px;background:#fff}
body.corporate-portal-theme th{
  font-size:11px;font-weight:700;color:var(--portal-text-3);padding:7px 10px;
  border-bottom:1px solid var(--portal-border-2);background:#f7f9fc;text-transform:uppercase;letter-spacing:.04em;
}
body.corporate-portal-theme th.sortable button{padding:7px 10px;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
body.corporate-portal-theme td{padding:9px 10px;border-bottom:1px solid var(--portal-border);color:var(--portal-text)}
body.corporate-portal-theme tr:hover td{background:#f7f9fc}
body.corporate-portal-theme .badge{
  display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:600;padding:2px 9px;border-radius:20px;
}
body.corporate-portal-theme .badge.ok{background:var(--portal-success-bg);color:var(--portal-success)}
body.corporate-portal-theme .badge.wait{background:var(--portal-warn-bg);color:var(--portal-warn)}
body.corporate-portal-theme .badge.bad{background:var(--portal-danger-bg);color:var(--portal-danger)}
body.corporate-portal-theme .badge.info{background:var(--portal-info-bg);color:var(--portal-info)}
body.corporate-portal-theme .badge.neutral{background:#eef0f3;color:var(--portal-text-3)}
body.corporate-portal-theme .btn{
  border:1px solid var(--portal-border-2);border-radius:var(--portal-radius-sm);padding:7px 14px;
  font-size:12px;font-weight:600;background:transparent;color:var(--portal-text-2);min-height:auto;
}
body.corporate-portal-theme .btn:hover{background:var(--portal-bg);color:var(--portal-text);transform:none;opacity:1}
body.corporate-portal-theme .btn.primary{background:var(--portal-blue);color:#fff;border-color:var(--portal-blue)}
body.corporate-portal-theme .btn.btn-primary{background:var(--portal-blue);color:#fff;border-color:var(--portal-blue)}
body.corporate-portal-theme .btn.primary:hover{background:var(--portal-navy-light);border-color:var(--portal-navy-light)}
body.corporate-portal-theme .btn.btn-primary:hover{background:var(--portal-navy-light);border-color:var(--portal-navy-light)}
body.corporate-portal-theme .btn.secondary{background:transparent;color:var(--portal-text-2);border-color:var(--portal-border-2)}
body.corporate-portal-theme .btn.danger{background:var(--portal-danger-bg);color:var(--portal-danger);border-color:#f0aaaa}
body.corporate-portal-theme .btn.btn-danger{background:var(--portal-danger-bg);color:var(--portal-danger);border-color:#f0aaaa}
body.corporate-portal-theme .btn.small{padding:5px 10px;font-size:11px}
body.corporate-portal-theme .btn.btn-sm{padding:5px 10px;font-size:11px}
body.corporate-portal-theme .actions.compact{gap:5px}
body.corporate-portal-theme .tbl-action{display:flex;gap:5px}
body.corporate-portal-theme .portal-doc-list{display:flex;flex-direction:column;gap:10px}
body.corporate-portal-theme .portal-doc-item{
  display:flex;align-items:center;gap:10px;padding:8px;background:#f7f9fc;border-radius:var(--portal-radius-sm);
}
body.corporate-portal-theme .portal-doc-item>span{font-size:20px}
body.corporate-portal-theme .portal-doc-item>div{flex:1;min-width:0}
body.corporate-portal-theme .portal-doc-item strong{display:block;font-size:12px;color:var(--portal-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.corporate-portal-theme .portal-doc-item em{display:block;font-style:normal;font-size:11px;color:var(--portal-text-3);margin-top:1px}
body.corporate-portal-theme .portal-mini-flow span{
  border-color:var(--portal-border);background:#f7f9fc;border-radius:var(--portal-radius-sm);
  color:var(--portal-text);font-weight:700;
}
body.corporate-portal-theme .portal-org-grid{gap:16px}
body.corporate-portal-theme .portal-unit{
  border-color:var(--portal-border);border-radius:var(--portal-radius);padding:16px 18px;background:#fff;
  border-top:3px solid var(--portal-accent);
}
body.corporate-portal-theme .portal-unit strong{color:var(--portal-text)}
body.corporate-portal-theme .portal-unit span{color:var(--portal-blue)}
body.corporate-portal-theme .portal-flow{grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px}
body.corporate-portal-theme .portal-step{
  border-color:var(--portal-border);border-radius:var(--portal-radius);padding:14px;background:#fff;
}
body.corporate-portal-theme .portal-step span{border-radius:50%;background:var(--portal-navy);color:#fff}
body.corporate-portal-theme .portal-step em{color:var(--portal-accent-dim)}
body.corporate-portal-theme input,
body.corporate-portal-theme select,
body.corporate-portal-theme textarea{
  border:1px solid var(--portal-border-2);border-radius:var(--portal-radius-sm);background:#fff;color:var(--portal-text);
  font-family:"Golos Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
body.corporate-portal-theme input:focus,
body.corporate-portal-theme select:focus,
body.corporate-portal-theme textarea:focus{border-color:var(--portal-blue);box-shadow:0 0 0 3px rgba(30,111,191,.1)}
body.corporate-portal-theme .modal{border-radius:var(--portal-radius);border:1px solid var(--portal-border-2);box-shadow:0 4px 20px rgba(15,31,56,.12)}
body.corporate-portal-theme .modal-head{padding:16px 20px;border-bottom:1px solid var(--portal-border)}
body.corporate-portal-theme .modal-body{padding:20px}
body.corporate-portal-theme .modal-foot{background:#f7f9fc;border-top:1px solid var(--portal-border)}
body.corporate-portal-theme .portal-reader header{border-color:var(--portal-border);background:linear-gradient(135deg,#fff,#f7f9fc)}
body.corporate-portal-theme .portal-reader header h2{color:var(--portal-text)}
body.corporate-portal-theme .portal-reader-content,
body.corporate-portal-theme .portal-reader-toc{border-color:var(--portal-border);border-radius:var(--portal-radius)}
body.corporate-portal-theme .portal-reader-content h2,
body.corporate-portal-theme .portal-reader-content h3{color:var(--portal-navy)}
body.corporate-portal-theme .gt-subpage{
  --text:var(--portal-text);
  --text2:var(--portal-text-2);
  --text3:var(--portal-text-3);
  --border:var(--portal-border);
  --border2:var(--portal-border-2);
  --bg-card:#fff;
  --blue:var(--portal-blue);
  --blue2:#3a8fd4;
  --navy:var(--portal-navy);
  --navy2:var(--portal-navy-light);
  --accent:var(--portal-accent);
  --green:var(--portal-success);
  --green-bg:var(--portal-success-bg);
  --amber:var(--portal-warn);
  --amber-bg:var(--portal-warn-bg);
  --red:var(--portal-danger);
  --red-bg:var(--portal-danger-bg);
  --teal:var(--portal-accent-dim);
  --teal-bg:#e3fbf6;
  --purple:#6f42c1;
  --purple-bg:#f1eaff;
  --r:var(--portal-radius);
  --r-sm:var(--portal-radius-sm);
  margin-bottom:16px;
}
body.corporate-portal-theme .gt-subpage *{box-sizing:border-box}
body.corporate-portal-theme .card-sub{font-size:12px;color:var(--portal-text-3);margin-top:2px}
body.corporate-portal-theme .gt-subpage .bg{background:var(--green-bg);color:var(--green)}
body.corporate-portal-theme .gt-subpage .ba{background:var(--amber-bg);color:var(--amber)}
body.corporate-portal-theme .gt-subpage .br{background:var(--red-bg);color:var(--red)}
body.corporate-portal-theme .gt-subpage .bb{background:#e0ecfc;color:var(--blue)}
body.corporate-portal-theme .gt-subpage .bt{background:var(--teal-bg);color:var(--teal)}
body.corporate-portal-theme .gt-subpage .bp{background:var(--purple-bg);color:var(--purple)}
body.corporate-portal-theme .gt-subpage .bn{background:#e6ebf2;color:var(--text2)}
body.corporate-portal-theme .gt-subpage .bac{background:#fff0cc;color:#7a4800}
body.corporate-portal-theme .gt-org-poster{
  background:#fff;border:1px solid var(--border);border-radius:var(--r);margin-bottom:18px;overflow-x:auto;overflow-y:hidden;
  box-shadow:0 1px 2px rgba(15,31,56,.04);
}
body.corporate-portal-theme .gt-org-titlebar{
  background:#25548d;color:#fff;text-align:center;text-transform:uppercase;font-weight:800;font-size:22px;
  letter-spacing:.02em;padding:16px 18px;font-family:Georgia,"Times New Roman",serif;
}
body.corporate-portal-theme .gt-org-ceo-row{
  display:flex;justify-content:center;padding:20px 18px 28px;position:relative;
}
body.corporate-portal-theme .gt-org-ceo-row:after{
  content:"";position:absolute;left:50%;bottom:6px;width:2px;height:24px;background:#d6dde8;transform:translateX(-50%);
}
body.corporate-portal-theme .gt-org-ceo{
  min-width:250px;background:var(--navy);border-radius:6px;padding:12px 22px;text-align:center;color:#fff;
  box-shadow:0 6px 18px rgba(15,31,56,.12);
}
body.corporate-portal-theme .gt-org-ceo strong{display:block;font-size:15px;line-height:1.2}
body.corporate-portal-theme .gt-org-ceo span{display:block;margin-top:6px;font-size:12px;color:rgba(255,255,255,.6);font-weight:700}
body.corporate-portal-theme .gt-org-section-title,
body.corporate-portal-theme .gt-org-support-title{
  text-align:center;text-transform:uppercase;font-weight:800;color:#243143;letter-spacing:.02em;
}
body.corporate-portal-theme .gt-org-section-title{font-size:18px;margin:0 18px 18px}
body.corporate-portal-theme .gt-org-support-title{font-size:15px;margin:24px 18px 12px}
body.corporate-portal-theme .gt-org-value-chain{
  display:grid;grid-template-columns:repeat(5,minmax(155px,1fr));gap:12px;padding:0 16px 20px;align-items:stretch;
}
body.corporate-portal-theme .gt-value-block{
  min-width:0;display:grid;grid-template-rows:auto 1fr auto auto;border:1px solid #d4d9e0;background:#f8f9fb;
}
body.corporate-portal-theme .gt-value-head{
  min-height:58px;padding:12px 14px;color:#fff;font-weight:800;text-align:center;text-transform:uppercase;
  display:flex;align-items:center;justify-content:center;position:relative;line-height:1.25;font-size:14px;
}
body.corporate-portal-theme .gt-value-head i{
  position:absolute;right:-22px;top:50%;transform:translateY(-50%);width:0;height:0;z-index:3;
  border-top:14px solid transparent;border-bottom:14px solid transparent;border-left:22px solid currentColor;
}
body.corporate-portal-theme .gt-value-block.green .gt-value-head{background:#2f835c;color:#2f835c}
body.corporate-portal-theme .gt-value-block.blue .gt-value-head{background:#25548d;color:#25548d}
body.corporate-portal-theme .gt-value-block.orange .gt-value-head{background:#dc741f;color:#dc741f}
body.corporate-portal-theme .gt-value-block.purple .gt-value-head{background:#653d93;color:#653d93}
body.corporate-portal-theme .gt-value-block.red .gt-value-head{background:#bd5146;color:#bd5146}
body.corporate-portal-theme .gt-value-head span{color:#fff;position:relative;z-index:1}
body.corporate-portal-theme .gt-value-people,
body.corporate-portal-theme .gt-value-function{
  padding:14px 16px;border-bottom:1px solid #d4d9e0;background:#f9fbfe;min-height:150px;
}
body.corporate-portal-theme .gt-value-people span{
  display:block;color:#243143;font-size:13px;line-height:1.45;margin-bottom:3px;
}
body.corporate-portal-theme .gt-value-people span:before{content:"• ";font-weight:700}
body.corporate-portal-theme .gt-value-function{min-height:132px;background:#fff}
body.corporate-portal-theme .gt-value-function strong{
  display:block;font-size:15px;text-transform:uppercase;margin-bottom:8px;font-weight:800;
}
body.corporate-portal-theme .gt-value-block.green .gt-value-function strong{color:#2f835c}
body.corporate-portal-theme .gt-value-block.blue .gt-value-function strong{color:#25548d}
body.corporate-portal-theme .gt-value-block.orange .gt-value-function strong{color:#dc741f}
body.corporate-portal-theme .gt-value-block.purple .gt-value-function strong{color:#653d93}
body.corporate-portal-theme .gt-value-block.red .gt-value-function strong{color:#bd5146}
body.corporate-portal-theme .gt-value-function p{margin:0;color:#243143;font-size:13px;line-height:1.45}
body.corporate-portal-theme .gt-value-subordination{
  padding:10px 14px;background:#eef3f8;color:#52627a;font-size:11px;font-weight:700;text-align:center;
}
body.corporate-portal-theme .gt-org-support-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 16px 18px;
}
body.corporate-portal-theme .gt-support-block{
  border:1px solid #d4d9e0;background:#f9fbfe;min-height:260px;padding:18px 20px;display:flex;flex-direction:column;
}
body.corporate-portal-theme .gt-support-block h4{
  color:#d1a11e;font-size:17px;margin:0 0 12px;text-transform:uppercase;font-weight:800;
}
body.corporate-portal-theme .gt-support-people{color:#243143;font-size:13px;line-height:1.45;margin-bottom:12px}
body.corporate-portal-theme .gt-support-people span{display:block}
body.corporate-portal-theme .gt-support-people span:before{content:"• "}
body.corporate-portal-theme .gt-support-block p,
body.corporate-portal-theme .gt-support-block ul{
  color:#243143;font-size:13px;line-height:1.45;margin:0 0 14px;padding:0;
}
body.corporate-portal-theme .gt-support-block strong{
  color:#d1a11e;text-transform:uppercase;font-size:13px;margin-top:auto;margin-bottom:8px;
}
body.corporate-portal-theme .gt-support-block li{list-style:none;margin-bottom:4px}
body.corporate-portal-theme .gt-support-block li:before{content:"• "}
body.corporate-portal-theme .gt-support-block em{
  display:block;margin-top:10px;color:#63728a;font-style:normal;font-size:11px;font-weight:700;
}
body.corporate-portal-theme .gt-org-intro{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px;
}
body.corporate-portal-theme .gt-org-stat{
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:14px 16px;text-align:center;
}
body.corporate-portal-theme .gt-org-stat-val{font-size:26px;font-weight:700;color:var(--text);line-height:1}
body.corporate-portal-theme .gt-org-stat-label{
  font-size:11px;color:var(--text3);margin-top:4px;text-transform:uppercase;letter-spacing:.04em;font-weight:700;
}
body.corporate-portal-theme .gt-legend{display:flex;gap:10px;align-items:center;font-size:11px;color:var(--text2);flex-wrap:wrap}
body.corporate-portal-theme .gt-legend span{display:flex;align-items:center;gap:5px}
body.corporate-portal-theme .gt-legend i{width:12px;height:3px;display:inline-block;border-radius:2px}
body.corporate-portal-theme .gt-legend i.chain{background:var(--accent)}
body.corporate-portal-theme .gt-legend i.support{background:var(--blue2)}
body.corporate-portal-theme .gt-org-tree{overflow-x:auto;padding:10px 0}
body.corporate-portal-theme .gt-org-level{display:flex;justify-content:center;gap:12px;margin-bottom:4px;flex-wrap:wrap}
body.corporate-portal-theme .gt-org-line-center{display:flex;justify-content:center;margin:2px 0}
body.corporate-portal-theme .vline{width:2px;height:28px;background:var(--border2)}
body.corporate-portal-theme .gt-org-split{
  display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start;min-width:760px;
}
body.corporate-portal-theme .gt-section-chip{
  display:block;width:max-content;margin:0 auto 10px;font-size:10px;font-weight:700;padding:3px 14px;border-radius:20px;
  letter-spacing:.05em;text-transform:uppercase;
}
body.corporate-portal-theme .gt-section-chip.chain{background:var(--accent);color:var(--navy)}
body.corporate-portal-theme .gt-section-chip.support{background:#e0ecfc;color:var(--blue)}
body.corporate-portal-theme .gt-chain-list{display:flex;flex-direction:column;gap:0;align-items:center}
body.corporate-portal-theme .gt-support-list{display:flex;flex-direction:column;gap:10px}
body.corporate-portal-theme .gt-org-node{
  background:var(--bg-card);border:1px solid var(--border2);border-radius:var(--r-sm);padding:10px 14px;
  min-width:140px;max-width:220px;transition:all .15s;text-align:center;
}
body.corporate-portal-theme .gt-org-node:hover{border-color:var(--blue);background:#f0f6ff;transform:translateY(-1px)}
body.corporate-portal-theme .gt-org-node.type-ceo{background:var(--navy);border-color:var(--navy);min-width:200px}
body.corporate-portal-theme .gt-org-node.type-ceo .gt-on-name{color:#fff}
body.corporate-portal-theme .gt-org-node.type-ceo .gt-on-role{color:rgba(255,255,255,.55)}
body.corporate-portal-theme .gt-org-node.type-chain{border-left:3px solid var(--accent);background:#fffdf5;width:220px}
body.corporate-portal-theme .gt-org-node.type-support{border-left:3px solid var(--blue2);background:#f4f9ff;max-width:100%}
body.corporate-portal-theme .gt-node-top{display:flex;align-items:center;gap:6px;justify-content:center;margin-bottom:3px;font-size:16px}
body.corporate-portal-theme .gt-support-node{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;text-align:left}
body.corporate-portal-theme .gt-support-icon{font-size:18px}
body.corporate-portal-theme .gt-on-name{font-size:12px;font-weight:700;color:var(--text);line-height:1.3}
body.corporate-portal-theme .gt-on-role{font-size:10px;color:var(--text3);margin-top:3px;line-height:1.3}
body.corporate-portal-theme .gt-on-count{
  font-size:10px;font-weight:600;color:var(--blue);margin-top:4px;display:flex;align-items:center;justify-content:center;gap:3px;
}
body.corporate-portal-theme .gt-on-badge{
  font-size:9px;font-weight:700;padding:1px 6px;border-radius:10px;margin-top:4px;display:inline-block;white-space:nowrap;
}
body.corporate-portal-theme .gt-on-badge-chain{background:#fff0cc;color:#7a4800}
body.corporate-portal-theme .gt-on-badge-support{background:#e0ecfc;color:var(--blue)}
body.corporate-portal-theme .gt-blocks-title{margin-bottom:8px;font-size:13px;font-weight:700;color:var(--text)}
body.corporate-portal-theme .blocks-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}
body.corporate-portal-theme .gt-block-card{
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;border-top:3px solid var(--accent);
}
body.corporate-portal-theme .gt-block-card.support{border-top-color:var(--blue2)}
body.corporate-portal-theme .gt-block-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}
body.corporate-portal-theme .gt-block-head>.badge{margin-left:auto;flex-shrink:0}
body.corporate-portal-theme .gt-block-icon{
  width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;
}
body.corporate-portal-theme .gt-block-name{font-size:13px;font-weight:700;color:var(--text)}
body.corporate-portal-theme .gt-block-type{
  font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin-top:2px;color:var(--portal-warn);
}
body.corporate-portal-theme .gt-block-card.support .gt-block-type{color:var(--blue)}
body.corporate-portal-theme .gt-block-people{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
body.corporate-portal-theme .gt-block-person{font-size:11px;background:#f0f4f8;color:var(--text2);padding:3px 8px;border-radius:4px}
body.corporate-portal-theme .gt-block-funcs{font-size:11px;color:var(--text2);line-height:1.6}
body.corporate-portal-theme .gt-block-funcs span{display:block;padding-left:10px;position:relative}
body.corporate-portal-theme .gt-block-funcs span:before{content:"•";position:absolute;left:0;color:var(--text3)}
body.corporate-portal-theme .gt-proc-header{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:20px;
}
body.corporate-portal-theme .gt-proc-stat{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px}
body.corporate-portal-theme .gt-ps-val{font-size:22px;font-weight:700;color:var(--text)}
body.corporate-portal-theme .gt-ps-label{font-size:10px;color:var(--text3);text-transform:uppercase;letter-spacing:.04em;margin-top:2px;font-weight:700}
body.corporate-portal-theme .gt-ps-kpi{font-size:11px;font-weight:600;margin-top:6px;color:var(--text2)}
body.corporate-portal-theme .gt-proc-body{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
body.corporate-portal-theme .gt-proc-steps{display:flex;flex-direction:column;gap:0}
body.corporate-portal-theme .gt-proc-step{display:flex;gap:0;align-items:stretch}
body.corporate-portal-theme .gt-proc-step-left{display:flex;flex-direction:column;align-items:center;width:48px;flex-shrink:0}
body.corporate-portal-theme .gt-proc-step-circle{
  width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0;border:2px solid transparent;z-index:1;
}
body.corporate-portal-theme .gt-proc-step-vline{flex:1;width:2px;background:var(--border2);margin:2px 0}
body.corporate-portal-theme .gt-proc-step-content{
  flex:1;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:12px 16px;margin:0 0 6px 8px;transition:all .15s;cursor:pointer;
}
body.corporate-portal-theme .gt-proc-step-content:hover{border-color:var(--blue);box-shadow:0 2px 8px rgba(24,96,176,.08)}
body.corporate-portal-theme .gt-proc-step:has(.gt-proc-step-left:hover) .gt-proc-step-content{border-color:var(--blue);box-shadow:0 2px 8px rgba(24,96,176,.08)}
body.corporate-portal-theme .gt-proc-step-content.active{border-color:var(--blue);border-left:3px solid var(--blue);background:#f4f9ff}
body.corporate-portal-theme .gt-psc-top{display:flex;align-items:center;gap:8px;margin-bottom:5px;flex-wrap:wrap}
body.corporate-portal-theme .gt-psc-num{font-size:10px;font-weight:700;color:var(--text3);font-family:"JetBrains Mono",monospace}
body.corporate-portal-theme .gt-psc-dept{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
body.corporate-portal-theme .gt-psc-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:4px}
body.corporate-portal-theme .gt-psc-desc{font-size:12px;color:var(--text2);line-height:1.5}
body.corporate-portal-theme .gt-psc-footer{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
body.corporate-portal-theme .gt-psc-time{font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px}
body.corporate-portal-theme .gt-psc-time.green{background:var(--green-bg);color:var(--green)}
body.corporate-portal-theme .gt-psc-time.amber{background:var(--amber-bg);color:var(--amber)}
body.corporate-portal-theme .gt-psc-time.red{background:var(--red-bg);color:var(--red)}
body.corporate-portal-theme .gt-psc-time.blue{background:#e0ecfc;color:var(--blue)}
body.corporate-portal-theme .gt-psc-time.teal{background:var(--teal-bg);color:var(--teal)}
body.corporate-portal-theme .gt-psc-time.purple{background:var(--purple-bg);color:var(--purple)}
body.corporate-portal-theme .gt-detail-panel{
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r);padding:18px;position:sticky;top:74px;height:fit-content;
}
body.corporate-portal-theme .gt-dp-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:14px;display:flex;align-items:center;gap:8px}
body.corporate-portal-theme .gt-dp-section{margin-bottom:14px}
body.corporate-portal-theme .gt-dp-section-label{
  font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;
}
body.corporate-portal-theme .gt-dp-row{display:flex;align-items:flex-start;gap:8px;margin-bottom:6px;font-size:12px}
body.corporate-portal-theme .gt-dp-row-key{color:var(--text3);width:90px;flex-shrink:0}
body.corporate-portal-theme .gt-dp-row-val{color:var(--text);font-weight:500;flex:1}
body.corporate-portal-theme .gt-dp-kpi{background:#f4f9ff;border:1px solid #c8dff8;border-radius:var(--r-sm);padding:10px 12px;margin-bottom:6px}
body.corporate-portal-theme .gt-dp-kpi-name{font-size:11px;color:var(--text2);margin-bottom:3px}
body.corporate-portal-theme .gt-dp-kpi-val{font-size:14px;font-weight:700;color:var(--blue)}
body.corporate-portal-theme .gt-dp-rule{display:flex;align-items:flex-start;gap:6px;font-size:11px;color:var(--text2);margin-bottom:5px}
body.corporate-portal-theme .gt-dp-rule:before{content:"✓";color:var(--green);font-weight:700;flex-shrink:0}
body.corporate-portal-theme .gt-dp-note{
  font-size:12px;color:var(--text2);background:var(--amber-bg);padding:10px;border-radius:var(--r-sm);border-left:3px solid var(--accent);
}
body.corporate-portal-theme .gt-crit-card{margin-top:14px}
body.corporate-portal-theme .gt-crit-list{display:flex;flex-direction:column;gap:6px}
body.corporate-portal-theme .gt-crit-item{
  display:flex;align-items:flex-start;gap:10px;padding:10px 14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r-sm);
}
body.corporate-portal-theme .gt-crit-item.ok{border-left:3px solid var(--green)}
body.corporate-portal-theme .gt-crit-num{
  width:22px;height:22px;border-radius:50%;background:var(--navy);color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px;
}
body.corporate-portal-theme .gt-crit-text{font-size:12px;color:var(--text2);line-height:1.5;flex:1}
body.corporate-portal-theme .gt-crit-kpi{font-size:11px;font-weight:700;margin-left:auto;flex-shrink:0}
body.corporate-portal-theme .timesheet-app{display:flex;flex-direction:column;gap:14px}
body.corporate-portal-theme .timesheet-toolbar{
  display:grid;grid-template-columns:minmax(260px,1fr) 170px 220px auto;gap:10px;align-items:center;margin-bottom:0;
}
body.corporate-portal-theme .timesheet-toolbar select{width:100%}
body.corporate-portal-theme .timesheet-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body.corporate-portal-theme .timesheet-card{padding:0;overflow:hidden}
body.corporate-portal-theme .timesheet-scroll{overflow:auto;max-height:68vh;border-bottom:1px solid var(--portal-border)}
body.corporate-portal-theme .timesheet-grid{border-collapse:separate;border-spacing:0;min-width:1180px;font-size:12px}
body.corporate-portal-theme .timesheet-grid th,
body.corporate-portal-theme .timesheet-grid td{
  border-right:1px solid #e5edf7;border-bottom:1px solid #e5edf7;padding:0;background:#fff;vertical-align:middle;
}
body.corporate-portal-theme .timesheet-grid thead th{
  position:sticky;top:0;z-index:3;background:#f5f8fc;color:#52627a;text-align:center;font-size:11px;font-weight:800;
  padding:7px 5px;white-space:nowrap;
}
body.corporate-portal-theme .timesheet-grid thead th b{display:block;color:var(--portal-text);font-size:13px}
body.corporate-portal-theme .timesheet-grid thead th span{display:block;margin-top:1px;color:#8291a8;font-size:10px;text-transform:uppercase}
body.corporate-portal-theme .timesheet-grid .sticky-col{position:sticky;z-index:2}
body.corporate-portal-theme .timesheet-grid thead .sticky-col{z-index:5}
body.corporate-portal-theme .timesheet-grid .employee-col{left:0;min-width:220px;max-width:220px;padding:8px 10px;text-align:left}
body.corporate-portal-theme .timesheet-grid .position-col{left:220px;min-width:150px;max-width:150px;padding:8px 10px;text-align:left}
body.corporate-portal-theme .timesheet-grid td.employee-col b{display:block;color:var(--portal-text);font-size:12px;line-height:1.25}
body.corporate-portal-theme .timesheet-grid td.employee-col span{display:block;margin-top:2px;color:var(--portal-text-3);font-size:10px}
body.corporate-portal-theme .timesheet-grid td.position-col{color:var(--portal-text-2);font-size:11px}
body.corporate-portal-theme .timesheet-grid td.num,
body.corporate-portal-theme .timesheet-grid th.num{min-width:58px;text-align:center;padding:8px 7px;background:#fbfcfe}
body.corporate-portal-theme .timesheet-total{font-weight:800;color:var(--portal-blue)}
body.corporate-portal-theme .timesheet-grid th.weekend,
body.corporate-portal-theme .timesheet-grid td.weekend{background:#fff7ed}
body.corporate-portal-theme .timesheet-grid input[data-timesheet-cell]{
  width:42px;height:32px;border:0;border-radius:0;background:transparent;text-align:center;padding:0 2px;font:inherit;color:var(--portal-text);
}
body.corporate-portal-theme .timesheet-grid input[data-timesheet-cell]:focus{
  outline:2px solid var(--portal-blue);outline-offset:-2px;background:#eff6ff;
}
body.corporate-portal-theme .timesheet-grid input.is-hours{color:#135f2f;font-weight:700}
body.corporate-portal-theme .timesheet-grid input.is-mark{color:#9a3412;font-weight:800;background:#fff7ed}
body.corporate-portal-theme .timesheet-section-row td{
  position:sticky;left:0;z-index:4;background:#eaf3ff!important;color:var(--portal-navy);font-size:11px;
  text-transform:uppercase;letter-spacing:.04em;font-weight:800;padding:7px 10px;
}
body.corporate-portal-theme .timesheet-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 14px;font-size:12px;color:var(--portal-text-2)}
body.corporate-portal-theme .timesheet-legend span{display:flex;align-items:center;gap:6px}
body.corporate-portal-theme .timesheet-legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
body.corporate-portal-theme .timesheet-legend .work{background:#dcfce7;border:1px solid #86efac}
body.corporate-portal-theme .timesheet-legend .mark{background:#ffedd5;border:1px solid #fdba74}
body.corporate-portal-theme .timesheet-legend .weekend{background:#fff7ed;border:1px solid #fed7aa}
body.corporate-portal-theme .daily-report-app{
  --dr-blue:#3b7dd8;
  --dr-text:#1a1a1a;
  --dr-muted:#888;
  --dr-border:#e8e8e8;
  --dr-soft:#f5f6f8;
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 172px);
  overflow:hidden;
  background:var(--dr-soft);
  color:var(--dr-text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  border:1px solid var(--dr-border);
  border-radius:8px;
}
body.corporate-portal-theme .dr-topbar{height:56px;background:#fff;border-bottom:1px solid var(--dr-border);padding:0 24px;display:flex;align-items:center;gap:0;flex-shrink:0}
body.corporate-portal-theme .dr-brand{font-weight:600;font-size:15px;margin-right:32px;color:var(--dr-text);white-space:nowrap}
body.corporate-portal-theme .dr-brand span{color:var(--dr-blue)}
body.corporate-portal-theme .dr-tabs{display:flex;height:100%;align-items:flex-end;gap:0;min-width:0;overflow:auto}
body.corporate-portal-theme .dr-tab{padding:0 16px;height:100%;display:flex;align-items:center;font-size:13px;font-weight:500;color:#888;cursor:pointer;border:0;border-bottom:2px solid transparent;background:none;font-family:inherit;white-space:nowrap}
body.corporate-portal-theme .dr-tab:hover{color:#444}
body.corporate-portal-theme .dr-tab.active{color:#1a1a1a;border-bottom-color:var(--dr-blue)}
body.corporate-portal-theme .dr-topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}
body.corporate-portal-theme .dr-ctrl,
body.corporate-portal-theme .dr-form-input,
body.corporate-portal-theme .dr-form-select{padding:7px 10px;border:1px solid #e0e0e0;border-radius:6px;background:#fff;color:#1a1a1a;font-size:13px;font-family:inherit}
body.corporate-portal-theme .dr-ctrl{padding:5px 10px}
body.corporate-portal-theme .dr-btn-export{padding:5px 14px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;background:#fff;color:#444;font-family:inherit;cursor:pointer;white-space:nowrap}
body.corporate-portal-theme .dr-btn-export:hover{background:#f5f5f5}
body.corporate-portal-theme .dr-main{display:flex;flex:1;overflow:hidden;min-height:0}
body.corporate-portal-theme .dr-sidebar{width:200px;background:#fff;border-right:1px solid var(--dr-border);display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto}
body.corporate-portal-theme .dr-sidebar-head{padding:14px 16px 10px;font-size:11px;font-weight:600;color:#aaa;letter-spacing:.5px;text-transform:uppercase}
body.corporate-portal-theme .dr-emp-list{display:flex;flex-direction:column}
body.corporate-portal-theme .dr-emp-item{padding:10px 16px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:background .1s;border:0;background:#fff;text-align:left;font-family:inherit;color:inherit;width:100%}
body.corporate-portal-theme .dr-emp-item:hover{background:#f8f8f8}
body.corporate-portal-theme .dr-emp-item.active{background:#eef4ff}
body.corporate-portal-theme .dr-avatar{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;flex-shrink:0}
body.corporate-portal-theme .dr-avatar.lg{width:38px;height:38px;font-size:13px}
body.corporate-portal-theme .dr-emp-info{flex:1;min-width:0}
body.corporate-portal-theme .dr-emp-name{display:block;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.corporate-portal-theme .dr-emp-role{display:block;font-size:11px;color:#999;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.corporate-portal-theme .dr-status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
body.corporate-portal-theme .dot-green{background:#4caf50}
body.corporate-portal-theme .dot-amber{background:#ff9800}
body.corporate-portal-theme .dot-red{background:#f44336}
body.corporate-portal-theme .dr-content{flex:1;overflow-y:auto;padding:28px 32px;background:#f5f6f8}
body.corporate-portal-theme .dr-report-header{display:flex;align-items:center;gap:12px;margin-bottom:20px}
body.corporate-portal-theme .dr-report-name{font-size:16px;font-weight:600;color:#1a1a1a}
body.corporate-portal-theme .dr-report-dept{font-size:14px;color:#888;font-weight:400}
body.corporate-portal-theme .dr-badge{display:inline-block;padding:2px 9px;border-radius:4px;font-size:12px;font-weight:500}
body.corporate-portal-theme .dr-badge-mid{background:#fff3e0;color:#e65100}
body.corporate-portal-theme .dr-badge-high{background:#fce4ec;color:#b71c1c}
body.corporate-portal-theme .dr-badge-low{background:#e8f5e9;color:#1b5e20}
body.corporate-portal-theme .dr-report-time{margin-left:auto;font-size:12px;color:#aaa}
body.corporate-portal-theme .dr-section-label{font-size:11px;font-weight:600;color:#aaa;letter-spacing:.5px;text-transform:uppercase;margin-bottom:8px}
body.corporate-portal-theme .dr-report-text{font-size:14px;color:#333;line-height:1.6;margin-bottom:16px;white-space:pre-line}
body.corporate-portal-theme .dr-meta-row{display:flex;align-items:center;gap:20px;margin-bottom:16px;font-size:13px;color:#555;flex-wrap:wrap}
body.corporate-portal-theme .dr-meta-item{display:flex;align-items:center;gap:5px}
body.corporate-portal-theme .dr-meta-item svg{opacity:.5}
body.corporate-portal-theme .dr-alert-box{background:#fffbf0;border:1px solid #ffe082;border-radius:6px;padding:9px 14px;font-size:13px;color:#7a5c00;margin-bottom:16px;display:flex;align-items:center;gap:6px}
body.corporate-portal-theme .dr-alert-box svg{flex-shrink:0}
body.corporate-portal-theme .dr-divider{height:1px;background:#f0f0f0;margin:16px 0}
body.corporate-portal-theme .dr-actions{display:flex;gap:8px;margin-top:20px;flex-wrap:wrap}
body.corporate-portal-theme .dr-btn{padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;border:1px solid #e0e0e0;background:#fff;color:#444}
body.corporate-portal-theme .dr-btn:hover{background:#f5f5f5}
body.corporate-portal-theme .dr-btn-primary{background:var(--dr-blue);color:#fff;border-color:var(--dr-blue)}
body.corporate-portal-theme .dr-btn-primary:hover{background:#2f6bbf}
body.corporate-portal-theme .dr-btn-danger{background:#fff;color:#d32f2f;border-color:#f5c6c6}
body.corporate-portal-theme .dr-btn-danger:hover{background:#fdf2f2}
body.corporate-portal-theme .dr-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px;color:#bbb;text-align:center;gap:8px}
body.corporate-portal-theme .dr-empty.compact{height:200px}
body.corporate-portal-theme .dr-empty-icon{width:40px;height:40px;border:1.5px solid currentColor;border-radius:8px;display:flex;align-items:center;justify-content:center;opacity:.35;font-size:18px}
body.corporate-portal-theme .dr-empty-inline{padding:14px 16px;color:#aaa;font-size:13px}
body.corporate-portal-theme .dr-view-title{font-size:16px;font-weight:600;margin-bottom:4px;color:#1a1a1a}
body.corporate-portal-theme .dr-view-sub{font-size:13px;color:#999;margin-bottom:20px}
body.corporate-portal-theme .dr-month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:20px}
body.corporate-portal-theme .dr-weekday{text-align:center;font-size:11px;color:#aaa;padding:4px 0;font-weight:600}
body.corporate-portal-theme .dr-month-cell{padding:8px 6px;background:#fff;border:1px solid var(--dr-border);border-radius:6px;text-align:center;font-size:12px}
body.corporate-portal-theme .dr-day-num{font-weight:600;font-size:13px;margin-bottom:4px}
body.corporate-portal-theme .dr-day-count{font-size:11px;color:#888}
body.corporate-portal-theme .dr-month-cell.day-full{border-color:#4caf50;background:#f1f8f1}
body.corporate-portal-theme .dr-month-cell.day-partial{border-color:#ff9800;background:#fff8f0}
body.corporate-portal-theme .dr-month-cell.day-empty{border-color:#e8e8e8}
body.corporate-portal-theme .dr-legend{display:flex;gap:16px;font-size:12px;color:#888;flex-wrap:wrap}
body.corporate-portal-theme .dr-legend span{display:flex;align-items:center;gap:5px}
body.corporate-portal-theme .dr-legend i{width:10px;height:10px;border-radius:2px;display:inline-block}
body.corporate-portal-theme .dr-legend .full{background:#4caf50}
body.corporate-portal-theme .dr-legend .partial{background:#ff9800}
body.corporate-portal-theme .dr-legend .empty{background:#e8e8e8}
body.corporate-portal-theme .dr-fill,
body.corporate-portal-theme .dr-settings{max-width:640px}
body.corporate-portal-theme .dr-fill{max-width:560px}
body.corporate-portal-theme .dr-settings-section{background:#fff;border:1px solid var(--dr-border);border-radius:8px;padding:20px;margin-bottom:16px}
body.corporate-portal-theme .dr-settings-title{font-size:14px;font-weight:600;margin-bottom:14px;color:#1a1a1a}
body.corporate-portal-theme .dr-settings-tools{display:grid;grid-template-columns:minmax(0,1fr) 160px auto;gap:8px;margin-bottom:14px}
body.corporate-portal-theme .dr-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
body.corporate-portal-theme .dr-form-group{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
body.corporate-portal-theme .dr-form-label{font-size:12px;color:#888;font-weight:500}
body.corporate-portal-theme .dr-form-input:focus,
body.corporate-portal-theme .dr-form-select:focus,
body.corporate-portal-theme .dr-ctrl:focus{outline:none;border-color:var(--dr-blue);box-shadow:0 0 0 3px rgba(59,125,216,.1)}
body.corporate-portal-theme .dr-emp-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #f5f5f5}
body.corporate-portal-theme .dr-emp-row:last-child{border-bottom:none}
body.corporate-portal-theme .dr-emp-row-info{flex:1;min-width:0}
body.corporate-portal-theme .dr-emp-row-info b{display:block;font-size:13px;font-weight:500;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.corporate-portal-theme .dr-emp-row-info em{display:block;font-size:11px;color:#999;font-style:normal;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.corporate-portal-theme .dr-row-delete{margin-left:8px;padding:4px 10px;border:1px solid #f0c0c0;border-radius:5px;background:#fff;color:#d32f2f;font-size:12px;cursor:pointer;font-family:inherit}
body.corporate-portal-theme .dr-toggle{position:relative;display:inline-block;width:34px;height:19px;flex-shrink:0}
body.corporate-portal-theme .dr-toggle input{opacity:0;width:0;height:0}
body.corporate-portal-theme .dr-toggle span{position:absolute;inset:0;background:#d0d0d0;border-radius:19px;cursor:pointer;transition:.2s}
body.corporate-portal-theme .dr-toggle span:before{content:"";position:absolute;width:13px;height:13px;border-radius:50%;background:#fff;left:3px;bottom:3px;transition:.2s}
body.corporate-portal-theme .dr-toggle input:checked+span{background:var(--dr-blue)}
body.corporate-portal-theme .dr-toggle input:checked+span:before{transform:translateX(15px)}
body.corporate-portal-theme .dr-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;padding:6px 0}
.calculator-option-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.calc-check{border:1px solid #E5E7EB;border-radius:8px;background:#fff;padding:8px 9px;display:grid;grid-template-columns:auto minmax(0,1fr) 74px;gap:8px;align-items:center;cursor:pointer}
.calc-check:hover{border-color:#B6C5D6;background:#FAFCFF}
.calc-check input[type=checkbox]{width:16px;height:16px;accent-color:var(--navy)}
.calc-check span{min-width:0}
.calc-check b{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calc-check em{display:block;font-style:normal;color:var(--muted);font-size:10px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calc-extra-qty{width:74px;padding:5px 7px;text-align:right}
.calculator-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.calc-list{display:flex;flex-direction:column;gap:7px;padding:11px}
.calc-saved{width:100%;border:1px solid #E5E7EB;background:#fff;border-radius:8px;padding:9px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;cursor:pointer}
.calc-saved:hover{border-color:#B6C5D6;background:#FAFCFF}
.calc-saved span{min-width:0}
.calc-saved b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calc-saved em{display:block;font-style:normal;color:var(--muted);font-size:11px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calc-saved strong{font-variant-numeric:tabular-nums;color:var(--navy);white-space:nowrap}
.catalog-tools{display:grid;grid-template-columns:1fr 145px;gap:7px}
.catalog-list{display:flex;flex-direction:column;gap:7px;padding:0 11px 11px}
.catalog-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:9px;align-items:center;border:1px solid #E5E7EB;border-radius:8px;padding:7px;background:#fff}
.catalog-item img,.catalog-thumb{width:42px;height:42px;border-radius:7px;object-fit:cover;background:#EFF6FF;color:var(--navy);display:grid;place-items:center;font-weight:800}
.catalog-item b{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.catalog-item span{display:block;color:var(--muted);font-size:11px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calc-modal{position:fixed;inset:0;background:rgba(12,20,30,.48);z-index:1100;display:flex;align-items:center;justify-content:center;padding:18px}
.calc-active{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:700;color:#374151}
.calc-active input{width:16px;height:16px;accent-color:var(--navy)}
.empty.compact{padding:18px;font-size:12px}
.legacy-calculator-wrap{height:calc(100vh - 82px);min-height:760px;background:#fff;border:1px solid var(--border);border-radius:11px;overflow:hidden;display:flex;flex-direction:column}
.legacy-calculator-frame{width:100%;flex:1 1 auto;min-height:0;border:0;display:block;background:#fff}

@media(max-width:1180px){
  .calculator-grid{grid-template-columns:1fr}
  .calculator-side{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .calculator-option-list,.calculator-kpis{grid-template-columns:1fr}
  .catalog-tools{grid-template-columns:1fr}
  .calc-check{grid-template-columns:auto minmax(0,1fr)}
  .calc-extra-qty{grid-column:2;width:100%}
}
.production-gantt-head{align-items:center}
.production-gantt-head select{width:132px}
.production-gantt-summary{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:9px}
.production-gantt-summary div{background:#fff;border:1px solid var(--border);border-radius:9px;padding:10px 12px}
.production-gantt-summary span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;font-weight:700}
.production-gantt-summary strong{display:block;margin-top:4px;font-size:18px}
.production-gantt-filters input,.production-gantt-filters select{width:180px}
.production-gantt-legend{display:flex;gap:12px;flex-wrap:wrap;align-items:center;color:#4B5563;font-size:12px}
.production-gantt-legend span{display:inline-flex;align-items:center;gap:6px}
.gantt-dot{width:10px;height:10px;border-radius:3px;display:inline-block}
.gantt-dot.green,.production-gantt-bar.green{background:#16A34A}
.gantt-dot.blue,.production-gantt-bar.blue{background:#2563EB}
.gantt-dot.yellow,.production-gantt-bar.yellow{background:#D97706}
.gantt-dot.red,.production-gantt-bar.red{background:#DC2626}
.gantt-dot.gray,.production-gantt-bar.gray{background:#6B7280}
.gantt-dot.light,.production-gantt-bar.light{background:#CBD5E1;color:#334155}
.production-gantt-skeleton{height:560px;border:1px solid var(--border);border-radius:10px;background:linear-gradient(90deg,#F3F4F6,#E5E7EB,#F3F4F6);background-size:220% 100%}
.production-gantt-chart{display:grid;grid-template-columns:560px 1fr;background:#fff;border:1px solid var(--border);border-radius:10px;overflow:hidden;min-height:420px}
.production-gantt-sidebar{border-right:1px solid var(--border);background:#fff;position:sticky;left:0;z-index:2}
.production-gantt-sidebar-head,.production-gantt-side-row{display:grid;grid-template-columns:100px 92px 1.4fr 112px 48px 108px 84px;gap:8px;align-items:center;min-height:34px;padding:0 10px;border-bottom:1px solid #EEF2F7;font-size:11px}
.production-gantt-sidebar-head{height:40px;background:#F8FAFC;color:#4A5568;font-weight:700;text-transform:none}
.production-gantt-side-row{cursor:pointer}
.production-gantt-side-row:hover{background:#FAFCFF}
.production-gantt-side-row.group{grid-template-columns:1fr;background:#EFF6FF;color:#1E40AF;font-weight:800;min-height:32px}
.production-gantt-side-row.order{background:#F8FAFC;font-weight:600}
.production-gantt-side-row.task{background:#fff}
.production-gantt-side-row span,.production-gantt-side-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-gantt-timeline{overflow:auto;position:relative;background:#fff}
.production-gantt-scale{height:40px;display:flex;position:sticky;top:0;z-index:1;background:#F8FAFC;border-bottom:1px solid var(--border)}
.production-gantt-scale span{display:flex;align-items:center;justify-content:center;border-right:1px solid #E5E7EB;font-size:11px;color:#4A5568;font-weight:700}
.production-gantt-tracks{position:relative}
.production-gantt-track-row{height:34px;border-bottom:1px solid #EEF2F7;position:relative;background:repeating-linear-gradient(90deg,#fff 0,#fff 95px,#F8FAFC 96px)}
.production-gantt-track-row.group{height:32px;background:#EFF6FF}
.production-gantt-track-row.order{background:#F8FAFC}
.production-gantt-bar{position:absolute;top:7px;height:20px;border:0;border-radius:5px;color:#fff;overflow:hidden;text-align:left;padding:0 7px;cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.16)}
.production-gantt-bar span{position:absolute;inset:0 auto 0 0;background:rgba(255,255,255,.24);pointer-events:none}
.production-gantt-bar b{position:relative;font-size:10px;line-height:20px;white-space:nowrap}
.production-gantt-actual{position:absolute;top:27px;height:3px;background:#111827;border-radius:10px;opacity:.55}
.production-gantt-today{position:absolute;top:0;bottom:0;width:2px;background:#EF4444;z-index:3}
.production-gantt-modal{width:min(760px,95vw)}
.production-dashboard-head{align-items:center}
.production-dashboard-filters input,.production-dashboard-filters select{width:178px}
.production-dashboard-skeleton{height:620px;border:1px solid var(--border);border-radius:10px;background:linear-gradient(90deg,#F3F4F6,#E5E7EB,#F3F4F6);background-size:220% 100%}
.production-dashboard-kpis{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:9px}
.production-dashboard-kpi{background:#fff;border:1px solid var(--border);border-radius:9px;padding:11px 12px;border-left:4px solid #CBD5E1}
.production-dashboard-kpi.ok{border-left-color:var(--green)}
.production-dashboard-kpi.wait{border-left-color:#D97706}
.production-dashboard-kpi.bad{border-left-color:var(--red);background:#FFF7F7}
.production-dashboard-kpi span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;font-weight:800;line-height:1.25}
.production-dashboard-kpi strong{display:block;margin-top:5px;font-size:20px}
.production-dashboard-kpi small{display:block;margin-top:2px;color:var(--muted)}
.production-dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.production-dashboard-section.wide{grid-column:1/-1}
.production-app fieldset{border:0;margin:0;padding:0;min-width:0}
.production-app fieldset.form-grid,.production-app fieldset.card-body{display:grid}
.production-inline-form fieldset{display:contents}
.production-no-access{max-width:620px;margin:24px auto}
.production-stage-distribution{display:flex;flex-direction:column;gap:8px}
.production-stage-bar-row{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(160px,1fr) auto;gap:10px;align-items:center}
.production-stage-bar-row strong{display:block;font-size:12px}
.production-stage-bar-row span{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.production-stage-bar{height:8px;background:#E5E7EB;border-radius:20px;overflow:hidden}
.production-stage-bar i{display:block;height:100%;background:var(--blue);border-radius:20px}
.invoice-app{display:flex;flex-direction:column;gap:14px}
.invoice-tabs{display:flex;gap:4px;overflow:auto;background:#fff;border:1px solid var(--border);border-radius:9px;padding:0 8px}
.invoice-notice{display:none;border-radius:8px;padding:9px 12px;font-weight:600}
.invoice-notice.ok{display:block;background:#ECFDF5;color:#166534;border:1px solid #BBF7D0}
.invoice-notice.bad{display:block;background:#FEF2F2;color:#991B1B;border:1px solid #FECACA}
.invoice-status-picker{display:inline-flex;align-items:center;gap:6px;min-width:0}
.invoice-status-picker.compact{min-width:190px}
.invoice-status-picker select{width:132px;padding:5px 26px 5px 8px;font-size:12px;background:#fff}
.invoice-status-picker:not(.compact){display:flex;align-items:flex-start;flex-direction:column;gap:7px;margin-top:6px}
.invoice-status-picker:not(.compact) select{width:170px}
.invoice-filters input,.invoice-filters select{width:185px}
.invoice-upload-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(420px,1.4fr);gap:14px;align-items:start}
.invoice-drop-card{min-height:320px}
.invoice-drop-zone{height:320px;border:2px dashed #CBD5E0;border-radius:10px;background:#F8FAFC;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;padding:24px;cursor:pointer}
.invoice-drop-zone.drag{border-color:var(--blue);background:#EFF6FF}
.invoice-drop-zone strong{font-size:16px}
.invoice-drop-zone span{color:var(--muted)}
.invoice-drop-zone input{max-width:260px}
.invoice-hint{background:#F1F5F9;border:1px solid #D8E1EA;border-radius:8px;padding:10px 12px;color:#52627A;font-size:13px;line-height:1.4}
.needs-review input,.needs-review select,.needs-review textarea{border-color:#D97706;background:#FFFBEB}
.needs-review label:after{content:" требует проверки";color:#B45309;font-weight:700}
.invoice-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.invoice-info-item{border:1px solid #EEF2F7;border-radius:8px;background:#F8FAFC;padding:9px 10px;min-width:0}
.payment-invoice-list{display:flex;flex-direction:column;gap:8px}
.payment-invoice-setting-row{border:1px solid var(--border);border-radius:8px;background:#F8FAFC;padding:9px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.payment-invoice-setting-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.invoice-info-item span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.invoice-info-item strong{display:block;overflow-wrap:anywhere}
.invoice-preview-img{display:block;max-width:100%;max-height:460px;border:1px solid var(--border);border-radius:8px;object-fit:contain}
.invoice-preview-frame{width:100%;height:460px;border:1px solid var(--border);border-radius:8px;background:#fff}
.invoice-file-box{border:1px solid var(--border);border-radius:8px;padding:14px;display:flex;align-items:flex-start;gap:9px;flex-direction:column}
.invoice-file-box span{color:var(--muted)}
.invoice-log-list{display:flex;flex-direction:column;gap:8px}
.invoice-log{border:1px solid #EEF2F7;border-radius:8px;padding:10px 12px;background:#fff}
.invoice-log b{display:inline-block;margin-right:8px}
.invoice-log span{color:var(--muted);font-size:12px}
.invoice-log p{margin:7px 0 0;line-height:1.4}
.invoice-local-modal{position:fixed;inset:0;background:rgba(12,20,30,.48);z-index:1100;display:flex;align-items:center;justify-content:center;padding:18px}
.price-kpis{grid-template-columns:repeat(6,minmax(150px,1fr))}
.price-workspace{display:grid;grid-template-columns:280px minmax(0,1fr) 320px;gap:14px;align-items:start}
.price-category-nav{position:sticky;top:14px;max-height:calc(100vh - 110px);overflow:auto}
.price-nav-list{display:flex;flex-direction:column;gap:7px}
.price-nav-group{display:flex;flex-direction:column;gap:5px}
.price-nav-children{display:flex;flex-direction:column;gap:4px;margin-left:12px;padding-left:10px;border-left:2px solid #E5EDF7}
.price-nav-item{width:100%;border:1px solid #E5EDF7;background:#fff;border-radius:8px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--navy);font-weight:800;text-align:left;cursor:pointer}
.price-nav-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.price-nav-item b{font-size:12px;color:var(--muted);background:#F4F7FB;border-radius:999px;padding:2px 7px}
.price-nav-item.top{background:#FAFBFC}
.price-nav-item.child{font-size:13px;font-weight:700;padding:7px 9px}
.price-nav-item:hover,.price-nav-item.active{border-color:#94B3D8;background:#EAF3FF;color:var(--blue)}
.price-nav-item.active b{background:#fff;color:var(--blue)}
.price-section-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.price-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:8px;background:#fff;padding:14px 16px}
.price-section-title h3{margin:0;font-size:22px}
.price-section-title p,.price-category-section .card-head p{margin:3px 0 0;color:var(--muted)}
.price-category-section{overflow:hidden}
.price-product-cell{display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px;align-items:center;min-width:260px}
.price-thumb{width:52px;height:40px;border:1px solid var(--border);border-radius:7px;background:#F8FAFC;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:17px}
.price-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.price-thumb.broken img{display:none}
.price-thumb.broken::after{content:"🖼";font-size:17px}
.price-product-text{min-width:0}
.price-product-text b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.price-media-note{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:700}
.price-toolbar input{width:260px}
.quality-panel{display:flex;flex-direction:column;gap:8px}
.quality-row,.quality-line{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #EEF2F7;border-radius:8px;padding:8px 10px;background:#fff}
.quality-row span,.quality-line span{font-weight:800;color:var(--navy)}
.compact-empty{padding:12px;text-align:left}
.product-form textarea{min-height:82px}
.product-form+.product-related{margin-top:14px}
.product-related{border-top:1px solid #EEF2F7;padding-top:10px}
.related-list{display:flex;flex-direction:column;gap:7px;margin:8px 0 12px}
.related-item{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid #EEF2F7;border-radius:8px;padding:8px 10px;background:#FAFBFC}
.related-item.media-item{grid-template-columns:84px minmax(0,1fr) auto}
.related-item.site-source-item{grid-template-columns:1fr;align-items:flex-start}
.related-item span{color:var(--muted);overflow-wrap:anywhere}
.related-item a{color:var(--blue);text-decoration:none;overflow-wrap:anywhere}
.site-source-item a{display:block;margin-top:4px}
.asset-thumb{width:72px;height:54px;border:1px solid var(--border);border-radius:7px;background:#fff;display:block;overflow:hidden}
.asset-thumb img{width:100%;height:100%;display:block;object-fit:cover}
.asset-file{width:72px;height:54px;border:1px solid var(--border);border-radius:7px;background:#F8FAFC;color:var(--navy);display:grid;place-items:center;font-weight:800;font-size:12px}
.compact-form{border:1px solid #EEF2F7;border-radius:8px;padding:12px;background:#fff}
.product-related .section-label{margin-top:0}
.modal:has(.product-form){width:min(980px,96vw)}
.product-doc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 14px}
.product-doc-card{border:1px solid #E5EDF7;border-radius:8px;background:#fff;padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0}
.product-doc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.product-doc-head b{display:block;color:var(--navy);font-size:15px}
.product-doc-head span,.product-doc-meta span{display:block;color:var(--muted);font-size:12px;font-weight:700;margin-top:2px}
.product-doc-empty{min-height:150px;border:1px dashed #CBD5E1;border-radius:8px;background:#F8FAFC;display:grid;place-items:center;color:var(--muted);font-weight:800;text-align:center;padding:12px}
.product-doc-preview{display:flex;flex-direction:column;gap:8px}
.product-doc-frame{width:100%;height:220px;border:1px solid var(--border);border-radius:8px;background:#F8FAFC}
.product-doc-file-preview{display:flex;justify-content:center;align-items:center;min-height:120px;border:1px solid var(--border);border-radius:8px;background:#F8FAFC}
.product-doc-meta{display:flex;flex-direction:column;gap:3px;min-width:0}
.product-doc-upload{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1fr) 112px;gap:8px;align-items:center}
.file-drop{border:1px solid var(--border);border-radius:8px;background:#F8FAFC;min-height:38px;padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--navy);font-weight:800;position:relative;overflow:hidden}
.file-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.product-doc-upload input[name="note"]{min-width:0}
.product-doc-error{grid-column:1/-1;color:#991B1B;background:#FEF2F2;border:1px solid #FECACA;border-radius:8px;padding:7px 9px;font-weight:800;display:none}
.product-doc-error:not(:empty){display:block}
@media(max-width:900px){.product-doc-grid{grid-template-columns:1fr}.product-doc-upload{grid-template-columns:1fr}.product-doc-frame{height:260px}}
.knowledge-kpis{grid-template-columns:repeat(5,minmax(150px,1fr))}
.knowledge-workspace{display:grid;grid-template-columns:260px minmax(0,1fr) 300px;gap:14px;align-items:start}
.knowledge-nav,.knowledge-test-panel{position:sticky;top:60px}
.knowledge-nav-list{display:flex;flex-direction:column;gap:7px;padding:12px}
.knowledge-nav-item{width:100%;border:1px solid #E5EDF7;background:#fff;border-radius:8px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--navy);font-weight:800;text-align:left;cursor:pointer}
.knowledge-nav-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.knowledge-nav-item b{font-size:12px;color:var(--muted);background:#F4F7FB;border-radius:999px;padding:2px 7px}
.knowledge-nav-item:hover,.knowledge-nav-item.active{border-color:#94B3D8;background:#EAF3FF;color:var(--blue)}
.knowledge-main{display:flex;flex-direction:column;gap:14px;min-width:0}
.knowledge-chat{display:flex;flex-direction:column;gap:12px}
.knowledge-chat-feed{border:1px solid #E5EDF7;border-radius:10px;background:#FAFCFF;padding:12px;min-height:120px}
.knowledge-chat-placeholder{color:var(--muted);font-weight:700}
.knowledge-chat-mode{display:inline-flex;margin-bottom:8px;border-radius:999px;background:#EAF3FF;color:var(--blue);font-size:12px;font-weight:900;padding:5px 10px}
.knowledge-chat-warning{border:1px solid #FECACA;background:#FEF2F2;color:#991B1B;border-radius:9px;padding:9px 10px;font-weight:800;margin-bottom:8px}
.knowledge-chat-form{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:10px;align-items:start}
.knowledge-chat-form textarea{width:100%;min-height:64px}
.knowledge-chat-form .btn{min-height:64px}
.knowledge-chat-message{border:1px solid #E5EDF7;border-radius:10px;padding:10px 12px;background:#fff;margin-bottom:8px}
.knowledge-chat-message.user{background:#EEF6FF}
.knowledge-chat-message.assistant{background:#F8FFF9}
.knowledge-chat-message b,.knowledge-chat-sources>b{display:block;margin-bottom:6px;color:var(--navy)}
.knowledge-chat-message p{margin:4px 0;line-height:1.45}
.knowledge-chat-sources{display:flex;flex-direction:column;gap:7px;margin-top:10px}
.knowledge-chat-sources a{border:1px solid #E5EDF7;border-radius:9px;padding:9px 10px;background:#fff;text-decoration:none;color:var(--ink)}
.knowledge-chat-sources span{display:block;font-weight:800;color:var(--blue)}
.knowledge-chat-sources small{display:block;margin-top:3px;color:var(--muted);line-height:1.35}
.knowledge-upload-form{display:grid;grid-template-columns:1.1fr 1fr 180px;gap:10px;align-items:end}
.knowledge-upload-form .field{min-width:0}
.knowledge-upload-form input,.knowledge-upload-form select{width:100%}
.knowledge-upload-form .wide{grid-column:span 2}
.knowledge-upload-error{align-self:end;color:#991B1B;background:#FEF2F2;border:1px solid #FECACA;border-radius:8px;padding:8px 10px;min-height:34px;font-weight:700;display:none}
.knowledge-upload-error:not(:empty){display:block}
.knowledge-upload-action{align-self:end}
.knowledge-upload-action .btn{width:100%}
.knowledge-flow{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:9px}
.knowledge-flow-step{border:1px solid #EEF2F7;border-radius:8px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:5px;min-height:112px}
.knowledge-flow-step b{width:26px;height:26px;border-radius:7px;background:#EAF3FF;color:var(--blue);display:grid;place-items:center}
.knowledge-flow-step strong{font-size:13px}
.knowledge-flow-step span{color:var(--muted);font-size:11px;line-height:1.35}
.knowledge-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.knowledge-module-card{border:1px solid var(--border);border-radius:8px;background:#fff;padding:12px;text-align:left;display:flex;flex-direction:column;gap:9px;cursor:pointer;color:var(--ink)}
.knowledge-module-card:hover{border-color:#94B3D8;background:#FAFCFF}
.knowledge-module-card strong{display:block;font-size:13px}
.knowledge-module-card span{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.knowledge-module-card b{font-size:12px;color:var(--navy)}
.knowledge-progress{height:6px;background:#E5E7EB;border-radius:99px;overflow:hidden}
.knowledge-progress span{display:block;height:100%;background:var(--green);border-radius:99px}
.knowledge-product-cell{min-width:260px}
.knowledge-product-cell b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.knowledge-product-cell span{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.knowledge-test-score{border:1px solid #E5EDF7;border-radius:8px;padding:12px;background:#F8FAFC;margin-bottom:12px}
.knowledge-test-score strong{display:block;font-size:28px;color:var(--navy);line-height:1}
.knowledge-test-score span{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.knowledge-checklist{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.knowledge-checklist label{display:flex;align-items:center;gap:7px;font-size:12px;color:#374151}
.knowledge-checklist input{width:15px;height:15px;padding:0;accent-color:var(--navy)}
@media(max-width:1200px){.kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1300px){
  .price-workspace{grid-template-columns:260px minmax(0,1fr)}
  .knowledge-workspace{grid-template-columns:230px minmax(0,1fr)}
  .knowledge-test-panel{grid-column:1/-1;position:static}
  .knowledge-upload-form{grid-template-columns:1fr 1fr}
  .price-workspace>.card:last-child{grid-column:1/-1}
  .production-header-grid{grid-template-columns:1fr 1fr 1fr;align-items:start}
  .production-inline-form{grid-template-columns:repeat(3,minmax(160px,1fr))}
  .production-comment-form{grid-template-columns:1fr}
  .production-gantt-summary{grid-template-columns:repeat(4,minmax(120px,1fr))}
  .production-gantt-chart{grid-template-columns:500px 1fr}
  .production-gantt-sidebar-head,.production-gantt-side-row{grid-template-columns:88px 76px 1.2fr 94px 42px 92px 76px}
  .production-dashboard-kpis{grid-template-columns:repeat(4,minmax(120px,1fr))}
  .production-dashboard-grid{grid-template-columns:1fr}
  .invoice-upload-grid{grid-template-columns:1fr}
  body.corporate-portal-theme .gt-org-titlebar{font-size:19px}
  body.corporate-portal-theme .gt-value-head{font-size:12px;padding:10px}
  body.corporate-portal-theme .gt-value-people,
  body.corporate-portal-theme .gt-value-function{padding:12px;min-height:140px}
}
@media(max-width:900px){
  .price-workspace{grid-template-columns:1fr}
  .knowledge-workspace{grid-template-columns:1fr}
  .knowledge-nav{position:static}
  .knowledge-chat-form{grid-template-columns:1fr}
  .knowledge-chat-form .btn{min-height:40px}
  .knowledge-upload-form{grid-template-columns:1fr}
  .knowledge-upload-form .wide{grid-column:auto}
  .knowledge-flow{grid-template-columns:1fr}
  .knowledge-modules{grid-template-columns:1fr}
  .price-category-nav{position:static;max-height:none}
  .price-section-title{align-items:flex-start;flex-direction:column}
  .related-item{grid-template-columns:1fr}
  .related-item.media-item{grid-template-columns:72px 1fr}
  .kpis,.cols-2,.cols-3{grid-template-columns:1fr 1fr}
  .price-kpis,.knowledge-kpis{grid-template-columns:1fr}
  .production-board{grid-template-columns:1fr 1fr}
  .production-flow{grid-template-columns:repeat(4,minmax(118px,1fr))}
  .production-header-grid,.production-check-row{grid-template-columns:1fr}
  .production-filters input,.production-filters select{width:100%}
  .production-kanban-column{width:285px;min-width:285px;max-height:calc(100vh - 260px)}
  .production-inline-form{grid-template-columns:1fr}
  .production-gantt-summary{grid-template-columns:1fr 1fr}
  .production-gantt-chart{grid-template-columns:420px 1fr}
  .production-gantt-filters input,.production-gantt-filters select{width:100%}
  .production-dashboard-kpis{grid-template-columns:1fr 1fr}
  .production-dashboard-filters input,.production-dashboard-filters select{width:100%}
  .production-stage-bar-row{grid-template-columns:1fr}
  .invoice-info-grid{grid-template-columns:1fr}
  body.corporate-portal-theme .brand{width:52px;padding:0 10px}
  body.corporate-portal-theme .brand strong{font-size:0}
  body.corporate-portal-theme .brand strong:before{font-size:14px}
  body.corporate-portal-theme .brand span{display:none}
  body.corporate-portal-theme .sidebar{width:52px}
  body.corporate-portal-theme .main{margin-left:52px}
  body.corporate-portal-theme .topbar{left:52px;height:92px;padding:8px 10px}
  body.corporate-portal-theme .nav-group,
  body.corporate-portal-theme .nav-label{display:none}
  body.corporate-portal-theme .nav-item{justify-content:center;padding:8px 0;width:52px}
  body.corporate-portal-theme .portal-topnav-item{padding:6px 9px;font-size:11px}
  body.corporate-portal-theme .portal-topbar-tools{gap:10px}
  body.corporate-portal-theme .topbar-search{display:none}
  body.corporate-portal-theme .user-name{display:none}
  body.corporate-portal-theme .view{padding-top:112px}
  body.corporate-portal-theme .kpi-row,
  body.corporate-portal-theme .two-col,
  body.corporate-portal-theme .three-col{grid-template-columns:1fr}
  body.corporate-portal-theme .timesheet-toolbar,
  body.corporate-portal-theme .timesheet-kpis{grid-template-columns:1fr}
  body.corporate-portal-theme .timesheet-scroll{max-height:62vh}
  body.corporate-portal-theme .timesheet-grid .employee-col{min-width:190px;max-width:190px}
  body.corporate-portal-theme .timesheet-grid .position-col{left:190px;min-width:125px;max-width:125px}
  body.corporate-portal-theme .gt-org-intro,
  body.corporate-portal-theme .gt-proc-header{grid-template-columns:1fr 1fr}
  body.corporate-portal-theme .gt-org-poster{overflow-x:auto}
  body.corporate-portal-theme .gt-org-titlebar{min-width:1040px;font-size:16px;padding:14px 16px}
  body.corporate-portal-theme .gt-org-ceo-row,
  body.corporate-portal-theme .gt-org-section-title,
  body.corporate-portal-theme .gt-org-support-title{min-width:1040px}
  body.corporate-portal-theme .gt-org-value-chain{min-width:1040px}
  body.corporate-portal-theme .gt-org-support-grid{min-width:1040px}
  body.corporate-portal-theme .gt-org-split,
  body.corporate-portal-theme .gt-proc-body,
  body.corporate-portal-theme .blocks-grid{grid-template-columns:1fr;min-width:0}
  body.corporate-portal-theme .gt-detail-panel{position:static}
  body.corporate-portal-theme .gt-support-node{grid-template-columns:24px minmax(0,1fr)}
  body.corporate-portal-theme .gt-support-node .gt-on-badge{grid-column:2}
  body.corporate-portal-theme .daily-report-app{min-height:calc(100vh - 128px)}
  body.corporate-portal-theme .dr-topbar{height:auto;min-height:56px;padding:10px;gap:10px;flex-wrap:wrap}
  body.corporate-portal-theme .dr-brand{margin-right:4px}
  body.corporate-portal-theme .dr-tabs{order:3;width:100%;height:38px}
  body.corporate-portal-theme .dr-topbar-right{margin-left:0;flex:1;justify-content:flex-end;min-width:0}
  body.corporate-portal-theme .dr-sidebar{width:150px}
  body.corporate-portal-theme .dr-content{padding:18px}
  body.corporate-portal-theme .dr-settings-tools,
  body.corporate-portal-theme .dr-form-row{grid-template-columns:1fr}
  body.corporate-portal-theme .dr-month-grid{grid-template-columns:repeat(7,minmax(34px,1fr))}
  .portal-hero{flex-direction:column}
  .portal-hero .actions,.portal-quick{width:100%;justify-content:flex-start}
  .portal-hero .actions input{width:100%}
  .portal-org-grid,.portal-flow{grid-template-columns:1fr 1fr}
  .portal-reader-layout{grid-template-columns:1fr}
  .portal-reader-toc{position:static;max-height:none}
  .portal-reader-content{padding:18px}
  .reg-hero{padding:22px}
  .reg-hero h2{font-size:28px}
  .reg-kpi-grid,
  .reg-role-grid,
  .reg-diagram-lanes,
  .reg-close-grid{grid-template-columns:1fr}
  .reg-process-map{grid-template-columns:1fr 1fr}
  .reg-full-meta{padding:0 18px 16px}
  .reg-full-layout{grid-template-columns:1fr}
  .reg-full-layout .portal-reader-toc{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--reg-border)}
  .reg-full-content{padding:22px 18px 28px}
  .reg-process-node:nth-child(7n):after{display:block}
  .reg-process-node:nth-child(2n):after,
  .reg-process-node:last-child:after{display:none}
  .form-grid{grid-template-columns:1fr}
  .sidebar{width:52px}
  .brand{padding:18px 10px 14px}
  .brand strong{font-size:0}
  .brand strong:before{font-size:14px}
  .brand span,.nav-group,.nav-label{display:none}
  .nav-item{justify-content:center;padding:8px 0;width:46px}
}
