:root{
  --bg:#f5f7fb;--card:#fff;--text:#0f172a;--muted:#64748b;--line:#e5eaf3;--blue:#0b6bff;--blue2:#2457e6;--green:#16a34a;--red:#ef4444;--orange:#f97316;--shadow:0 20px 55px rgba(15,23,42,.08);--r:24px
}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.top{height:72px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 6vw;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px;font-weight:950;font-size:20px}.logo{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;display:grid;place-items:center;font-size:24px;box-shadow:0 14px 35px rgba(11,107,255,.24)}.badge{background:#eaf1ff;color:var(--blue);border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900}.nav{display:flex;gap:18px;align-items:center;font-size:14px;font-weight:850}.nav a{color:#334155}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 18px;border:1px solid #dce6f3;border-radius:14px;background:#fff;font-weight:900;color:#0f172a;box-shadow:none}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 14px 34px rgba(11,107,255,.22)}.btn.danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}.btn.green{background:#ecfdf5;border-color:#bbf7d0;color:#15803d}.btn.small{padding:9px 12px;border-radius:11px;font-size:13px}.page{padding:34px 6vw}.hero{padding:70px 6vw 42px;display:grid;grid-template-columns:1fr 1fr;gap:46px;align-items:center}.eyebrow{display:inline-block;background:#eaf1ff;color:var(--blue);border-radius:999px;padding:9px 13px;font-size:13px;font-weight:900;margin-bottom:18px}h1{font-size:58px;line-height:1;letter-spacing:-2.4px;margin:0 0 22px}h2{font-size:34px;letter-spacing:-1px;margin:0 0 18px}h3{font-size:22px;margin:0 0 12px}.lead{font-size:19px;line-height:1.55;color:#475569;margin:0 0 28px}.actions{display:flex;gap:14px;flex-wrap:wrap}.chips{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.chip{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 13px;font-size:13px;font-weight:850;color:#334155}.mock,.card,.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}.mock{padding:22px}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.kpi{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px}.kpi small{display:block;color:var(--muted);font-weight:850}.kpi b{display:block;font-size:27px;margin:8px 0}.green-text{color:var(--green)!important}.red-text{color:var(--red)!important}.orange-text{color:var(--orange)!important}.chart{height:250px;margin-top:18px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff);display:flex;align-items:end;gap:10px;padding:22px}.bar{flex:1;background:linear-gradient(180deg,#3b82f6,#0b6bff);border-radius:9px 9px 0 0}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.section{padding:34px 6vw}.card,.panel{padding:24px}.card p,.panel p{color:#475569;line-height:1.5}.layout{display:grid;grid-template-columns:255px 1fr;min-height:calc(100vh - 72px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:24px}.side-menu a{display:block;padding:14px 16px;border-radius:14px;margin-bottom:8px;font-weight:850;color:#334155}.side-menu a.active{background:#eaf1ff;color:var(--blue)}.side-info{margin-top:24px;background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:16px}.main{padding:28px}.main-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:22px}.main-head h1{font-size:42px;margin-bottom:8px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.field,.select,input,select,textarea{border:1px solid #dbe4f0;background:#fff;border-radius:14px;padding:13px 14px;outline:none}.field:focus,input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(11,107,255,.12)}.table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden}.table th,.table td{text-align:left;padding:14px 16px;border-bottom:1px solid #eef2f7;font-size:14px}.table th{background:#f8fafc;color:#475569;font-weight:950}.table tr:last-child td{border-bottom:0}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:950}.pill.ok{background:#dcfce7;color:#15803d}.pill.warn{background:#ffedd5;color:#c2410c}.pill.bad{background:#ffe4e6;color:#be123c}.auth-wrap{min-height:calc(100vh - 72px);display:grid;place-items:center;padding:40px 20px}.auth-card{width:100%;max-width:480px;background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:34px}.form{display:grid;gap:14px}.form label{font-weight:850;font-size:14px;color:#334155}.form input,.form select{width:100%}.notice{border-radius:18px;padding:16px;background:#eaf1ff;color:#1e40af;font-weight:800}.notice.danger{background:#fff1f2;color:#be123c}.notice.ok{background:#ecfdf5;color:#15803d}.empty{padding:30px;text-align:center;color:#64748b}.footer{padding:30px 6vw;border-top:1px solid var(--line);color:#64748b}.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:99;padding:20px}.modal-backdrop.active{display:flex}.modal{background:#fff;border-radius:26px;box-shadow:0 30px 80px rgba(0,0,0,.24);width:min(520px,100%);padding:28px}.modal h2{font-size:28px}.toast{position:fixed;right:20px;bottom:20px;background:#0f172a;color:#fff;border-radius:16px;padding:14px 16px;box-shadow:var(--shadow);z-index:120;display:none}.toast.active{display:block}.access-box{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px}.access-days{font-size:26px;font-weight:950;color:var(--blue)}.divider{height:1px;background:var(--line);margin:18px 0}.mobile-menu{display:none}
@media(max-width:1050px){.hero{grid-template-columns:1fr}.grid,.grid3{grid-template-columns:1fr 1fr}.kpis{grid-template-columns:1fr 1fr}.layout{grid-template-columns:1fr}.sidebar{display:none}.nav{display:none}.mobile-menu{display:flex}.main-head{display:block}.toolbar{margin-top:14px}}
@media(max-width:680px){h1{font-size:40px}.grid,.grid2,.grid3,.kpis{grid-template-columns:1fr}.page,.section,.hero{padding-left:20px;padding-right:20px}.top{padding:0 20px}.brand{font-size:17px}.main{padding:20px}.table{display:block;overflow:auto}.auth-card{padding:24px}}
.store-switcher{margin-bottom:18px;display:flex;justify-content:space-between;align-items:center;gap:16px}.store-switcher small{display:block;color:var(--muted);font-weight:900;margin-bottom:6px}.store-switcher b{font-size:20px}.store-switcher p{margin:6px 0 0}.store-card{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.store-card .actions{justify-content:flex-end}.select{min-width:260px}.form textarea{min-height:92px;resize:vertical;width:100%}@media(max-width:760px){.store-switcher,.store-card{display:block}.store-switcher .toolbar,.store-card .actions{margin-top:12px}.select{width:100%;min-width:0}}


.product-cell{display:flex;align-items:center;gap:12px;min-width:360px}
.product-thumb{width:54px;height:54px;flex:0 0 54px;border-radius:14px;background:#f2f5fb;border:1px solid #e6edf7;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.product-thumb:before{content:'Фото';font-size:10px;color:#94a3b8;font-weight:800;letter-spacing:.02em}
.product-thumb img{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0;background:#fff}
.product-thumb.no-photo:before{content:'Нет фото'}
@media(max-width:760px){.product-cell{min-width:260px}.product-thumb{width:46px;height:46px;flex-basis:46px}}
.product-cell{display:flex;align-items:center;gap:12px;min-width:300px}.product-thumb{width:56px;height:56px;min-width:56px;border-radius:14px;background:#eef2f7;border:1px solid var(--line);display:grid;place-items:center;overflow:hidden}.product-thumb img{width:100%;height:100%;object-fit:cover;display:block}.product-thumb.no-photo:after{content:'Нет фото';font-size:10px;font-weight:900;color:#64748b;text-align:center;line-height:1.1}.cost-input{width:112px;padding:10px 10px;border-radius:12px}.cost-input.saved{border-color:var(--green);box-shadow:0 0 0 3px rgba(22,163,74,.12)}.products-table th,.products-table td{white-space:nowrap}.products-table td:first-child,.products-table th:first-child{white-space:normal;min-width:360px}

/* RC9 dashboard trust blocks */
.overview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}
.info-card{border:1px solid var(--line);border-radius:18px;background:#f8fbff;padding:18px;min-height:132px}
.info-card small{display:block;color:var(--muted);font-weight:900;margin-bottom:8px}
.info-card b{display:block;font-size:26px;letter-spacing:-.4px;margin-bottom:8px}
.info-card p{margin:0;color:#475569;font-size:14px;line-height:1.45}
.mini-list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0 18px}
.mini-list div{border:1px solid var(--line);border-radius:16px;background:#f8fbff;padding:14px}
.mini-list b{display:block;font-size:26px;margin-bottom:4px}
.mini-list span{font-size:13px;color:#64748b;font-weight:800}.small-note{font-size:13px;color:#64748b;margin-top:10px!important}
@media(max-width:1050px){.overview-grid{grid-template-columns:1fr 1fr}.mini-list{grid-template-columns:1fr}}
@media(max-width:680px){.overview-grid{grid-template-columns:1fr}}
.mini-label{display:block;margin:12px 0 10px;font-size:13px;font-weight:800;color:#334155}
.mini-label select{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff;font-weight:800;color:#0f172a}
.payment-note{margin-top:18px;padding:18px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:18px;color:#1e3a8a;font-weight:700}
.payment-note b{color:#0f172a}
.disabled-link{opacity:.45;pointer-events:none}.small-note{font-size:13px;color:#64748b;line-height:1.45}.tariff-grid .card{min-height:250px}.store-switcher .notice.small-note{display:inline-flex;align-items:center;padding:11px 13px;border-radius:12px}.mini-label{display:grid;gap:8px;margin:12px 0;font-weight:850}.mini-label select{width:100%}

/* RC13: clickable marketplace product cards */
.product-thumb.clickable{cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;text-decoration:none;color:inherit}
.product-thumb.clickable:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.12);border-color:#b9cef5}
.product-title-link{color:#0f172a;text-decoration:none;font-weight:950}
.product-title-link:hover{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.product-open-hint{color:#64748b;font-weight:850}
.product-cell:hover .product-open-hint{color:var(--blue)}

/* RC14: product table sorting and manual column widths */
.table-scroll{width:100%;overflow:auto;border-radius:20px}
.products-table{table-layout:fixed;min-width:1320px}
.products-table th{position:relative;user-select:none}
.products-table th[data-sort]{cursor:pointer}
.products-table th[data-sort]:hover{color:var(--blue)}
.products-table th.sort-active{color:var(--blue)}
.sort-mark{font-weight:950;color:var(--blue)}
.col-resizer{position:absolute;top:0;right:-3px;width:8px;height:100%;cursor:col-resize;z-index:2}
.col-resizer:hover{background:rgba(11,107,255,.12)}
.resizing-cols{cursor:col-resize;user-select:none}
.products-table td{overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.products-table td:first-child{overflow:visible}
.product-table-note{margin:10px 0 0 4px}
.muted{color:#94a3b8}
.small-note{font-size:12px;color:#64748b;line-height:1.35}


/* RC15: stable product table layout, no cell overlap */
.products-table-wrap{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  -webkit-overflow-scrolling:touch;
}
.products-table-wrap .table{
  border:0;
  border-radius:0;
}
.products-table{
  table-layout:fixed;
  min-width:1680px;
  width:auto;
}
.products-table th,
.products-table td{
  padding:12px 14px;
  font-size:13px;
  line-height:1.25;
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.products-table th:first-child,
.products-table td:first-child{
  white-space:normal;
  overflow:hidden;
}
.product-cell{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0!important;
  width:100%;
  max-width:100%;
}
.product-cell > .product-info{
  min-width:0;
  width:100%;
  max-width:100%;
  overflow:hidden;
}
.product-name,
.product-title-link,
.product-meta,
.product-open-hint{
  max-width:100%;
}
.product-name,
.product-title-link{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  white-space:normal;
  line-height:1.18;
}
.product-meta,
.product-open-hint{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  line-height:1.25;
}
.products-table .num-cell{
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.products-table .cost-input{
  width:100%;
  min-width:86px;
  max-width:120px;
  padding:9px 10px;
}
.products-table .pill{
  white-space:nowrap;
}
.products-table .small-note{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.product-table-note{margin-top:12px!important;color:#64748b;}
@media(max-width:1050px){
  .products-table{min-width:1540px;}
}


/* RC16: readable reconciliation sales table */
.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.rec-api-note{margin-top:-8px;margin-bottom:16px;max-width:900px;}
.rec-sales-table{min-width:980px;table-layout:fixed;}
.rec-sales-table th:nth-child(1),.rec-sales-table td:nth-child(1){width:360px;}
.rec-sales-table th:nth-child(2),.rec-sales-table td:nth-child(2){width:170px;}
.rec-sales-table th:nth-child(3),.rec-sales-table td:nth-child(3){width:130px;}
.rec-sales-table th:nth-child(4),.rec-sales-table td:nth-child(4){width:145px;}
.rec-sales-table th:nth-child(5),.rec-sales-table td:nth-child(5){width:180px;}
.rec-sales-table th:nth-child(6),.rec-sales-table td:nth-child(6){width:130px;}
.rec-product-cell{min-width:0;width:100%;}
.rec-product-cell .product-info{min-width:0;}
.rec-sales-table .product-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.rec-sales-table .product-meta,.rec-sales-table .small-note{white-space:normal;}
