/* ============================================================
   88 Trading Corp – Order Portal
   Bill.com-inspired design • Primary: #9a1b1d
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Raleway:wght@400;500;600;700&display=swap');

/* ── Design tokens ────────────────────────────────────── */
:root {
  /* Brand */
  --primary:        #9a1b1d;
  --primary-dark:   #7c1517;
  --primary-light:  #b92225;
  --primary-tint:   #fdf3f3;
  --primary-muted:  rgba(154, 27, 29, 0.08);

  /* Neutrals */
  --white:      #ffffff;
  --gray-50:    #f8f9fa;
  --gray-100:   #f1f3f5;
  --gray-150:   #eaecef;
  --gray-200:   #dee2e6;
  --gray-300:   #ced4da;
  --gray-400:   #adb5bd;
  --gray-500:   #868e96;
  --gray-600:   #495057;
  --gray-700:   #343a40;
  --gray-800:   #212529;
  --gray-900:   #121417;

  /* Semantic */
  --success:        #087f5b;
  --success-bg:     #ebfbee;
  --success-border: #8ce99a;
  --warning:        #e67700;
  --warning-bg:     #fff9db;
  --warning-border: #ffe066;
  --danger:         #c92a2a;
  --danger-bg:      #fff5f5;
  --danger-border:  #ffa8a8;
  --info:           #1971c2;
  --info-bg:        #e7f5ff;
  --info-border:    #74c0fc;

  /* Typography */
  --font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Raleway',    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shape */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);

  /* Layout */
  --sidebar-w:  252px;
  --topnav-h:   62px;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: .88em;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: .1rem .4rem;
  border-radius: 4px;
  color: var(--primary-dark);
}

/* ── Alerts ───────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert--success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.alert--success::before { content: "✓"; font-weight: 700; }
.alert--error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.alert--error::before { content: "!"; font-weight: 700; }
.alert--info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}

/* Temp password reveal box */
.temp-password-box { display: block; line-height: 1.9; }
.temp-password-box::before { content: none; }
.temp-pw {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: .08em;
  background: #fff;
  border: 2px solid var(--success);
  color: var(--success);
  padding: .2rem .7rem;
  border-radius: var(--radius-sm);
  user-select: all;
  cursor: text;
  vertical-align: middle;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.15rem;
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 27, 29, .25);
}

/* Primary */
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(154,27,29,.30);
}

/* Secondary */
.btn--secondary {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
}
.btn--secondary:hover {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

/* Ghost */
.btn--ghost {
  background: var(--white);
  border-color: var(--gray-200);
  color: var(--gray-700);
}
.btn--ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

/* Danger */
.btn--danger {
  color: var(--danger) !important;
  border-color: var(--danger-border) !important;
}
.btn--danger:hover {
  background: var(--danger-bg) !important;
  color: var(--danger) !important;
}

/* Sizes */
.btn--full { width: 100%; }
.btn--sm   { padding: .35rem .75rem; font-size: .8rem; }
.btn--lg   { padding: .75rem 1.75rem; font-size: 1rem; }

/* ── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .4rem;
}

.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group input[type=number],
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .925rem;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23868e96' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 27, 29, .12);
}

.form-group textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-group small { display: block; color: var(--gray-500); font-size: .8rem; margin-top: .3rem; }
.req { color: var(--danger); margin-left: .1rem; }

.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--gray-150); }

.checkbox-label,
.radio-label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-weight: 500;
  font-size: .9rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: .3rem 0;
}
.checkbox-label input,
.radio-label input { margin-top: .18rem; flex-shrink: 0; accent-color: var(--primary); }

/* ── Badges / Status pills ────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge--pending   { background: var(--warning-bg);  color: var(--warning); border: 1px solid var(--warning-border); }
.badge--pending::before   { background: var(--warning); }
.badge--processed { background: var(--info-bg);     color: var(--info);    border: 1px solid var(--info-border); }
.badge--processed::before { background: var(--info); }
.badge--completed { background: var(--success-bg);  color: var(--success); border: 1px solid var(--success-border); }
.badge--completed::before { background: var(--success); }

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--gray-150);
  background: var(--gray-50);
}
.card__header h3 {
  font-size: .975rem;
  font-family: var(--font-head);
  color: var(--gray-800);
  margin: 0;
}
.card__body { padding: 1.4rem; }

/* ── Tables ───────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-150);
}
.data-table thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-150);
}
.data-table th {
  padding: .7rem 1rem;
  text-align: left;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  white-space: nowrap;
}
.data-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  font-size: .9rem;
  color: var(--gray-700);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--primary-tint); }
.data-table strong { color: var(--gray-900); font-weight: 600; }

.row--inactive td { opacity: .5; }
.actions { white-space: nowrap; display: flex; gap: .4rem; align-items: center; }
.actions form { margin: 0; display: inline; }

/* ── Filter / Tab bar ─────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--gray-200);
}
.filter-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.1rem;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
}
.filter-tab:hover { color: var(--gray-800); text-decoration: none; }
.filter-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-count {
  background: var(--gray-150);
  color: var(--gray-600);
  border-radius: var(--radius-pill);
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
}
.filter-tab.active .tab-count {
  background: var(--primary-muted);
  color: var(--primary);
}

/* ── Page header ──────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h2 {
  font-size: 1.45rem;
  font-family: var(--font-head);
  color: var(--gray-900);
  font-weight: 700;
}
.page-header__sub {
  font-size: .85rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: .75rem;
}
.page-header__actions { display: flex; gap: .5rem; }

/* ── Empty state ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--gray-400);
  font-size: .95rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-150);
  box-shadow: var(--shadow-sm);
}
.empty-state a { color: var(--primary); font-weight: 600; }

/* ── Detail list ──────────────────────────────────────── */
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem 1rem;
  font-size: .9rem;
}
.detail-list dt {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-500);
  padding-top: .05rem;
}
.detail-list dd { color: var(--gray-800); font-weight: 500; }

/* ── Order notes / meta ───────────────────────────────── */
.order-notes {
  margin-top: 1.25rem;
  padding: .85rem 1rem;
  background: var(--gray-50);
  border-left: 3px solid var(--gray-200);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: var(--gray-600);
}
.order-notes strong { color: var(--gray-800); display: block; margin-bottom: .2rem; }
.order-meta { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; font-size: .9rem; color: var(--gray-600); }

/* ── Two-column layout ────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ── Template hint ────────────────────────────────────── */
.template-hint {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .875rem;
  line-height: 1.85;
  color: var(--info);
}

/* ── Divider ──────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--gray-150);
  margin: 1.5rem 0;
}

/* ============================================================
   LOGIN / INSTALL LAYOUT
   ============================================================ */
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
}

/* Left panel — brand */
.login-layout::before {
  content: '';
  display: block;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  min-height: 100vh;
}

/* Override for install page (single panel) */
.login-layout--single {
  grid-template-columns: 1fr;
  background: var(--gray-50);
}
.login-layout--single::before { display: none; }

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  min-height: 100vh;
}
.login-brand {
  color: rgba(255,255,255,.85);
  text-align: center;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}
.login-brand__name {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.login-brand__tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  max-width: 340px;
}
.login-brand__logo-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.75rem;
  border: 2px solid rgba(255,255,255,.25);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 420px;
}
.login-card__logo {
  margin-bottom: 1.75rem;
}
.login-card__logo h1 {
  font-size: 1.35rem;
  font-family: var(--font-head);
  color: var(--gray-900);
  margin-bottom: .3rem;
}
.login-card__logo p {
  color: var(--gray-500);
  font-size: .9rem;
}

@media (max-width: 700px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-layout::before { display: none; }
  .login-panel { padding: 2rem 1.25rem; background: var(--gray-50); }
  .login-card { box-shadow: none; border: 1px solid var(--gray-200); }
}

/* ============================================================
   CUSTOMER LAYOUT
   ============================================================ */
.customer-layout { background: var(--gray-50); }

/* Top nav */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topnav-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-150);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}
.top-nav__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.top-nav__brand span {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: .8rem;
  line-height: 28px;
  text-align: center;
  margin-right: .45rem;
  font-weight: 700;
}
.top-nav__links {
  display: flex;
  gap: .25rem;
  flex: 1;
}
.top-nav__links a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 600;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.top-nav__links a:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  text-decoration: none;
}
.top-nav__links a.active {
  background: var(--primary-muted);
  color: var(--primary);
}
.top-nav__user {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .85rem;
  color: var(--gray-600);
  white-space: nowrap;
}
.top-nav__user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-logout {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.btn-logout:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  text-decoration: none;
}

.page-content { max-width: 1160px; margin: 0 auto; padding: 2.25rem 2rem; }

/* ── Product order table ──────────────────────────────── */
.product-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.product-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-150);
}
.product-table thead tr {
  background: var(--primary);
}
.product-table th {
  padding: .85rem 1.1rem;
  text-align: left;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.85);
}
.product-table th.qty-col { text-align: right; }
.product-table td {
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.product-table tbody tr:last-child td { border-bottom: none; }
.product-table tbody tr:hover td { background: var(--primary-tint); }
.product-name { font-weight: 600; color: var(--gray-900); font-size: .92rem; }
.product-desc { color: var(--gray-500); font-size: .875rem; max-width: 320px; }
.product-unit { color: var(--gray-500); font-size: .85rem; white-space: nowrap; }
.qty-col      { width: 120px; text-align: right; }

.qty-input {
  width: 100px;
  padding: .45rem .65rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font-body);
  text-align: right;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}
.qty-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 27, 29, .12);
}
.qty-input:not(:placeholder-shown):not(:focus) { border-color: var(--primary-light); background: var(--primary-tint); }

.order-footer {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.order-footer textarea {
  width: 100%;
  resize: vertical;
  padding: .6rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.order-footer textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 27, 29, .12);
}
.order-footer .form-group { margin-bottom: 1rem; }
.order-footer label {
  display: block;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-500);
  margin-bottom: .4rem;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--gray-50);
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 2px 0 12px rgba(0,0,0,.12);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.4rem 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: .5rem;
}
.sidebar__brand-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.2);
}
.sidebar__brand-text span {
  display: block;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sidebar__brand-text small {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sidebar__nav { flex: 1; padding: .5rem .75rem; }

.sidebar__section-label {
  font-family: var(--font-head);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  padding: 1rem .5rem .4rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  color: rgba(255,255,255,.72);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: .15rem;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-link.active {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 rgba(255,255,255,.6);
}
.nav-icon { font-size: .95rem; width: 1.15rem; text-align: center; flex-shrink: 0; }

.sidebar__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .82rem;
}
.sidebar__footer .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar__footer-text { flex: 1; overflow: hidden; }
.sidebar__footer-text span { display: block; color: rgba(255,255,255,.9); font-weight: 600; font-family: var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__footer-text a {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
}
.sidebar__footer-text a:hover { color: #fff; text-decoration: none; }

/* ── Admin body ───────────────────────────────────────── */
.admin-body { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-main { padding: 2.25rem 2rem; max-width: 1280px; width: 100%; }

/* ── Stat cards (optional future use) ────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.stat-card__label { font-family: var(--font-head); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); margin-bottom: .4rem; }
.stat-card__value { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; color: var(--gray-900); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .admin-body { margin-left: 0; }
  .admin-main { padding: 1.25rem 1rem; }
  .page-content { padding: 1.25rem 1rem; }
  .top-nav { padding: 0 1rem; }
  .data-table th, .data-table td { padding: .6rem .75rem; }
}
