/* ==========================================================================
   SA-Takealot Warehouse · Light Cursor-inspired Enterprise UI
   Design tokens first, components second. No gradients, no heavy shadows.
   ========================================================================== */

:root {
  /* Backgrounds */
  --bg-app: #f7f8fa;
  --bg-sidebar: #f9fafb;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --bg-hover: #f1f3f5;
  --bg-active: #e9edf3;

  /* Text */
  --text-primary: #17191d;
  --text-secondary: #606875;
  --text-muted: #8a919e;
  --text-disabled: #a8afb8;

  /* Borders */
  --border-default: #e5e7eb;
  --border-subtle: #eef0f2;
  --border-strong: #d4d9e1;

  /* Brand */
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;

  /* Status */
  --success: #15803d;
  --success-soft: #ecfdf3;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Layout */
  --sidebar-w: 216px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 56px;

  /* Legacy aliases (old templates reference these names) */
  --bg: var(--bg-app);
  --panel: var(--bg-surface);
  --panel-soft: #fbfbfd;
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --muted: var(--text-muted);
  --line: var(--border-default);
  --line-strong: var(--border-strong);
  --ok: var(--success);
  --ok-soft: var(--success-soft);
  --warn: var(--warning);
  --warn-soft: var(--warning-soft);
  --bad: var(--danger);
  --bad-soft: var(--danger-soft);
  --brand-ink: var(--brand-hover);

  /* Fonts */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 13.5px/1.55 var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04";
}

a { color: var(--brand); text-decoration: none; transition: color 120ms var(--ease); }
a:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 { margin: 0 0 8px; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }

/* ==========================================================================
   App shell
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 12px 10px;
  gap: 4px;
  transition: width 200ms var(--ease), flex-basis 200ms var(--ease);
  overflow: hidden;
  z-index: 30;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  gap: 6px;
}
.sidebar .brand {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collapse-btn {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.collapse-btn:hover { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border-default); }
.collapse-btn svg { width: 15px; height: 15px; }

.sidebar nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.sidebar nav a:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.sidebar nav a.active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 550;
}
.sidebar nav a .nav-icon { flex: 0 0 16px; width: 16px; height: 16px; color: var(--text-muted); }
.sidebar nav a.active .nav-icon { color: var(--brand); }
.sidebar nav a .nav-label { overflow: hidden; text-overflow: ellipsis; }

.sidebar .who {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 10px 6px 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar .who-row { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.sidebar .who-label { flex: 0 0 46px; color: var(--text-muted); font-size: 11px; }
.sidebar .who-value { color: var(--text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.sidebar form { margin: 4px 0 0; }
button.link {
  background: none; border: 0; color: var(--text-muted); cursor: pointer;
  padding: 2px 0; font: inherit; font-size: 12px;
}
button.link:hover { color: var(--danger); }

/* Collapsed sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); padding: 12px 8px; }
body.sidebar-collapsed .sidebar .brand,
body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .sidebar .who { display: none; }
body.sidebar-collapsed .sidebar-head { justify-content: center; padding: 4px 0 10px; }
body.sidebar-collapsed .sidebar nav a { justify-content: center; padding: 0; }
body.sidebar-collapsed .collapse-btn svg { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar nav a .nav-icon { flex-basis: 18px; width: 18px; height: 18px; }

main {
  flex: 1;
  min-width: 0;
  padding: 0 24px 56px;
  max-width: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  margin: 0 -24px 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

.wallet {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.wallet strong { color: var(--text-primary); font-weight: 600; font-size: 13px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.user-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
button:hover, .btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; text-decoration: none; }
button:active, .btn:active { transform: translateY(0.5px); }
button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-soft);
  outline-offset: 1px;
}
button:disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; }

button.ghost, .btn.ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
button.ghost:hover, .btn.ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }

button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }

button.danger, .btn.danger { background: var(--bg-surface); color: var(--danger); border-color: var(--border-strong); }
button.danger:hover, .btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

button.small, .btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--r-sm); }

/* ==========================================================================
   Cards / sections
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card > h2:first-child { margin-top: 0; }
.card > *:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.stat .n {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat .l { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
tbody tr { transition: background 100ms var(--ease); }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .mono, th .mono { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: var(--r-xs);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  white-space: nowrap;
}
.badge.ok { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.badge.warn { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
}
.alert.success { background: var(--success-soft); border-color: #bbf7d0; color: #14532d; }
.alert.error { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.alert.warning { background: var(--warning-soft); border-color: #fde68a; color: #78350f; }
.alert.info { background: var(--info-soft); border-color: #bfdbfe; color: #1e3a8a; }

/* ==========================================================================
   Forms
   ========================================================================== */
form .field { margin-bottom: 14px; }
form label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=month], input[type=file], select, textarea {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 13px;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
  appearance: none;
}
textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%238A919E' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
input:hover, select:hover, textarea:hover { border-color: #b8c0cc; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; }
.help { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.inline { display: inline; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0; }
.pre {
  white-space: pre-wrap; word-break: break-word; background: var(--bg-subtle);
  border: 1px solid var(--border-default); border-radius: var(--r-md); padding: 12px;
  font-family: var(--font-mono); font-size: 12.5px;
}
hr { border: 0; border-top: 1px solid var(--border-default); margin: 18px 0; }

/* Pagination */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 14px 0; font-size: 12.5px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px;
  border: 1px solid var(--border-default); border-radius: var(--r-sm);
  color: var(--text-secondary); background: var(--bg-surface);
}
.pager a:hover { background: var(--bg-hover); text-decoration: none; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
main.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  max-width: none;
  background: var(--bg-app);
}
.auth .card {
  width: 100%;
  max-width: 384px;
  padding: 28px 28px 24px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.auth h1, .auth h2 { text-align: center; font-size: 20px; }
.auth .card form button[type=submit] { width: 100%; height: 38px; }

/* ==========================================================================
   Thumb (product image hover zoom — existing business need)
   ========================================================================== */
.thumb { position: relative; display: inline-block; width: 40px; height: 40px; vertical-align: middle; }
.thumb > img {
  width: 40px; height: 40px; object-fit: cover; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--border-default);
}
.thumb:hover { z-index: 50; }
.thumb:hover > img {
  position: absolute; left: -6px; top: -6px;
  width: 280px; height: 280px; max-width: none; object-fit: contain;
  border-radius: var(--r-md); background: #fff;
  box-shadow: var(--shadow-md); padding: 6px; border: 1px solid var(--border-default);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  main { padding: 0 16px 48px; }
  .topbar { margin: 0 -16px 16px; padding: 0 16px; }
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    border-right: 0; border-bottom: 1px solid var(--border-default);
    padding: 10px 12px;
  }
  .sidebar-head { padding: 0 2px 8px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidebar nav a { height: 32px; padding: 0 10px; }
  .sidebar .who { display: none; }
  main { padding: 0 12px 40px; }
  .topbar { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ==========================================================================
   Workspace strip (overview) + auth brand + inline toolbar
   ========================================================================== */
.ws-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
}
.ws-strip-main { display: flex; align-items: baseline; gap: 10px; }
.ws-label { font-size: 12px; color: var(--text-muted); }
.ws-code {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.ws-strip-hint { font-size: 12px; color: var(--text-muted); }

select.w-auto, input.w-auto { width: auto; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-logo {
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.auth-name { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.auth-sub { font-size: 11.5px; color: var(--text-muted); }

/* ==========================================================================
   Login — Light Cursor-inspired split layout
   ========================================================================== */
.auth.auth-wide {
  display: block;
  min-height: 100vh;
  padding: 0;
  max-width: none;
  background: var(--bg-app);
}

.login-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ---- left: brand ---- */
.login-brand {
  position: relative;
  flex: 0 0 55%;
  max-width: 55%;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #f3f6fa;
  border-right: 1px solid var(--border-default);
}
.login-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.login-brand-inner {
  position: relative;
  z-index: 1;
  padding: 64px;
  max-width: 540px;
}
.login-brand-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 44px; }
.login-brand-logo {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.login-brand-name {
  font-size: 14.5px; font-weight: 600; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.login-brand-title {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1e293b;
  margin: 0 0 14px;
}
.login-brand-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 26px;
  max-width: 420px;
}
.login-brand-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.login-brand-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.login-brand-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .55;
}

/* ---- right: panel ---- */
.login-panel-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg-app);
}
.login-mobile-brand { display: none; }
.login-panel {
  width: 100%;
  max-width: 404px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 32px 30px 26px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}
.login-panel-head h2 {
  text-align: left;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.login-panel-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 22px;
}
.login-panel .field { margin-bottom: 16px; }
.login-panel .field label { font-size: 12.5px; color: var(--text-secondary); }
.login-panel input[type=text],
.login-panel input[type=password] { height: 40px; font-size: 13.5px; }
.login-panel .alert { margin-bottom: 16px; }

.login-submit {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  font-size: 13.5px;
  position: relative;
  gap: 8px;
}
.login-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
}
.btn.is-loading .login-spinner { display: inline-block; }
.btn.is-loading { opacity: 0.9; cursor: progress; }

@keyframes login-spin { to { transform: rotate(360deg); } }

.login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 12.5px;
}
.login-forgot { color: var(--text-muted); }
.login-forgot:hover { color: var(--brand); }

.login-demo {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: #fafbfd;
}
.login-demo-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.login-demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.login-demo .help { margin-top: 8px; font-size: 11.5px; }

.login-copyright {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .login-brand { flex-basis: 48%; max-width: 48%; }
  .login-brand-inner { padding: 48px 40px; }
  .login-brand-title { font-size: 29px; }
}

@media (max-width: 860px) {
  .auth.auth-wide { display: block; }
  .login-shell { flex-direction: column; }
  .login-brand { display: none; }
  .login-panel-wrap {
    flex: 1;
    min-height: 100vh;
    padding: 32px 20px;
    justify-content: center;
  }
  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
  }
  .login-panel { padding: 26px 22px 22px; }
  .login-links { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .login-spinner { animation: none; border-top-color: #fff; }
}

/* ---- 图片悬停放大（不下载、不跳转） ---- */
.zoom-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: zoom-in;
  transform-origin: center center;
}
.zoom-hover:hover {
  transform: scale(2);
  position: relative;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  background: #fff;
}
.sku-thumb { overflow: visible; }
