/* TubiCore v31 — 2B Контур visual language.
   Tenant workspace ONLY. HQ, public site, API and feature state unchanged. */
.tc-kontur{
 --tc-ink:#152239;--tc-muted:#758399;--tc-line:#e3e9f1;
 --tc-surface:#fff;--tc-bg:#f4f7fb;--tc-blue:#3f66f3;
 --tc-navy:#14233b;--tc-green:#22a57a;
 font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--tc-ink);
 background:var(--tc-bg);font-size:14px;
}
.tc-kontur button,.tc-kontur input,.tc-kontur select,.tc-kontur textarea{
 font-family:inherit;
}
.tc-kontur :focus-visible{outline:2px solid #4772f1;outline-offset:3px}
.tc-kontur .hidden{display:none!important}
.tc-kontur .muted,.tc-kontur .minor{color:var(--tc-muted)}
.tc-kontur h1,.tc-kontur h2,.tc-kontur h3{letter-spacing:-.027em}
.tc-kontur h2{font-size:1.46rem;font-weight:790}
.tc-kontur h3{font-size:1rem}
.tc-kontur .eyebrow{font-size:.67rem;letter-spacing:.13em;font-weight:800}
.tc-kontur .pill{color:#385bc3;background:#ebefff;border:1px solid #dce4ff;
 padding:7px 12px;border-radius:9px;font-weight:750}

/* Deep-blue left rail (modeled on the actual Kontur navigation). */
.tc-kontur .workspace{display:flex;min-height:100vh}
.tc-kontur .sidebar{
 z-index:32;width:251px;position:fixed;top:0;bottom:0;left:0;
 display:flex;flex-direction:column;min-height:0;height:100dvh;
 background:#14233b;color:#c8d1df;padding:25px 15px 15px;
 border-right:1px solid #20324c;box-shadow:4px 0 22px #0d19310c;
 overflow:hidden;
}
.tc-kontur .sidebar .brand{
 display:flex;align-items:center;gap:12px;margin:0;padding:0 10px 25px;
 color:#fff;font-size:1.22rem;font-weight:900;letter-spacing:-.055em;
 line-height:1.1;min-height:66px;
}
.tc-kontur .sidebar .brand::before{
 content:"T";flex:none;display:grid;place-items:center;width:41px;height:41px;
 color:#fff;border-radius:11px;letter-spacing:0;font-size:21px;font-weight:900;
 background:linear-gradient(145deg,#607dff,#3b57df);
 box-shadow:0 9px 20px #090f2477;
}
.tc-kontur .brand span{color:#779bff}
.tc-kontur .side-caption{
 padding:0 13px;color:#7486a4;font-size:.64rem;letter-spacing:.11em;
 margin:1px 0 10px;
}
.tc-kontur .side-company{
 background:#1c2e4b;border:1px solid #304561;color:#f5f7ff;
 border-radius:10px;padding:12px 13px;margin:0 5px 15px;
 font-size:.83rem;line-height:1.35;font-weight:760;
 box-shadow:inset 0 1px #ffffff0a;
}
.tc-kontur #app-nav{
 display:flex;flex-direction:column;gap:2px;overflow-y:auto;overflow-x:hidden;
 padding:3px 1px 18px;min-height:0;flex:1;
 scrollbar-width:thin;scrollbar-color:#405473 transparent;
}
.tc-kontur #app-nav::-webkit-scrollbar{width:5px}
.tc-kontur #app-nav::-webkit-scrollbar-thumb{background:#405473;border-radius:5px}
.tc-kontur .nav-item{
 display:flex;align-items:center;gap:11px;flex:0 0 auto;
 width:100%;min-height:41px;margin:0;padding:10px 12px;
 border:0;border-radius:9px;background:transparent;
 color:#a0afc4;font-size:.825rem;font-weight:640;line-height:1.27;
 white-space:normal;text-align:left;transition:background .15s,color .15s;
}
.tc-kontur .nav-item:hover{background:#1c3050;color:#fff;transform:none}
.tc-kontur .nav-item.selected{
 background:linear-gradient(90deg,#3d5ef0,#4a68f3);
 color:#fff;border:0;box-shadow:0 8px 19px #0b173a44;
 font-weight:780;
}
.tc-kontur .tc-nav-icon{
 width:20px;height:20px;flex:none;display:inline-flex;align-items:center;
 justify-content:center;opacity:.9;
}
.tc-kontur .tc-nav-icon svg{display:block;width:19px;height:19px;stroke:currentColor;
 fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tc-kontur .nav-item.selected .tc-nav-icon{opacity:1}
.tc-kontur .tc-nav-group{
 color:#697d9c;font-size:.625rem;letter-spacing:.12em;font-weight:800;
 text-transform:uppercase;padding:20px 12px 7px;
 pointer-events:none;user-select:none;
}
.tc-kontur .sidebar-bottom{
 margin-top:auto;padding:12px 1px 0;border-top:1px solid #2a3d59;
}
.tc-kontur .sidebar-user{
 display:flex;align-items:center;gap:10px;min-height:50px;
 padding:6px 11px;color:#d3dded;font-weight:670;font-size:.78rem;
 line-height:1.35;
}
.tc-kontur .sidebar-user::before{
 content:"";width:35px;height:35px;flex:none;border-radius:50%;
 background:linear-gradient(145deg,#7a94ff,#486af0);
 box-shadow:inset 0 1px #ffffff55;
}
.tc-kontur .sidebar-bottom .nav-item{color:#b7c4d5;font-size:.78rem;min-height:38px}
.tc-kontur .sidebar-bottom .nav-item:hover{color:#fff}
.tc-kontur .content-area{margin-left:251px;width:calc(100% - 251px);min-width:0;min-height:100vh}
.tc-kontur .topbar{
 z-index:18;position:sticky;top:0;height:75px;min-height:75px;
 padding:0 clamp(20px,2.5vw,35px);
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 background:#ffffffed;backdrop-filter:blur(15px);
 border-bottom:1px solid var(--tc-line);
 box-shadow:0 4px 16px #22314e05;
}
.tc-kontur .topbar .eyebrow{margin:0 0 5px;color:#8090a4}
.tc-kontur .topbar h1{font-size:1.37rem;margin:0;color:#182943;font-weight:820}
.tc-kontur .topbar .pill{text-transform:capitalize;font-size:.73rem}
.tc-kontur .page-content{
 max-width:none;width:100%;padding:27px clamp(18px,2.5vw,36px) 68px;margin:0 auto;
}

/* Overview, dense panels, tables and forms. */
.tc-kontur .welcome{
 background:linear-gradient(114deg,#172d4e 0%,#244a89 100%);
 border-radius:15px;padding:28px 32px;margin-bottom:20px;box-shadow:0 12px 26px #17305413;
}
.tc-kontur .welcome h2{font-size:1.7rem;margin-bottom:8px}
.tc-kontur .welcome .eyebrow{color:#b7caff}
.tc-kontur .welcome p{color:#c9d9ec}
.tc-kontur .license-card{background:#ffffff17;border-color:#ffffff2e;border-radius:11px}
.tc-kontur .stat-grid{gap:13px;margin-bottom:20px}
.tc-kontur .stat-card{
 border:1px solid var(--tc-line);border-radius:12px;
 padding:22px 23px;background:#fff;box-shadow:0 4px 12px #1b34550a;
}
.tc-kontur .stat-card span{font-size:.8rem;color:#77869b;font-weight:650}
.tc-kontur .stat-card strong{font-size:1.9rem;color:#172d4c;margin-top:9px}
.tc-kontur .tip,.tc-kontur .empty,.tc-kontur .form-card,.tc-kontur .record{
 border:1px solid var(--tc-line);border-radius:12px;background:#fff;
 box-shadow:0 3px 13px #1b345507;
}
.tc-kontur .tip,.tc-kontur .empty{padding:22px}
.tc-kontur .form-card{padding:21px 23px;margin-bottom:16px}
.tc-kontur .record{padding:16px 18px;gap:14px}
.tc-kontur .records{gap:8px}
.tc-kontur .record h3{font-weight:790;font-size:.93rem}
.tc-kontur .record p{color:#748399}
.tc-kontur .section-head{margin-bottom:17px;gap:10px}
.tc-kontur .section-head h2{font-size:1.4rem;margin-bottom:3px}
.tc-kontur .section-head p{font-size:.85rem;line-height:1.45}
.tc-kontur .form-card h3{margin-bottom:14px}
.tc-kontur label{color:#596a80;gap:7px;font-size:.79rem;font-weight:680}
.tc-kontur input:not([type=checkbox]):not([type=radio]),
.tc-kontur select,.tc-kontur textarea{
 border-radius:9px;border:1px solid #d7e0eb;
 background:#fff;min-height:41px;color:#24354e;
 box-shadow:0 1px 2px #11243b03;
}
.tc-kontur input:focus,.tc-kontur select:focus,.tc-kontur textarea:focus{
 outline:none;border-color:#6884f5;box-shadow:0 0 0 3px #4169f31b;
}
.tc-kontur .btn{
 border:1px solid #d7e0ea;background:#fff;color:#243958;
 border-radius:9px;box-shadow:none;
 font-weight:740;min-height:40px;padding:10px 15px;
 transition:background .15s,border-color .15s;
}
.tc-kontur .btn:hover{background:#f2f5ff;border-color:#abbcf7;transform:none}
.tc-kontur .btn.primary{
 color:#fff;border-color:#3e60ef;
 background:linear-gradient(95deg,#3e60ef,#4a6cf4);
 box-shadow:0 4px 13px #395af222;
}
.tc-kontur .btn.primary:hover{background:#3658da}
.tc-kontur .btn:disabled{opacity:.5}
.tc-kontur .permissions-grid .check,
.tc-kontur .checklist label{background:#f7f9fd;border-color:#e2e9f2}

/* Kontur-like production/order pipeline: calm columns and clear order names. */
.tc-kontur .kanban,.tc-kontur .v26-kanban{
 gap:12px;scrollbar-width:thin;scrollbar-color:#c4d0df transparent;
 padding:2px 2px 18px;
}
.tc-kontur .kanban-column{
 flex:0 0 277px;min-height:520px;
 padding:11px;border:1px solid #e0e6ef;border-radius:12px;background:#eef2f7;
}
.tc-kontur .kanban-column header{
 min-height:32px;margin-bottom:12px;padding:0 2px;
 color:#263c59;font-size:.84rem;font-weight:780;
}
.tc-kontur .count{background:#dae3f0;color:#536984;font-weight:780}
.tc-kontur .order-card,.tc-kontur .v26-card{
 border:1px solid #e1e5eb;border-radius:10px;
 box-shadow:0 4px 11px #26395c0b;
 background:#fff;padding:14px;
}
.tc-kontur .order-card:hover,.tc-kontur .v26-card:hover{
 border-color:#c8d7fb;box-shadow:0 7px 20px #1b3e7c16;
}
.tc-kontur .order-card h3,.tc-kontur .v26-card h3{
 color:#1e324b;font-size:.93rem;font-weight:790;line-height:1.35;
}
.tc-kontur .order-card p,.tc-kontur .v26-card p{color:#778599}
.tc-kontur .order-price{color:#345fce;font-weight:770}
.tc-kontur .kanban-column.drop-target,.tc-kontur .v26-column:has(.v26-card:active){
 background:#e6ecff;border-color:#5675f0;
}
.tc-kontur .v26-column{
 background:#eef2f7;border:1px solid #e0e6ef;border-radius:12px;
 flex-basis:290px;
}
.tc-kontur .v26-column-head{
 background:#e6ecf5;border-color:#d8e2ed;min-height:59px;padding:13px 14px;
}
.tc-kontur .v26-column-head strong{color:#263b57;font-size:.9rem}
.tc-kontur .v26-count{color:#4562ad;background:#d8e3ff}
.tc-kontur .v26-stack{padding:11px;gap:10px}
.tc-kontur .v26-card{padding:14px}
.tc-kontur .v26-order-link{border-radius:8px;background:#eef3ff;color:#3858bd}
.tc-kontur .v26-order-link:hover{background:#e5ecff}
.tc-kontur .v26-header h2{font-size:1.45rem}
.tc-kontur .v28-stock-item,.tc-kontur .v29,.tc-kontur .v29-form,
.tc-kontur .v28-panel,.tc-kontur .v28-new{
 border-color:var(--tc-line);border-radius:11px;
}
.tc-kontur .v29 details>summary{color:#27415f}

/* Same typography in existing CRM, quotes, finance reports and modals;
   no changes to permissions, fields or event listeners. */
.tc-kontur .detail-dialog{
 background:#f4f7fb;border-radius:15px;border:1px solid #dbe4f0;
 box-shadow:0 28px 90px #08152866;
}
.tc-kontur .detail-dialog-header{
 padding:21px 26px;border-bottom-color:var(--tc-line);
 background:#fffffffa;
}
.tc-kontur .detail-layout{gap:14px;padding:17px 24px 25px}
.tc-kontur .detail-panel,.tc-kontur .detail-field{
 border:1px solid var(--tc-line);border-radius:11px;
 box-shadow:0 2px 8px #1b345506;
}
.tc-kontur .detail-panel{padding:19px}
.tc-kontur .detail-field{padding:14px}
.tc-kontur .detail-panel h3{font-weight:780}
.tc-kontur .order-detail-overlay{background:#08182bb3}
.tc-kontur .org-checklist,.tc-kontur .org-dashboard-notice{border-radius:12px}
.tc-kontur .alert{
 background:#1c3456;border-radius:11px;box-shadow:0 15px 35px #12223a33;
}
.tc-kontur .alert.error{background:#c54956}

/* Kontur login: deep navy backdrop with single white sign-in card. */
.tc-kontur .auth-shell{
 background:radial-gradient(ellipse at 14% 8%,#263e67 0%,transparent 44%),
 radial-gradient(ellipse at 89% 89%,#1e3864 0%,transparent 40%),#111f35;
}
.tc-kontur .auth-card{
 border:1px solid #ffffff27;border-radius:22px;
 box-shadow:0 38px 110px #03091488;
 padding:35px 37px 32px;max-width:465px;
}
.tc-kontur .auth-card .brand{
 display:flex;align-items:center;gap:12px;color:#14243b;
 margin-bottom:30px;font-size:1.3rem;
}
.tc-kontur .auth-card .brand::before{
 content:"T";display:grid;place-items:center;flex:none;
 width:44px;height:44px;border-radius:11px;
 background:linear-gradient(145deg,#607dff,#3b57df);
 color:white;letter-spacing:0;font-size:23px;
 box-shadow:0 9px 18px #2742b63d;
}
.tc-kontur .auth-card .brand span{color:#3d62e7}
.tc-kontur .auth-card h1{font-size:1.75rem}
.tc-kontur .auth-card .btn.primary{width:100%}
.tc-kontur .auth-switch{margin-top:20px!important}

/* Mobile: off-canvas sidebar; never hide a functional section or change its data. */
.tc-mobile-menu,.tc-mobile-brand,.tc-mobile-scrim{display:none}
@media(max-width:1120px){
 .tc-kontur .sidebar{width:236px}
 .tc-kontur .content-area{margin-left:236px;width:calc(100% - 236px)}
 .tc-kontur .page-content{padding-left:19px;padding-right:19px}
 .tc-kontur .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 .tc-kontur .workspace{display:block}
 .tc-kontur .sidebar{
  width:min(285px,85vw);max-width:285px;
  transform:translateX(-110%);transition:transform .22s ease;
  box-shadow:8px 0 35px #07162e44;
 }
 .tc-kontur.tc-menu-open .sidebar{transform:translateX(0)}
 .tc-kontur .content-area{margin-left:0;width:100%}
 .tc-kontur .topbar{height:65px;min-height:65px;gap:11px;padding:0 15px}
 .tc-kontur .topbar h1{font-size:1.03rem}
 .tc-kontur .topbar .eyebrow{font-size:.58rem}
 .tc-kontur .topbar .pill{font-size:.64rem;padding:5px 8px}
 .tc-kontur .tc-mobile-menu{
  width:39px;height:39px;display:grid;place-items:center;flex:none;
  border:1px solid #d9e1eb;background:#fff;border-radius:9px;
  color:#263e62;cursor:pointer;
 }
 .tc-kontur .tc-mobile-menu svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:2}
 .tc-kontur .tc-mobile-scrim{
  display:block;position:fixed;inset:0;z-index:29;background:#06152ab3;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .2s,visibility .2s;
 }
 .tc-kontur.tc-menu-open .tc-mobile-scrim{
  opacity:1;visibility:visible;pointer-events:auto;
 }
 .tc-kontur .page-content{padding:18px 13px 55px}
 .tc-kontur .welcome{padding:22px;flex-direction:column}
 .tc-kontur .welcome h2{font-size:1.42rem}
 .tc-kontur .stat-grid{gap:10px}
 .tc-kontur .stat-card{padding:17px}
 .tc-kontur .stat-card strong{font-size:1.55rem}
 .tc-kontur .record{padding:13px;flex-wrap:wrap}
 .tc-kontur .sidebar nav{flex-direction:column;overflow-y:auto}
 .tc-kontur .nav-item{width:100%;min-width:0}
 .tc-kontur .kanban-column{flex-basis:255px}
 .tc-kontur .v26-column{flex-basis:min(295px,86vw)}
 .tc-kontur .detail-dialog{max-height:100dvh;border-radius:0}
 .tc-kontur .detail-dialog-header{padding:15px}
 .tc-kontur .detail-layout{padding:13px;grid-template-columns:1fr}
 .tc-kontur .auth-card{padding:25px 23px}
}
@media(prefers-reduced-motion:reduce){
 .tc-kontur .sidebar,.tc-kontur .tc-mobile-scrim,
 .tc-kontur .nav-item{transition:none}
}
