/* ================================================================
   QPlate — Design System v2
   Clean, modern, data-dense. Tight vertical rhythm, soft surfaces,
   deliberate use of color and elevation.
   ================================================================ */

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

:root {
    /* Brand */
    --primary: #16a34a;
    --primary-dark: #0f7f38;
    --primary-soft: #dcfce7;
    --primary-ink: #052e16;

    /* Neutrals */
    --bg: #fafbfc;
    --bg-soft: #f1f5f9;
    --surface: #ffffff;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    /* Semantic */
    --accent: #f59e0b;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;

    /* Radii */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-full: 999px;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 2px 8px -2px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow:    0 8px 24px -8px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.04);
    --shadow-lg: 0 20px 40px -15px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.06);
    --shadow-primary: 0 10px 25px -8px rgba(22,163,74,.35);

    /* Type */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);
}

html { height: 100%; scroll-behavior: smooth; }
body {
    min-height: 100%;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--primary-dark); }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--primary-soft); color: var(--primary-ink); }

main { min-height: calc(100vh - 200px); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ================================================================
   NAVBAR
   ================================================================ */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 28px;
}
.nav-brand {
    font-weight: 700; font-size: 19px;
    color: var(--text);
    display: inline-flex; align-items: center; gap: 9px;
    letter-spacing: -0.01em;
}
.nav-brand .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text-muted); font-weight: 500; font-size: 14px;
    padding: 8px 12px; border-radius: var(--r-sm);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }

.nav-auth {
    display: flex; align-items: center; gap: 6px;
}
.nav-link-btn {
    color: var(--text); font-size: 14px; font-weight: 500;
    padding: 8px 14px; border-radius: var(--r-sm);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-link-btn:hover { background: var(--bg-soft); color: var(--primary); }

.nav-logout {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px; border-radius: var(--r-sm);
    font-weight: 500; font-size: 14px;
    cursor: pointer; font-family: inherit;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.nav-logout:hover { background: var(--bg-soft); border-color: var(--border-strong); color: var(--danger); }

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--r-sm);
    font-weight: 600; font-size: 14px;
    box-shadow: var(--shadow-primary);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
    border: 0;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(22,163,74,.45); color: #fff; }

@media (max-width: 720px) {
    .nav-links { display: none; }
    .nav-inner { height: 58px; }
}

/* ================================================================
   HERO / Landing
   ================================================================ */
.hero {
    padding: 92px 0 64px;
    text-align: center;
    background:
        radial-gradient(ellipse 800px 400px at 50% 0%, rgba(22,163,74,.08), transparent 60%),
        radial-gradient(ellipse 600px 300px at 80% 100%, rgba(245,158,11,.05), transparent 60%);
}
.hero h1 {
    font-size: clamp(34px, 5.5vw, 60px);
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--text);
}
.hero h1 .accent {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: clamp(16px, 1.6vw, 18px);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    padding: 14px 28px; border-radius: var(--r);
    font-weight: 600; font-size: 15px;
    box-shadow: var(--shadow-primary);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(22,163,74,.5); }

/* ================================================================
   FEATURES
   ================================================================ */
.features {
    padding: 72px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.feature {
    padding: 26px;
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.feature-icon {
    width: 48px; height: 48px; border-radius: var(--r);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    box-shadow: 0 6px 14px -4px rgba(22,163,74,.35);
}
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { color: var(--text-muted); font-size: 14.5px; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    background: #fff;
    border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--primary); }

/* ================================================================
   PAGE HEADER + CONTENT
   ================================================================ */
.page-head { padding: 56px 0 28px; text-align: center; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.page-head .breadcrumb { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-xs);
}
.content h2 { font-size: 22px; margin: 28px 0 12px; font-weight: 700; letter-spacing: -0.01em; }
.content h2:first-child { margin-top: 0; }
.content p { margin-bottom: 14px; color: #334155; }
.content ul { padding-left: 22px; margin-bottom: 14px; }
.content ul li { margin-bottom: 4px; }

/* ================================================================
   QR DETAIL (public profile)
   ================================================================ */
.qr-wrap { max-width: 640px; margin: 28px auto; padding: 0 20px 60px; }

.qr-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 8px 18px;
    border-radius: var(--r-full);
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px;
    box-shadow: var(--shadow-primary);
}

.qr-card {
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid rgba(15,23,42,0.04);
}

.qr-cover {
    background:
        linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.15), transparent 50%);
    height: 110px;
    position: relative;
}
.qr-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 50%);
}

.qr-header { padding: 0 24px 24px; text-align: center; margin-top: -56px; position: relative; }
.qr-avatar {
    width: 112px; height: 112px; border-radius: 50%;
    border: 5px solid #fff;
    background: var(--bg-soft);
    margin: 0 auto 14px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; color: var(--text-subtle);
    box-shadow: var(--shadow-sm);
}
.qr-avatar img { width: 100%; height: 100%; object-fit: cover; }

.qr-name { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.qr-username { color: var(--text-muted); font-size: 14px; margin-top: 2px; font-family: var(--font-mono); }
.qr-username span { color: var(--text); font-family: var(--font-sans); font-weight: 500; }
.qr-club {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 14px;
    border-radius: var(--r-full);
    font-size: 12px; font-weight: 600;
    margin-top: 12px;
    box-shadow: 0 6px 14px -4px rgba(217,119,6,.4);
}

.qr-section { padding: 20px 24px; border-top: 1px solid var(--border); }
.qr-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
}
.qr-section-title .icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}

.qr-text { color: #334155; font-size: 15px; }
.qr-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.qr-row:last-child { border-bottom: 0; }
.qr-row-label { color: var(--text-muted); }
.qr-row-value { color: var(--text); font-weight: 500; }

.qr-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-tag {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--r-full);
    font-size: 13px;
    color: var(--text);
}
.qr-tag.allergy { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.qr-tag.medication { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.qr-contact {
    background: var(--bg-soft);
    padding: 14px 16px;
    border-radius: var(--r);
    margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border);
}
.qr-contact-name { font-weight: 600; font-size: 14px; }
.qr-contact-rel { color: var(--text-muted); font-size: 12px; }
.qr-contact-phone {
    background: var(--primary); color: #fff !important;
    padding: 7px 14px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 10px -3px rgba(22,163,74,.4);
}
.qr-contact-phone:hover { background: var(--primary-dark); }

.qr-blood {
    display: inline-block;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: var(--danger);
    font-weight: 800;
    padding: 10px 18px;
    border-radius: var(--r);
    font-size: 20px;
    letter-spacing: 0.02em;
    border: 1px solid #fecaca;
}

.qr-vehicle-status-sale {
    background: #fef3c7; color: #92400e;
    padding: 4px 11px; border-radius: var(--r-full);
    font-size: 12px; font-weight: 600;
    border: 1px solid #fde68a;
}

.qr-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.qr-gallery img {
    aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm);
    transition: transform .2s var(--ease);
}
.qr-gallery img:hover { transform: scale(1.03); }

.qr-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.qr-social {
    width: 44px; height: 44px; border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.qr-social:hover { transform: translateY(-3px); }
.qr-social-instagram:hover { color: #fff; background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); border-color: transparent; }
.qr-social-facebook:hover  { color: #fff; background: #1877f2; border-color: #1877f2; }
.qr-social-youtube:hover   { color: #fff; background: #ff0000; border-color: #ff0000; }
.qr-social-tiktok:hover    { color: #fff; background: #000; border-color: #000; }

.qr-actions {
    padding: 20px 24px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.qr-btn {
    background: #fff; border: 1px solid var(--border); color: var(--text);
    padding: 11px; border-radius: var(--r);
    text-align: center; font-weight: 600; font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.qr-btn:hover { border-color: var(--primary); transform: translateY(-1px); color: var(--text); }
.qr-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}
.qr-btn.primary:hover { box-shadow: 0 14px 28px -8px rgba(22,163,74,.5); }

.qr-empty-state { padding: 80px 40px; text-align: center; color: var(--text-muted); }
.qr-empty-state .emoji { font-size: 48px; margin-bottom: 12px; }

/* ================================================================
   AUTH (Login / Register)
   ================================================================ */
.auth-wrap {
    min-height: calc(100vh - 140px);
    display: flex; align-items: center; justify-content: center;
    padding: 60px 20px;
    background:
        radial-gradient(ellipse 600px 400px at 50% 0%, rgba(22,163,74,.06), transparent 60%);
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 44px;
    position: relative;
}
.auth-card::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}
.auth-card h1 {
    font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: 6px; text-align: center;
}
.auth-card .auth-sub {
    color: var(--text-muted); text-align: center; margin-bottom: 32px;
    font-size: 14.5px;
}
.auth-card.wide { max-width: 640px; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text); margin-bottom: 6px;
    letter-spacing: -0.005em;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: 14.5px;
    background: #fff;
    color: var(--text);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    font-family: inherit;
    appearance: none;
}
.form-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--border-strong); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-subtle); }

.form-error {
    color: var(--danger); font-size: 13px; margin-top: 5px;
    display: flex; align-items: center; gap: 4px;
}
.form-help { color: var(--text-muted); font-size: 12.5px; margin-top: 5px; }

.form-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13.5px; color: var(--text);
    margin-bottom: 14px; cursor: pointer;
    user-select: none;
}
.form-check input[type=checkbox] {
    margin-top: 2px; width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: 0; border-radius: var(--r);
    padding: 12px 22px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: transform .12s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease);
    font-family: inherit;
    letter-spacing: -0.005em;
    box-shadow: var(--shadow-primary);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(22,163,74,.45); }
.btn:active { transform: translateY(0); }
.btn.btn-secondary {
    background: #fff; color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn.btn-secondary:hover { background: var(--bg-soft); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.btn.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 25px -8px rgba(239,68,68,.4);
}
.btn.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; border-radius: var(--r-sm); box-shadow: none; }
.btn.btn-sm:hover { box-shadow: var(--shadow-xs); }

.auth-footer { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { font-weight: 600; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
    padding: 13px 16px; border-radius: var(--r); margin-bottom: 20px;
    font-size: 14px; line-height: 1.5;
    display: flex; gap: 10px; align-items: flex-start;
    border: 1px solid transparent;
}
.alert::before { font-size: 16px; line-height: 1; flex-shrink: 0; margin-top: 1px }
.alert-success { background: var(--primary-soft); color: var(--primary-ink); border-color: #a7f3d0; }
.alert-success::before { content: '✓'; }
.alert-error   { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-error::before { content: '⚠'; }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.alert-info::before { content: 'ℹ'; }

/* ================================================================
   ADMIN LAYOUT
   ================================================================ */
.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background: var(--bg-soft);
}

.admin-sidebar {
    background: #0b1220;
    color: #cbd5e1;
    padding: 26px 0;
    position: sticky; top: 0; align-self: start;
    height: 100vh; overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.04);
}
.admin-brand {
    padding: 4px 22px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
    display: flex; align-items: center;
    color: #fff;
}
.admin-nav { list-style: none; padding: 0; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 22px;
    color: #94a3b8;
    font-size: 13.5px; font-weight: 500;
    border-left: 3px solid transparent;
    margin: 1px 0;
    transition: all .15s var(--ease);
}
.admin-nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.admin-nav a.active {
    background: linear-gradient(90deg, rgba(22,163,74,.15), transparent);
    color: #fff;
    border-left-color: var(--primary);
}
.admin-nav .sep {
    padding: 18px 22px 7px;
    font-size: 10.5px; text-transform: uppercase;
    letter-spacing: 0.12em; color: #475569;
    font-weight: 600;
}

.admin-main { padding: 26px 32px 60px; min-width: 0; }
.admin-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 26px;
}
.admin-header h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.admin-user {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--text-muted);
}
.admin-user form { display: inline; }
.admin-user button {
    background: transparent; border: 1px solid var(--border);
    padding: 7px 14px; border-radius: var(--r-sm);
    font-size: 13px; color: var(--text); cursor: pointer;
    font-family: inherit;
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.admin-user button:hover { background: #fff; border-color: var(--border-strong); }

/* ================================================================
   STATS / PANELS / TABLES
   ================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 24px;
}
.stat {
    background: var(--surface);
    padding: 20px 22px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-label {
    font-size: 11.5px; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted);
    margin-bottom: 8px; font-weight: 600;
}
.stat-value {
    font-size: 30px; font-weight: 700; color: var(--text);
    letter-spacing: -0.025em; line-height: 1.1;
}
.stat-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.panel {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.panel-header {
    padding: 16px 22px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg);
    gap: 12px; flex-wrap: wrap;
}
.panel-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.panel-body { padding: 0; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 13px 22px; text-align: left; font-size: 14px; }
.table th {
    background: var(--bg); color: var(--text-muted);
    text-transform: uppercase; font-size: 11px;
    letter-spacing: 0.06em; font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s var(--ease); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg); }
.table .mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: var(--r-full);
    font-size: 11.5px; font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}
.badge-green { background: var(--primary-soft); color: var(--primary-ink); border-color: #a7f3d0; }
.badge-orange { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.badge-red { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.badge-gray { background: var(--bg-soft); color: #475569; border-color: var(--border); }
.badge-blue { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input[type=text], .filters select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 13px;
    background: #fff;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s var(--ease);
}
.filters input[type=text] { min-width: 220px; }
.filters input[type=text]:focus, .filters select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.pagination-wrap { padding: 14px 22px; border-top: 1px solid var(--border); }

/* Laravel paginator */
.pagination-wrap nav > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagination-wrap svg { width: 18px; height: 18px; }
.pagination-wrap a, .pagination-wrap span[aria-current], .pagination-wrap span {
    min-width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 13px; font-weight: 500;
    color: var(--text);
    background: #fff;
    margin: 0 1px;
}
.pagination-wrap a:hover { background: var(--bg-soft); color: var(--primary); border-color: var(--primary); }
.pagination-wrap span[aria-current] { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 20px 18px 40px; }
}

/* ================================================================
   ERROR PAGE (legacy compat)
   ================================================================ */
.error-wrap {
    min-height: 70vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px; text-align: center;
}
.error-code {
    font-size: 96px; font-weight: 800;
    color: var(--primary); line-height: 1;
    margin-bottom: 12px;
}

/* ================================================================
   UTILITIES
   ================================================================ */
.text-muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
code {
    font-family: var(--font-mono);
    background: var(--bg-soft);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: .9em;
    border: 1px solid var(--border);
}
