/* Reset and Core Body */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Roboto', sans-serif;
}

:root {
    /* Premium Dark Theme (Default) */
    --primary-navy: #0A192F;
    --navy-light: #112240;
    --navy-lighter: #233554;
    --accent-blue: #64FFDA;
    --text-primary: #CCD6F6;
    --text-secondary: #8892B0;
    --bg-color: #020C1B;
    --glass-bg: rgba(17, 34, 64, 0.7);
    --glass-border: rgba(100, 255, 218, 0.2);
    --brand-primary: #3b82f6;
    --topbar-bg: rgba(2, 12, 27, 0.8);
    --input-bg: rgba(2, 12, 27, 0.5);
}

[data-theme="light"] {
    /* Premium Light Theme */
    --primary-navy: #f8fafc;
    --navy-light: #f1f5f9;
    --navy-lighter: #e2e8f0;
    --accent-blue: #2563eb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --brand-primary: #2563eb;
    --topbar-bg: rgba(255, 255, 255, 0.9);
    --input-bg: #f8fafc;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.text-display {
    font-family: 'Outfit', sans-serif;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4cd8b8;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--navy-lighter);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.1);
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    border: 1px solid var(--brand-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Login Page Specifics */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 12, 27, 0.7);
    /* Dark overlay for text readability */
    z-index: -1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    animation: fadeIn 0.8s ease-out forwards;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Component Layouts */
.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-color);
}

.card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-content {
    padding: 1.5rem;
}

.text-danger {
    color: #ef4444;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}



.avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 1.2rem;
}

.avatar-btn:hover {
    border-color: var(--accent-blue);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: 300px;
    background: rgba(2, 12, 27, 0.9);
    backdrop-filter: blur(28px) saturate(2);
    -webkit-backdrop-filter: blur(28px) saturate(2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
    transform-origin: top right;
    animation: dropFade 0.2s ease-out;
}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

[data-theme="light"] .user-dropdown {
    background: rgba(255, 255, 255, 0.9);
}


.dropdown-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.dropdown-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-weight: bold;
    user-select: none;
}

.dropdown-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.membership-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.membership-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
}

.membership-badge strong {
    color: var(--text-primary);
}

.dropdown-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(100, 255, 218, 0.1);
    color: var(--text-primary);
}

/* Avatar Upload Overlays */
.avatar-upload-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--navy-lighter);
    border: 2px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: bold;
}

.avatar-upload-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.avatar-upload-wrapper:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}