*{ box-sizing:border-box; }

:root{
  --vs-ink:#1E2A4A;
  --vs-ink-light:#2E3C5E;
  --vs-paper:#F7F3EA;
  --vs-card:#FFFDF8;
  --vs-border:#E4DDC8;
  --vs-border-strong:#D8D0B8;
  --vs-text:#2B2E33;
  --vs-muted:#7A7568;
  --vs-brass:#C08A2E;
  --vs-sage:#6B8F71;
  --vs-rust:#B0522F;
  --vs-blue:#3B6FD6;
  --vs-purple:#7A5FC7;
  --serif:'Lora',serif;
  --sans:'Inter',sans-serif;
}

body.vs-body{ margin:0; background:var(--vs-paper); }
#vs-app-root, .vs-login-page{ font-family:var(--sans); color:var(--vs-text); }

/* ---------- Login ---------- */
.vs-login-page{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(59,111,214,.22), transparent 60%),
    radial-gradient(1000px 600px at 110% 10%, rgba(192,138,46,.25), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(122,95,199,.18), transparent 60%),
    var(--vs-ink);
}
.vs-login-wrap{
  width:100%; max-width:760px; padding:36px 30px; background:var(--vs-paper);
  border-radius:12px; box-shadow:0 30px 60px -20px rgba(0,0,0,.45);
}
.vs-login-brand{ text-align:center; margin-bottom:30px; }
.vs-login-mark{
  width:64px;height:64px;border-radius:50%;object-fit:cover;display:block;margin:0 auto 14px;
  border:3px solid var(--vs-brass); box-shadow:0 4px 14px rgba(0,0,0,.2);
}
.vs-login-title{ font-family:var(--serif); font-size:28px; color:var(--vs-ink); font-weight:700; }
.vs-login-sub{ color:var(--vs-muted); font-size:13px; margin-top:4px; }
.vs-login-error{ background:#FBE3DC; border:1px solid #EFC0AE; color:#8A3D22; padding:10px 14px; border-radius:6px; font-size:13px; margin-bottom:18px; }
.vs-role-tabs{ display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-bottom:26px; }
.vs-role-tab{
  width:210px; text-align:left; background:var(--vs-card); border:1px solid var(--vs-border);
  border-top:4px solid var(--vs-border); border-radius:8px; padding:16px; text-decoration:none;
  color:inherit; display:block; transition:transform .12s ease, box-shadow .12s ease;
}
.vs-role-tab:hover{ transform:translateY(-2px); box-shadow:0 10px 20px -12px rgba(0,0,0,.25); }
.vs-role-tab-super{ border-top-color:var(--vs-blue); }
.vs-role-tab-admin{ border-top-color:var(--vs-purple); }
.vs-role-tab-employee{ border-top-color:var(--vs-brass); }
.vs-role-tab-custom{ border-top-color:var(--vs-sage); }
.vs-role-tab.active{ box-shadow:0 0 0 2px var(--vs-brass) inset; }
.vs-role-tab-label{ font-family:var(--serif); font-size:16px; color:var(--vs-ink); font-weight:600; margin-bottom:4px; }
.vs-role-tab-desc{ font-size:12px; color:var(--vs-muted); line-height:1.4; }
.vs-login-form{
  max-width:340px; margin:0 auto; display:flex; flex-direction:column; gap:14px;
  background:var(--vs-card); border:1px solid var(--vs-border); padding:22px; border-radius:8px;
}
.vs-login-form label{ font-size:12.5px; font-weight:600; color:#3D3A31; display:flex; flex-direction:column; gap:6px; }
.vs-login-form input{ padding:9px 11px; border-radius:6px; border:1px solid var(--vs-border-strong); font-size:13.5px; font-family:var(--sans); }
.vs-login-form button{
  margin-top:6px; padding:11px 16px; border-radius:6px; border:none; cursor:pointer;
  font-weight:700; font-size:13.5px; color:#fff; background:linear-gradient(135deg, var(--vs-brass), #A9701E);
}

/* ---------- Mobile header (hamburger) ---------- */
.vs-mobile-header{
  display:none; align-items:center; justify-content:space-between; padding:12px 16px;
  background:var(--vs-ink); position:sticky; top:0; z-index:60;
}
.vs-mobile-header-brand{ display:flex; align-items:center; gap:10px; }
.vs-mobile-header-logo{ width:32px; height:32px; border-radius:50%; object-fit:cover; border:2px solid var(--vs-brass); }
.vs-mobile-header-title{ font-family:var(--serif); color:var(--vs-paper); font-size:15px; font-weight:600; }
.vs-hamburger{ width:36px; height:36px; border-radius:6px; border:1px solid rgba(247,243,234,.3); background:transparent; color:var(--vs-paper); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.vs-sidebar-scrim{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:59; }

/* ---------- App shell ---------- */
.vs-shell{ display:flex; min-height:100vh; background:var(--vs-paper); }

/* Sticky: the sidebar stays pinned to the viewport while the page scrolls,
   the menu list scrolls internally if it's taller than the screen, and the
   sign-out button is always visible at the bottom. */
.vs-sidebar{
  width:236px; background:var(--vs-ink); flex-shrink:0; display:flex; flex-direction:column;
  transition:width .18s ease; position:sticky; top:0; align-self:flex-start;
  height:100vh; max-height:100vh;
}
.vs-sidebar.collapsed{ width:76px; }
.vs-sidebar-brand{ padding:24px 14px 16px; display:flex; flex-direction:column; align-items:center; text-align:center; }
.vs-sidebar.collapsed .vs-sidebar-brand{ padding:20px 8px 14px; }
.vs-sidebar-logo{ width:52px; height:52px; border-radius:50%; object-fit:cover; flex-shrink:0; border:2px solid var(--vs-brass); margin-bottom:10px; }
.vs-sidebar.collapsed .vs-sidebar-logo{ width:38px; height:38px; margin-bottom:0; }
.vs-sidebar-brand-text{ min-width:0; }
.vs-sidebar.collapsed .vs-sidebar-brand-text{ display:none; }
.vs-sidebar-brand-title{ font-family:var(--serif); color:var(--vs-paper); font-size:16px; font-weight:600; line-height:1.3; white-space:normal; word-break:break-word; }
.vs-sidebar-sep{ height:1px; margin:2px 18px 0; background:rgba(247,243,234,0.14); }
.vs-collapse-btn{
  position:absolute; top:20px; right:-11px; width:22px; height:22px; border-radius:50%;
  background:var(--vs-brass); color:var(--vs-ink); border:2px solid var(--vs-paper);
  display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:11px; font-weight:700;
  box-shadow:0 2px 6px rgba(0,0,0,.3); z-index:2;
}
.vs-collapse-btn svg{ width:11px; height:11px; }
.vs-nav{ flex:1 1 auto; padding:14px 10px; overflow-y:auto; min-height:0; }
.vs-sidebar-brand, .vs-sidebar-sep, .vs-sidebar-foot{ flex-shrink:0; }
.vs-nav-item{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:6px; margin-bottom:4px;
  cursor:pointer; color:#C9D0E0; font-size:13.5px; font-weight:500; transition:background .1s ease;
}
.vs-nav-item:hover{ background:rgba(247,243,234,0.08); }
.vs-nav-item svg{ flex-shrink:0; width:17px; height:17px; }
.vs-sidebar.collapsed .vs-nav-item{ justify-content:center; padding:10px; }
.vs-sidebar.collapsed .vs-nav-item span{ display:none; }
.vs-nav-item.active{ background:var(--vs-brass); color:var(--vs-ink); font-weight:600; }
.vs-nav-item.active:hover{ background:var(--vs-brass); }
.vs-sidebar-foot{
  height:40px; margin:8px 10px 14px; padding:0 12px; border-top:1px solid var(--vs-ink-light); padding-top:12px;
  color:#C9D0E0; font-size:13.5px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:10px;
  transition:background .1s ease; border-radius:6px;
}
.vs-sidebar-foot:hover{ background:rgba(247,243,234,0.08); }
.vs-sidebar-foot svg{ width:17px; height:17px; flex-shrink:0; }
.vs-sidebar.collapsed .vs-sidebar-foot{ justify-content:center; padding:0; margin:8px; }
.vs-sidebar.collapsed .vs-sidebar-foot span{ display:none; }

.vs-main{ flex:1; padding:0 34px 34px; min-width:0; }

.vs-topbar{ display:flex; justify-content:flex-end; align-items:center; padding:16px 0; gap:12px; position:relative; }
.vs-topbar-user{ text-align:right; cursor:pointer; }
.vs-topbar-name{ font-size:13px; font-weight:600; color:var(--vs-ink); }
.vs-topbar-role{ font-size:11px; color:var(--vs-muted); }
.vs-topbar-avatar{
  width:36px; height:36px; border-radius:50%; background:var(--vs-brass); color:var(--vs-ink);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; font-family:var(--serif);
  cursor:pointer; overflow:hidden; flex-shrink:0;
}
.vs-topbar-avatar img{ width:100%; height:100%; object-fit:cover; }
.vs-profile-menu{
  position:absolute; top:56px; right:0; width:190px; background:var(--vs-card); border:1px solid var(--vs-border);
  border-radius:8px; box-shadow:0 14px 30px -10px rgba(0,0,0,.3); z-index:50; padding:6px; display:none;
}
.vs-profile-menu.open{ display:block; }
.vs-profile-menu-item{ padding:9px 12px; font-size:13px; border-radius:5px; cursor:pointer; color:var(--vs-text); display:flex; align-items:center; gap:8px; }
.vs-profile-menu-item:hover{ background:var(--vs-paper); color:var(--vs-brass); }
.vs-profile-menu-item svg{ width:15px; height:15px; }
.vs-profile-menu-sep{ height:1px; background:var(--vs-border); margin:4px 6px; }

h1.vs-h1{ font-family:var(--serif); font-size:24px; color:var(--vs-ink); margin:0 0 4px; }
.vs-sub{ color:var(--vs-muted); font-size:13.5px; margin:0 0 18px; }

/* ---------- Stat boxes ---------- */
.vs-stats{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.vs-stat{ flex:1; min-width:180px; background:var(--vs-card); border:1px solid var(--vs-border); border-radius:10px; padding:16px 18px; position:relative; }
.vs-stat-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.vs-stat-icon{ width:38px; height:38px; border-radius:9px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.vs-stat-icon svg{ width:19px; height:19px; }
.vs-stat-icon-blue{ background:var(--vs-blue); }
.vs-stat-icon-brass{ background:var(--vs-brass); }
.vs-stat-icon-sage{ background:var(--vs-sage); }
.vs-stat-icon-rust{ background:var(--vs-rust); }
.vs-stat-icon-purple{ background:var(--vs-purple); }
.vs-stat-label{ font-size:12px; color:var(--vs-muted); margin:10px 0 2px; }
.vs-stat-value{ font-family:var(--serif); font-size:26px; color:var(--vs-ink); font-weight:700; }

.vs-stat-filter{ position:relative; }
.vs-stat-filter-btn{ width:26px; height:26px; border-radius:6px; border:1px solid var(--vs-border-strong); background:var(--vs-paper); color:var(--vs-muted); cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.vs-stat-filter-btn svg{ width:13px; height:13px; }
.vs-stat-filter-btn.active{ background:var(--vs-brass); border-color:var(--vs-brass); color:var(--vs-ink); }
.vs-stat-filter-menu{ position:absolute; top:30px; right:0; background:var(--vs-card); border:1px solid var(--vs-border); border-radius:8px; box-shadow:0 14px 30px -10px rgba(0,0,0,.25); z-index:40; width:200px; padding:6px; display:none; max-height:320px; overflow-y:auto; }
.vs-stat-filter-menu.open{ display:block; }
.vs-stat-filter-opt{ padding:7px 10px; font-size:12.5px; border-radius:5px; cursor:pointer; color:var(--vs-text); }
.vs-stat-filter-opt:hover, .vs-stat-filter-opt.active{ background:var(--vs-paper); color:var(--vs-brass); font-weight:600; }
.vs-stat-filter-custom{ padding:8px 10px; border-top:1px solid var(--vs-border); margin-top:4px; }
.vs-stat-filter-custom input{ width:100%; margin-bottom:6px; padding:5px 7px; font-size:12px; border-radius:4px; border:1px solid var(--vs-border-strong); }
.vs-stat-filter-custom button{ width:100%; padding:6px; font-size:12px; font-weight:600; border-radius:4px; border:none; background:var(--vs-ink); color:#fff; cursor:pointer; }
.vs-stat-filter-active-label{ font-size:10.5px; color:var(--vs-brass); font-weight:600; margin-top:2px; }

/* ---------- Panels / lists ---------- */
.vs-row-2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:20px; }
.vs-panel{ background:var(--vs-card); border:1px solid var(--vs-border); border-radius:10px; overflow-x:auto; margin-bottom:20px; }
.vs-panel-head{ padding:14px 16px; border-bottom:1px solid var(--vs-border); font-family:var(--serif); color:var(--vs-ink); font-size:15.5px; font-weight:600; display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.vs-panel-head a{ font-size:12px; color:var(--vs-blue); font-weight:600; text-decoration:none; font-family:var(--sans); }
.vs-list{ padding:6px 4px; }
.vs-list-empty{ padding:20px 16px; color:var(--vs-muted); font-size:13px; }
.vs-list-item{ display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--vs-border); font-size:13px; }
.vs-list-item:last-child{ border-bottom:none; }
.vs-list-item-main{ font-weight:600; color:var(--vs-ink); }
.vs-list-item-sub{ color:var(--vs-muted); font-size:11.5px; }

/* ---------- Top selling items ---------- */
.vs-items-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:14px; padding:16px; }
.vs-item-card{ text-align:center; }
.vs-item-thumb{ width:100%; aspect-ratio:1; border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center; font-family:var(--serif); font-size:22px; font-weight:700; color:#fff; margin-bottom:8px; }
.vs-item-thumb img{ width:100%; height:100%; object-fit:cover; }
.vs-item-name{ font-size:12.5px; font-weight:600; color:var(--vs-ink); }
.vs-item-qty{ font-size:11.5px; color:var(--vs-muted); }

/* ---------- Search + toolbar ---------- */
.vs-search{ position:relative; }
.vs-search input{ padding:8px 12px 8px 32px; border-radius:20px; border:1px solid var(--vs-border-strong); background:var(--vs-card); font-size:12.5px; font-family:var(--sans); width:220px; }
.vs-search svg{ position:absolute; left:10px; top:50%; transform:translateY(-50%); width:14px; height:14px; color:var(--vs-muted); }

table.vs-table{ width:100%; border-collapse:collapse; }
table.vs-table th{ text-align:left; padding:10px 14px; font-size:12.5px; font-weight:600; color:#5B5647; border-bottom:1.5px solid var(--vs-border-strong); white-space:nowrap; }
table.vs-table td{ padding:13px 14px; font-size:13.5px; border-bottom:1px solid var(--vs-border); }
table.vs-table td.num, table.vs-table th.num, table.vs-table td.center, table.vs-table th.center{ text-align:center; }
table.vs-table tr:last-child td{ border-bottom:none; }
table.vs-table td.vs-avatar-cell{ width:44px; }
.vs-row-avatar{ width:34px; height:34px; border-radius:50%; object-fit:cover; background:var(--vs-border); display:block; }
.vs-row-avatar-fallback{ width:34px; height:34px; border-radius:50%; background:var(--vs-brass); color:var(--vs-ink); display:flex; align-items:center; justify-content:center; font-family:var(--serif); font-weight:700; font-size:12px; }

.vs-pill{ padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; display:inline-block; }
.vs-pill-Received, .vs-pill-Sourcing, .vs-pill-Cutting, .vs-pill-Stitching, .vs-pill-Printing, .vs-pill-Fusing, .vs-pill-Threading, .vs-pill-Packing{ background:#EFE6D3; color:#8A6420; }
.vs-pill-ReadyforDelivery{ background:#E1E8F5; color:#2E4E9A; }
.vs-pill-Delivered{ background:#E4EBE4; color:#3F5F44; }
.vs-pill-Overdue{ background:#F3E1D8; color:#8A3D22; }
.vs-pill-Paid{ background:#E4EBE4; color:#3F5F44; }
.vs-pill-Unpaid{ background:#F3E1D8; color:#8A3D22; }
.vs-pill-PartiallyPaid{ background:#EFE6D3; color:#8A6420; }

.vs-balance-cell{ font-size:11.5px; line-height:1.6; white-space:nowrap; }
.vs-balance-cell div span{ font-weight:600; color:var(--vs-text); }
.vs-balance-edit-btn{ font-size:10.5px; color:var(--vs-blue); font-weight:600; cursor:pointer; margin-top:2px; display:inline-block; }

.vs-deliver-btn{ font-size:11.5px; font-weight:700; padding:6px 10px; border-radius:6px; border:none; cursor:pointer; background:var(--vs-sage); color:#fff; white-space:nowrap; }
.vs-delivered-info{ font-size:11.5px; color:var(--vs-muted); line-height:1.4; }
.vs-delivered-info strong{ color:var(--vs-text); }

.vs-toolbar{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:18px; gap:12px; flex-wrap:wrap; }
.vs-toolbar-right{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.vs-filters{ display:flex; gap:6px; flex-wrap:wrap; }
.vs-filter{ font-size:12.5px; padding:6px 12px; border-radius:20px; border:1px solid var(--vs-border); background:var(--vs-card); color:#5B5647; cursor:pointer; white-space:nowrap; }
.vs-filter.active{ border-color:var(--vs-ink); background:var(--vs-ink); color:var(--vs-paper); }

.vs-btn-primary{ font-size:13px; font-weight:600; padding:9px 16px; background:var(--vs-brass); color:#fff; border:none; border-radius:6px; cursor:pointer; white-space:nowrap; }
.vs-btn-secondary{ font-size:13px; font-weight:600; padding:9px 18px; background:transparent; color:#5B5647; border:1px solid var(--vs-border-strong); border-radius:6px; cursor:pointer; }
.vs-btn-dark{ font-size:13px; font-weight:600; padding:9px 18px; background:var(--vs-ink); color:var(--vs-paper); border:none; border-radius:6px; cursor:pointer; }
.vs-btn-danger{ font-size:13px; font-weight:600; padding:9px 18px; background:#FBE3DC; color:#8A3D22; border:1px solid #EFC0AE; border-radius:6px; cursor:pointer; }
.vs-link{ color:var(--vs-brass); font-weight:600; cursor:pointer; }
.vs-row-actions{ display:flex; gap:10px; align-items:center; white-space:nowrap; }

/* ---------- Modal / form ---------- */
.vs-modal-overlay{ position:fixed; inset:0; background:rgba(30,42,74,.5); display:flex; align-items:center; justify-content:center; z-index:9999; padding:20px; }
.vs-modal{ background:var(--vs-paper); border-radius:10px; width:780px; max-width:100%; max-height:90vh; overflow-y:auto; }
.vs-modal.vs-modal-wide{ width:920px; }
.vs-modal-tabs{ display:flex; border-bottom:1px solid var(--vs-border); }
.vs-modal-tab{ flex:1; text-align:center; padding:14px 0; cursor:pointer; font-size:13.5px; font-weight:600; color:#9C9682; border-bottom:2px solid transparent; }
.vs-modal-tab.active{ color:var(--vs-ink); border-bottom-color:var(--vs-brass); }
.vs-modal-body{ padding:24px; }
.vs-modal-grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 18px; }
.vs-modal-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.vs-field{ margin-bottom:16px; min-width:0; position:relative; }
.vs-field-label{ font-size:12.5px; font-weight:600; color:#3D3A31; margin-bottom:6px; }
.vs-field-label .req{ color:var(--vs-rust); }
.vs-field input, .vs-field select, .vs-field textarea{
  width:100%; padding:9px 11px; border-radius:6px; border:1px solid var(--vs-border-strong);
  background:var(--vs-card); font-size:13.5px; font-family:var(--sans); color:var(--vs-text);
}
.vs-field textarea{ min-height:60px; resize:vertical; }
.vs-notice{ background:#F3E1D8; border:1px solid #E4C4B2; border-radius:6px; padding:10px 14px; font-size:12.5px; color:#8A3D22; line-height:1.6; }
.vs-modal-actions{ display:flex; justify-content:space-between; margin-top:22px; padding-top:18px; border-top:1px solid var(--vs-border); gap:10px; flex-wrap:wrap; }

.vs-photo-picker{ display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.vs-photo-preview{ width:60px; height:60px; border-radius:50%; object-fit:cover; background:var(--vs-border); flex-shrink:0; }
.vs-photo-preview-empty{ width:60px; height:60px; border-radius:50%; background:var(--vs-border); flex-shrink:0; }

/* ---------- Searchable client dropdown ---------- */
.vs-combo{ position:relative; }
.vs-combo-input{ width:100%; padding:9px 11px; border-radius:6px; border:1px solid var(--vs-border-strong); background:var(--vs-card); font-size:13.5px; }
.vs-combo-menu{ position:absolute; top:calc(100% + 4px); left:0; right:0; background:var(--vs-card); border:1px solid var(--vs-border); border-radius:6px; box-shadow:0 14px 30px -10px rgba(0,0,0,.3); z-index:60; max-height:220px; overflow-y:auto; }
.vs-combo-opt{ padding:8px 12px; font-size:13px; cursor:pointer; }
.vs-combo-opt:hover{ background:var(--vs-paper); }
.vs-combo-opt-add{ color:var(--vs-brass); font-weight:700; border-top:1px solid var(--vs-border); }
.vs-combo-empty{ padding:8px 12px; font-size:12.5px; color:var(--vs-muted); }

/* ---------- Client detail ---------- */
.vs-detail-totals{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.vs-detail-total{ flex:1; min-width:130px; background:var(--vs-paper); border:1px solid var(--vs-border); border-radius:8px; padding:12px 14px; }
.vs-detail-total-label{ font-size:11px; color:var(--vs-muted); }
.vs-detail-total-value{ font-family:var(--serif); font-size:18px; color:var(--vs-ink); font-weight:700; }

/* ---------- Inventory ---------- */
.vs-yn-toggle{ display:flex; gap:8px; }
.vs-yn-btn{ flex:1; padding:8px; border-radius:6px; border:1px solid var(--vs-border-strong); background:var(--vs-card); cursor:pointer; font-size:13px; font-weight:600; color:var(--vs-muted); }
.vs-yn-btn.active{ background:var(--vs-brass); color:#fff; border-color:var(--vs-brass); }

/* ---------- Upgrade page ---------- */
.vs-upgrade-section{ background:var(--vs-card); border:1px solid var(--vs-border); border-radius:10px; padding:20px; margin-bottom:16px; }
.vs-upgrade-section h3{ font-family:var(--serif); font-size:15px; color:var(--vs-ink); margin:0 0 14px; }
.vs-color-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; }
.vs-color-field{ display:flex; align-items:center; gap:10px; }
.vs-color-field input[type=color]{ width:40px; height:36px; border-radius:6px; border:1px solid var(--vs-border-strong); padding:2px; cursor:pointer; background:var(--vs-card); }
.vs-color-field-label{ font-size:12.5px; font-weight:600; color:var(--vs-text); }
.vs-cat-image-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.vs-cat-image-card{ text-align:center; }
.vs-cat-image-thumb{ width:100%; aspect-ratio:1; border-radius:8px; background:var(--vs-paper); border:1px dashed var(--vs-border-strong); display:flex; align-items:center; justify-content:center; overflow:hidden; margin-bottom:6px; cursor:pointer; }
.vs-cat-image-thumb img{ width:100%; height:100%; object-fit:cover; }
.vs-cat-image-name{ font-size:12px; font-weight:600; color:var(--vs-ink); }

/* ---------- Custom roles editor (Upgrade page) ---------- */
.vs-role-editor{ border:1px solid var(--vs-border); border-radius:8px; padding:16px; margin-bottom:12px; background:var(--vs-paper); }
.vs-role-editor-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; }
.vs-role-editor-title{ font-weight:700; font-size:14px; color:var(--vs-ink); }
.vs-role-editor-badge{ font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:20px; background:var(--vs-border); color:var(--vs-muted); }
.vs-cap-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:8px; margin-top:6px; }
.vs-cap-check{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--vs-text); cursor:pointer; }
.vs-cap-check input{ width:auto; margin:0; cursor:pointer; }

/* ---------- Overview / analytics ---------- */
.vs-charts-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.vs-chart-card{ background:var(--vs-card); border:1px solid var(--vs-border); border-radius:10px; padding:16px; }
.vs-chart-card h3{ font-family:var(--serif); font-size:14.5px; color:var(--vs-ink); margin:0 0 12px; }
.vs-chart-card canvas{ max-height:260px; }

@media (max-width: 900px){
  .vs-row-2, .vs-charts-row{ grid-template-columns:1fr; }
}

@media (max-width: 780px){
  .vs-mobile-header{ display:flex; }
  .vs-shell{ flex-direction:column; }
  .vs-sidebar{
    position:fixed; top:0; left:0; bottom:0; z-index:61; width:250px; transform:translateX(-100%);
    transition:transform .2s ease; box-shadow:8px 0 24px rgba(0,0,0,.25);
    height:100%; max-height:100%; align-self:auto;
  }
  .vs-sidebar.mobile-open{ transform:translateX(0); }
  .vs-sidebar.collapsed{ width:250px; }
  .vs-sidebar.collapsed .vs-sidebar-brand-text, .vs-sidebar.collapsed .vs-nav-item span, .vs-sidebar.collapsed .vs-sidebar-foot span{ display:block; }
  .vs-sidebar.collapsed .vs-nav-item{ justify-content:flex-start; }
  .vs-collapse-btn{ display:none; }
  .vs-sidebar-scrim.open{ display:block; }
  .vs-main{ padding:0 16px 20px; }
  .vs-topbar{ padding:12px 0; }
  .vs-modal-grid, .vs-modal-grid-2{ grid-template-columns:1fr; }
  .vs-stat-filter-menu{ right:auto; left:0; }
  .vs-search input{ width:150px; }
}
