/* ============================================
   THRONE ROOM DASHBOARD STYLES
   Standalone version — Shopify overrides removed
   ============================================ */

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

:root {
    --throne-bg-dark: #050b14;
    --throne-bg-mid: #0f1c30;
    --throne-sidebar-bg: #0b1121;
    --throne-sidebar-width: 280px;
    --throne-accent-blue: #3b82f6;
    --throne-accent-gold: #fbbf24;
    --throne-text-primary: #ffffff;
    --throne-text-secondary: #94a3b8;
    --throne-border: rgba(255, 255, 255, 0.08);
    --throne-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --throne-body-gradient: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #0a1628 100%);
}

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

/* Removed manual html font-size to allow browser default (16px) for Tailwind compatibility */

body {
    font-family: var(--throne-font);
    background: var(--throne-body-gradient);
    background-attachment: fixed;
    color: var(--throne-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 1rem;
}

a { color: inherit; text-decoration: none; }

/* ── Dashboard Layout ───────────────────────── */
.throne-dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Sidebar ────────────────────────────────── */
.throne-sidebar {
    width: var(--throne-sidebar-width);
    background: var(--throne-sidebar-bg);
    border-right: 1px solid var(--throne-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--throne-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--throne-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none !important;
    letter-spacing: -0.02em;
    transition: transform 0.2s ease;
}

.sidebar-logo:hover { transform: scale(1.02); }

.sidebar-logo .crown {
    display: flex;
    align-items: center;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3));
}

.sidebar-logo .crown svg {
    width: 28px;
    height: 28px;
    stroke: #fbbf24;
}

.sidebar-logo span:last-child {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0 1.5rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    color: var(--throne-text-secondary);
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.nav-item:hover {
    color: var(--throne-text-primary);
    background: rgba(255, 255, 255, 0.03);
    padding-left: 2rem;
}

.nav-item.active {
    color: var(--throne-text-primary);
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.08), transparent);
    border-left-color: var(--throne-accent-gold);
    font-weight: 600;
}

.nav-item .icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-item .icon svg {
    width: 20px; height: 20px;
    stroke: #64748b;
    transition: all 0.2s ease;
}

.nav-item:hover .icon svg {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.nav-item.active .icon svg {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.nav-divider {
    margin: 1.5rem 1.75rem 0.5rem;
    border-top: 1px solid var(--throne-border);
}

.nav-section-label {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
}

/* Account Section */
.sidebar-account {
    padding: 1.5rem;
    border-top: 1px solid var(--throne-border);
    background: rgba(0, 0, 0, 0.15);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.account-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--throne-accent-blue), #1d4ed8);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.account-name { font-size: 0.9rem; font-weight: 700; color: var(--throne-text-primary); }
.account-email { font-size: 0.75rem; color: var(--throne-text-secondary); }

.account-links { display: flex; gap: 1.25rem; margin-top: 1rem; }
.account-links a { font-size: 0.85rem; color: var(--throne-text-secondary); text-decoration: none; transition: color 0.2s; }
.account-links a:hover { color: var(--throne-accent-blue); }

.login-prompt { text-align: center; }
.login-prompt p { font-size: 0.9rem; color: var(--throne-text-secondary); margin-bottom: 1rem; }

.login-btn {
    display: block; width: 100%; text-align: center;
    background: linear-gradient(135deg, var(--throne-accent-blue), #1e40af);
    color: white; font-size: 0.85rem; font-weight: 600; padding: 0.6rem;
    border-radius: 8px; border: none; cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

/* ── Main Content Area ──────────────────────── */
.throne-main {
    flex: 1;
    margin-left: var(--throne-sidebar-width);
    padding: 3rem;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.throne-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--throne-text-primary);
}

/* Content Panels */
.throne-panel { display: none; }
.throne-panel.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Mobile Hamburger ───────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem; left: 1rem;
    z-index: 1001;
    background: var(--throne-sidebar-bg);
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
    width: 48px; height: 48px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.sidebar-toggle .bar {
    display: block; width: 24px; height: 2px;
    background: var(--throne-text-primary);
    margin: 5px auto;
    transition: all 0.3s ease;
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Collapsed Sidebar */
body.throne-sidebar-collapsed .throne-sidebar { transform: translateX(-100%); }
body.throne-sidebar-collapsed .throne-main { margin-left: 0; }
body.throne-sidebar-collapsed .sidebar-toggle {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}

/* Mobile */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
    }
    .throne-sidebar { transform: translateX(-100%); }
    .throne-sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; opacity: 1; }
    .throne-main { margin-left: 0; padding: 5rem 1.5rem 2rem; }
    .sidebar-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .sidebar-toggle.active .bar:nth-child(2) { opacity: 0; }
    .sidebar-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* ── Glassmorphism Card ─────────────────────── */
.throne-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.throne-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.throne-card.card-gold:hover { border-color: rgba(251, 191, 36, 0.5); }

/* ── Overview Panel ─────────────────────────── */
.overview-header { text-align: center; margin-bottom: 4rem; }

.overview-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    padding: 0.5rem 1rem; border-radius: 50px;
    margin-bottom: 1.5rem;
}

.overview-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1.25rem;
    line-height: 1.1; letter-spacing: -1px;
}

.overview-title span {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overview-subtitle {
    font-size: 1rem;
    color: var(--throne-text-secondary);
    max-width: 650px; margin: 0 auto;
    line-height: 1.6; font-weight: 300;
}

/* Quick Access Grid */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.quick-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--throne-border);
    border-radius: 20px; padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: flex; flex-direction: column; height: 100%;
}

.quick-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--throne-accent-blue);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.quick-card-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }

.quick-card-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(217, 119, 6, 0.1));
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.quick-card-icon svg { width: 24px; height: 24px; stroke: #fbbf24; filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.3)); }
.quick-card-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.quick-card-desc { font-size: 0.95rem; color: var(--throne-text-secondary); line-height: 1.5; margin-bottom: 1.5rem; flex: 1; }

.quick-card-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--throne-accent-blue);
    font-size: 0.95rem; font-weight: 700;
    transition: gap 0.2s ease;
}

/* ── Page Header & Typography ───────────────── */
.throne-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1.5rem;
}

.throne-page-title {
    font-size: 1.8rem; font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.2));
}

.throne-page-subtitle { font-size: 0.95rem; color: var(--throne-text-secondary); margin: 0; }

.throne-last-updated {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
    padding: 6px 14px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.02em; white-space: nowrap;
}

.throne-last-updated::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80; animation: throne-pulse 2s ease-in-out infinite; flex-shrink: 0;
}

@keyframes throne-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Stats Bar ──────────────────────────────── */
.throne-stats-bar { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }

.throne-stat-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem; min-width: 140px; flex: 1;
}

.throne-stat-label {
    font-size: 0.85rem; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 0.5rem; font-weight: 600;
}

.throne-stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.throne-stat-value.highlight { color: #4ade80; }

/* ── Filter Bar ─────────────────────────────── */
.throne-filter-bar { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }

.throne-search-wrapper { position: relative; flex: 1; min-width: 250px; }

.throne-search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: #64748b;
}

.throne-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.875rem 1rem 0.875rem 3rem;
    color: #e2e8f0; font-size: 0.95rem;
    font-family: var(--throne-font);
    transition: all 0.2s;
}

.throne-input:focus {
    outline: none;
    border-color: var(--throne-accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.throne-input::placeholder { color: #64748b; }

.throne-filter-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--throne-text-primary);
    padding: 0.75rem 1.25rem; border-radius: 8px;
    font-size: 0.9rem; font-family: var(--throne-font);
    cursor: pointer; transition: all 0.2s; font-weight: 500;
}

.throne-filter-btn:hover, .throne-filter-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--throne-accent-blue);
}

/* ── Tables ──────────────────────────────────── */
.throne-table-container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: auto; max-height: 75vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.throne-table { width: 100%; border-collapse: collapse; color: var(--throne-text-primary); font-size: 0.95rem; }

.throne-table th {
    background: rgba(10, 15, 30, 0.9);
    padding: 1rem 1.25rem; text-align: left;
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--throne-accent-gold);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap; position: sticky; top: 0; z-index: 10;
}

.throne-table th.sortable { cursor: pointer; transition: background 0.2s; }
.throne-table th.sortable:hover { background: rgba(15, 25, 45, 0.9); }

.throne-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.throne-table tr:hover td { background: rgba(59, 130, 246, 0.06); }
.throne-table tr:hover td:first-child { box-shadow: inset 3px 0 0 0 #3b82f6; }
.throne-table tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────── */
.throne-badge {
    padding: 0.25rem 0.6rem; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
    display: inline-flex; align-items: center; justify-content: center;
}

.throne-badge-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.throne-badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.throne-badge-green { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }

/* ── Back Button ─────────────────────────────── */
.throne-back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--throne-text-secondary); cursor: pointer;
    margin-bottom: 1rem; font-weight: 600;
    transition: color 0.2s; text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 0.05em;
    background: none; border: none;
}

.throne-back-btn:hover { color: var(--throne-accent-gold); }

/* ── Scrollbar ───────────────────────────────── */
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.1); border-radius: 20px; }
.sidebar-nav:hover::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); }

/* ── Ko-fi Link ──────────────────────────────── */
.kofi-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; margin-top: 8px;
    color: #fb6340; font-size: 0.85rem; font-weight: 600;
    text-decoration: none; border-radius: 8px;
    background: rgba(251, 99, 64, 0.08);
    border: 1px solid rgba(251, 99, 64, 0.15);
    transition: all 0.2s;
}

.kofi-link:hover {
    background: rgba(251, 99, 64, 0.18);
    border-color: rgba(251, 99, 64, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(251, 99, 64, 0.2);
}

/* ── Skeleton Loader ─────────────────────────── */
@keyframes throne-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.throne-skeleton-row td { padding: 1.25rem 1.5rem !important; }

.throne-skeleton-bar {
    height: 16px; border-radius: 6px;
    background: linear-gradient(90deg, rgba(148,163,184,0.08) 25%, rgba(148,163,184,0.18) 50%, rgba(148,163,184,0.08) 75%);
    background-size: 800px 100%;
    animation: throne-shimmer 1.5s infinite linear;
}

.throne-skeleton-bar.wide { width: 70%; }
.throne-skeleton-bar.medium { width: 50%; }
.throne-skeleton-bar.narrow { width: 35%; }

/* ── Settings Button ─────────────────────────── */
.settings-btn {
    background: none; border: none;
    color: #94a3b8; cursor: pointer;
    margin-left: auto; padding: 5px;
    display: flex; align-items: center;
}

.settings-btn:hover { color: var(--throne-accent-gold); }
.settings-btn svg { width: 20px; height: 20px; }

/* ── Collapse Button ─────────────────────────── */
.collapse-icon {
    background: none; border: none;
    padding: 4px; cursor: pointer;
    display: flex; align-items: center;
    color: var(--throne-text-secondary);
    transition: color 0.2s;
}

.collapse-icon:hover { color: var(--throne-accent-gold); }

.exit-icon {
    color: var(--throne-text-secondary);
    transition: color 0.2s;
    display: flex; align-items: center;
    text-decoration: none;
}

.exit-icon:hover { color: var(--throne-accent-gold); }
