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

:root {
    --bg: #180c1e;
    --bg-card: #221440;
    --bg-card-hover: #2c1a50;
    --bg-sidebar: #110918;
    --border: #2a1f48;
    --border-soft: rgba(42,31,72,0.6);
    --text: #ede4d0;
    --text-dim: #7a6a8a;
    --accent: #c8861a;
    --accent-light: #e8a93c;
    --accent-dim: rgba(200,134,26,0.15);
    --purple: #7c5cbf;
    --purple-light: #9b7fd4;
    --win: #4ade80;
    --loss: #f87171;
    --warn: #fbbf24;
    --info: #60a5fa;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 32px rgba(0,0,0,0.6);
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
    --glow-amber: 0 0 24px rgba(200,134,26,0.18), 0 0 48px rgba(200,134,26,0.08);
    --glow-purple: 0 0 24px rgba(124,92,191,0.2), 0 0 48px rgba(124,92,191,0.1);
    --font-display: 'Cinzel', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: rgba(200,134,26,0.25); color: var(--text); }

html { font-size: 15px; }
body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 40% at 50% -5%, rgba(230,165,55,0.1) 0%, transparent 50%),
        radial-gradient(ellipse 55% 60% at 100% 100%, rgba(170,85,220,0.12) 0%, transparent 50%),
        radial-gradient(ellipse 45% 50% at -5% 75%, rgba(180,90,230,0.1) 0%, transparent 50%),
        radial-gradient(rgba(175,90,215,0.045) 1px, transparent 1px);
    background-size: auto, auto, auto, 22px 22px;
    color: var(--text);
    display: flex;
    min-height: 100vh;
    line-height: 1.5;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    min-height: 100vh;
    background: var(--bg-sidebar);
    background-image:
        linear-gradient(180deg, rgba(175,90,215,0.14) 0%, transparent 30%),
        radial-gradient(rgba(175,90,215,0.04) 1px, transparent 1px);
    background-size: auto, 18px 18px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 1.8rem 1.2rem 1.4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,134,26,0.5), transparent);
}
.sidebar-header .logo {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    display: block;
    filter: drop-shadow(0 0 10px rgba(200,134,26,0.6)) drop-shadow(0 0 20px rgba(200,134,26,0.3));
    animation: logoGlow 3s ease-in-out infinite alternate;
}
@keyframes logoGlow {
    from { filter: drop-shadow(0 0 8px rgba(200,134,26,0.5)) drop-shadow(0 0 16px rgba(200,134,26,0.2)); }
    to   { filter: drop-shadow(0 0 14px rgba(200,134,26,0.8)) drop-shadow(0 0 28px rgba(200,134,26,0.35)); }
}
.sidebar-header h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, var(--accent-light) 0%, #f5c96a 50%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}
.sidebar-header .subtitle {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: block;
}

.nav-links { list-style: none; padding: 1rem 0; flex: 1; }
.nav-links li a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1.4rem;
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s;
    text-decoration: none;
    border-left: 3px solid transparent;
    position: relative;
}
.nav-links li a:hover {
    color: var(--text);
    background: rgba(200,134,26,0.07);
    border-left-color: rgba(200,134,26,0.35);
    text-decoration: none;
}
.nav-links li a.active {
    color: var(--accent-light);
    background: linear-gradient(90deg, rgba(200,134,26,0.12) 0%, rgba(200,134,26,0.04) 100%);
    border-left-color: var(--accent);
    font-weight: 600;
}
.nav-links li a.active::after {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 1px;
    background: rgba(200,134,26,0.3);
}
.nav-links li a .icon {
    font-size: 1rem;
    width: 1.4rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.2rem 1.4rem;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
}
.sidebar-footer::before {
    content: '';
    position: absolute;
    top: -1px; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124,92,191,0.4), transparent);
}
.sidebar-footer-dots {
    display: block;
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 0.4em;
    opacity: 0.7;
    margin-bottom: 0.3rem;
}
.sidebar-footer-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ─── Main Content ─────────────────────────────────────────── */
.content { margin-left: 220px; flex: 1; padding: 2.2rem 2.8rem; max-width: 1240px; }

.page-header { margin-bottom: 2rem; }
.page-header h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, var(--text) 40%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header p { color: var(--text-dim); font-size: 0.88rem; letter-spacing: 0.01em; }

/* ─── Stats Grid ───────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(200,134,26,0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,134,26,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-amber);
    border-color: rgba(200,134,26,0.3);
}
.stat-card:hover::before, .stat-card:hover::after { opacity: 1; }
.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.55rem;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; font-family: var(--font-display); letter-spacing: 0.04em; }
.stat-card .stat-value.win { color: var(--win); }
.stat-card .stat-value.loss { color: var(--loss); }
.stat-card .stat-value.accent { color: var(--accent-light); }

/* ─── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    background-image: radial-gradient(ellipse 100% 40% at 50% 0%, rgba(124,92,191,0.05) 0%, transparent 60%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,134,26,0.3), transparent);
}
.card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 1.1rem;
    color: var(--accent-light);
    text-transform: uppercase;
}

/* ─── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
thead th {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    background: rgba(200,134,26,0.04);
}
tbody td { padding: 0.62rem 0.9rem; border-bottom: 1px solid var(--border-soft); }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge.win { background: rgba(74,222,128,0.1); color: var(--win); border: 1px solid rgba(74,222,128,0.25); }
.badge.loss { background: rgba(248,113,113,0.1); color: var(--loss); border: 1px solid rgba(248,113,113,0.25); }

.text-right { text-align: right; }
.text-center { text-align: center; }
.dim { color: var(--text-dim); }
.positive { color: var(--win); }
.negative { color: var(--loss); }

/* ─── Match table ─────────────────────────────────────────── */
.match-row { cursor: pointer; }
.match-row:hover { background: var(--bg-card-hover); }
.expand-arrow { color: var(--text-dim); font-size: 0.7rem; transition: transform 0.15s; user-select: none; }
.sub-table { width: 100%; background: rgba(8,6,18,0.6); border-radius: 0; }
.sub-table thead th { font-size: 0.7rem; padding: 0.4rem 0.9rem; background: transparent; }
.sub-table tbody td { padding: 0.42rem 0.9rem; font-size: 0.83rem; }
.sub-table tbody tr:hover { background: rgba(200,134,26,0.05); }
.match-detail > td { background: rgba(8,6,18,0.6); }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.58rem 1.25rem;
    border: none; border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.84rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #a0690f 100%);
    color: #fff;
    box-shadow: 0 2px 14px rgba(200,134,26,0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 4px 24px rgba(200,134,26,0.5);
    transform: translateY(-1px);
}
.btn-danger { background: rgba(248,113,113,0.1); color: var(--loss); border: 1px solid rgba(248,113,113,0.25); padding: 0.2rem 0.55rem; }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-sm { padding: 0.22rem 0.55rem; font-size: 0.79rem; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(200,134,26,0.07); color: var(--text); border-color: rgba(200,134,26,0.35); }
.btn-ghost.active { background: rgba(200,134,26,0.12); color: var(--accent-light); border-color: var(--accent); box-shadow: 0 0 12px rgba(200,134,26,0.15); }

.btn-row { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
input[type="text"], select, textarea {
    width: 100%;
    padding: 0.65rem 0.95rem;
    background: rgba(8,6,18,0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,134,26,0.15);
}
textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Consolas','Monaco',monospace;
    font-size: 0.82rem;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.8rem;
    text-align: center;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.22s;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}
.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(200,134,26,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.22s;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    color: var(--accent-light);
    box-shadow: var(--glow-amber);
}
.drop-zone:hover::before, .drop-zone.dragover::before { opacity: 1; }
.drop-zone .drop-icon { font-size: 2.6rem; margin-bottom: 0.7rem; display: block; }
.drop-zone p { font-size: 0.9rem; }
.drop-zone .hint { font-size: 0.77rem; margin-top: 0.4rem; opacity: 0.7; }

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab {
    padding: 0.65rem 1.2rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    transition: all 0.18s;
    letter-spacing: 0.01em;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Toast ────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    padding: 0.85rem 1.3rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 380px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.toast.success { background: rgba(74,222,128,0.1); color: var(--win); border: 1px solid rgba(74,222,128,0.25); }
.toast.error { background: rgba(248,113,113,0.1); color: var(--loss); border: 1px solid rgba(248,113,113,0.25); }
.toast.info { background: rgba(96,165,250,0.1); color: var(--info); border: 1px solid rgba(96,165,250,0.25); }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Analytics ────────────────────────────────────────────── */
.analytics-controls { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.analytics-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.analytics-controls select { width: auto; min-width: 200px; }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-dim); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; display: block; }
.empty-state p { font-size: 0.93rem; line-height: 1.6; }

/* ─── Color Dots ───────────────────────────────────────────── */
/* Ink color indicator — uses a single 3x2 sprite sheet of the official
   Lorcana hexagonal ink logos. Each hex is ~120 x 137 in the 666 x 375
   source; we scale the full sprite to 200 x 113 (0.30x) and use pixel-
   precise background-position per color to land each hex's top-left at
   the container origin. Percent-based positioning doesn't work here
   because the top and bottom rows have different padding inside their
   cells (44 px vs 7 px from the top), which would visually misalign. */
.color-dot {
    display: inline-block;
    width: 36px; height: 42px;
    vertical-align: middle;
    margin-right: 4px;
    background-image: url('/images/ink/ink-sprite.png');
    background-size: 200px 113px;
    background-repeat: no-repeat;
}
.color-dot.Amber    { background-position:  -16px -13px; }
.color-dot.Amethyst { background-position:  -81px -12px; }
.color-dot.Emerald  { background-position: -148px -13px; }
.color-dot.Ruby     { background-position:  -16px -58px; }
.color-dot.Sapphire { background-position:  -82px -58px; }
.color-dot.Steel    { background-position: -148px -58px; }
.cost-bar { display: inline-block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--purple)); min-width: 3px; }

/* ─── Card Gallery ─────────────────────────────────────────── */
.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}
.gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}
.gallery-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), var(--glow-amber);
    border-color: rgba(200,134,26,0.45);
}
.gallery-img-wrap {
    aspect-ratio: 5/7;
    overflow: hidden;
    background: var(--bg);
}
.gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-card:hover .gallery-img-wrap img { transform: scale(1.04); }
.gallery-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 1rem;
    font-size: 0.78rem; color: var(--text-dim);
}
.gallery-info { padding: 0.5rem 0.65rem; display: flex; align-items: baseline; gap: 0.4rem; }
.gallery-qty { font-weight: 700; font-size: 0.85rem; color: var(--accent-light); white-space: nowrap; }
.gallery-name { font-size: 0.76rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Card Preview Overlay ─────────────────────────────────── */
.card-preview-overlay {
    position: fixed; inset: 0;
    background: rgba(6,4,14,0.94);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; cursor: pointer;
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.card-preview-overlay img {
    max-height: 85vh; max-width: 90vw;
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(200,134,26,0.3), 0 0 160px rgba(124,92,191,0.2), 0 30px 80px rgba(0,0,0,0.8);
    animation: cardReveal 0.25s ease;
}
@keyframes cardReveal {
    from { transform: scale(0.92) translateY(8px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ─── Section dividers ─────────────────────────────────────── */
.section-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-dim); font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.12em;
}
.section-divider::before, .section-divider::after {
    content: ''; flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ─── Responsive ───────────────────────────────────────────── */
/* ─── Auth pages (login / signup) ─────────────────────────── */
.auth-content {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-shell {
    width: 100%;
    max-width: 420px;
}
.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-brand .logo {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.auth-brand h1 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-light) 0%, #f5c96a 50%, var(--purple-light, #b89fff) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-brand .subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
    letter-spacing: 0.04em;
}
.auth-card {
    padding: 1.75rem;
}
.auth-alt {
    margin-top: 1.2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.form-error {
    background: rgba(200, 48, 48, 0.15);
    border: 1px solid rgba(200, 48, 48, 0.5);
    color: #ffb4b4;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.88rem;
    margin: 0.5rem 0;
}

/* ─── Sidebar user chip ──────────────────────────────────── */
.sidebar-user {
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-user-name {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}
.sidebar-logout:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

@media (max-width: 768px) {
    .sidebar { width: 64px; }
    .sidebar-header h1, .sidebar-header .subtitle,
    .nav-links li a span:not(.icon), .sidebar-footer-label, .sidebar-footer-dots,
    .sidebar-user-name, .sidebar-logout { display: none; }
    .sidebar-header { padding: 1rem 0.5rem; }
    .sidebar-header .logo { font-size: 1.8rem; }
    .nav-links li a { justify-content: center; padding: 0.8rem; border-left: none; border-bottom: 3px solid transparent; }
    .nav-links li a.active { border-left: none; border-bottom-color: var(--accent); }
    .content { margin-left: 64px; padding: 1.2rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
