:root {
    /* Color Palette */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary: #EC4899;
    /* Pink 500 */
    --accent: #8B5CF6;
    /* Violet 500 */

    --bg-color: #F3F4F6;
    /* Gray 100 */
    --text-main: #111827;
    /* Gray 900 */
    --text-muted: #6B7280;
    /* Gray 500 */
    --text-light: #F9FAFB;
    /* Gray 50 */

    /* Glassmorphism Tokens */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --backdrop-blur: 12px;

    /* Spacing & Radius */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --sidebar-width: 280px;
}

/* Reset & Base */
body {
    background: var(--bg-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    /* Modern Sans */
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    /* Tighter headings */
    margin-bottom: 0.5em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: var(--sidebar-width);
    max-width: 100%;
}

/* Glass Sidebar */
.sidebar-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque for readability */
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--glass-shadow);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 3rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-item i {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Components: Glass Cards */
.card-premium {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

/* Components: Buttons */
.btn-modern {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    margin: 10px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    filter: brightness(1.1);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

/* User Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    /* Star hidden */
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Table Styling */
.table-glass {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table-glass th,
.table-glass td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table-glass th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Forms */
.input-modern {
    width: 90%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s;
    margin: 0.5rem;
}

.input-modern:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}