:root {
    --sidebar-width: 240px;
    --transition-speed: 0.4s;
    --matte-black: #1C1C1E;
    --aged-brass: #C9A961;
    --burnished-gold: #B8960C;
    --bg-light: #D4C5B0;
    --charcoal-slate: #2B2D30;
    --smoked-onyx: #1C1C1E;
    --taupe-grey: #D4C5B0;
    --deep-burgundy: #6B2C3E;
    --text-warm: #EDE0D0;
    --text-muted-warm: #A89880;
}

body {
    background-color: var(--taupe-grey);
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center top;
    color: #1C1C1E;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding-top: 80px;   
    padding-left: var(--sidebar-width); 
    transition: padding-left var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-font-smoothing: antialiased;
}

body.collapsed { padding-left: 0; }
body.collapsed .sidebar { transform: translateX(-100%); }

.wrapper { 
    max-width: 1200px; 
    margin: 0 auto 60px auto; 
    padding: 0 40px;
}

.bento-card {
    background: #E8DDD0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.03), 
        0 10px 15px -3px rgba(0, 0, 0, 0.04), 
        0 25px 50px -12px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.04), 
        0 20px 25px -5px rgba(0, 0, 0, 0.05), 
        0 30px 60px -15px rgba(107, 44, 62, 0.3);
    border-color: var(--aged-brass);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--aged-brass); }

.search-input {
    width: 100%;
    background: #EDE0D0;
    border: 1px solid rgba(0,0,0,0.08);
    color: #1C1C1E;
    border-radius: 16px;
    padding: 16px 20px;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.search-input:focus {
    background: #E8DDD0;
    border-color: var(--aged-brass);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.2);
}

.top-nav {
    flex-wrap: nowrap;
    overflow: visible;
    background: var(--smoked-onyx);
    border-bottom: 1px solid rgba(201, 169, 97, 0.12); 
    padding: 0 30px;
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; right: 0; 
    z-index: 1000; height: 70px;
}
.nav-left, .nav-right { flex: 1; display: flex; align-items: center; }
.nav-right { justify-content: flex-end; }
.nav-center { flex: 0; text-align: center; white-space: nowrap; }

.logo { 
    font-size: 1.6em; font-weight: 900; color: #EDE0D0; 
    letter-spacing: 4px; display: inline-flex; align-items: center; 
}
.header-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex: 0 0 auto;
}
.header-logo-text {
    color: #EDE0D0;
    display: inline-flex;
    align-items: center;
    gap: 0.32em;
    white-space: nowrap;
}
.logo-the { color: #EDE0D0; }
.logo-octagon { color: var(--aged-brass); }

.sidebar {
    height: calc(100vh - 70px); width: var(--sidebar-width);
    position: fixed; z-index: 100; top: 70px; left: 0;
    background-color: var(--charcoal-slate);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0 28px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-profile-card { display: flex; align-items: center; padding: 15px 25px; gap: 14px; }
.sidebar-username { color: #EDE0D0; text-decoration: none; font-weight: 600; font-size: 0.95em; transition: color 0.2s; }
.sidebar-username:hover { color: var(--aged-brass); }

.sidebar a.icon-link {
    padding: 14px 25px; text-decoration: none; font-size: 0.95em; font-weight: 500;
    color: #A89880; display: flex; align-items: center; flex: 1; transition: all 0.3s ease;
    border-left: 2px solid transparent;
}
.sidebar a.icon-link:hover { color: #EDE0D0; background: rgba(107, 44, 62, 0.25); padding-left: 30px; }
.sidebar a.active, .sidebar .active {
    color: #EDE0D0 !important; background: linear-gradient(90deg, rgba(201,169,97,0.25) 0%, transparent 100%) !important;
    border-left: 2px solid var(--aged-brass) !important;
}

.btn-aged-brass {
    background: var(--aged-brass); color: #1e1c1c; padding: 10px 24px; border-radius: 12px;
    font-weight: 800; border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85em;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-aged-brass:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 169, 97, 0.35); }

.btn-danger {
    color: #C0392B; padding: 10px 24px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 0.9em;
    transition: all 0.3s ease; border: 1px solid rgba(192,57,43,0.2); background: rgba(192,57,43,0.05);
}
.btn-danger:hover { background: #C0392B; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(192, 57, 43, 0.2); }

.btn-teal {
    background: var(--aged-brass);
    color: #071315;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-teal:hover {
    background:darkred;
    color: #071315;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 173, 181, 0.25);
}

.nav-left, .nav-right { flex: 1; display: flex; align-items: center; min-width: 0; }
.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; gap: 24px; }
.nav-center { flex: 0 1 auto; text-align: center; white-space: nowrap; min-width: 0; }

.header-push-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--aged-brass);
    border-radius: 11px;
    background: var(--aged-brass);
    color: #171411;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.header-push-btn:hover { background: #E1C473; border-color: #E1C473; transform: translateY(-1px); }
.header-push-btn.is-enabled { background: #34d399; border-color: #34d399; color: #07130f; }
.header-push-btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.header-push-icon { flex: 0 0 auto; }
.push-label-mobile { display: none; }




    @media (max-width: 768px) {
        body {
            padding-left: 0 !important;
            padding-top: 68px;
        }
        .top-nav {
            height: 64px;
            padding: 0 12px;
            gap: 8px;
        }
        .nav-left, .nav-right {
            flex: 0 1 auto;
        }
        .nav-left {
            width: 44px;
        }
        .nav-center {
            flex: 1 1 auto;
            display: flex;
            justify-content: center;
            min-width: 0;
        }
        .nav-center a {
            min-width: 0;
        }
        .nav-right {
            gap: 8px;
            min-width: 0;
        }
        .header-push-btn {
            min-width: 38px;
            min-height: 36px;
            gap: 5px;
            padding: 6px 8px;
            border-radius: 10px;
            font-size: 0.64rem;
        }
        .header-push-icon { width: 16px; height: 16px; }
        .push-label-full { display: none; }
        .push-label-mobile { display: inline; }
        .header-logo {
            display: inline-flex !important;
            max-width: 100%;
            min-width: 0;
            align-items: center;
            gap: 6px !important;
            font-size: 1rem;
            letter-spacing: 1.5px;
        }
        .header-logo-img {
            width: 22px !important;
            height: 22px !important;
            flex: 0 0 auto;
        }
        .header-logo-text {
            display: inline-block;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .header-trophy {
            gap: 6px !important;
            padding: 6px 9px !important;
            border-radius: 12px !important;
        }
        .header-trophy .text-2xl {
            font-size: 1rem !important;
            line-height: 1;
        }
        .header-trophy-count {
            font-size: 0.9rem !important;
            letter-spacing: 0.04em !important;
        }
        .header-auth-btn {
            border-radius: 10px;
            font-size: 0.75rem !important;
            line-height: 1;
            padding: 8px 10px !important;
            white-space: nowrap;
        }
        .header-login-link {
            font-size: 0.78rem !important;
            white-space: nowrap;
        }
        .wrapper {
            padding: 0 16px;
        }
        .sidebar {
            transform: translateX(-100%);
            z-index: 999;
            top: 64px;
            height: calc(100vh - 64px);
        }
        body.collapsed {
            padding-left: 0 !important;
        }
        body.collapsed .sidebar {
            transform: translateX(-100%);
        }
        body.mobile-open .sidebar {
            transform: translateX(0);
        }
        body.mobile-open::before {
            content: '';
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 998;
        }
    }

    @media (max-width: 420px) {
        .top-nav {
            padding: 0 8px;
            gap: 6px;
        }
        .nav-left {
            width: 38px;
        }
        #sidebar-toggle {
            padding: 7px !important;
        }
        #sidebar-toggle svg {
            width: 22px;
            height: 22px;
        }
        .nav-right {
            gap: 6px;
        }
        .header-push-btn {
            width: 34px;
            min-width: 34px;
            min-height: 34px;
            padding: 5px;
        }
        .header-trophy { display: none !important; }
        .push-label-mobile { display: none; }
        .header-logo {
            font-size: 0.86rem;
            letter-spacing: 0.7px;
        }
        .header-logo-img {
            width: 20px !important;
            height: 20px !important;
        }
        .header-trophy {
            padding: 5px 7px !important;
        }
        .header-auth-btn {
            font-size: 0.68rem !important;
            padding: 7px 8px !important;
        }
        .header-login-link {
            font-size: 0.72rem !important;
        }
    }

    @media (max-width: 340px) {
        .header-logo-text {
            display: none;
        }
    }
