:root {
    --primary-red: #c3002f;
    --primary-red-deep: #7a001f;
    --accent-red: #ff3c64;
    --page-bg: #050506;
    --panel-bg: rgba(12, 12, 14, 0.65);
    --panel-strong: rgba(18, 12, 14, 0.85);
    --panel-border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: #a0a0a0;
    --shadow-deep: 0 50px 100px rgba(0, 0, 0, 0.7);
    --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%, rgba(255, 255, 255, 0.04));
    --accent-gradient: linear-gradient(135deg, #c3002f, #7a001f);
    --hover-glow: 0 0 40px rgba(195, 0, 47, 0.25);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass Utility Classes */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        var(--shadow-deep),
        inset 0 0 40px rgba(255, 255, 255, 0.02);
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-gradient);
    pointer-events: none;
}

.crisp-button {
    background: var(--accent-gradient);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 28px;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(195, 0, 47, 0.2);
}

/* Dashboard Hero Section */
.dashboard-hero {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.hero-content {
    text-align: center;
    animation: heroReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-logo {
    width: 260px;
    margin-bottom: 42px;
    filter: drop-shadow(0 0 60px rgba(195, 0, 47, 0.4));
    animation: heroLogoFloat 4s ease-in-out infinite;
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(195, 0, 47, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.hero-eyebrow-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-eyebrow-role {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(195, 0, 47, 0.26);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 92px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
    color: #fff;
    position: relative;
    z-index: 10;
}

.hero-title span {
    color: var(--primary-red);
    text-shadow: 0 0 40px rgba(195, 0, 47, 0.5);
}

.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.3;
    animation: heroGlitch 4s infinite;
}

@keyframes heroGlitch {
    0%, 100% { transform: translate(0); color: var(--primary-red); }
    20% { transform: translate(-3px, 3px); color: #fff; }
    40% { transform: translate(-3px, -3px); color: var(--primary-red); }
    60% { transform: translate(3px, 3px); color: #fff; }
    80% { transform: translate(3px, -3px); color: var(--primary-red); }
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.42);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-top: 8px;
}

.hero-footer {
    margin-top: 72px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff80;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff80;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.crisp-button::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.6s;
}

.crisp-button:hover::after {
    left: 100%;
}

.crisp-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(195, 0, 47, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.crisp-button:active {
    transform: translateY(-1px);
}


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

html,
body {
    min-height: 100%;
}

body {
    background: var(--page-bg);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    overflow: hidden;
}

/* Background layers - PRESERVED */
#galaxy-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    filter: blur(1px);
}

.overlay-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 18%, rgba(195, 0, 47, 0.1), transparent 18%),
        radial-gradient(circle at 88% 14%, rgba(140, 0, 35, 0.12), transparent 18%),
        linear-gradient(180deg, rgba(30, 0, 8, 0.16), transparent 40%);
}

/* Layout */
.container {
    display: flex;
    height: 100vh;
    gap: 14px;
    padding: 0 22px 0 0;
}

/* Sidebar - Enhanced Glassmorphism */
.sidebar {
    width: 318px;
    flex: 0 0 318px;
    min-height: 0;
    max-height: 100vh;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 12px 18px 12px 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 20;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: -6px;
    background:
        linear-gradient(90deg, rgba(65, 0, 17, 0.52), rgba(28, 6, 12, 0.24) 42%, rgba(10, 10, 12, 0.08) 72%, transparent 100%),
        radial-gradient(circle at top left, rgba(195, 0, 47, 0.18), transparent 34%);
    filter: blur(2px);
    pointer-events: none;
}

.sidebar.glass-panel::before {
    background: none;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 8px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04) 18%, rgba(255, 255, 255, 0.02) 82%, transparent);
    pointer-events: none;
}

.logo-area {
    text-align: center;
    padding: 18px 28px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.logo-img {
    width: 170px;
    filter: drop-shadow(0 14px 32px rgba(195, 0, 47, 0.24));
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 2px 16px 0 10px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    color: #b0b0b7;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.nav-item i {
    font-size: 16px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
    color: #d0d0d5;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(195, 0, 47, 0.18), rgba(82, 10, 28, 0.12));
    border-color: rgba(195, 0, 47, 0.24);
    color: #fff;
    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-item.active i {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 78, 117, 0.95), rgba(122, 0, 31, 0.95));
    text-shadow: none;
    box-shadow: 0 10px 24px rgba(195, 0, 47, 0.34);
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 16px 0 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.nav-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(195, 0, 47, 0.18));
    border-radius: 999px;
    border: none;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(195, 0, 47, 0.28));
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e91f54, #8a0928);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 18px rgba(195, 0, 47, 0.32);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.user-role {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #ff3c64;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
    border-radius: 16px;
    border: 1px solid transparent;
}

.logout-link:hover {
    color: #fff;
    background: rgba(195, 0, 47, 0.12);
    border-color: rgba(195, 0, 47, 0.24);
}

/* Main Content */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    padding: 24px 6px 40px;
}

.kd-signature {
    position: fixed;
    right: 24px;
    bottom: 20px;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 60;
    pointer-events: none;
    user-select: none;
}

.kd-signature::before {
    content: none;
}

.kd-signature-mark {
    color: rgba(220, 224, 232, 0.22);
    font-family: 'Playfair Display', serif;
    font-size: 46px;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    transform: skewX(-12deg);
    text-shadow:
        10px -3px 0 rgba(220, 224, 232, 0.08),
        0 1px 6px rgba(0, 0, 0, 0.08);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 11, 11, 0.8);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: rgba(60, 60, 60, 0.8);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* Responsive */
@media (max-width: 1440px) {
    .container {
        gap: 10px;
        padding-right: 16px;
    }

    .sidebar {
        width: 286px;
        flex-basis: 286px;
        padding-right: 14px;
    }

    .logo-area {
        padding: 16px 22px 22px 16px;
        margin-bottom: 18px;
    }

    .logo-img {
        width: 152px;
    }

    .nav-menu {
        gap: 10px;
        padding-right: 12px;
    }

    .nav-item {
        padding: 14px 16px;
        font-size: 13px;
    }

    .nav-item i {
        width: 40px;
        height: 40px;
    }

    .sidebar-footer {
        padding-right: 12px;
    }
}

@media (max-width: 1180px) {
    .container {
        gap: 8px;
        padding-right: 12px;
    }

    .sidebar {
        width: 254px;
        flex-basis: 254px;
    }

    .logo-img {
        width: 138px;
    }

    .nav-item {
        gap: 14px;
        padding: 13px 14px;
    }

    .user-pill {
        padding: 13px 14px;
    }
}

@media (max-height: 860px) {
    .sidebar {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .logo-area {
        padding: 12px 18px 16px 14px;
        margin-bottom: 14px;
    }

    .logo-img {
        width: 136px;
    }

    .nav-menu {
        gap: 8px;
        padding-right: 10px;
    }

    .nav-item {
        gap: 13px;
        padding: 11px 14px;
        border-radius: 16px;
        font-size: 13px;
    }

    .nav-item i {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .sidebar-footer {
        padding-top: 14px;
        gap: 10px;
    }

    .user-pill {
        padding: 12px 13px;
        border-radius: 16px;
    }

    .avatar {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .logout-link {
        padding: 11px 14px;
        font-size: 13px;
    }
}

@media (max-height: 760px) {
    .logo-area {
        padding-bottom: 12px;
        margin-bottom: 10px;
    }

    .logo-img {
        width: 122px;
    }

    .nav-menu {
        gap: 6px;
    }

    .nav-item {
        padding: 10px 12px;
        font-size: 12px;
    }

    .nav-item i {
        width: 34px;
        height: 34px;
    }

    .user-name {
        font-size: 14px;
    }

    .user-role {
        font-size: 10px;
    }
}

@media (max-width: 980px) {
    .container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        flex: none;
        border-radius: 24px;
        padding: 18px;
        max-height: none;
    }

    .main {
        padding: 12px 0 18px;
    }

}

@media (max-width: 640px) {
    .kd-signature {
        right: 16px;
        bottom: 16px;
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }

    .kd-signature-mark {
        transform: scale(0.84) skewX(-12deg);
    }
}
