/* =========================================================
   PHARMA WORLD — Design System
   Dark premium theme with glassmorphism accents
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg-primary:      #0d1117;
  --bg-secondary:    #161b22;
  --bg-card:         #1c2333;
  --bg-hover:        #21262d;
  --bg-sidebar:      #111827;

  --accent-primary:  #3b82f6;
  --accent-hover:    #2563eb;
  --accent-green:    #10b981;
  --accent-amber:    #f59e0b;
  --accent-red:      #ef4444;
  --accent-purple:   #8b5cf6;
  --accent-cyan:     #06b6d4;

  --text-primary:    #e6edf3;
  --text-secondary:  #8b949e;
  --text-muted:      #484f58;

  --border:          #30363d;
  --border-light:    #21262d;

  --gradient-blue:   linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --gradient-green:  linear-gradient(135deg, #065f46 0%, #10b981 100%);
  --gradient-amber:  linear-gradient(135deg, #92400e 0%, #f59e0b 100%);
  --gradient-red:    linear-gradient(135deg, #7f1d1d 0%, #ef4444 100%);
  --gradient-purple: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%);
  --gradient-header: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #3b82f6 100%);

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6);

  --sidebar-w: 260px;
  --topbar-h:  64px;

  --transition: all .2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--gradient-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-brand .brand-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.sidebar-brand .brand-tag {
  font-size: .65rem;
  color: var(--accent-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
  padding: 12px 20px 6px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin: 1px 8px;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, .15);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent-primary);
  border-radius: 99px;
}

.nav-item .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.nav-badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info { min-width: 0; }
.sidebar-user .user-name {
  font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-content { padding: 24px; flex: 1; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stat Cards ────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.blue::before   { background: var(--gradient-blue); }
.stat-card.green::before  { background: var(--gradient-green); }
.stat-card.amber::before  { background: var(--gradient-amber); }
.stat-card.red::before    { background: var(--gradient-red); }
.stat-card.purple::before { background: var(--gradient-purple); }
.stat-card.cyan::before   { background: linear-gradient(135deg, #0c4a6e 0%, #06b6d4 100%); }

.stat-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(59,130,246,.15); color: var(--accent-primary); }
.stat-icon.green  { background: rgba(16,185,129,.15); color: var(--accent-green); }
.stat-icon.amber  { background: rgba(245,158,11,.15); color: var(--accent-amber); }
.stat-icon.red    { background: rgba(239,68,68,.15);  color: var(--accent-red); }
.stat-icon.purple { background: rgba(139,92,246,.15); color: var(--accent-purple); }
.stat-icon.cyan   { background: rgba(6,182,212,.15);  color: var(--accent-cyan); }

.stat-body { flex: 1; }
.stat-label { font-size: .75rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-sub   { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

tfoot td {
  padding: 11px 14px;
  border-top: 2px solid var(--border);
  font-weight: 700;
  background: var(--bg-secondary);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
}

.badge-green  { background: rgba(16,185,129,.15); color: var(--accent-green); border: 1px solid rgba(16,185,129,.3); }
.badge-red    { background: rgba(239,68,68,.15);  color: var(--accent-red);   border: 1px solid rgba(239,68,68,.3); }
.badge-amber  { background: rgba(245,158,11,.15); color: var(--accent-amber); border: 1px solid rgba(245,158,11,.3); }
.badge-blue   { background: rgba(59,130,246,.15); color: var(--accent-primary); border: 1px solid rgba(59,130,246,.3); }
.badge-purple { background: rgba(139,92,246,.15); color: var(--accent-purple); border: 1px solid rgba(139,92,246,.3); }
.badge-gray   { background: rgba(138,150,168,.08); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary  { background: var(--accent-primary); color: #fff; }
.btn-primary:hover  { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }

.btn-success  { background: var(--accent-green); color: #fff; }
.btn-success:hover  { background: #059669; color: #fff; }

.btn-warning  { background: var(--accent-amber); color: #000; }
.btn-warning:hover  { background: #d97706; color: #000; }

.btn-danger   { background: var(--accent-red); color: #fff; }
.btn-danger:hover   { background: #dc2626; color: #fff; }

.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }

.btn-sm { padding: 5px 12px; font-size: .77rem; }
.btn-lg { padding: 12px 28px; font-size: .95rem; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

.btn-outline-primary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}
.btn-outline-primary:hover { background: var(--accent-primary); color: #fff; }

/* ── Forms ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.col-span-2 { grid-column: span 2; }
.form-group.col-span-3 { grid-column: span 3; }
.form-group.col-span-full { grid-column: 1 / -1; }

label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.req { color: var(--accent-red); }

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=tel],
input[type=search],
textarea,
select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .875rem;
  padding: 9px 13px;
  width: 100%;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

textarea { resize: vertical; min-height: 90px; }

.input-group { position: relative; }
.input-group-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; pointer-events: none; }
.input-group input { padding-left: 36px; }

.form-help { font-size: .72rem; color: var(--text-muted); }

/* ── Alerts / Flash ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: var(--accent-green); }
.alert-danger  { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3); color: var(--accent-red); }
.alert-warning { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: var(--accent-amber); }
.alert-info    { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.3); color: var(--accent-primary); }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left h1 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.page-header-left .subtitle {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.page-header-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-primary); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

/* ── Date filter bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filter-bar .preset-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.filter-bar .preset-btn:hover,
.filter-bar .preset-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.filter-bar form label {
  font-size: .72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.filter-bar .search-input-wrap {
  margin-right: 4px;
}

/* ── Chart containers ────────────────────────────────────── */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { max-height: 280px; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title { font-size: 1rem; font-weight: 700; }

/* ── Autocomplete dropdown ───────────────────────────────── */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow);
  display: none;
}

.autocomplete-list.open { display: block; }
.autocomplete-item {
  padding: 9px 14px;
  font-size: .83rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.autocomplete-item:hover { background: var(--bg-hover); color: var(--accent-primary); }
.autocomplete-item .ac-sub { font-size: .7rem; color: var(--text-muted); }

/* ── Bill line items table ───────────────────────────────── */
.line-items-table { width: 100%; border-collapse: collapse; }
.line-items-table th, .line-items-table td { padding: 8px 10px; }
.line-items-table input { background: var(--bg-secondary); }

/* ── Expiry urgency indicators ───────────────────────────── */
.urgency-critical { color: var(--accent-red); }
.urgency-high     { color: var(--accent-amber); }
.urgency-medium   { color: #eab308; }
.urgency-low      { color: var(--accent-green); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state .empty-title { font-size: 1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }

/* ── Search / filter row ─────────────────────────────────── */
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.search-input-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input-wrap input { padding-left: 36px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.page-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}
.page-link:hover, .page-link.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }

/* ── Login page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.06) 0%, transparent 60%);
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .logo-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: var(--gradient-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(59,130,246,.3);
}

.login-logo h1 { font-size: 1.5rem; font-weight: 800; }
.login-logo p  { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ── Receipt / Print ─────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .topbar-actions, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  body { background: #fff; color: #000; }
  .card { border: none; box-shadow: none; }

  .receipt-header { text-align: center; margin-bottom: 16px; }
  .receipt-header h1 { font-size: 18pt; }
  .receipt-table th, .receipt-table td { padding: 5px 8px; font-size: 10pt; }
  .receipt-totals { font-size: 10pt; }
}

/* ── Utilities ───────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: .8rem; }
.text-xs { font-size: .72rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
