/* =====================================================
   Stampify — Design System
   Aesthetic: dark editorial × refined minimalism
   Type: Fraunces (display) + Inter (body) + JetBrains Mono (mono)
   ===================================================== */

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

:root {
    /* Brand */
    --brand-primary:  #10b981;
    --brand-primary-hover: #059669;
    --brand-dark:     #0a0a0a;
    --brand-darker:   #050505;

    /* Neutrals (dark theme default) */
    --bg-base:    #0a0a0a;
    --bg-elev-1:  #111111;
    --bg-elev-2:  #161616;
    --bg-elev-3:  #1c1c1c;
    --border:     #262626;
    --border-strong: #333333;

    --text-primary:   #ffffff;
    --text-secondary: #a3a3a3;
    --text-tertiary:  #6b6b6b;
    --text-muted:     #525252;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #3b82f6;
    --purple:  #8b5cf6;
    --pink:    #ec4899;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Inter', -apple-system, system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    /* Spacing scale */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
    --s-9: 48px; --s-10: 64px; --s-11: 80px; --s-12: 96px;

    /* Radius */
    --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,.5);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.6);
    --shadow-glow: 0 0 40px rgba(16,185,129,.15);

    /* Transitions */
    --t-fast: 120ms cubic-bezier(.4,0,.2,1);
    --t-med:  200ms cubic-bezier(.4,0,.2,1);
    --t-slow: 400ms cubic-bezier(.4,0,.2,1);
}

/* Light theme variant */
[data-theme="light"] {
    --bg-base:    #fafafa;
    --bg-elev-1:  #ffffff;
    --bg-elev-2:  #f5f5f5;
    --bg-elev-3:  #eeeeee;
    --border:     #e5e5e5;
    --border-strong: #d4d4d4;
    --text-primary:   #0a0a0a;
    --text-secondary: #525252;
    --text-tertiary:  #737373;
    --text-muted:     #a3a3a3;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* RTL support */
[dir="rtl"] {
    --font-body: 'Inter', 'Tajawal', sans-serif;
}

/* === Typography === */
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
.display-1 { font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.display-2 { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 500; line-height: 1.1;  letter-spacing: -0.025em; }
.display-3 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.h1 { font-size: 2rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.h4 { font-size: 1.0625rem; font-weight: 600; }
.body { font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }
.small { font-size: 0.8125rem; color: var(--text-tertiary); }
.tiny  { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--text-tertiary); }
.mono  { font-family: var(--font-mono); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text-tertiary); }

/* === Layout === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-5); }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 var(--s-5); }
.container-md { max-width: 960px; margin: 0 auto; padding: 0 var(--s-5); }

.row { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-tight { display: flex; flex-direction: column; gap: var(--s-2); }
.cluster { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.split { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.center { display: flex; align-items: center; justify-content: center; }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--s-2);
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    transition: all var(--t-med);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    min-height: 40px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }

.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 1px 2px rgba(16,185,129,.25);
}
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-primary:active { transform: translateY(0); }

.btn-dark {
    background: var(--bg-elev-3);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-dark:hover { background: var(--bg-elev-2); border-color: var(--border-strong); }

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elev-2); }

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

.btn-link {
    color: var(--brand-primary);
    padding: 4px 8px;
    background: transparent;
}
.btn-link:hover { text-decoration: underline; }

.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg { min-height: 48px; padding: 14px 24px; font-size: 0.9375rem; }
.btn-icon { min-width: 40px; padding: 0; }
.btn-icon.btn-sm { min-width: 32px; }
.btn-block { width: 100%; }

/* === Cards === */
.card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.card-body { padding: var(--s-6); }
.card-header {
    padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.card-footer {
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid var(--border);
}

/* === Forms === */
.form-group { margin-bottom: var(--s-5); }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
}
.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--t-fast);
    min-height: 40px;
}
.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-elev-3);
    box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--text-tertiary); margin-top: var(--s-1); }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: var(--s-1); }

/* === Badges === */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}
.badge-success { background: rgba(16,185,129,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,.15);  color: var(--danger); }
.badge-info    { background: rgba(59,130,246,.15); color: var(--info); }
.badge-purple  { background: rgba(139,92,246,.15); color: var(--purple); }
.badge-neutral { background: var(--bg-elev-3); color: var(--text-secondary); }

/* === Tables === */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table thead { background: var(--bg-elev-2); }
.table th {
    text-align: left;
    padding: var(--s-3) var(--s-4);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: var(--s-4);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr:hover { background: var(--bg-elev-2); }
.table tbody tr:last-child td { border-bottom: 0; }

/* === Flash messages === */
.flash {
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    margin-bottom: var(--s-4);
    font-size: 0.875rem;
    display: flex; align-items: center; gap: var(--s-2);
}
.flash-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: var(--success); }
.flash-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: var(--danger); }

/* === Stat cards === */
.stat-card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    position: relative;
    overflow: hidden;
}
.stat-card-icon {
    width: 40px; height: 40px;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--s-4);
}
.stat-card-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--s-1);
}
.stat-card-label { font-size: 0.8125rem; color: var(--text-tertiary); }
.stat-card-trend { font-size: 0.75rem; margin-top: var(--s-2); display: inline-flex; align-items: center; gap: 4px; }

/* === Icon tile === */
.icon-tile {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
}
.icon-tile.tone-success { background: rgba(16,185,129,.12); color: var(--success); }
.icon-tile.tone-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.icon-tile.tone-danger  { background: rgba(239,68,68,.12);  color: var(--danger); }
.icon-tile.tone-info    { background: rgba(59,130,246,.12); color: var(--info); }
.icon-tile.tone-purple  { background: rgba(139,92,246,.12); color: var(--purple); }
.icon-tile.tone-pink    { background: rgba(236,72,153,.12); color: var(--pink); }
.icon-tile.tone-neutral { background: var(--bg-elev-3); color: var(--text-secondary); }

/* === Sidebar layout === */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--bg-elev-1);
    border-right: 1px solid var(--border);
    padding: var(--s-5);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-7);
    padding: var(--s-2);
}
.sidebar-brand .dot {
    display: inline-block; width: 6px; height: 6px;
    background: var(--brand-primary); border-radius: 50%;
    margin-left: 2px; vertical-align: top; margin-top: 14px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-section { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: var(--s-3) var(--s-3) var(--s-2); margin-top: var(--s-3); }
.sidebar-link {
    display: flex; align-items: center; gap: var(--s-3);
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--t-fast);
    position: relative;
}
.sidebar-link:hover { background: var(--bg-elev-2); color: var(--text-primary); }
.sidebar-link.active { background: var(--bg-elev-3); color: var(--text-primary); }
.sidebar-link.active::before {
    content: ''; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; background: var(--brand-primary); border-radius: 0 2px 2px 0;
}
.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: var(--s-3) 0 0;
    margin-top: var(--s-4);
}

.main-area { padding: var(--s-7); min-width: 0; overflow-x: hidden; }
.main-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--s-7); flex-wrap: wrap; gap: var(--s-4); }
.main-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.main-subtitle { color: var(--text-tertiary); font-size: 0.9375rem; margin-top: var(--s-2); }

@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; flex-direction: row; overflow-x: auto; }
    .sidebar-nav { flex-direction: row; flex: 0 0 auto; }
    .sidebar-section, .sidebar-brand { display: none; }
    .sidebar-link { white-space: nowrap; }
    .main-area { padding: var(--s-5); }
}

/* === Utilities === */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }

/* === Empty state === */
.empty-state {
    text-align: center;
    padding: var(--s-10) var(--s-5);
}
.empty-state-icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--s-4);
    border-radius: var(--r-lg);
    background: var(--bg-elev-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary);
}
.empty-state-title { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--s-2); }
.empty-state-text { color: var(--text-tertiary); font-size: 0.875rem; margin-bottom: var(--s-5); max-width: 320px; margin-left: auto; margin-right: auto; }

/* === Modal === */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
    padding: var(--s-4);
    animation: fadeIn 200ms;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 250ms;
}
.modal-header { padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: var(--s-6); }
.modal-footer { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--s-2); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* === Login / Auth pages === */
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--s-5);
    background:
        radial-gradient(circle at 20% 30%, rgba(16,185,129,.06), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139,92,246,.05), transparent 50%),
        var(--bg-base);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--s-8);
    box-shadow: var(--shadow-lg);
}
.auth-brand {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: var(--s-2);
}
.auth-tagline {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: var(--s-7);
}

/* ============================================
   Admin panel & shared additions
   ============================================ */

/* Sidebar (short class names used by admin layout) */
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid var(--border-default); margin-bottom: 8px; }
.sb-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.sb-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.sb-link.is-active { background: rgba(16,185,129,.1); color: var(--brand-primary); }
.sb-link svg { flex-shrink: 0; opacity: .9; }
.sb-foot { padding: 14px 16px; border-top: 1px solid var(--border-default); margin-top: auto; }

.user-tile { display: flex; align-items: center; gap: 10px; }
.user-tile .avatar {
  width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-primary), #059669);
  color: #000; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.user-tile .meta { flex: 1; min-width: 0; }
.user-tile .nm { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-tile .rl { font-size: 11px; color: var(--text-tertiary); }

.brand-mark.sm { width: 32px; height: 32px; }
.brand-name.sm { font-size: 18px; }
.brand-sub.xs { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

/* Page heads */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 8px 0 24px; padding: 24px 32px 0; }
.page-title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 32px; letter-spacing: -0.02em; margin: 4px 0 6px; color: var(--text-primary); }
.page-sub { color: var(--text-tertiary); margin: 0; font-size: 14px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* KPI grid */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0 32px; }
.kpi-card { background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: 14px; padding: 18px; }
.kpi-num { font-family: var(--font-display); font-weight: 500; font-size: 30px; letter-spacing: -0.02em; color: var(--text-primary); margin-top: 12px; line-height: 1.1; }
.kpi-lab { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; font-weight: 500; }
.kpi-delta { font-size: 12px; margin-top: 6px; }
.kpi-delta.pos { color: var(--brand-primary); }
.kpi-delta.neg { color: #ef4444; }

/* Panels */
.panel { background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: 14px; padding: 20px; margin: 0 32px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3, .panel-title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 18px; margin: 0; color: var(--text-primary); }

/* Main area gets some breathing room */
.main-area > .page-head:first-child { margin-top: 0; }
.main-area > .kpi-grid, .main-area > .panel, .main-area > .grid-2, .main-area > .grid-3, .main-area > section { margin-left: 32px; margin-right: 32px; }
.main-area > section > .panel { margin-left: 0; margin-right: 0; }
.main-area > .grid-2 > .panel, .main-area > .grid-3 > .panel { margin: 0; }
.main-area .filter-bar { margin-left: 32px; margin-right: 32px; }

/* Activity list */
.activity-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 12px; padding: 10px; background: var(--bg-canvas); border-radius: 10px; }
.act-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(16,185,129,.1); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act-body { flex: 1; min-width: 0; }
.act-line { font-size: 13px; color: var(--text-secondary); }
.act-line strong { color: var(--text-primary); }

/* Key-value lists */
.kv { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-tertiary); font-size: 13px; }
.kv dd { margin: 0; color: var(--text-primary); }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0; }
.filter-bar .input { max-width: 320px; }

/* Form fields */
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.input {
  width: 100%; background: var(--bg-canvas); border: 1px solid var(--border-default);
  color: var(--text-primary); padding: 10px 12px; border-radius: 8px; font-size: 14px;
  font-family: inherit; transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--brand-primary); }
.input.sm { padding: 6px 10px; font-size: 13px; }
.input.mono { font-family: var(--font-mono); font-size: 12px; }

.check-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; cursor: pointer; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.col-span-2 { grid-column: span 2; }

/* Table extras */
.mono-table td { font-family: var(--font-mono); font-size: 12px; }
.muted { color: var(--text-tertiary); }
.xs { font-size: 12px; }
.link-strong { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.link-strong:hover { color: var(--brand-primary); }

/* Empty state inline in tables */
.table .empty { text-align: center; color: var(--text-tertiary); padding: 30px; font-style: italic; }

/* Pager */
.pager { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.pager .page {
  display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center;
  padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--text-secondary);
  border: 1px solid var(--border-default); font-size: 13px;
}
.pager .page:hover { background: var(--bg-hover); }
.pager .page.is-active { background: var(--brand-primary); color: #000; border-color: var(--brand-primary); font-weight: 600; }

/* Spacing utilities */
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }

/* Auth shell additions */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse at top, rgba(16,185,129,.08), transparent 60%), var(--bg-canvas); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: 18px; padding: 32px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 24px; margin: 0 0 20px; color: var(--text-primary); }
.auth-meta { text-align: center; margin: 16px 0 0; font-size: 13px; }
.auth-meta a { color: var(--text-tertiary); text-decoration: none; }
.auth-meta a:hover { color: var(--brand-primary); }

/* Make sure responsive admin layout collapses gracefully */
@media (max-width: 720px) {
  .main-area > .page-head, .main-area > .kpi-grid, .main-area > .panel, .main-area > .filter-bar { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }
  .page-head { padding: 16px; }
  .page-title { font-size: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
}
