:root {
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --blue-soft: #eff6ff;
  --ink: #172033;
  --muted: #64748b;
  --line: #e7edf5;
  --canvas: #f6f8fc;
  --surface: #ffffff;
  --green: #0f9f72;
  --amber: #c87000;
  --red: #dc3d53;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 12px 40px rgba(28, 47, 84, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.23,1,.32,1); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--line); background: var(--surface); transition: width .22s cubic-bezier(.23,1,.32,1), transform .22s cubic-bezier(.23,1,.32,1); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; color: #fff; font-size: 21px; font-weight: 800; background: linear-gradient(135deg, #3b82f6, #1d4ed8); border-radius: 14px; box-shadow: 0 8px 18px rgba(37,99,235,.24); }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy span { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.side-title { margin: 0 10px 6px; color: #94a3b8; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; color: #52627a; border-radius: 12px; font-size: 13px; font-weight: 650; transition: background .16s ease-out, color .16s ease-out, transform .16s ease-out; }
.nav-item:hover { background: #f5f8fd; color: var(--ink); }
.nav-item:active { transform: scale(.98); }
.nav-item.active { color: var(--blue); background: var(--blue-soft); }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side-bottom { margin-top: auto; display: grid; gap: 10px; padding: 0 2px; }
.bot-status { padding: 12px; border: 1px solid #d5f3e5; border-radius: var(--radius-md); background: #f3fdf8; }
.bot-status small { display: block; color: #6b7f75; font-size: 11px; }
.bot-status strong { display: flex; gap: 7px; align-items: center; margin-top: 5px; color: #137a59; font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.account { display: flex; gap: 9px; align-items: center; padding: 10px; background: #f8fafc; border-radius: var(--radius-md); }
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; background: #dbeafe; border-radius: 10px; color: #1d4ed8; font-size: 12px; font-weight: 800; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy span { display: block; max-width: 158px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-copy strong { font-size: 12px; }.account-copy span { color: var(--muted); margin-top: 2px; font-size: 11px; }

.content { min-width: 0; padding: 28px 34px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.topbar h1 { margin: 0; font-size: clamp(23px, 2.5vw, 29px); letter-spacing: -.04em; }
.topbar p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.menu-button { display: inline-flex; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-size: 12px; font-weight: 750; transition: transform .16s ease-out, background .16s ease-out, box-shadow .16s ease-out; }
.button:active { transform: scale(.97); }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(37,99,235,.2); }.button-primary:hover { background: var(--blue-strong); }
.button-secondary { color: #485a75; background: #fff; border-color: var(--line); }.button-secondary:hover { background: #f8fafc; }
.button-danger { color: var(--red); background: #fff; border-color: #ffd8de; }.button-danger:hover { background: #fff7f8; }
.button-small { min-height: 33px; padding: 0 10px; border-radius: 10px; font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.metric { min-height: 140px; padding: 19px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 2px 8px rgba(15,23,42,.015); }
.metric::after { content: ""; position: absolute; width: 105px; height: 105px; right: -33px; bottom: -47px; border: 25px solid var(--tint, #eff6ff); border-radius: 50%; }
.metric-icon { width: 37px; height: 37px; display: grid; place-items: center; color: var(--accent, var(--blue)); border-radius: 12px; background: var(--tint, var(--blue-soft)); }
.metric-label { display: block; color: var(--muted); margin-top: 16px; font-size: 11px; font-weight: 700; }.metric-value { display: block; margin-top: 5px; font-size: 23px; font-weight: 800; letter-spacing: -.045em; }
.layout-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(285px, .85fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 2px 10px rgba(15,23,42,.018); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 21px 16px; border-bottom: 1px solid #f0f3f8; }
.card-head h2 { margin: 0; font-size: 14px; letter-spacing: -.015em; }.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }th, td { padding: 14px 20px; border-bottom: 1px solid #f2f5f9; text-align: left; white-space: nowrap; font-size: 12px; }th { color: #90a0b6; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }td { color: #45556f; font-weight: 560; }tbody tr:last-child td { border-bottom: 0; }
.empty { display: grid; place-items: center; min-height: 182px; padding: 25px; text-align: center; color: var(--muted); }.empty strong { display: block; color: #475a78; margin-bottom: 5px; font-size: 13px; }.empty span { font-size: 12px; }
.quick-list { padding: 8px 10px 12px; }.quick-row { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 12px; }.quick-row:hover { background: #f8fafc; }.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; color: #1d4ed8; background: #eff6ff; border-radius: 10px; }.quick-copy { min-width: 0; flex: 1; }.quick-copy strong, .quick-copy span { display: block; }.quick-copy strong { font-size: 12px; }.quick-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }.quick-row svg:last-child { color: #9aabc0; width: 16px; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 13px 15px; color: #3c587f; border: 1px solid #cfe0ff; border-radius: 14px; background: #f5f9ff; font-size: 12px; line-height: 1.45; }.notice-success { color: #217355; background: #f2fdf7; border-color: #c9f3dc; }.notice-error { color: #a3273a; background: #fff6f7; border-color: #ffd5dc; }
.page-card { padding: 22px; }.page-card + .page-card { margin-top: 18px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }.form-grid .full { grid-column: 1/-1; }.field { display: grid; gap: 7px; }.field label { color: #4d5e75; font-size: 11px; font-weight: 750; }.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; color: #293850; background: #fff; border: 1px solid #dfe6ef; border-radius: 11px; outline: none; font-size: 13px; transition: border .16s ease-out, box-shadow .16s ease-out; }.field textarea { min-height: 120px; resize: vertical; }.field input:focus, .field textarea:focus, .field select:focus { border-color: #72a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }.field small { color: #8492a7; font-size: 10px; line-height: 1.35; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }.section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }.badge-green { color: #14805c; background: #eafaf2; }.badge-gray { color: #64748b; background: #eef2f7; }.badge-amber { color: #a26000; background: #fff6df; }.badge-red { color: #bf2740; background: #fff0f2; }
.product-cell { display: flex; align-items: center; gap: 10px; }.product-thumb { width: 36px; height: 36px; object-fit: cover; display: grid; place-items: center; color: #8aa0be; background: #eef3f9; border-radius: 10px; }.product-cell strong { display: block; color: #34445e; font-size: 12px; }.product-cell span { display: block; color: #8996aa; margin-top: 3px; font-size: 10px; }
.login-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at 15% 15%, #dbeafe 0, transparent 25%), radial-gradient(circle at 85% 80%, #e0e7ff 0, transparent 27%), #f7faff; }.login-card { width: min(430px, 100%); padding: 32px; border: 1px solid rgba(219,229,243,.85); border-radius: 25px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }.login-card h1 { margin: 22px 0 6px; font-size: 25px; letter-spacing: -.04em; }.login-card p { color: var(--muted); margin: 0 0 24px; font-size: 13px; line-height: 1.5; }.login-card .button { width: 100%; margin-top: 7px; }
.modal { position: fixed; inset: 0; display: none; place-items: center; padding: 18px; background: rgba(15,23,42,.45); z-index: 50; }.modal.open { display: grid; }.modal-card { width: min(650px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 22px; border-radius: 20px; background: white; box-shadow: 0 24px 65px rgba(15,23,42,.25); }.modal-card .section-head { margin-bottom: 16px; }

.app-shell.sidebar-collapsed { grid-template-columns: 82px minmax(0, 1fr); }.sidebar-collapsed .sidebar { padding-inline: 12px; }.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }.sidebar-collapsed .brand-copy, .sidebar-collapsed .side-title, .sidebar-collapsed .nav-item span, .sidebar-collapsed .bot-status, .sidebar-collapsed .account-copy, .sidebar-collapsed .account > a { display: none; }.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }.sidebar-collapsed .account { justify-content: center; padding: 8px; }.sidebar-collapsed .side-bottom { align-items: center; }.sidebar-collapsed .nav-item { position: relative; }.sidebar-collapsed .nav-item::after { content: attr(aria-label); position: absolute; left: 56px; display: none; padding: 7px 9px; color: #fff; background: #172033; border-radius: 8px; white-space: nowrap; font-size: 11px; z-index: 40; }.sidebar-collapsed .nav-item:hover::after { display: block; }
.dashboard-hero { display:flex; align-items:center; justify-content:space-between; gap:22px; margin-bottom:18px; padding:24px; overflow:hidden; background:linear-gradient(120deg,#fff 0%,#f4f8ff 100%); }.dashboard-hero-copy { max-width:590px; }.eyebrow { display:block; color:#3974d7; font-size:10px; font-weight:850; letter-spacing:.1em; }.dashboard-hero h2 { margin:7px 0; font-size:23px; letter-spacing:-.04em; }.dashboard-hero p { max-width:530px; margin:0; color:var(--muted); font-size:12px; line-height:1.6; }.bot-control { min-width:290px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px; border:1px solid #d6e8ff; border-radius:17px; background:#fff; }.bot-control.is-on { border-color:#c9f0dd; background:#f7fffb; }.bot-control-label, .bot-control strong, .bot-control small { display:block; }.bot-control-label { color:#8a9ab0; font-size:10px; font-weight:750; text-transform:uppercase; }.bot-control strong { margin-top:4px; font-size:14px; }.bot-control small { margin-top:4px; color:var(--muted); font-size:10px; }
.products-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; padding:22px; }.products-toolbar h2, .section-label h2 { margin:5px 0 0; font-size:17px; letter-spacing:-.025em; }.products-toolbar p, .section-label p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }.products-toolbar p { max-width:650px; }.product-section { margin-top:26px; }.section-label { display:flex; align-items:end; justify-content:space-between; margin:0 2px 12px; }.section-label h2 span { display:inline-grid; place-items:center; min-width:21px; height:21px; margin-left:5px; color:#52739f; background:#e9f1fc; border-radius:99px; font-size:10px; vertical-align:2px; }.inactive-section { padding-top:22px; border-top:1px solid #e3eaf3; }.product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }.product-card { min-height:175px; display:flex; flex-direction:column; padding:16px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 2px 10px rgba(15,23,42,.018); }.product-card.is-inactive { background:#fbfcfe; border-style:dashed; }.product-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }.product-card-top .product-cell { min-width:0; }.product-card-top .product-cell > span { min-width:0; }.product-card-meta { display:grid; gap:6px; margin-top:16px; color:#8190a5; font-size:10px; }.product-card-meta span:first-child { display:flex; align-items:center; gap:6px; color:#385474; font-size:12px; font-weight:800; }.product-card-meta svg { width:14px; height:14px; }.product-card-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:auto; padding-top:14px; }.product-card-actions form { margin:0; }.product-empty { min-height:130px; border:1px dashed #d9e3f0; border-radius:18px; background:#fbfcfe; }.modal-close { width:32px; height:32px; display:grid; place-items:center; flex:0 0 32px; color:#6d7f96; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer; font-size:21px; line-height:1; }.modal-close:hover { color:#1d4ed8; background:#eff6ff; }.product-modal-card { width:min(740px,100%); }.check-row { display:flex !important; align-items:center; gap:8px; margin-top:6px; color:#52627a !important; font-size:12px !important; font-weight:600 !important; }.check-row input { width:auto !important; }.modal-actions { margin-top:20px; }

@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.layout-grid { grid-template-columns: 1fr; }.product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.dashboard-hero { align-items:flex-start; flex-direction:column; }.bot-control { width:100%; } }
@media (max-width: 800px) { .app-shell, .app-shell.sidebar-collapsed { display: block; }.sidebar { position: fixed; width: 276px; transform: translateX(-105%); box-shadow: var(--shadow); }.sidebar.mobile-open { transform: translateX(0); }.content { padding: 20px 16px 36px; }.sidebar-collapsed .brand-copy, .sidebar-collapsed .side-title, .sidebar-collapsed .nav-item span, .sidebar-collapsed .bot-status, .sidebar-collapsed .account-copy, .sidebar-collapsed .account > a { display: initial; }.sidebar-collapsed .sidebar { padding-inline:14px; }.sidebar-collapsed .brand { justify-content:flex-start; padding-inline:8px; }.sidebar-collapsed .nav-item { justify-content:flex-start; padding:0 12px; }.topbar { align-items: flex-start; margin-bottom: 22px; }.top-actions { padding-top: 1px; }.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.38); z-index: 10; }.sidebar-overlay.open { display: block; } }
@media (max-width: 540px) { .topbar { gap: 10px; }.topbar h1 { font-size: 22px; }.topbar p { font-size: 11px; }.stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric { min-height: 125px; padding: 14px; }.metric-value { font-size: 18px; }.metric-label { margin-top: 12px; }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.page-card, .products-toolbar { padding: 16px; }.products-toolbar { align-items:flex-start; flex-direction:column; }.products-toolbar .button { width:100%; } .product-grid { grid-template-columns:1fr; } .bot-control { align-items:flex-start; flex-direction:column; min-width:0; }.bot-control .button { width:100%; } th, td { padding: 12px 14px; }.top-actions .button-primary { font-size: 0; width: 40px; padding: 0; }.top-actions .button-primary svg { margin: 0; } }

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