:root {
    /* Modern Palette */
    --primary-color: #232f3e;
    --primary-gradient: linear-gradient(135deg, #232f3e 0%, #1a2530 100%);
    --accent-color: #f90;
    --accent-gradient: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --border-color: #eef0f2;
    --sidebar-width: 270px;
    --header-height: 70px;
    --card-radius: 16px;
    /* High-end rounded corners */
    --input-radius: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: slideUp 0.5s ease-out forwards;
}

/* Login Page with Glassmorphism */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5 url('https://images.unsplash.com/photo-1557683316-973673baf926?auto=format&fit=crop&w=2000&q=80') no-repeat center center/cover;
}

.login-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.login-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e4e8;
    border-radius: var(--input-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-control:focus {
    border-color: var(--primary-color);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(35, 47, 62, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--input-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(35, 47, 62, 0.3);
}

/* Dashboard Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Modern Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -1px;
}

.brand i {
    color: #f90;
    font-size: 1.8rem;
    margin-right: 10px;
}

.brand span {
    color: #f90;
}

.nav-links {
    padding: 2rem 1rem;
    flex: 1;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-link:hover {
    background: #f8fafc;
    color: #111;
}

.nav-link.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(35, 47, 62, 0.2);
}

.nav-icon {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

/* User Profile in Sidebar */
.user-profile {
    margin: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-info .name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.user-info .role {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
}

.content-body {
    padding: 3rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Banner */
.welcome-banner {
    background: var(--primary-gradient);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    color: white;
    box-shadow: 0 20px 40px -10px rgba(35, 47, 62, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.welcome-bg-icon {
    font-size: 10rem;
    opacity: 0.1;
    position: absolute;
    right: -20px;
    bottom: -40px;
    transform: rotate(-10deg);
}

/* Dashboard Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-box.blue {
    background: #e0f2fe;
    color: #0284c7;
}

.icon-box.green {
    background: #dcfce7;
    color: #16a34a;
}

.icon-box.orange {
    background: #ffedd5;
    color: #ea580c;
}

.icon-box.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

/* Dashboard Split */
.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

.card-panel {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1.25rem 1rem;
    color: #334155;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #ffedd5;
    color: #9a3412;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        padding: 0 1.5rem;
    }

    .content-body {
        padding: 1.5rem;
    }
}