:root{--navy:#083a66;--navy-dark:#062f55;--blue:#0870c9;--cyan:#22b4dd;--ink:#17324d;--muted:#71869a;--line:#dbe6ee;--page:#f3f7fa;--green:#14875a;--green-bg:#e7f7ef;--orange:#af6200;--orange-bg:#fff3e3;--red:#c52d27;--red-bg:#fff0ed;--shadow:0 12px 30px rgba(33,68,99,.08)}
*{box-sizing:border-box}html,body{margin:0;min-width:320px;background:var(--page);color:var(--ink);font-family:Arial,sans-serif}button,input{font:inherit}.hidden{display:none!important}.modal-open{overflow:hidden}.brand{height:70px;display:flex;align-items:center;gap:10px;color:#fff}.brand img{width:43px;height:43px;object-fit:contain}.brand b{font-size:17px;line-height:1.1;letter-spacing:.045em}.brand i{display:block;color:#59d7eb;font-style:normal}.eyebrow{font-size:13px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:#8ee8f3}.eyebrow.blue{color:var(--blue)}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(480px,.95fr)}.story{padding:34px clamp(40px,7vw,110px);display:flex;flex-direction:column;background:radial-gradient(circle at 20% 78%,#0ca4cb55,transparent 26%),linear-gradient(145deg,#052c52,#07518c);color:#fff}.story-copy{margin:auto 0;max-width:610px}.story-copy h1{font-size:clamp(38px,5vw,64px);line-height:1.03;letter-spacing:-.045em;margin:18px 0 24px}.story-copy>p{max-width:520px;color:#d2e6f7;font-size:18px;line-height:1.6}.story ul{display:grid;gap:15px;margin:34px 0 0;padding:0;list-style:none}.story li:before{content:"✓";display:inline-grid;place-items:center;width:25px;height:25px;margin-right:12px;border-radius:50%;background:#19b9b0}.story>small{color:#98b9d3}.login-panel{display:grid;place-items:center;padding:50px;background:radial-gradient(circle at 100% 0,#dff6fc,transparent 35%),#f7fafc}.login-card{width:min(430px,100%);padding:42px;border-radius:22px;background:#fff;border:1px solid var(--line);box-shadow:0 25px 70px rgba(18,59,93,.12)}.login-card h2{font-size:31px;margin:12px 0 7px}.login-card>p{margin:0 0 28px;color:var(--muted)}.login-card label{display:grid;gap:8px;margin:17px 0;font-size:13px;font-weight:700}.login-card input{height:50px;padding:0 15px;border:1px solid #cbd9e4;border-radius:10px}.error{min-height:20px;color:var(--red);font-size:13px}
.primary,.secondary,.danger-button{min-height:42px;border:0;border-radius:8px;padding:0 17px;display:inline-flex;align-items:center;justify-content:center;gap:14px;font-weight:700;cursor:pointer}.primary{background:var(--blue);color:#fff;box-shadow:0 5px 12px rgba(8,112,201,.2)}.primary:hover{background:#075fad}.secondary{background:#fff;border:1px solid #adc7da;color:#0563b5}.login-card .primary{width:100%}
.app{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:230px;padding:0 14px 14px;background:linear-gradient(180deg,#063d6a,#062f55);display:flex;flex-direction:column;z-index:10}.sidebar .brand{padding:0 9px;border-bottom:1px solid #ffffff14}.sidebar nav{display:grid;gap:5px;margin-top:20px}.sidebar nav button{min-height:46px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:#c8d9e7;display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:9px;text-align:left;cursor:pointer}.sidebar nav button.active{background:#ffffff14;color:#fff}.nav-icon{font-size:18px}.nav-count{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#ef433a;color:#fff;font-style:normal;font-size:11px;font-weight:700}.connection{margin-top:auto;padding:15px 8px 13px;border-bottom:1px solid #ffffff14;display:grid;gap:5px;color:#dceaf3}.connection b{font-size:11px}.connection i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#2fe29b}.connection small{padding-left:14px;color:#8faec4;font-size:10px}.account{margin-top:9px;min-height:54px;padding:7px 5px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;color:#fff}.account>span{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#bfe9f2;color:#075473;font-size:12px;font-weight:700}.account div{display:grid;gap:3px}.account b{font-size:11px}.account small{color:#a9c0d0;font-size:10px}.account button{border:0;background:transparent;color:#d5e4ee;font-size:20px;cursor:pointer}
.workspace{min-height:100vh;margin-left:230px}.workspace>header{height:76px;padding:0 52px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff}.workspace h1{margin:0;font-size:25px;font-weight:500}.workspace header p{margin:5px 0 0;color:var(--muted);font-size:12px}.header-actions{display:flex;align-items:center;gap:14px}.app-version{padding:5px 8px;border-radius:6px;background:#e8f3ff;color:#0870c9;font-size:11px;font-weight:700;letter-spacing:.035em}.header-actions time{color:var(--muted);font-size:13px;font-weight:600}.help{width:31px;height:31px;border:1px solid #cbd9e4;border-radius:50%;background:#fff;color:#6f8395;cursor:pointer}.content{width:min(1215px,calc(100% - 48px));margin:0 auto;padding:30px 0 78px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.dashboard-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.dashboard-stat{min-height:104px;padding:18px;display:flex;align-items:center;gap:15px}.dashboard-stat>div{display:grid;gap:4px}.dashboard-stat small{color:var(--muted);font-size:11px}.dashboard-stat b{font-size:19px;color:#092d50}.dashboard-stat p{margin:0;color:#72879a;font-size:11px}.stat-icon,.round-icon{width:43px;height:43px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;font-size:24px;font-weight:600}.blue-icon{color:#0871c9;background:#e8f3ff}.green-icon{color:var(--green);background:var(--green-bg)}.orange-icon{color:var(--orange);background:var(--orange-bg)}.red-icon{color:var(--red);background:var(--red-bg)}
.decision-card{min-height:173px;margin:20px 0;padding:25px 24px;border-left:4px solid #d63834;background:linear-gradient(90deg,#fff 0%,#fffaf8 100%);display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:19px}.decision-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:50%;background:#fff0ed;color:#d62f2b;font-size:23px;font-weight:600}.decision-label{color:#c51f1b;font-size:11px;letter-spacing:.13em;font-weight:600}.decision-copy h2{margin:11px 0 7px;font-size:21px;font-weight:500;color:#0a2f52}.decision-copy p{margin:0;color:#6e8295;font-size:13px}.decision-tags{display:flex;gap:8px;margin-top:14px}.decision-tags span{padding:5px 8px;border-radius:5px;background:#fff0ed;color:#c52d28;font-size:10px;font-weight:600}.decision-button{margin-left:12px;white-space:nowrap;font-size:14px}
.section-head{min-height:74px;padding:17px 21px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.section-head h2{margin:0 0 5px;font-size:18px;font-weight:500}.section-head p{margin:0;color:var(--muted);font-size:11px}.link-button{border:0;background:none;color:#0870c9;font-weight:700;cursor:pointer}.operations-card,.table-card,.history-card,.users-card{overflow:hidden}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{height:41px;padding:0 20px;background:#f7f9fb;color:#788a99;font-size:10px;text-transform:uppercase;letter-spacing:.06em}td{height:63px;padding:9px 20px;border-top:1px solid #edf1f4;white-space:nowrap}td:first-child{min-width:220px}td small{display:block;color:var(--muted);margin-top:5px}.operations-table td:first-child{min-width:150px}.person{display:flex;align-items:center;gap:9px}.person i{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#c8eef8;color:#05739c;font-size:9px;font-style:normal;font-weight:600}
.pill{display:inline-block;padding:5px 9px;border-radius:999px;font-size:13px;font-weight:600;text-transform:uppercase;line-height:1.15}.pill.safe{color:var(--green);background:var(--green-bg)}.pill.warn{color:var(--orange);background:var(--orange-bg)}.pill.danger{color:var(--red);background:var(--red-bg)}.pill.blue-pill,.blue-pill{color:var(--blue);background:#e8f3ff}.operations-table .pill{font-size:11px}.operations-table .pill.warn{background:#fff4e6}.operations-table .pill.safe{background:var(--green-bg)}
.review{padding-bottom:108px}.upload{min-height:82px;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;gap:22px}.upload>div{display:flex;align-items:center;gap:13px}.upload h2{margin:0 0 4px;font-size:15px;font-weight:500}.upload p{margin:0;color:var(--muted);font-size:11px}.file{width:43px;height:46px;display:grid;place-items:center;border-radius:8px;background:var(--green-bg);color:var(--green);font-size:11px;font-weight:600}.upload-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.upload label{margin:0;cursor:pointer}.upload input{display:none}.primary:disabled,.secondary:disabled{opacity:.55;cursor:not-allowed}.summary{display:grid;grid-template-columns:repeat(4,1fr);margin:16px 0;background:#fff;border:1px solid var(--line);border-radius:11px;overflow:hidden}.summary span{height:64px;display:flex;align-items:center;justify-content:center;gap:7px;border-right:1px solid var(--line);font-size:11px;font-weight:600}.summary span:last-child{border:0}.summary b{font-size:18px}.safe{color:var(--green)}.warn{color:var(--orange)}.danger{color:var(--red)}.filters{color:#7b8c9b;font-size:10px}.price{display:flex;align-items:center;gap:7px}.price del{color:#8494a2}.price i{color:#889aaa;font-style:normal}.price b{color:#102f4d}.price em{padding:4px 6px;border-radius:4px;background:#f1f4f6;color:#617587;font-style:normal;font-size:13px;font-weight:600}.price.no-old{align-items:flex-start;flex-direction:column;gap:3px}.review-actions{display:grid;grid-template-columns:.9fr 1.1fr;gap:16px;margin-top:16px}.safe-action,.critical-action{min-height:210px;padding:21px;display:flex;flex-direction:column}.safe-action>div,.critical-action>div:first-child{display:flex;gap:14px}.safe-action h2,.critical-action h2{margin:0 0 6px;font-size:16px;font-weight:500}.safe-action p,.critical-action p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}.wide{width:100%;margin-top:auto}.critical-action{border-color:#ef9d94}.confirm-line{min-height:39px;margin:17px 0 11px;padding:9px 10px;display:flex;align-items:center;gap:8px;border-radius:7px;background:var(--red-bg);color:#7b4e49;font-size:10px}.confirm-line input{width:14px;height:14px;margin:0}.danger-button{width:100%;margin-top:auto;background:#d73d34;color:#fff}.danger-button:disabled{background:#e7b0ac;color:#fff;cursor:not-allowed}.apply-bar{position:fixed;left:230px;right:0;bottom:0;min-height:72px;padding:10px 52px;display:flex;align-items:center;justify-content:flex-end;gap:24px;border-top:1px solid var(--line);background:#fff;z-index:8}.apply-bar div{display:grid;gap:5px;text-align:right}.apply-bar b{font-size:12px}.apply-bar small{color:var(--muted);font-size:10px}
.history-card{margin-top:18px}.role-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}.role-cards article{min-height:102px;padding:18px;border:1px solid #bcd8ee;border-radius:11px;background:#eaf4fc}.role-cards article:nth-child(2){border-color:#bbe2d4;background:#eaf8f1}.role-cards article:nth-child(3){border-color:#f2d7ad;background:#fff4e6}.role-cards b{font-size:12px}.role-cards p{margin:12px 0 0;color:#657b8e;font-size:10px;line-height:1.5}.users-list>div{min-height:65px;padding:10px 20px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:34px 1fr auto 90px auto;align-items:center;gap:10px}.users-list>div:last-child{border-bottom:0}.users-list .avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#bfe9f2;color:#07617e;font-size:10px;font-weight:700}.users-list .identity{display:grid;gap:4px}.users-list .identity b{font-size:12px}.users-list .identity small,.users-list .last-seen{color:var(--muted);font-size:10px}.user-password{min-height:36px;padding:0 12px;border:1px solid #adc7da;border-radius:7px;background:#fff;color:#0563b5;font-weight:700;cursor:pointer}.toast{position:fixed;top:18px;right:24px;z-index:1000;max-width:470px;min-height:74px;padding:10px 18px 10px 14px;border:3px solid var(--red);border-radius:10px;background:#fff4e6;color:#0563b5;box-shadow:0 12px 30px rgba(87,28,20,.24);font-size:15px;font-weight:700;line-height:1.35;display:flex;align-items:center;gap:14px;opacity:0;transform:translateY(-14px);pointer-events:none;transition:.2s}.toast::before{content:"✓";flex:0 0 auto;color:var(--red);font-size:50px;font-weight:700;line-height:.9}.toast.show{opacity:1;transform:none}
.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:rgba(4,30,53,.58)}.modal-card{width:min(560px,100%);max-height:calc(100vh - 48px);overflow:auto;padding:30px;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(0,25,50,.28)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.modal-head h2{margin:8px 0 0;font-size:26px}.modal-card>p{margin:13px 0 22px;color:var(--muted);font-size:15px;line-height:1.5}.modal-close{width:40px;height:40px;border:0;border-radius:50%;background:#edf4f8;color:#47677f;font-size:26px;line-height:1;cursor:pointer}.modal-card label{display:grid;gap:8px;margin:16px 0;color:#2b465f;font-size:14px;font-weight:700}.modal-card input{width:100%;height:50px;padding:0 14px;border:1px solid #bdcfdd;border-radius:9px;background:#fff}.modal-card input:focus{outline:3px solid #d7ebfa;border-color:var(--blue)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.modal-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:8px}.logout-link{width:100%;margin-top:18px;padding:13px;border:0;border-top:1px solid var(--line);background:transparent;color:#b32a25;font-weight:700;cursor:pointer}
.toast-stack{position:fixed;top:18px;right:24px;z-index:1000;width:min(470px,calc(100vw - 48px));max-height:calc(100vh - 36px);padding:0 4px 0 0;display:grid;gap:10px;overflow-y:auto;pointer-events:none}.toast-stack .toast{position:relative;left:auto;right:auto;top:auto;z-index:auto;width:100%;max-width:none;flex:0 0 auto;padding-right:58px;opacity:1;transform:none;pointer-events:auto}.toast-message{min-width:0}.toast-close{position:absolute;top:8px;right:8px;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:transparent;color:#9b2c27;font-size:30px;font-weight:400;line-height:1;cursor:pointer}.toast-close:hover,.toast-close:focus-visible{background:#ffe0d6;outline:none}.toast-close:focus-visible{box-shadow:0 0 0 3px rgba(197,45,39,.2)}
@media(max-width:700px){.toast-stack{left:12px;right:12px;top:78px;width:auto;max-height:calc(100dvh - 90px)}.toast-stack .toast{left:auto;right:auto;top:auto}}
@media(max-width:1050px){.dashboard-stats{grid-template-columns:1fr}.decision-card{grid-template-columns:48px 1fr}.decision-button{grid-column:2;margin:0;justify-self:start}.review-actions{grid-template-columns:1fr}}
@media(max-width:900px){.login-page{grid-template-columns:1fr}.story{display:none}.login-panel{min-height:100vh;padding:20px}.summary{grid-template-columns:repeat(2,1fr)}.role-cards{grid-template-columns:1fr}}
@media(max-width:700px){.sidebar{width:70px;padding:0 8px}.sidebar .brand b,.sidebar nav button>span:not(.nav-icon),.connection,.account div{display:none}.sidebar .brand{justify-content:center}.sidebar .brand img{width:42px;height:42px}.sidebar nav button{display:flex;justify-content:center;font-size:20px}.nav-count{position:absolute;margin:0 0 28px 30px}.account{grid-template-columns:1fr;justify-items:center}.account button{display:none}.workspace{margin-left:70px}.workspace>header{padding:0 18px}.header-actions time{display:none}.content{width:calc(100% - 24px);padding-top:18px}.decision-card{grid-template-columns:1fr;padding:22px 17px}.decision-icon{display:none}.decision-button{grid-column:1}.decision-tags{flex-wrap:wrap}.upload{align-items:flex-start;flex-direction:column}.upload-actions{width:100%;align-items:stretch;flex-direction:column}.upload-actions .secondary,.upload-actions .primary{width:100%}.apply-bar{left:70px;padding:9px 12px;gap:10px}.apply-bar div{display:none}.apply-bar .primary{width:100%}.users-list>div{grid-template-columns:32px 1fr auto}.users-list .last-seen,.users-list .pill{display:none}.user-password{grid-column:2 / 4;justify-self:start}.login-card{padding:28px 22px}.modal{padding:12px}.modal-card{max-height:calc(100vh - 24px);padding:23px 19px}.form-grid{grid-template-columns:1fr;gap:0}.modal-actions{align-items:stretch;flex-direction:column-reverse}.modal-actions button{width:100%}}

/* Readable desktop scale: the approved layout must not require squinting. */
@media(min-width:701px){
  .sidebar{width:248px;padding:0 16px 16px}
  .sidebar .brand{height:88px;padding:0 10px;gap:13px}
  .sidebar .brand img{width:49px;height:49px}
  .sidebar .brand b{font-size:19px;line-height:1.12}
  .sidebar .brand i{margin-top:6px}
  .sidebar nav{gap:7px;margin-top:22px}
  .sidebar nav button{min-height:52px;padding:0 15px;grid-template-columns:24px 1fr auto;gap:11px;font-size:16px;line-height:1.25}
  .nav-icon{font-size:20px}
  .nav-count{width:25px;height:25px;font-size:13px}
  .connection{padding:20px 10px 17px;gap:8px}
  .connection b{font-size:14px}
  .connection i{width:10px;height:10px}
  .connection small{padding-left:18px;font-size:13px;line-height:1.35}
  .account{min-height:70px;margin-top:10px;padding:9px 8px;grid-template-columns:42px 1fr auto;gap:11px;border-radius:10px;background:#ffffff08}
  .account>span{width:42px;height:42px;font-size:15px}
  .account div{gap:5px}
  .account b{font-size:14px}
  .account small{font-size:13px}
  .workspace{margin-left:248px}
  .workspace>header{height:82px;padding:0 58px}
  .workspace h1{font-size:27px}
  .workspace header p{font-size:14px}
  .content{width:min(1320px,calc(100% - 64px));padding:32px 0 112px}
  .dashboard-stat{min-height:118px;padding:21px;gap:17px}
  .dashboard-stat small{font-size:14px}
  .dashboard-stat b{font-size:22px}
  .dashboard-stat p{font-size:13px}
  .stat-icon,.round-icon{width:48px;height:48px;font-size:26px}
  .decision-card{min-height:188px;padding:27px 26px;gap:21px}
  .decision-copy h2{font-size:23px}
  .decision-copy p{font-size:15px;line-height:1.45}
  .decision-tags span{padding:6px 9px;font-size:13px}
  .link-button{font-size:14px}
  .review{padding-bottom:126px}
  .upload{min-height:94px;padding:18px 22px;gap:26px}
  .upload h2{font-size:17px}
  .upload p{font-size:13px}
  .file{width:48px;height:50px;font-size:13px}
  .primary,.secondary,.danger-button{min-height:48px;padding:0 20px;font-size:15px}
  .summary{margin:18px 0}
  .summary span{height:72px;gap:8px;font-size:13px}
  .summary b{font-size:21px}
  .section-head{min-height:82px;padding:19px 23px}
  .section-head h2{font-size:19px}
  .section-head p{font-size:13px}
  .filters{font-size:13px}
  table{font-size:14px}
  th{height:45px;padding:0 22px;font-size:13px}
  td{height:70px;padding:10px 22px}
  td small{margin-top:6px;font-size:13px}
  .person i{width:30px;height:30px;font-size:11px}
  .operations-table .pill{font-size:13px}
  .price{gap:9px}
  .price em{font-size:13px}
  .review-actions{gap:18px;margin-top:18px}
  .safe-action,.critical-action{min-height:224px;padding:23px}
  .safe-action h2,.critical-action h2{font-size:18px}
  .safe-action p,.critical-action p{font-size:13px;line-height:1.55}
  .decision-label{font-size:13px}
  .confirm-line{min-height:44px;margin:18px 0 12px;padding:10px 12px;gap:9px;font-size:13px;line-height:1.35}
  .confirm-line input{width:16px;height:16px}
  .apply-bar{left:248px;min-height:90px;padding:14px 58px;gap:28px}
  .apply-bar div{gap:6px}
  .apply-bar b{font-size:15px}
  .apply-bar small{font-size:13px}
  .apply-bar .primary{min-height:50px;font-size:16px;padding:0 24px}
  .role-cards article{min-height:120px;padding:21px}
  .role-cards b{font-size:15px}
  .role-cards p{font-size:13px;line-height:1.55}
  .users-list>div{min-height:74px;padding:12px 22px;grid-template-columns:40px 1fr auto 110px auto;gap:12px}
  .users-list .avatar{width:38px;height:38px;font-size:12px}
  .users-list .identity b{font-size:14px}
  .users-list .identity small,.users-list .last-seen{font-size:13px}
  .user-password{min-height:40px;padding:0 14px;font-size:13px}
  .toast{padding:10px 20px 10px 15px;font-size:15px}
}

/* v0.9: real statuses, complete lists and account/team controls. */
.connection i{background:#f0a43c}.connection.connected i{background:#2fe29b}.connection.disconnected i{background:#ff5b55}.connection.disconnected b{color:#ffd0cd}.connection.checking b{color:#ffe0aa}
.account-avatar{width:34px;height:34px;padding:0!important;display:grid!important;place-items:center;border:0;border-radius:50%;background:#bfe9f2!important;color:#075473!important;font-size:12px!important;font-weight:700;cursor:pointer}.account-avatar span{pointer-events:none}
.password-field{position:relative;display:block}.password-field input{width:100%;padding-right:54px}.password-toggle{position:absolute;top:50%;right:7px;transform:translateY(-50%);width:40px;height:38px;padding:0;border:0;border-radius:7px;background:transparent;color:#17324d;font-size:19px;cursor:pointer}.password-toggle:hover{background:#edf4f8}
.team-card{width:100%;min-height:82px;margin:18px 0 0;padding:16px 20px;display:flex;align-items:center;gap:14px;text-align:left;color:var(--ink);cursor:pointer}.team-card>span:nth-child(2){display:grid;gap:5px}.team-card b{font-size:16px}.team-card small{color:var(--muted)}.team-card>i{margin-left:auto;color:var(--blue);font-size:24px;font-style:normal}.team-card:hover{border-color:#9cc7e6}
.review-table-wrap{max-height:58vh;overflow:auto}.history-table-wrap{max-height:64vh;overflow:auto}.dashboard-history-wrap{max-height:390px}.review-table-wrap thead,.history-table-wrap thead{position:sticky;top:0;z-index:2}.review-table-wrap th,.history-table-wrap th{box-shadow:0 1px 0 var(--line)}.empty-row{height:90px!important;text-align:center;color:var(--muted);white-space:normal!important}.empty-users{padding:30px;text-align:center;color:var(--muted)}
.control-table th{vertical-align:middle}.control-table td:first-child{white-space:normal;overflow-wrap:anywhere;word-break:normal;vertical-align:top}.control-table td:first-child small{line-height:1.35}
.users-list>div{grid-template-columns:34px minmax(160px,1fr) auto minmax(125px,auto) auto}.user-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.user-delete{min-height:36px;padding:0 12px;border:1px solid #efb1ad;border-radius:7px;background:#fff;color:var(--red);font-weight:700;cursor:pointer}.user-delete:hover{background:var(--red-bg)}
.modal-card select{width:100%;height:50px;padding:0 14px;border:1px solid #bdcfdd;border-radius:9px;background:#fff}.modal-card select:focus{outline:3px solid #d7ebfa;border-color:var(--blue)}.compact-modal{width:min(520px,100%)}.modal-danger{width:auto;margin:0;min-height:42px}.eyebrow.danger{color:var(--red)}
@media(min-width:701px){.account-avatar{width:42px;height:42px;font-size:15px!important}.users-list>div{grid-template-columns:40px minmax(180px,1fr) auto minmax(145px,auto) auto}}
@media(max-width:700px){.account{grid-template-columns:1fr;justify-items:center}.account #account-settings{display:none}.account-avatar{display:grid!important;width:38px;height:38px;font-size:13px!important}.review-table-wrap{max-height:55vh}.history-table-wrap{max-height:70vh}.users-list>div{grid-template-columns:32px 1fr}.users-list .identity{min-width:0}.users-list .identity small{overflow:hidden;text-overflow:ellipsis}.user-actions{grid-column:1 / 3;justify-content:flex-start;padding-left:42px;flex-wrap:wrap}.user-password,.user-delete{min-height:40px}.section-head{align-items:flex-start;gap:12px;flex-direction:column}.section-head .primary,.section-head .secondary{width:100%}.filters{line-height:1.5}.password-toggle{display:block!important}}
@media(max-width:700px){.source-strip{flex-wrap:wrap}.source-strip #ms-source-label{flex:1 1 calc(100% - 105px)}.source-refresh{width:100%;min-height:38px}}

/* v0.9.16 — readable technical details and compact desktop dialogs. */
.add-user-modal-card{width:min(700px,100%)}
.technical-modal-card{width:min(760px,100%)}
.technical-product{margin-bottom:16px!important;padding:12px 14px;border-radius:9px;background:#f3f8fc;color:#294861!important;font-weight:700;overflow-wrap:anywhere}
.technical-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}
.technical-grid>div{min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#f9fbfd}
.technical-grid .technical-wide{grid-column:1 / -1}
.technical-grid dt{margin:0 0 6px;color:#71869a;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}
.technical-grid dd{margin:0;color:#294861;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.technical-grid .technical-reason{border-color:#ef9aa8;background:#ffe8ed}
.history-table-wrap{overflow-x:hidden}
.history-table-wrap .operations-table{width:100%;table-layout:fixed}
.history-table-wrap .operations-table th:nth-child(1){width:13%}
.history-table-wrap .operations-table th:nth-child(2){width:14%}
.history-table-wrap .operations-table th:nth-child(3){width:20%}
.history-table-wrap .operations-table th:nth-child(4){width:43%}
.history-table-wrap .operations-table th:nth-child(5){width:10%}
.history-table-wrap .operations-table td{min-width:0!important;overflow:hidden;text-overflow:ellipsis}
.history-table-wrap .operations-table td:nth-child(4){white-space:normal;overflow-wrap:anywhere;line-height:1.4}

@media(max-width:700px){
  .technical-grid{grid-template-columns:1fr;gap:8px}
  .technical-grid .technical-wide{grid-column:auto}
  .history-table-wrap{overflow:visible}
}

/* v0.9.17 — настоящий предпросмотр плана изменений. */
.change-plan-modal-card{width:min(1180px,100%);padding:24px}
.change-plan-source{margin:8px 0 14px!important}
.plan-summary{display:grid;grid-template-columns:repeat(6,1fr);overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#f9fbfd}
.plan-summary span{min-height:72px;padding:11px 13px;display:grid;align-content:center;gap:5px;border-right:1px solid var(--line)}
.plan-summary span:last-child{border-right:0}.plan-summary small{color:#71869a;font-size:10px;font-weight:700;text-transform:uppercase}.plan-summary b{font-size:22px;color:var(--ink)}
.plan-summary .safe b{color:var(--green)}.plan-summary .danger b{color:var(--red)}.plan-summary .warn b{color:var(--orange)}.plan-summary .blue b{color:var(--blue)}
.plan-meta{min-height:38px;padding:8px 2px;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#667d90;font-size:12px;font-weight:700}
.plan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.plan-filters{min-width:0;display:flex;gap:6px;overflow-x:auto}
.modal-card .table-search.plan-search{width:270px;flex:0 0 270px;display:flex;grid-template-columns:none;align-items:center;gap:7px;margin:0;padding:0 11px}
.modal-card .table-search.plan-search>span{flex:0 0 auto;line-height:1}
.modal-card .table-search.plan-search input{height:auto;padding:0;border:0}
.plan-filter{min-height:34px;padding:0 12px;border:1px solid #d4e0e8;border-radius:999px;background:#fff;color:#60768a;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.plan-filter.active{border-color:#91bfe3;background:#e8f3ff;color:#0870c9}
.plan-table-wrap{height:min(410px,45vh);border:1px solid var(--line);border-radius:10px}
.plan-table{min-width:980px;table-layout:fixed}.plan-table th{position:sticky;top:0;z-index:2}.plan-table th:nth-child(1){width:28%}.plan-table th:nth-child(2){width:21%}.plan-table th:nth-child(n+3){width:10.2%}
.plan-table td{height:58px;padding:8px 12px;font-size:12px;font-variant-numeric:tabular-nums}.plan-table td:first-child{min-width:0;white-space:normal}.plan-table td:first-child small{max-height:30px;overflow:hidden;line-height:1.25}.plan-table .pill{margin:2px 3px 2px 0;font-size:9px;padding:4px 7px}.plan-actions{white-space:normal}.plan-actions>small{display:block;margin-top:5px;white-space:normal;line-height:1.3}.plan-table .delta-positive{color:var(--green);font-weight:700}.plan-table .delta-negative{color:var(--red);font-weight:700}
.moysklad-write-panel{margin-top:14px;padding:15px 16px;border:1px solid #c7dbe9;border-radius:12px;background:#f5faff}
.moysklad-write-panel h3{margin:4px 0 0;font-size:17px}.moysklad-write-panel>p{margin:9px 0 12px!important;color:#566f83;font-size:12px;line-height:1.45}
.moysklad-write-panel.blocked{border-color:#efc1c7;background:#fff5f6}.moysklad-write-panel.ready{border-color:#a8d9c5;background:#f2fcf7}
.moysklad-draft-documents{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.moysklad-draft-documents article{padding:10px 12px;border:1px solid #cddde8;border-radius:9px;background:#fff;display:grid;gap:4px}.moysklad-draft-documents b{font-size:13px}.moysklad-draft-documents small{color:#71869a;font-size:11px}.moysklad-draft-documents a{color:#0870c9;font-size:11px;font-weight:700;text-decoration:none}.moysklad-draft-documents .conducted{color:var(--green)}
.moysklad-write-panel .confirm-line{margin:10px 0;grid-template-columns:20px 1fr}.moysklad-write-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.moysklad-write-actions button{min-height:42px;padding:0 16px}
.moysklad-rrp-panel{margin-top:14px;padding-top:14px;border-top:1px solid #c7dbe9}.moysklad-rrp-panel>p{margin:0 0 10px!important;color:#566f83;font-size:12px;line-height:1.45}.moysklad-rrp-panel .confirm-line{margin:10px 0}
.rrp-progress{display:block;width:100%;height:10px;margin:8px 0 12px;accent-color:#0879cf}.rrp-progress.hidden{display:none}

@media(max-width:700px){
  .change-plan-modal-card{padding:16px 12px}.plan-summary{grid-template-columns:1fr 1fr}.plan-summary span{min-height:60px;border-bottom:1px solid var(--line)}.plan-summary span:nth-child(2n){border-right:0}.plan-summary span:last-child{grid-column:1 / -1;border-bottom:0}.plan-summary b{font-size:18px}.plan-meta{align-items:flex-start;flex-direction:column;gap:4px}.plan-table-wrap{height:48vh}.plan-table{min-width:900px}.plan-toolbar{align-items:stretch;flex-direction:column}.plan-filters{padding-bottom:2px}.modal-card .table-search.plan-search{width:100%;flex-basis:auto}.moysklad-draft-documents{grid-template-columns:1fr}.moysklad-write-actions{display:grid}.moysklad-write-actions button{width:100%}
}

/* v0.9.10: preserve the original automatic column layout; only long product names wrap. */

/* v0.9.2: dashboard cleanup and clearer connection display. */
.connection b{display:flex;align-items:center;gap:8px}
.empty-users{display:block!important;width:100%;padding:30px;text-align:center;color:var(--muted);white-space:normal;line-height:1.45}
@media(min-width:701px){.connection b{gap:10px}}


/* v0.9.11 — horizontal navigation and 10-column comparison workspace. */
.topbar{position:sticky;top:0;z-index:30;min-height:78px;padding:0 24px;display:flex;align-items:stretch;justify-content:space-between;gap:20px;background:linear-gradient(90deg,#063d6a,#062f55);box-shadow:0 4px 16px rgba(3,37,66,.15)}
.topbar-main{min-width:0;display:flex;align-items:center;gap:28px}.topbar .brand{height:78px;flex:0 0 auto;padding:0;border:0}.topbar .brand img{width:46px;height:46px}.topbar .brand b{font-size:18px}.topbar .brand i{display:block;margin-top:3px}
.topnav{min-width:0;display:flex;align-items:center;gap:6px}.topnav button{position:relative;min-height:44px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:#c8d9e7;display:flex;align-items:center;gap:8px;white-space:nowrap;cursor:pointer;font-size:14px;font-weight:600}.topnav button:hover{background:#ffffff0d;color:#fff}.topnav button.active{background:#0d5c96;color:#fff}.topnav .nav-icon{font-size:17px}.topnav .nav-count{width:20px;height:20px;font-size:10px}
.topbar-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}.topbar .connection{min-width:190px;margin:0;padding:9px 14px;border:0;border-right:1px solid #ffffff1f;display:grid;gap:4px}.topbar .connection b{font-size:12px;white-space:nowrap}.topbar .connection small{padding-left:18px;font-size:10px;white-space:nowrap}.topbar .account{min-width:178px;min-height:58px;margin:0;padding:8px 7px;grid-template-columns:38px 1fr 28px;gap:9px;background:transparent}.topbar .account-avatar{width:38px;height:38px;font-size:13px!important}.topbar .account b{font-size:12px}.topbar .account small{font-size:10px}.topbar .account #account-settings{font-size:20px}
.workspace{min-height:calc(100vh - 78px);margin-left:0}.workspace>header.page-header{height:78px;padding:0 26px;background:#fff}.workspace h1{font-size:25px}.workspace header p{font-size:12px}.content{width:min(2400px,calc(100% - 40px));max-width:none;margin:0 auto;padding:24px 0 108px}
.apply-bar{left:0;min-height:78px;padding:10px 24px}.apply-bar div{display:grid}.review{padding-bottom:116px}
.source-strip{min-height:42px;margin:0 0 14px;padding:9px 14px;display:flex;align-items:center;gap:7px;border:1px solid #cfe0ec;border-radius:9px;background:#f7fbfe;color:#5e7488;font-size:11px}.source-strip b{color:#294861}.source-dot{width:8px;height:8px;border-radius:50%;background:#efad41;flex:0 0 auto}.source-dot.fresh{background:#18a66a}.source-dot.stale{background:#efad41}.source-dot.unavailable{background:#df453d}
.source-strip #ms-source-label{min-width:0;flex:1}.source-refresh{min-height:30px;padding:0 11px;border:1px solid #adc7da;border-radius:7px;background:#fff;color:#0563b5;font:inherit;font-weight:700;white-space:nowrap;cursor:pointer}.source-refresh:disabled{opacity:.55;cursor:not-allowed}
.source-warning{min-height:30px;padding:0 11px;border:1px solid #df6b63;border-radius:7px;background:#fff0ed;color:var(--red);font:inherit;font-weight:700;white-space:nowrap;cursor:pointer}.source-warning:hover{background:#ffe4df}
.review-result-card{overflow:hidden}.result-toolbar{min-height:64px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.result-tabs{display:flex;align-self:stretch;gap:4px}.result-tab{min-height:42px;padding:0 15px;border:0;border-radius:7px;background:transparent;color:#667d90;font-weight:700;cursor:pointer}.result-tab.active{background:#e8f3ff;color:var(--blue)}
.result-tools{display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}.table-search{width:270px;height:38px;padding:0 11px;display:flex;align-items:center;gap:7px;border:1px solid #c9d8e3;border-radius:8px;background:#fff;color:#72879a}.table-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}.filter-chips{display:flex;gap:5px}.filter-chip{height:34px;padding:0 10px;border:1px solid #d4e0e8;border-radius:999px;background:#fff;color:#60768a;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}.filter-chip.active{border-color:#91bfe3;background:#e8f3ff;color:#0870c9}.purchase-filter.active{border-color:#efbd70;background:#fff4e2;color:#a85e00}
.table-caption-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.result-export{min-height:36px;padding:0 13px;white-space:nowrap}.result-export:disabled{opacity:.55}
.table-caption-row{min-height:62px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.table-caption-row h2{margin:0 0 4px;font-size:16px;font-weight:600}.table-caption-row p{margin:0;color:var(--muted);font-size:11px}.table-caption-row .filters{flex:0 0 auto;font-size:11px}
.review-table-wrap{max-height:52vh;min-height:310px;overflow:auto}.comparison-table{width:100%;min-width:1460px;table-layout:fixed;font-size:12px}.comparison-table th{height:48px;padding:6px 9px;white-space:normal;line-height:1.22;font-size:10px;text-align:left}.comparison-table td{height:62px;padding:8px 9px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}.comparison-table td:first-child{min-width:0;white-space:normal}.comparison-table td:first-child b{font-size:12px}.comparison-table td:first-child small{max-height:30px;overflow:hidden;line-height:1.25}.comparison-table .col-product{width:27%}.comparison-table .col-number{width:7%}.comparison-table .col-delta{width:7%}.comparison-table .col-price{width:8.5%}.comparison-table .col-price-delta{width:8.5%}.comparison-table .col-percent{width:7%}.comparison-table .col-result{width:14%}.comparison-table .col-tech{width:4.5%}.comparison-table .numeric{font-variant-numeric:tabular-nums;white-space:nowrap}.comparison-table .delta-positive{color:var(--green);font-weight:700}.comparison-table .delta-negative{color:var(--red);font-weight:700}.comparison-table .placeholder{color:#9aabb8}.comparison-table .pill{font-size:10px}.comparison-table .tech-head{text-align:center}.table-sort{width:100%;min-height:30px;padding:0;display:flex;align-items:center;justify-content:flex-start;gap:5px;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;text-align:left;cursor:pointer}.table-sort b{min-width:20px;color:#6f8496;font-size:11px;line-height:1}.table-sort:hover,.table-sort.active{color:#0870c9}.table-sort:focus-visible{outline:2px solid #8dbce0;outline-offset:2px;border-radius:4px}.result-pill-stack{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.pill.purchase-warning{border:1px solid #efbd70;background:#fff4e2;color:#a85e00}.tech-cell{text-align:center;overflow:visible!important}.row-tech{width:30px;height:30px;padding:0;border:1px solid #d3e0e8;border-radius:7px;background:#fff;color:#557085;font-size:18px;line-height:1;cursor:pointer}.row-tech:hover,.row-tech.open{border-color:#8dbce0;background:#e8f3ff;color:#0870c9}.detail-row td{height:auto!important;padding:0!important;background:#f7fafc;border-top:0}.row-detail{padding:10px 16px 12px 20px;display:flex;align-items:flex-start;gap:20px;color:#5f7486;font-size:11px;line-height:1.45}.row-detail b{color:#294861}.row-detail span{white-space:normal}.row-detail .detail-note{flex:1}
@media(min-width:1700px){.comparison-table{min-width:0}.comparison-table th{font-size:11px}.comparison-table td{font-size:13px}.content{width:calc(100% - 48px)}}
@media(max-width:1450px){.topbar{padding:0 14px;gap:10px}.topbar-main{gap:14px}.topnav button{padding:0 10px;font-size:13px}.topbar .connection{min-width:160px;padding:8px 10px}.topbar .connection small{display:none}.topbar .account{min-width:150px}.result-tools{gap:6px}.table-search{width:220px}.filter-chip{padding:0 8px}}
@media(max-width:1120px){.topbar{position:relative;min-height:auto;flex-wrap:wrap;padding:8px 12px}.topbar-main{width:100%;justify-content:space-between}.topbar .brand{height:56px}.topnav{overflow-x:auto}.topbar-right{width:100%;justify-content:flex-end;border-top:1px solid #ffffff14}.result-toolbar{align-items:stretch;flex-direction:column}.result-tools{justify-content:space-between}.table-search{flex:1}.content{width:calc(100% - 24px)}.workspace>header.page-header{padding:0 14px}}
@media(max-width:700px){.topbar-main{align-items:flex-start;flex-direction:column;gap:4px}.topbar .brand{height:48px}.topbar .brand b{display:block}.topnav{width:100%}.topnav button>span:not(.nav-icon){display:inline}.topbar-right{justify-content:space-between}.topbar .connection{display:grid}.topbar .account{grid-template-columns:38px 1fr}.topbar .account #account-settings{display:none}.workspace{margin-left:0}.workspace>header.page-header{height:70px}.header-actions time{display:none}.app-version{font-size:10px}.filter-chips{overflow-x:auto}.result-tools{align-items:stretch;flex-direction:column}.table-search{width:100%;flex:none}.table-caption-actions{align-items:stretch;flex-direction:column}.result-export{width:100%}.apply-bar{left:0}.apply-bar div{display:none}.comparison-table{min-width:1450px}}

/* v0.10.6 — полный реестр отрицательных остатков и единый список блокировок. */
.column-mapping{margin:12px 0 14px;padding:16px 18px}.column-mapping-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.column-mapping-head h2{margin:3px 0 5px;font-size:17px}.column-mapping-head p{max-width:850px;margin:0;color:var(--muted);font-size:11px;line-height:1.45}.mapping-mode{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:#e8f3ff;color:#0870c9;font-size:10px;font-weight:700}.mapping-mode.manual{background:#fff4e2;color:#a85e00}.mapping-grid{display:grid;grid-template-columns:1.15fr 1fr .85fr repeat(4,1.15fr);gap:10px}.mapping-grid label{display:grid;gap:5px;color:#587084;font-size:10px;font-weight:700}.mapping-grid select{width:100%;height:36px;padding:0 30px 0 9px;border:1px solid #cbdbe6;border-radius:7px;background:#fff;color:var(--ink);font-size:11px}.mapping-grid select:focus{outline:2px solid #9ac7e8;outline-offset:1px}.mapping-caption{margin:10px 0 0;color:#62798d;font-size:11px}.mapping-caption.error{color:var(--red);font-weight:700}
.mapping-sheet-preview{margin-top:14px;border:1px solid #cbdbe6;border-radius:9px;overflow:hidden;background:#fff}.mapping-sheet-preview-head{min-height:50px;padding:8px 11px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #d9e4eb;background:#f7fafc}.mapping-sheet-preview-head>div{display:grid;gap:3px}.mapping-sheet-preview-head b{color:#183d5c;font-size:12px}.mapping-sheet-preview-head span,.mapping-sheet-preview-head small{color:#667f93;font-size:10px}.mapping-sheet-preview-head small{text-align:right}.mapping-sheet-preview-wrap{max-height:340px;overflow:auto}.mapping-preview-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:10px}.mapping-preview-table th,.mapping-preview-table td{height:29px;padding:5px 7px;border-right:1px solid #dce5eb;border-bottom:1px solid #dce5eb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mapping-preview-table thead th{position:sticky;top:0;z-index:3;min-width:125px;background:#eaf1f6;color:#35566f;text-align:center}.mapping-preview-table thead th:first-child,.mapping-preview-table tbody th{width:42px;min-width:42px;max-width:42px;position:sticky;left:0;z-index:2;background:#eef4f7;color:#6a8091;text-align:center}.mapping-preview-table thead th:first-child{z-index:4}.mapping-preview-table td{min-width:125px;max-width:240px;color:#29465e}.mapping-preview-table tr.mapping-header-row td,.mapping-preview-table tr.mapping-header-row>th{box-shadow:inset 0 2px #1683d8,inset 0 -2px #1683d8;background-color:#f1f8ff}.mapping-preview-table .mapping-field-article{background-color:#eaf4ff}.mapping-preview-table .mapping-field-name{background-color:#eaf9f1}.mapping-preview-table .mapping-field-price{background-color:#f3efff}.mapping-preview-table .mapping-field-stock{background-color:#fff4e2}.mapping-preview-table thead .mapping-field-article{color:#086bb7}.mapping-preview-table thead .mapping-field-name{color:#16805a}.mapping-preview-table thead .mapping-field-price{color:#6b50b4}.mapping-preview-table thead .mapping-field-stock{color:#a55f00}
.negative-stock-modal-card{width:min(1180px,100%);padding:24px}.negative-stock-modal-card>p{margin:10px 0 14px;font-size:13px}.negative-stock-summary{min-height:68px;margin-bottom:12px;padding:10px 12px;display:flex;align-items:center;gap:28px;border:1px solid #efb1ad;border-radius:10px;background:#fff6f4}.negative-stock-summary span{display:grid;gap:4px}.negative-stock-summary small{color:#7f6a67;font-size:10px;font-weight:700;text-transform:uppercase}.negative-stock-summary b{color:var(--red);font-size:20px}.negative-stock-summary button{margin-left:auto}.negative-stock-table-wrap{max-height:55vh;border:1px solid var(--line);border-radius:10px}.negative-stock-table{min-width:880px;table-layout:fixed}.negative-stock-table th{position:sticky;top:0;z-index:2}.negative-stock-table th:nth-child(1){width:6%}.negative-stock-table th:nth-child(2){width:18%}.negative-stock-table th:nth-child(3){width:43%}.negative-stock-table th:nth-child(4){width:23%}.negative-stock-table th:nth-child(5){width:10%}.negative-stock-table td{height:54px;padding:8px 12px;white-space:normal}.negative-stock-table td:last-child{color:var(--red);font-weight:700;font-variant-numeric:tabular-nums}.negative-stock-note{padding:10px 12px;border-radius:8px;background:#fff0ed;color:#7b4e49!important}.moysklad-write-blockers{margin:10px 0;padding:10px 12px;border:1px solid #ef9d94;border-radius:9px;background:#fff}.moysklad-write-blockers>strong{display:block;margin-bottom:7px;color:var(--red);font-size:12px}.moysklad-write-blockers ol{max-height:190px;margin:0;padding-left:22px;overflow:auto}.moysklad-write-blockers li{margin:5px 0;color:#6d4642;font-size:11px;line-height:1.4}.moysklad-write-blockers b{color:#562f2c}

@media(max-width:1250px){.mapping-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.column-mapping{padding:14px 12px}.column-mapping-head,.mapping-sheet-preview-head{align-items:flex-start;flex-direction:column}.mapping-sheet-preview-head{gap:5px}.mapping-sheet-preview-head small{text-align:left}.mapping-grid{grid-template-columns:1fr}.source-warning,.source-refresh{width:100%;min-height:38px}.negative-stock-modal-card{padding:16px 12px}.negative-stock-summary{align-items:stretch;flex-direction:column;gap:10px}.negative-stock-summary button{width:100%;margin:0}.negative-stock-table-wrap{max-height:58vh}}

/* v0.9.12 Compact — Samsung S24E390 / 1920x1080 is the reference desktop.
   Goal: compact the chrome vertically and keep 10 product rows visible inside
   the comparison table viewport. The table keeps its own vertical scroll. */
@media (min-width: 1451px) {
  .topbar{
    min-height:62px;
    padding:0 22px;
  }
  .topbar-main{gap:22px}
  .topbar .brand{height:62px}
  .topbar .brand img{width:40px;height:40px}
  .topbar .brand b{font-size:16px}
  .topbar .brand i{margin-top:2px}
  .topnav button{min-height:38px;padding:0 12px;font-size:13px}
  .topnav .nav-icon{font-size:16px}
  .topbar .connection{min-width:180px;padding:6px 12px;gap:2px}
  .topbar .connection b{font-size:11px}
  .topbar .connection small{font-size:9px}
  .topbar .account{min-width:170px;min-height:50px;padding:5px 6px;grid-template-columns:34px 1fr 26px}
  .topbar .account-avatar{width:34px;height:34px;font-size:12px!important}
  .topbar .account b{font-size:11px}
  .topbar .account small{font-size:9px}

  .workspace{min-height:calc(100vh - 62px)}
  .workspace>header.page-header{height:58px;padding:0 28px}
  .workspace h1{font-size:23px}
  .workspace header p{margin-top:3px;font-size:11px}
  .header-actions time{font-size:11px}

  .content{width:calc(100% - 40px);padding:16px 0 82px}
  .review{padding-bottom:84px}

  .upload{min-height:62px;padding:9px 16px}
  .upload h2{font-size:14px;margin-bottom:2px}
  .upload p{font-size:10px}
  .file{width:38px;height:40px}
  .upload .secondary{min-height:38px}

  .summary{margin:10px 0}
  .summary span{height:50px;font-size:10px}
  .summary b{font-size:17px}

  .source-strip{min-height:32px;margin:0 0 10px;padding:6px 12px;font-size:10px}

  .result-toolbar{min-height:48px;padding:5px 12px;gap:12px}
  .result-tab{min-height:36px;padding:0 13px;font-size:12px}
  .table-search{height:34px;width:260px}
  .filter-chip{height:30px;padding:0 9px;font-size:10px}

  .table-caption-row{min-height:44px;padding:7px 14px}
  .table-caption-row h2{margin:0 0 2px;font-size:15px}
  .table-caption-row p{font-size:10px}
  .table-caption-row .filters{font-size:10px}

  /* 40px header + 10 x 50px rows = 540px. A little extra keeps borders clean. */
  .review-table-wrap{
    height:548px;
    min-height:548px;
    max-height:548px;
    overflow:auto;
  }
  .comparison-table th{height:40px;padding:5px 8px;font-size:9px}
  .comparison-table td{height:50px;padding:6px 8px;font-size:12px}
  .comparison-table td:first-child small{margin-top:3px;max-height:28px;line-height:1.18}
  .comparison-table .pill{font-size:9px;padding:4px 8px}
  .row-tech{width:28px;height:28px}

  .apply-bar{min-height:62px;padding:8px 22px}
}

/* v0.9.13 — тестовая арифметика по снимку МоегоСклада */
.pill.change{color:#0b63a8;background:#e7f2ff}

/* v0.10.12 — ручная UUID-привязка и создание отсутствующего товара. */
.resolve-product{display:block;margin-top:6px;padding:5px 8px;border:1px solid #8bbce0;border-radius:7px;background:#eef7ff;color:#086db9;font-size:10px;font-weight:800;cursor:pointer}.resolve-product:hover{background:#dfefff}.product-resolution-modal-card{width:min(1080px,100%);padding:24px}.resolution-source-card{margin:12px 0;padding:12px 14px;display:grid;grid-template-columns:90px 1fr;gap:14px;border:1px solid #c9dce9;border-radius:10px;background:#f5f9fc}.resolution-source-card>span{display:grid;align-content:start;gap:4px}.resolution-source-card small{color:#71889a;font-size:10px}.resolution-source-card b{color:#173f60}.resolution-source-card>span b{font-size:22px}.resolution-source-card p{margin:4px 0 6px;color:#526f86;font-size:13px;line-height:1.35}.resolution-reason{margin:10px 0;padding:9px 11px;border-radius:8px;background:#fff4e2;color:#80551e;font-size:12px;line-height:1.45}.resolution-reason.danger{background:#fff0ed;color:#9d3228;font-weight:700}.resolution-search{display:grid;grid-template-columns:minmax(240px,1fr) auto auto;gap:8px;margin:12px 0 5px}.resolution-search input{height:40px;padding:0 11px;border:1px solid #c7d9e6;border-radius:8px;font-size:13px}.resolution-search button{white-space:nowrap}.resolution-candidate-summary{margin:0 0 7px;color:#6d8292;font-size:10px}.resolution-candidates{max-height:320px;overflow:auto;border:1px solid #d2e0e9;border-radius:10px;background:#fff}.resolution-candidate{margin:0!important;padding:10px 12px!important;display:grid!important;grid-template-columns:22px 1fr;align-items:start;gap:8px;border-bottom:1px solid #e2eaf0;cursor:pointer}.resolution-candidate:last-child{border-bottom:0}.resolution-candidate:hover,.resolution-candidate.selected{background:#edf7ff}.resolution-candidate input{width:17px!important;height:17px!important;margin:2px 0 0!important}.resolution-candidate span{display:grid;gap:3px}.resolution-candidate span>b{color:#086db9;font-size:11px}.resolution-candidate strong{color:#173c59;font-size:13px;line-height:1.3}.resolution-candidate small{color:#71889a;font-size:10px;overflow-wrap:anywhere}.resolution-confirm{margin-top:12px!important;padding:10px 12px;border:1px solid #f1c782;border-radius:9px;background:#fffaf1}.resolution-create-note{margin:8px 0!important;color:#6d8292!important;font-size:10px!important}.resolution-actions{grid-template-columns:auto 1fr 1fr}.resolution-actions button{white-space:normal}.resolution-actions #resolution-create{background:#0874c9}

@media(max-width:700px){.product-resolution-modal-card{padding:16px 12px}.resolution-source-card{grid-template-columns:58px 1fr;padding:10px}.resolution-source-card>span b{font-size:18px}.resolution-search{grid-template-columns:1fr}.resolution-search button{width:100%}.resolution-candidates{max-height:38vh}.resolution-actions{display:grid;grid-template-columns:1fr}.resolution-actions button{width:100%}.resolve-product{width:100%;min-height:36px}.resolution-candidate strong{font-size:12px}}

/* v0.9.14 — MOBILE FIX PACK */
.mobile-menu-toggle{display:none}
.file-formats{display:block;margin-top:4px;color:#8295a6;font-size:10px}
.retry-link{margin-top:8px;padding:7px 12px;border:1px solid #b7ccdc;border-radius:7px;background:#fff;color:#0870c9;font-weight:700;cursor:pointer}
.error-state{color:#9a4b45!important}
.mobile-comparison-tr,.mobile-history-tr{display:none}

@media(max-width:700px){
  body{overflow-x:hidden}
  .topbar{
    position:sticky!important;top:0;z-index:40;
    min-height:68px!important;height:68px;
    padding:6px 12px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;gap:8px;flex-wrap:nowrap!important;
  }
  .topbar-main{width:auto!important;min-width:0;display:block!important}
  .topbar .brand{height:56px!important;gap:8px}
  .topbar .brand img{width:42px;height:42px}
  .topbar .brand b{display:block!important;font-size:15px;line-height:1.05}
  .topbar .brand i{margin-top:2px}
  .mobile-menu-toggle{
    display:grid;width:42px;height:42px;place-items:center;
    border:1px solid #ffffff24;border-radius:10px;background:#0d5c96;color:#fff;
    font-size:23px;line-height:1;cursor:pointer
  }
  .topnav{
    display:none;position:absolute;left:12px;right:12px;top:62px;z-index:60;
    width:auto!important;padding:8px;overflow:visible!important;
    grid-template-columns:1fr;background:#063d6a;border:1px solid #ffffff24;
    border-radius:12px;box-shadow:0 18px 36px rgba(0,26,50,.28)
  }
  .topnav.mobile-open{display:grid}
  .topnav button{width:100%;min-height:46px;justify-content:flex-start;padding:0 13px!important;font-size:14px!important}
  .topnav .nav-count{margin-left:auto;position:static}
  .topbar-right{width:auto!important;display:flex!important;align-items:center;gap:7px;border:0!important;padding:0!important}
  .topbar .connection{display:block!important;min-width:0!important;width:14px;height:14px;padding:0!important;border:0!important;background:transparent}
  .topbar .connection b{display:block;font-size:0;line-height:0}
  .topbar .connection b i{width:10px;height:10px;margin:2px;border-radius:50%}
  .topbar .connection span,.topbar .connection small{display:none!important}
  .topbar .account{min-width:0!important;min-height:0;padding:0!important;display:block!important;background:transparent}
  .topbar .account div,.topbar .account #account-settings{display:none!important}
  .topbar .account-avatar{display:grid!important;width:42px;height:42px;font-size:14px!important;border:0}

  .workspace{min-height:calc(100vh - 68px)!important}
  .workspace>header.page-header{height:62px!important;padding:8px 14px!important}
  .workspace h1{font-size:26px;line-height:1.05}
  .workspace header p{margin-top:4px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:94vw}
  .content{width:calc(100% - 24px)!important;padding:14px 0 88px!important}

  .dashboard-stats{gap:10px}
  .dashboard-stat{min-height:90px;padding:14px 15px;gap:12px}
  .dashboard-stat .stat-icon{width:38px;height:38px;font-size:20px}
  .dashboard-stat small{font-size:11px}.dashboard-stat b{font-size:18px}.dashboard-stat p{font-size:11px}
  .operations-card .section-head{min-height:66px}

  .section-head{min-height:auto;padding:14px 16px;gap:10px}
  .section-head h2{font-size:19px}.section-head p{font-size:11px}
  .section-head .primary,.section-head .secondary{min-height:44px}

  /* Journal becomes readable cards instead of a desktop table. */
  #dashboard .operations-table thead,#history .operations-table thead{display:none}
  #dashboard .operations-table,#history .operations-table{display:block;width:100%}
  #dashboard .operations-table tbody,#history .operations-table tbody{display:block;width:100%}
  #dashboard .mobile-history-tr,#history .mobile-history-tr{display:block;width:100%}
  #dashboard .mobile-history-tr td,#history .mobile-history-tr td{display:block;width:100%;height:auto;padding:0;border:0;white-space:normal;min-width:0}
  .mobile-history-card{padding:13px 15px;border-bottom:1px solid var(--line);background:#fff}
  .mobile-history-card>div{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
  .mobile-history-card b{font-size:13px}.mobile-history-card time{flex:0 0 auto;color:#70879a;font-size:10px}
  .mobile-history-card p{margin:7px 0;color:#536d82;font-size:12px;line-height:1.35;white-space:normal}
  .mobile-history-card small{display:block;margin:0;color:#8093a3;font-size:10px}
  .history-table-wrap,.dashboard-history-wrap{max-height:none!important;overflow:visible!important}

  /* Review table becomes one card per product. */
  .review-result-card{overflow:visible}
  .result-toolbar{padding:9px;gap:8px}
  .result-tabs{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .result-tab{min-height:40px;padding:0 8px;font-size:12px}
  .result-tools{gap:7px}
  .filter-chips{padding-bottom:2px}
  .table-caption-row{padding:10px 12px;align-items:flex-start}
  .table-caption-row>div p{display:none}
  .review-table-wrap{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  .comparison-table{min-width:0!important;display:block;width:100%;table-layout:auto}
  .comparison-table colgroup,.comparison-table thead{display:none}
  .comparison-table tbody{display:block;width:100%}
  .comparison-table .comparison-row,.comparison-table .detail-row{display:none}
  .comparison-table .mobile-comparison-tr{display:block;width:100%}
  .mobile-comparison-tr td{display:block;width:100%;height:auto!important;min-width:0!important;padding:0!important;border:0;white-space:normal!important}
  .mobile-product-card{padding:13px 12px;border-bottom:1px solid var(--line);background:#fff}
  .mobile-product-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
  .mobile-product-head>div{min-width:0}.mobile-product-head b{font-size:13px}.mobile-product-head p{margin:4px 0 0;color:#6c8296;font-size:12px;line-height:1.32}
  .mobile-product-head .result-pill-stack{flex:0 0 auto;max-width:48%;justify-content:flex-end}.mobile-product-head .pill{font-size:9px;padding:4px 7px}
  .mobile-product-grid{display:grid;grid-template-columns:1fr;gap:7px;margin-top:10px}
  .mobile-product-grid>span{padding:8px 9px;border-radius:8px;background:#f7fafc;display:grid;grid-template-columns:62px 1fr auto;align-items:center;gap:8px}
  .mobile-product-grid small{color:#7a8e9e;font-size:9px;text-transform:uppercase;font-weight:700}.mobile-product-grid b{font-size:12px;font-variant-numeric:tabular-nums}.mobile-product-grid em{font-size:11px;font-style:normal;white-space:nowrap}
  .mobile-product-note{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;color:#7b8e9e;font-size:10px}
  .mobile-product-note>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-product-note .row-tech{width:auto;height:32px;padding:0 10px;font-size:11px;font-weight:700}
  .mobile-row-detail{display:grid;gap:5px;margin-top:9px;padding:9px;border-radius:8px;background:#eef5fa;color:#526d82;font-size:10px;line-height:1.35;overflow-wrap:anywhere}

  .summary{grid-template-columns:1fr 1fr;margin:10px 0}.summary span{height:54px;font-size:9px}.summary b{font-size:16px}
  .source-strip{font-size:10px;line-height:1.35;align-items:flex-start}
  .file-formats{font-size:10px}

  /* Team */
  .role-cards{gap:9px;margin-bottom:12px}
  .role-cards article{min-height:0;padding:13px 14px}
  .role-cards b{font-size:13px}.role-cards p{margin-top:7px;font-size:11px;line-height:1.4}
  .users-list>div{min-height:64px;padding:10px 14px;grid-template-columns:34px minmax(0,1fr)!important;gap:10px}
  .users-list .pill,.users-list .last-seen{display:block;grid-column:2;justify-self:start}
  .users-list .pill{font-size:9px}.users-list .last-seen{font-size:10px}
  .user-actions{grid-column:1 / 3;padding-left:44px;gap:7px}
  .loading-users{padding:16px!important}

  /* Compact forms: no giant desktop controls on the phone. */
  .modal{place-items:start center;padding:10px 10px max(10px,env(safe-area-inset-bottom));overflow-y:auto}
  .modal-card{width:100%;max-width:520px;max-height:calc(100dvh - 20px);padding:18px 16px 16px;border-radius:18px}
  .modal-head{gap:12px}.modal-head h2{margin-top:5px;font-size:24px;line-height:1.08}.modal-head .eyebrow{font-size:11px}.modal-close{width:38px;height:38px;font-size:23px}
  .modal-card>p{margin:9px 0 14px;font-size:13px;line-height:1.4}
  .modal-card label{gap:6px;margin:10px 0;font-size:13px}
  .modal-card input,.modal-card select{height:48px;padding:0 12px;font-size:16px;border-radius:9px}
  .form-grid{gap:0}
  .modal-actions{margin-top:10px;gap:8px}
  .modal-actions button{min-height:46px;font-size:15px}
  .logout-link{margin-top:12px;padding:11px;font-size:14px}
  .password-toggle{width:42px;height:38px;right:5px}
  .error{font-size:12px;line-height:1.35}
  .toast{left:12px;right:12px;top:78px;max-width:none;font-size:12px}

  .apply-bar{position:sticky!important;bottom:0;min-height:58px;padding:7px 10px;z-index:15}
  .apply-bar .primary{width:100%;min-height:44px;font-size:13px}
}

/* AQUABAS PRICE — MoySklad UOM editor */

.uom-edit {
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.uom-edit:hover {
  border-color: #64748b;
  background: #f8fafc;
}

.uom-dialog {
  width: min(540px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.uom-dialog::backdrop {
  background: rgba(15, 23, 42, .52);
}

.uom-dialog-card {
  padding: 24px;
}

.uom-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.uom-dialog-head h2 {
  margin: 4px 0 0;
}

.uom-dialog-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.uom-dialog-product {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.uom-dialog-product span {
  color: #475569;
}

.uom-dialog-current {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.uom-dialog-current small {
  color: #64748b;
}

.uom-dialog-current strong {
  font-size: 18px;
}

.uom-dialog-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.uom-dialog-field span {
  font-weight: 700;
}

.uom-dialog-field select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
}

.uom-dialog-preview {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #eff6ff;
  font-weight: 700;
}

.uom-dialog-error {
  min-height: 20px;
  margin: 0 0 12px;
  color: #b91c1c;
}

.uom-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 700px) {
  .uom-dialog-actions {
    flex-direction: column-reverse;
  }

  .uom-dialog-actions button {
    width: 100%;
  }
}


/* AQUABAS PRICE — UOM inside product resolution */

.resolution-uom-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.resolution-uom-box > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #f8fafc;
}

.resolution-uom-box small {
  color: #64748b;
  font-size: 12px;
}

.resolution-uom-box b {
  color: #0f172a;
  font-size: 14px;
}

@media (max-width: 700px) {
  .resolution-uom-box {
    grid-template-columns: 1fr;
  }
}


/* v0.10.16 — UOM action buttons alignment */

.resolution-uom-actions > span {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 6px;
}

.resolution-uom-actions button {
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .resolution-uom-actions > span {
    flex-direction: column;
  }

  .resolution-uom-actions button {
    width: 100%;
  }
}


/* v0.10.16 — UOM action buttons alignment */

.resolution-uom-actions > span {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 6px;
}

.resolution-uom-actions button {
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .resolution-uom-actions > span {
    flex-direction: column;
  }

  .resolution-uom-actions button {
    width: 100%;
  }
}



/* v0.10.16 — compact toast controls */

.toast-clear-all {
  justify-self: end;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #adc7da;
  border-radius: 8px;
  background: #ffffff;
  color: #0563b5;
  box-shadow: 0 4px 14px rgba(20, 54, 82, .12);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.toast-clear-all:hover,
.toast-clear-all:focus-visible {
  background: #eef7ff;
  border-color: #79a9ce;
}

.toast-clear-all[hidden] {
  display: none !important;
}


/* v0.10.16 — compact toast controls */

.toast-clear-all {
  justify-self: end;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #adc7da;
  border-radius: 8px;
  background: #fff;
  color: #0563b5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.toast-clear-all:hover,
.toast-clear-all:focus-visible {
  background: #eef7ff;
  border-color: #79a9ce;
}

.toast-clear-all[hidden] {
  display: none !important;
}


/* Главный прайс: рабочая таблица */
.main-price-toolbar{
  min-height:56px;
  padding:10px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.main-price-search{
  width:min(520px,45vw);
  height:36px;
  padding:0 12px;
  border:1px solid #d3e0e8;
  border-radius:8px;
  background:#fff;
  font:inherit;
}

.main-price-pagination{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.main-price-pagination span{
  min-width:130px;
  text-align:right;
  color:var(--muted);
  font-size:11px;
}

.main-price-pagination button{
  min-height:34px;
  padding:0 12px;
}

.main-price-table-wrap{
  height:calc(100vh - 315px);
  min-height:340px;
  overflow:auto;
}

.main-price-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}

.main-price-table thead th{
  position:sticky;
  top:0;
  z-index:3;
  box-shadow:0 1px 0 var(--line);
}

.main-price-table th,
.main-price-table td{
  min-width:0!important;
  padding-left:12px;
  padding-right:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.main-price-table th:nth-child(1){width:13%}
.main-price-table th:nth-child(2){width:14%}
.main-price-table th:nth-child(3){width:43%}
.main-price-table th:nth-child(4){width:8%}
.main-price-table th:nth-child(5){width:11%}
.main-price-table th:nth-child(6){width:11%}

@media(max-width:900px){
  .main-price-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .main-price-search{
    width:100%;
  }

  .main-price-pagination{
    justify-content:space-between;
  }

  .main-price-table-wrap{
    height:55vh;
  }
}

.main-price-links-head{
  white-space:nowrap;
}

.main-price-links-head span{
  margin-right:5px;
}

.main-price-links-head select{
  height:26px;
  padding:0 22px 0 6px;
  border:1px solid #d3e0e8;
  border-radius:6px;
  background:#fff;
  color:#61788b;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}

.main-price-link-duplicate{
  display:inline-block;
  min-width:24px;
  padding:3px 7px;
  border:1px solid #efbd70;
  border-radius:12px;
  background:#fff4e2;
  color:#a85e00;
  font-weight:700;
  text-align:center;
}

.main-price-links-filter{
  position:relative;
  display:inline-block;
}

.main-price-links-toggle{
  min-height:26px;
  padding:0;
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:700;
  text-transform:uppercase;
  cursor:pointer;
}

.main-price-links-toggle b{
  font-size:11px;
  line-height:1;
}

.main-price-links-menu{
  position:absolute;
  top:30px;
  right:0;
  z-index:20;
  min-width:145px;
  padding:5px;
  border:1px solid #d3e0e8;
  border-radius:8px;
  background:#fff;
  box-shadow:0 8px 24px rgba(30,55,75,.14);
}

.main-price-links-menu.hidden{
  display:none;
}

.main-price-links-menu button{
  width:100%;
  min-height:32px;
  padding:0 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#294861;
  font-size:11px;
  text-align:left;
  cursor:pointer;
}

.main-price-links-menu button:hover{
  background:#eef6fc;
  color:#0870c9;
}

/* Выпадающий фильтр "Связи" должен выходить за пределы ячейки */
.main-price-table th.main-price-links-head{
  overflow:visible!important;
  text-overflow:clip!important;
  z-index:10;
}

.main-price-links-filter{
  position:relative;
  overflow:visible;
}

.main-price-links-menu{
  top:32px;
  right:0;
  z-index:100;
}

/* Фильтр "Связи": пункты строго вертикально */
.main-price-links-menu{
  width:160px;
  min-width:160px;
  white-space:normal!important;
}

.main-price-links-menu button{
  display:block;
  width:100%;
  white-space:nowrap;
}

.main-price-toolbar-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1;
}

.main-price-mode-switch{
  display:inline-flex;
  padding:2px;
  border:1px solid #d3e0e8;
  border-radius:8px;
  background:#f7f9fb;
  white-space:nowrap;
}

.main-price-mode-switch button{
  min-height:30px;
  padding:0 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#61788b;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.main-price-mode-switch button.active{
  background:#fff;
  color:#0870c9;
  box-shadow:0 1px 4px rgba(30,55,75,.12);
}

.main-price-row-action{
  width:30px;
  height:30px;
  padding:0;
  border:1px solid #d3e0e8;
  border-radius:7px;
  background:#fff;
  color:#557085;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.main-price-row-action:hover{
  border-color:#8dbce0;
  background:#e8f3ff;
  color:#0870c9;
}

.main-price-table th:nth-child(1){width:12%}
.main-price-table th:nth-child(2){width:13%}
.main-price-table th:nth-child(3){width:39%}
.main-price-table th:nth-child(4){width:8%}
.main-price-table th:nth-child(5){width:11%}
.main-price-table th:nth-child(6){width:12%}
.main-price-table th:nth-child(7){width:5%}

.main-price-actions-head,
.main-price-table td:nth-child(7){
  text-align:center;
  overflow:visible!important;
}

@media(max-width:900px){
  .main-price-toolbar-left{
    align-items:stretch;
    flex-direction:column;
  }

  .main-price-mode-switch{
    align-self:flex-start;
  }
}

/* Счётчики ГП: число и подпись выровнены по центру */
.main-price-summary > span{
  transform:none!important;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.main-price-summary > span b{
  line-height:1;
}

/* Сводные карточки: цифра по центру блока, подпись по нижнему краю цифры */
.main-price-summary > span{
  transform:none!important;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:8px;
}

.main-price-summary > span b{
  line-height:1;
}

/* Сводные карточки ГП:
   вся пара по центру блока,
   подпись по нижнему краю цифры */
.main-price-summary > span{
  transform:none!important;
  display:grid!important;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  align-items:end;
  align-content:center;
  justify-content:center;
  column-gap:8px;
}

.main-price-summary > span b{
  line-height:1;
}

/* Сводка проверки прайса:
   вся пара по центру блока,
   подпись по нижнему краю цифры */
.review .summary > span{
  display:grid!important;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  align-items:end;
  align-content:center;
  justify-content:center;
  column-gap:8px;
}

.review .summary > span b{
  line-height:1;
}

.main-price-select-head,
.main-price-select-cell{
  text-align:center;
}

.main-price-select-head input,
.main-price-select-cell input{
  width:16px;
  height:16px;
  margin:0;
  cursor:pointer;
}

.main-price-bulk-action{
  min-height:34px;
  padding:0 12px;
  white-space:nowrap;
}

/* 8 колонок Главного прайса */
.main-price-table th:nth-child(1){width:4%}
.main-price-table th:nth-child(2){width:11%}
.main-price-table th:nth-child(3){width:12%}
.main-price-table th:nth-child(4){width:39%}
.main-price-table th:nth-child(5){width:8%}
.main-price-table th:nth-child(6){width:10%}
.main-price-table th:nth-child(7){width:11%}
.main-price-table th:nth-child(8){width:5%}

.main-price-table td:nth-child(8){
  text-align:center;
  overflow:visible!important;
}

/* Дашборд "Прайсы" */
.prices-dashboard-card{
  overflow:hidden;
}

.prices-dashboard-head{
  min-height:76px;
}

.prices-dashboard-wrap{
  overflow:auto;
}

.prices-dashboard-table{
  width:100%;
  min-width:1180px;
  table-layout:fixed;
}

.prices-dashboard-table th{
  height:45px;
  padding:0 12px;
  white-space:normal;
  line-height:1.2;
}

.prices-dashboard-table td{
  height:62px;
  padding:8px 12px;
  min-width:0!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.prices-dashboard-table th:nth-child(1){width:19%}
.prices-dashboard-table th:nth-child(2){width:8%}
.prices-dashboard-table th:nth-child(3){width:9%}
.prices-dashboard-table th:nth-child(4){width:9%}
.prices-dashboard-table th:nth-child(5){width:9%}
.prices-dashboard-table th:nth-child(6){width:12%}
.prices-dashboard-table th:nth-child(7){width:17%}
.prices-dashboard-table th:nth-child(8){width:8%}
.prices-dashboard-table th:nth-child(9){width:9%}

.price-dashboard-name{
  padding:0;
  border:0;
  background:transparent;
  color:#0870c9;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}

.price-dashboard-name:hover{
  text-decoration:underline;
}

.price-dashboard-main td{
  background:#f5faff;
  font-weight:600;
}

.price-dashboard-main .price-dashboard-name{
  color:#083a66;
  font-size:14px;
}

.price-dashboard-subtitle{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:400;
}

.price-dashboard-number{
  font-variant-numeric:tabular-nums;
  text-align:right;
}

.price-dashboard-requires{
  color:var(--orange);
  font-weight:700;
}

.price-dashboard-zero{
  color:#8ba0b0;
}

.price-dashboard-status{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:var(--green-bg);
  color:var(--green);
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
}

.price-dashboard-status.archived{
  background:#edf1f4;
  color:#71869a;
}

.price-dashboard-version{
  white-space:normal!important;
  line-height:1.35;
}

.price-dashboard-version small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}

@media(max-width:900px){
  .prices-dashboard-wrap{
    max-height:65vh;
  }
}

/* Прайсы — строгая табличная сетка */
.prices-dashboard-table{
  border-collapse:collapse;
}

.prices-dashboard-table th,
.prices-dashboard-table td{
  border:1px solid #dbe6ee;
  vertical-align:middle;
}

.prices-dashboard-table th{
  height:48px;
  padding:8px 12px;
  background:#f7f9fb;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
}

.prices-dashboard-table td{
  height:64px;
  padding:10px 12px;
  font-size:14px;
  font-weight:400;
  line-height:1.25;
}

.price-dashboard-main td{
  font-weight:400;
}

.price-dashboard-name,
.price-dashboard-main .price-dashboard-name{
  font-size:14px;
  font-weight:700;
}

.price-dashboard-number{
  font-size:14px;
  font-weight:400;
}

.price-dashboard-requires{
  font-weight:700;
}

/* Дашборд Прайсы — спокойная табличная шапка */
.prices-dashboard-table thead th{
  height:44px;
  padding:6px 8px;
  background:#edf4f8;
  color:#60788b;
  font-size:11px;
  font-weight:400;
  line-height:1.2;
  text-align:center;
  vertical-align:middle;
  letter-spacing:.04em;
}

.prices-dashboard-table thead tr{
  border-bottom:1px solid #cddce7;
}

/* Прайсы — товары, требующие связи */
.price-dashboard-requires{
  color:var(--red)!important;
  font-weight:700!important;
}

.price-dashboard-load-type small{
  font-size:7px;
  color:#71869a;
  vertical-align:baseline;
}

/* Главный прайс: отсутствие связи пока не является критической ошибкой */
.price-dashboard-unlinked{
  color:var(--orange)!important;
  font-weight:700!important;
}

/* Прайс поставщика: несвязанные товары требуют решения */
.price-dashboard-requires{
  color:var(--red)!important;
  font-weight:700!important;
}

/* Прайсы: хорошо различимые показатели связей */
.price-dashboard-unlinked,
.price-dashboard-requires{
  display:inline-block;
  min-width:38px;
  padding:4px 8px;
  border-radius:7px;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1;
  text-align:right;
}

/* Главный прайс — нет связи, но это не критическая ошибка */
.price-dashboard-unlinked{
  color:#17324d!important;
  background:#fff3e3;
  border:1px solid #e4a445;
}

/* Поставщик — действительно требует решения */
.price-dashboard-requires{
  color:#a51f1b!important;
  background:#fff0ed;
  border:1px solid #e48c85;
}

/* Прайсы — индикатор в колонке "Требуют связи" */
.price-dashboard-link-cell{
  text-align:right;
}

.price-dashboard-link-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  height:34px;
  padding:0 10px;
  border-radius:8px;
  font-size:15px;
  font-weight:900;
  line-height:1;
  font-variant-numeric:tabular-nums;
}

/* Главный прайс — товары пока без связи */
.price-dashboard-link-unlinked{
  color:#17324d;
  background:#fff7e8;
  border:1px solid #e6b660;
}

/* Поставщик — реальная проблема сопоставления */
.price-dashboard-link-requires{
  color:#a51f1b;
  background:#fff0ed;
  border:1px solid #df8a83;
}

/* Прайсы — статус в едином стиле с индикаторами связей */
.price-dashboard-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:76px;
  height:34px;
  padding:0 10px;

  border:1px solid #72c99d;
  border-radius:8px;

  background:#e9f8f0;
  color:#087f50;

  font-size:11px;
  font-weight:800;
  line-height:1;
  text-transform:uppercase;
}

/* Архивный источник */
.price-dashboard-status.archived{
  border-color:#c6d2db;
  background:#f2f5f7;
  color:#71869a;
}

/* Прайсы — статус только информационный */
.prices-dashboard-table tbody td:nth-child(8){
  text-align:left!important;
}

.price-dashboard-status{
  display:inline;
  min-width:0;
  height:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#17324d;
  font-size:14px;
  font-weight:400;
  line-height:1.25;
  text-transform:none;
}

.price-dashboard-status.archived{
  min-width:0;
  height:auto;
  padding:0;
  border:0;
  background:transparent;
  color:#71869a;
  font-weight:400;
}

/* Универсальный экран прайса поставщика */
.price-source-card{
  overflow:hidden;
}

.price-source-head{
  min-height:92px;
  padding:18px 22px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line);
}

.price-source-head h2{
  margin:8px 0 5px;
  font-size:22px;
  font-weight:600;
}

.price-source-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}

#price-source-status{
  color:#17324d;
  font-size:14px;
}

.price-source-tabs{
  min-height:52px;
  padding:0 18px;
  display:flex;
  align-items:flex-end;
  gap:4px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}

.price-source-tabs button{
  min-height:48px;
  padding:0 16px;
  border:0;
  border-bottom:3px solid transparent;
  background:transparent;
  color:#61788b;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}

.price-source-tabs button.active{
  color:#0870c9;
  border-bottom-color:#0870c9;
}

.price-source-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-bottom:1px solid var(--line);
}

.price-source-summary span{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-right:1px solid var(--line);
  color:#60788b;
  font-size:12px;
}

.price-source-summary span:last-child{
  border-right:0;
}

.price-source-summary b{
  color:#17324d;
  font-size:18px;
}

#price-source-requires{
  color:var(--red);
  font-weight:900;
}

.price-source-table-wrap{
  max-height:calc(100vh - 360px);
  overflow:auto;
}

.price-source-table{
  width:100%;
  table-layout:fixed;
}

.price-source-table thead th{
  position:sticky;
  top:0;
  z-index:3;
  height:44px;
  padding:6px 10px;
  background:#edf4f8;
  color:#60788b;
  font-size:11px;
  font-weight:400;
  text-align:center;
  vertical-align:middle;
  box-shadow:0 1px 0 var(--line);
}

.price-source-table td{
  height:58px;
  padding:8px 12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.price-source-table th:nth-child(1){width:15%}
.price-source-table th:nth-child(2){width:42%}
.price-source-table th:nth-child(3){width:10%}
.price-source-table th:nth-child(4){width:12%}
.price-source-table th:nth-child(5){width:21%}

.price-source-table td:nth-child(3),
.price-source-table td:nth-child(4){
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.price-source-unlinked{
  color:var(--red);
  font-weight:700;
}

.price-source-tab.hidden{
  display:none;
}

.price-dashboard-load-type small{
  margin-left:5px;
  color:#71869a;
  font-size:10px;
  font-weight:400;
  text-transform:uppercase;
}

/* Прайс поставщика — компактная шапка только для ПК */
.price-source-head{
  min-height:58px;
  padding:8px 18px;
  align-items:center;
}

.price-source-head-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.price-source-head-main .link-button{
  flex:0 0 auto;
  padding:0;
  font-size:13px;
}

.price-source-head-divider{
  width:1px;
  height:24px;
  flex:0 0 auto;
  background:var(--line);
}

.price-source-head h2{
  flex:0 0 auto;
  margin:0;
  font-size:20px;
  line-height:1;
}

.price-source-head p{
  min-width:0;
  margin:0;
  overflow:hidden;
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#price-source-status{
  flex:0 0 auto;
  margin-left:18px;
  font-size:13px;
}

/* Таблица товаров поставщика — строгая сетка */
.price-source-table{
  border-collapse:collapse;
}

.price-source-table th,
.price-source-table td{
  border:1px solid #dbe6ee;
}

.price-source-table thead th{
  height:42px;
  padding:6px 10px;
  background:#edf4f8;
  font-size:11px;
  font-weight:400;
  text-align:center;
  vertical-align:middle;
}

.price-source-table td{
  height:58px;
  padding:8px 12px;
  vertical-align:middle;
}

/* текст влево */
.price-source-table td:nth-child(1),
.price-source-table td:nth-child(2),
.price-source-table td:nth-child(5){
  text-align:left;
}

/* цифры вправо */
.price-source-table td:nth-child(3),
.price-source-table td:nth-child(4){
  text-align:right;
}

/* Прайс поставщика — наименование переносится по строкам */
.price-source-table td:nth-child(2){
  white-space:normal!important;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  line-height:1.35;
  vertical-align:middle;
}

/* Прайс поставщика — типографика таблицы */

/* Наименование: 14px, без bold */
.price-source-table td:nth-child(2),
.price-source-table td:nth-child(2) b{
  font-size:14px!important;
  font-weight:400!important;
}

/* Связь с ГП: компактнее */
.price-source-table td:nth-child(5){
  font-size:12px!important;
  font-weight:400;
  line-height:1.3;
}

.price-source-table td:nth-child(5) .price-source-unlinked{
  font-size:12px!important;
}

/* Прайс поставщика — на ПК показываем примерно на 2 строки товаров больше */
.price-source-table-wrap{
  max-height:calc(100vh - 244px);
}

/* Счётчик "требуют связи" — активный фильтр */
.price-source-requires-card{
  cursor:pointer;
  transition:.15s ease;
}

.price-source-requires-card:hover{
  background:#fff6f3;
}

.price-source-requires-card:focus-visible{
  outline:2px solid #df8a83;
  outline-offset:-3px;
}

/* Несвязанная строка после перехода из счётчика */
.price-source-row-unlinked td{
  background:#fffafa;
}

/* Прайс поставщика — товар без связи заметен постоянно */
.price-source-row-unlinked td{
  background:#fff1ef!important;
}

/* При наведении только немного усиливаем */
.price-source-row-unlinked:hover td{
  background:#ffe7e3!important;
}

/* Прайс поставщика — постоянная подсветка проблем со связями */
.price-source-requires-card.has-issues{
  background:#fff1ef!important;
  color:#a51f1b;
  border-left:1px solid #efc5c0;
}

.price-source-requires-card.has-issues:hover{
  background:#ffe7e3!important;
}

.price-source-requires-card.has-issues #price-source-requires{
  color:#c52d27!important;
  font-weight:900;
}

/* Прайс поставщика — поиск и пагинация */
.price-source-toolbar{
  min-height:54px;
  padding:8px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

#price-source-search{
  width:min(520px,48vw);
  height:36px;
  padding:0 12px;
  border:1px solid #d3e0e8;
  border-radius:8px;
  background:#fff;
  font:inherit;
}

.price-source-pagination{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.price-source-pagination span{
  min-width:130px;
  color:var(--muted);
  font-size:11px;
  text-align:right;
}

.price-source-pagination button{
  min-height:34px;
  padding:0 12px;
}

.price-source-upload{
  min-height:110px;
  padding:20px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid var(--line);
}

.price-source-upload h3{
  margin:0 0 7px;
  font-size:18px;
  font-weight:600;
}

.price-source-upload p{
  max-width:720px;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.price-source-upload-note{
  padding:14px 22px;
  color:#60788b;
  font-size:12px;
  background:#f8fafc;
}

.price-source-current-version{
  padding:14px 22px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}

.price-source-current-version>div{
  display:flex;
  align-items:baseline;
  gap:10px;
}

.price-source-current-version small{
  color:#60788b;
  font-size:11px;
}

.price-source-current-version b{
  color:#17324d;
  font-size:14px;
}

.price-source-current-version span{
  color:var(--muted);
  font-size:11px;
}

.price-source-duplicate-warning{
  margin:14px 22px;
  padding:12px 14px;
  border:1px solid #e6b660;
  border-radius:8px;
  background:#fff7e8;
  color:#704a0b;
  font-size:12px;
  line-height:1.4;
}

#price-source-add{
  transition:background .15s ease,
             border-color .15s ease,
             color .15s ease;
}

#price-source-add:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

.main-price-head-actions{
  display:flex;
  align-items:center;
  gap:14px;
}

#main-price-refresh-sources{
  cursor:pointer;
  transition:background .15s ease,
             border-color .15s ease,
             color .15s ease;
}

#main-price-refresh-sources:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

.price-source-danger-zone{
  margin:24px;
  padding:18px;
  border:1px solid #e7a09a;
  border-radius:8px;
  background:#fff7f6;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.price-source-danger-zone b{
  display:block;
  margin-bottom:5px;
}

.price-source-danger-zone small{
  display:block;
  color:#687b8d;
}

.price-source-delete-button,
.price-dashboard-delete-source{
  cursor:pointer;
  border:1px solid #df7770;
  background:#fff;
  color:#b6251e;
  border-radius:7px;
}

.price-source-delete-button{
  padding:10px 16px;
  font-weight:600;
}

.price-dashboard-delete-source{
  margin-left:12px;
  padding:5px 8px;
  font-size:11px;
}

.price-source-delete-button:hover,
.price-dashboard-delete-source:hover{
  background:#fff0ee;
  border-color:#c93229;
}

.price-source-properties-action{
  margin:24px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.price-source-properties-action b{
  display:block;
  margin-bottom:5px;
}

.price-source-properties-action small{
  color:#687b8d;
}

#price-source-rename{
  cursor:pointer;
}

#price-source-rename:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

/* Supplier check: Supplier -> Main Price only */
#review.supplier-review .source-strip{
  display:none !important;
}

#review.supplier-review #check-results{
  display:none !important;
}

#review.supplier-review #prepare-safe,
#review.supplier-review #apply-safe{
  display:none !important;
}

.source-links-toolbar{
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line);
}

.source-links-toolbar b,
.source-links-toolbar small{
  display:block;
}


.source-links-toolbar small{
  margin-top:4px;
  color:#687b8d;
  font-size:12px;
}

.source-links-toolbar input{
  width:390px;
  max-width:45%;
  min-height:38px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:7px;
}

.source-links-table-wrap{
  max-height:520px;
  overflow:auto;
}

.source-links-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.source-links-table th,
.source-links-table td{
  padding:11px 14px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}

.source-links-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#eef4f8;
  color:#61788b;
  font-size:11px;
  font-weight:400;
  text-align:center;
}

.source-links-table th:nth-child(1){width:15%}
.source-links-table th:nth-child(2){width:43%}
.source-links-table th:nth-child(3){width:10%}
.source-links-table th:nth-child(4){width:12%}
.source-links-table th:nth-child(5){width:20%}

.source-links-table td:nth-child(3),
.source-links-table td:nth-child(4){
  text-align:right;
}

.source-link-open{
  cursor:pointer;
}

.source-link-open:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

.source-links-empty{
  padding:28px !important;
  text-align:center !important;
  color:#71879a;
}

.source-link-dialog{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px;
  background:rgba(10,32,50,.36);
}

.source-link-dialog.hidden{
  display:none !important;
}

.source-link-dialog-card{
  width:min(850px,94vw);
  max-height:80vh;
  overflow:hidden;
  background:#fff;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(0,0,0,.24);
}

.source-link-dialog-head,
.source-link-candidate{
  padding:13px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line);
}

.source-link-search-row{
  padding:14px 20px;
  display:flex;
  gap:10px;
  border-bottom:1px solid var(--line);
}

.source-link-search-row input{
  flex:1;
  min-height:40px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:7px;
}

.source-link-candidates{
  max-height:480px;
  overflow:auto;
}

.source-link-candidate b,
.source-link-candidate span{
  display:block;
}

.source-link-candidate span{
  margin-top:4px;
  color:#61788b;
}

.price-source-history-head{
  min-height:64px;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line);
}

.price-source-history-head b,
.price-source-history-head small{
  display:block;
}

.price-source-history-head small{
  margin-top:4px;
  color:#687b8d;
  font-size:12px;
}

.price-source-history-head span{
  color:#60788b;
  font-size:12px;
}

.price-source-history-wrap{
  max-height:520px;
  overflow:auto;
}

.price-source-history-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.price-source-history-table th,
.price-source-history-table td{
  padding:12px 16px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.price-source-history-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#eef4f8;
  color:#61788b;
  font-size:11px;
  font-weight:400;
  text-align:center;
}

.price-source-history-table th:nth-child(1){width:18%}
.price-source-history-table th:nth-child(2){width:46%}
.price-source-history-table th:nth-child(3){width:12%}
.price-source-history-table th:nth-child(4){width:12%}
.price-source-history-table th:nth-child(5){width:12%}

.price-source-history-table td:nth-child(3),
.price-source-history-table td:nth-child(4),
.price-source-history-table td:nth-child(5){
  text-align:right;
}

.price-source-history-table .history-safe{
  color:#087f46;
  font-weight:600;
}

.price-source-history-table .history-problem{
  color:#c32d26;
  font-weight:600;
  background:#fff3f1;
}

.price-source-history-empty{
  padding:48px;
  text-align:center;
  color:#71879a;
}

.source-links-empty b,
.source-links-empty span{
  display:block;
}

.source-links-empty span{
  margin:7px 0 16px;
  color:#71879a;
}

#source-link-create-main{
  cursor:pointer;
}

/* Связи: длинные названия переносятся, строка растёт по высоте */
.source-links-table{
  table-layout:fixed;
  width:100%;
}

.source-links-table th,
.source-links-table td{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.35;
}

.source-links-table td:nth-child(2){
  white-space:normal;
  overflow-wrap:anywhere;
}

.source-links-table-wrap{
  overflow-x:hidden;
  overflow-y:auto;
}

.source-links-table td:nth-child(3),
.source-links-table td:nth-child(4){
  white-space:nowrap;
}

.source-links-table td:nth-child(5){
  text-align:center;
  white-space:nowrap;
}

.source-link-open{
  white-space:nowrap;
}

.source-links-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:1;
}

#source-links-auto{
  cursor:pointer;
  white-space:nowrap;
}

#source-links-auto:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

.source-links-actions #source-links-search{
  max-width:390px;
}

.source-link-create-separate{
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-top:1px solid var(--line);
  background:#f8fafc;
}

.source-link-create-separate b,
.source-link-create-separate span{
  display:block;
}

.source-link-create-separate span{
  margin-top:5px;
  color:#687b8d;
  font-size:12px;
}

#source-link-create-main{
  white-space:nowrap;
}

.source-link-dialog-card{
  display:flex;
  flex-direction:column;
  max-height:80vh;
}

.source-link-candidates{
  max-height:420px;
  overflow-y:auto !important;
  overflow-x:hidden;
  flex:1 1 auto;
  min-height:0;
}

.source-link-create-separate{
  flex:0 0 auto;
}

.price-source-link-cell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.price-source-link-cell span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.source-unlink-main{
  flex:0 0 auto;
  cursor:pointer;
  padding:4px 7px;
  border:1px solid #df7770;
  border-radius:6px;
  background:#fff;
  color:#b6251e;
  font-size:11px;
}

.source-unlink-main:hover{
  background:#fff0ee;
  border-color:#c93229;
}

/* История операций — нормальная ширина и перенос строк */
#history table{
  width:100%;
  table-layout:fixed;
}

#history th,
#history td{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere;
  line-height:1.35;
  vertical-align:middle;
}

/* Время */
#history th:nth-child(1),
#history td:nth-child(1){
  width:190px;
}

/* Сотрудник */
#history th:nth-child(2),
#history td:nth-child(2){
  width:190px;
}

/* Действие */
#history th:nth-child(3),
#history td:nth-child(3){
  width:280px;
}

/* Детали — получает всё оставшееся место */
#history th:nth-child(4),
#history td:nth-child(4){
  width:auto;
}

/* Статус */
#history th:nth-child(5),
#history td:nth-child(5){
  width:130px;
}

#history td{
  min-height:54px;
  padding-top:12px;
  padding-bottom:12px;
}

.source-link-candidate button{
  cursor:pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.source-link-candidate button:hover{
  background:#eaf6ff;
  border-color:#7fc4f3;
  color:#0879cf;
}

.source-link-candidate button:hover{
  background:#dff3e7;
  border-color:#39a96b;
  color:#137a46;
}

.source-link-candidate button:active,
.source-link-candidate button:focus{
  background:#dff3e7;
  border:2px solid #218a52;
  color:#137a46;
  font-weight:600;
  outline:none;
  box-shadow:0 0 0 2px rgba(33,138,82,.12);
}

.source-link-candidate button:active,
.source-link-candidate button:focus{
  background:#dff3e7;
  border:2px solid #137a46;
  color:#0d6237;
  font-weight:700;
  outline:none;
  box-shadow:
    0 0 0 8px rgba(19,122,70,.75);
}

.source-link-candidate button:active,
.source-link-candidate button:focus{
  background:#dff3e7;
  border:2px solid #137a46;
  color:#0d6237;
  font-weight:700;
  outline:none;
  box-shadow:0 0 0 5px rgba(19,122,70,.65);
}

.source-link-group-title{
  padding:9px 20px;
  background:#f3f6f8;
  border-bottom:1px solid var(--line);
  color:#60788b;
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
}

.source-link-group-title.exact{
  background:#e8f5ed;
  color:#137a46;
}

.source-link-candidate.exact-article{
  background:#f1faf5;
  border-left:5px solid #39a96b;
}

.source-link-no-exact{
  padding:13px 20px;
  background:#fff8e9;
  border-bottom:1px solid #e9d6a7;
  color:#775317;
  font-size:12px;
}

.gp-control-ok{
  box-shadow:inset 0 0 0 2px #39a96b;
  background:#f1faf5;
}

.gp-control-warning{
  box-shadow:inset 0 0 0 2px #d89a2b;
  background:#fff8e8;
}

.gp-control-note{
  display:block;
  margin-top:4px;
  color:#60788b;
  font-size:10px;
  font-weight:600;
  line-height:1.25;
}

.gp-check-hidden{
  display:none !important;
}

.gp-check-start-panel{
  margin:18px 22px;
  padding:24px;
  min-height:130px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}

.gp-check-start-panel h2{
  margin:0 0 8px;
  font-size:20px;
}

.gp-check-start-panel p{
  max-width:820px;
  margin:0;
  color:#60788b;
  font-size:13px;
  line-height:1.5;
}

#gp-check-run{
  flex:0 0 auto;
  cursor:pointer;
  padding:0 22px;
  min-height:52px;
  white-space:nowrap;
}

.resolution-gp-rrp{
  margin:12px 0;
  padding:14px;
  display:flex;
  align-items:flex-end;
  gap:12px;
  border:1px solid #e6b660;
  border-radius:8px;
  background:#fff8e8;
}

.resolution-gp-rrp.hidden{display:none!important}

.resolution-gp-rrp label{
  flex:1;
  font-weight:600;
}

.resolution-gp-rrp input{
  width:100%;
  margin-top:6px;
  min-height:40px;
  padding:0 10px;
}

/* Вкладки прайса поставщика как нормальные кнопки */
.price-source-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 20px;
}

.price-source-tabs button{
  min-height:38px;
  padding:0 16px;
  border:1px solid #b9d3e5 !important;
  border-radius:7px;
  background:#fff;
  color:#385a73;
  font-weight:600;
  cursor:pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease;
}

.price-source-tabs button:hover{
  background:#eaf6ff;
  border-color:#7fc4f3 !important;
  color:#0879cf;
}

.price-source-tabs button.active{
  background:#e4f3ff;
  border:2px solid #0879cf !important;
  color:#0879cf;
  box-shadow:0 1px 3px rgba(0,70,120,.12);
}

/* Убираем старое подчёркивание активной вкладки */
.price-source-tabs button.active::after,
.price-source-tabs button::after{
  display:none !important;
}

/* История операций — статус снова компактной плашкой */
#history th:nth-child(5),
#history td:nth-child(5){
  width:140px !important;
  min-width:140px !important;
  text-align:center;
  white-space:nowrap !important;
  overflow:visible !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}

/* Не даём слову ЗАПИСАНО переноситься внутри badge */
#history td:nth-child(5) > *,
#history td:nth-child(5) span,
#history td:nth-child(5) div{
  width:auto !important;
  min-width:82px;
  max-width:none !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  line-height:1 !important;
  font-size:12px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
}

.product-history-search-box{
  margin-bottom:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.product-history-search-row{
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}

.product-history-search-row > div{
  margin-right:auto;
}

.product-history-search-row b,
.product-history-search-row small{
  display:block;
}

.product-history-search-row small{
  margin-top:3px;
  color:#687b8d;
}

#product-history-search{
  width:360px;
  min-height:38px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:7px;
}

.product-history-results{
  border-top:1px solid var(--line);
}

.product-history-section{
  padding:14px 16px 18px;
  border-bottom:1px solid var(--line);
}

.product-history-section h3{
  margin:0 0 10px;
  font-size:14px;
}

.product-history-main b,
.product-history-main span,
.product-history-main small{
  display:block;
}

.product-history-main span{margin-top:3px}
.product-history-main small{
  margin-top:4px;
  color:#687b8d;
}

.product-history-table{
  width:100%;
  border-collapse:collapse;
}

.product-history-table th,
.product-history-table td{
  padding:9px 10px;
  border:1px solid var(--line);
  vertical-align:top;
  white-space:normal;
  overflow-wrap:anywhere;
}

.product-history-table th{
  background:#eef4f8;
  color:#60788b;
  font-size:11px;
  font-weight:600;
}

.product-history-table code{
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:11px;
}

.product-history-empty{
  padding:16px;
  color:#71879a;
}


/* ========================================================
   ИСТОРИЯ ТОВАРА — карточки Главного прайса
   ======================================================== */

.product-history-main-card{
  padding:14px 16px;
  margin:0 0 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}

.product-history-main-card:last-child{
  margin-bottom:0;
}

.product-history-main-article{
  margin-bottom:7px;
  color:#17334d;
  font-size:15px;
  font-weight:700;
}

.product-history-main-info{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-width:0;
}

.product-history-main-name{
  min-width:0;
  color:#17334d;
  font-size:14px;
  line-height:1.35;
}

.product-history-main-uuid{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  color:#6a7f91;
  font-size:11px;
}

.product-history-main-uuid span{
  font-weight:600;
}

.product-history-main-uuid code{
  padding:3px 6px;
  border:1px solid #d9e4ec;
  border-radius:5px;
  background:#f5f8fa;
  color:#425d73;
  font-size:11px;
}

.product-history-main-links{
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid #edf2f5;
  color:#687d8f;
  font-size:12px;
}

.product-history-main-links b{
  color:#17334d;
}


/* ========================================================
   ИСТОРИЯ ТОВАРА — состояние связи
   ======================================================== */

.product-history-link-state b,
.product-history-link-state small{
  display:block;
}

.product-history-link-state small{
  margin-top:4px;
  color:#71879a;
  font-size:10px;
}

.history-link-active{
  color:#137a46;
}

.history-link-none{
  color:#b6251e;
}


/* Немного больше воздуха между историческими строками */

.product-history-table td{
  padding-top:12px !important;
  padding-bottom:12px !important;
  line-height:1.35;
}

.product-history-table th:last-child{
  min-width:180px;
}


/* =====================================================
   ИСТОРИЯ ТОВАРА — нормальный читаемый список ГП
   Текущий DOM: b + span + small
   ===================================================== */

.product-history-main{
  display:grid !important;
  grid-template-columns:150px minmax(300px,1fr) minmax(430px,560px);
  align-items:center;
  gap:22px;

  margin:0 0 12px !important;
  padding:14px 16px !important;

  border:1px solid #d7e3eb;
  border-radius:8px;
  background:#fff;
}

.product-history-main:last-child{
  margin-bottom:0 !important;
}

.product-history-main > b{
  display:block !important;
  margin:0 !important;

  color:#17334d;
  font-size:15px;
  font-weight:700;
  line-height:1.3;
}

.product-history-main > span{
  display:block !important;
  margin:0 !important;

  color:#17334d;
  font-size:14px;
  line-height:1.35;
}

.product-history-main > small{
  display:block !important;
  margin:0 !important;
  padding:7px 10px;

  border:1px solid #dbe5ec;
  border-radius:6px;
  background:#f6f9fb;

  color:#526b7e;
  font-size:11px;
  line-height:1.3;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Больше воздуха между разделами */

.product-history-section{
  padding-top:18px !important;
  padding-bottom:20px !important;
}

.product-history-section h3{
  margin-bottom:13px !important;
}


/* Версии поставщиков */

.product-history-table td{
  padding-top:13px !important;
  padding-bottom:13px !important;
}

.product-history-table th:last-child,
.product-history-table td:last-child{
  min-width:190px;
  white-space:normal !important;
}

#gp-control-mini{margin:0 20px 12px;padding:12px 16px;border:2px solid #d89a2b;border-radius:8px;background:#fff8e8}#gp-control-mini span{margin-left:22px;font-weight:700}
#gp-control-mini{
  margin-left:16px !important;
  margin-right:16px !important;
  width:auto !important;
  box-sizing:border-box;
}
#gp-control-mini{
  margin:0 0 12px !important;
  width:100% !important;
  box-sizing:border-box;
}
#gp-control-mini span{cursor:pointer;padding:7px 10px;border-radius:6px}
#gp-control-mini span:hover{background:#ffe8b8;box-shadow:inset 0 0 0 2px #d89a2b}
#gp-mini-negative{margin-left:22px;padding:7px 10px;border:0;border-radius:6px;background:transparent;font-weight:700;cursor:pointer}#gp-mini-negative:hover{background:#ffdeda;color:#b6251e}

/* PLAN MODAL: единый вид кнопок и поиска */
#change-plan-modal .plan-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
}

#change-plan-modal .plan-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
  flex:1 1 auto;
}

#change-plan-modal .plan-filter,
#change-plan-modal #download-plan-filter-xlsx,
#change-plan-modal .plan-search{
  min-height:44px;
  height:44px;
  box-sizing:border-box;
  border-radius:12px;
}

#change-plan-modal .plan-filter,
#change-plan-modal #download-plan-filter-xlsx{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  white-space:nowrap;
}

#change-plan-modal #download-plan-filter-xlsx{
  flex:0 1 auto;
}

#change-plan-modal .plan-search{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  flex:1 1 260px;
  min-width:260px;
  max-width:360px;
}

#change-plan-modal .plan-search input{
  height:100%;
}

#change-plan-modal .plan-toolbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:10px!important}
#change-plan-modal .plan-filters{display:flex!important;flex:1 1 auto!important;gap:8px!important;overflow-x:auto!important}
#change-plan-modal .plan-filter,#change-plan-modal .plan-toolbar>button,#change-plan-modal .plan-search{height:40px!important;min-height:40px!important;box-sizing:border-box!important;border-radius:10px!important}
#change-plan-modal .plan-filter,#change-plan-modal .plan-toolbar>button{padding:0 14px!important;white-space:nowrap!important}
#change-plan-modal .plan-search{flex:1 1 270px!important;min-width:240px!important;max-width:360px!important}
#change-plan-modal #download-plan-filter-xlsx{
  border:1px solid #91bfe3!important;background:#e8f3ff!important;color:#0870c9!important;
  font-weight:700!important;transition:background .15s,border-color .15s,color .15s!important;
}
#change-plan-modal #download-plan-filter-xlsx:hover{
  background:#cfe8ff!important;border-color:#55a2dc!important;color:#005da8!important;
}
#change-plan-modal .plan-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 270px!important;grid-template-areas:"filters download" "search ."!important;gap:10px 14px!important;align-items:center!important}
#change-plan-modal .plan-filters{grid-area:filters!important;display:flex!important;gap:8px!important;overflow:visible!important;flex-wrap:nowrap!important}
#change-plan-modal #download-plan-filter-xlsx{grid-area:download!important;width:270px!important;height:40px!important;justify-self:end!important}
#change-plan-modal .plan-search{grid-area:search!important;width:360px!important;min-width:360px!important;max-width:360px!important;height:40px!important}
#change-plan-modal .plan-search input:hover,
#change-plan-modal .plan-search input:focus{
  outline:none!important;
  box-shadow:none!important;
  border:0!important;
}

#review > .source-strip.gp-check-hidden {
  display: flex !important;
}

/* AQUABAS DESK — larger brand in login screen */
.login-page .story .brand img{
  width:58px;
  height:58px;
}

.login-page .story .brand b{
  font-size:22px;
  line-height:1.05;
}

.login-page .story .brand i{
  font-size:18px;
  margin-top:4px;
}
