:root {
    --brand-primary: #4f46e5;
    --brand-secondary: #9333ea;
    --brand-accent: #db2777;
    --bg-light: #f8fafc;
    --bg-dark: #020617;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 12px 48px -12px rgba(0, 0, 0, 0.08);
    --text-primary: #020617;
    --text-secondary: #475569;
}

.dark {
    --bg-light: #020617;
    --glass-bg: rgba(15, 23, 42, 0.3);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 12px 48px -12px rgba(0, 0, 0, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    /* Slate 900 */
    --text-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #1e293b;
    /* Slate 800 */
    --border-color: #334155;
    /* Slate 700 */
    --input-bg: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    line-height: 1.5;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background-color: var(--bg-color);
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar .logo a {
    text-decoration: none;
    color: var(--primary-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color);
    opacity: 0.5;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.nav-item {
    display: block;
    padding: 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Old Container - kept for internal content if needed */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

/* Forms & Buttons */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    box-sizing: border-box;
    /* Important for width 100% */
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0.375rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Utils */
.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

/* Security & Anti-Theft */
.secure-data {
    user-select: none;
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

/* Icon Styles */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.icon-btn:hover {
    background-color: var(--border-color);
}

/* Glassmorphism Utility - Premium Refinement */
.glass-pane {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    border-radius: 1.5rem;
}

/* Looped Vector Background Animation - Mesh Gradient Tier */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-light);
    transition: background-color 0.8s ease;
}

/* Noise Overlay for Texture */
.bg-animation::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.orb {
    position: absolute;
    width: 140vh;
    height: 140vh;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    animation: float 28s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    pointer-events: none;
}

.dark .orb {
    opacity: 0.35;
    mix-blend-mode: plus-lighter;
}

.orb-1 {
    background: radial-gradient(circle, #4f46e5, transparent);
    top: -30%;
    right: -20%;
    animation-duration: 20s;
}

.orb-2 {
    background: radial-gradient(circle, #7c3aed, transparent);
    bottom: -30%;
    left: -20%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.orb-3 {
    background: radial-gradient(circle, #db2777, transparent);
    top: 30%;
    left: 20%;
    width: 90vh;
    height: 90vh;
    animation-duration: 30s;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(15%, 20%) scale(1.15) rotate(5deg);
    }

    66% {
        transform: translate(-20%, 10%) scale(0.9) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

/* Premium Login Form Refinements */
.login-container {
    padding: 3.5rem 3rem !important;
    width: 100% !important;
    max-width: 500px !important;
    animation: slideUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.login-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: 1.25rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 1rem !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 10px 20px -10px rgba(99, 102, 241, 0.2) !important;
    transform: translateY(-2px) scale(1.015);
}

.premium-btn {
    background: linear-gradient(135deg, #4f46e5, #9333ea, #db2777) !important;
    background-size: 200% auto !important;
    color: white !important;
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    letter-spacing: -0.02em !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.premium-btn:hover {
    background-position: right center !important;
    transform: translateY(-4px) scale(1.025) !important;
    box-shadow: 0 20px 45px -12px rgba(99, 102, 241, 0.5) !important;
    filter: brightness(1.1) !important;
}

.premium-btn:active {
    transform: translateY(-1px) scale(1);
}