:root {
    /* Premium Dark Theme Palette */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Brand Colors */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #06b6d4;

    /* Gradients */
    --bg-gradient: radial-gradient(circle at top right, #1e293b 0%, #020617 100%);
    --card-gradient: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Glass Components --- */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-panel:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.0));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-1px);
}

.glass-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.glass-input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Select Styling */
select.glass-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select.glass-input option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

/* --- Table Styles --- */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transition: background 0.2s;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Scrollbar --- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Animations --- */

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Sidebar Animations --- */
.nav-item-animate {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-animate:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
    /* light flash */
}

/* Hover "White Stripe Glow" Effect */
.nav-item-animate:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
}

/* Green Glassy Border for Unlocked Settings */
.settings-unlocked-glow {
    /* border: 1px solid rgba(74, 222, 128, 0.5) !important; */
    /* Removed per user request */
    /* box-shadow: 0 0 20px rgba(74, 222, 128, 0.2), inset 0 0 20px rgba(74, 222, 128, 0.1) !important; */
    /* Removed per user request */
    transition: all 0.5s ease;
}

/* --- Toast Notifications --- */
.toast-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    padding: 16px 24px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-success {
    border-left: 4px solid #4ade80;
    /* Green */
    box-shadow: 0 10px 40px rgba(74, 222, 128, 0.1);
}

.toast-error {
    border-left: 4px solid #f87171;
    /* Red */
    box-shadow: 0 10px 40px rgba(248, 113, 113, 0.1);
}

@keyframes slideInRight {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}