:root {
    --primary-color: #ff9800; /* Orange */
    --secondary-color: #f57c00;
    --success-color: #4caf50; /* Green */
    --danger-color: #f44336;
    --text-color: #2c3e50;
    --bg-color: #f4f6f8;
    --white: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-text: #5f6368;
    --sidebar-active-bg: #fff3e0;
    --sidebar-active-text: #e65100;
    --border-radius: 16px;
    --shadow: 0 10px 25px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.animate-fade { animation: fadeIn 0.6s ease-out forwards; }

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem;
    list-style: none;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--sidebar-text);
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}

.sidebar-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    transition: var(--transition);
}

/* Header/Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
}

/* Card Design */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #388e3c);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; color: #64748b; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-bottom: 4px solid var(--primary-color);
}

.stat-value { font-size: 2.25rem; font-weight: 800; color: var(--text-color); margin: 0.5rem 0; }
.stat-label { color: #94a3b8; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; font-weight: 700; }

/* Table */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0 0.75rem; }
.data-table th { padding: 1.25rem; text-align: left; color: #64748b; font-weight: 600; border-bottom: 2px solid #f1f5f9; }
.data-table tr { background: white; transition: var(--transition); }
.data-table td { padding: 1.25rem; border-bottom: 1px solid #f1f5f9; }

/* Alerts */
.alert { padding: 1.25rem; border-radius: 12px; margin-bottom: 1.5rem; font-weight: 500; display: flex; align-items: center; gap: 0.75rem; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/* Public Navbar (Landing) */
.public-nav {
    padding: 1.5rem 0;
    position: absolute;
    width: 100%;
    z-index: 100;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar-logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-login-link {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section (Landing) */
.hero {
    padding: 8rem 2rem;
    background: radial-gradient(circle at top right, #fff3e0, #ffffff);
    text-align: center;
    position: relative;
}

.hero h1 { font-size: 4rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; }
.hero span { color: var(--primary-color); }
.hero p { font-size: 1.25rem; color: #64748b; max-width: 800px; margin: 0 auto 3rem; }

/* Features */
.feature-card {
    padding: 3rem 2rem;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--sidebar-active-bg);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: 280px; position: fixed; box-shadow: 20px 0 50px rgba(0,0,0,0.1); }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .sidebar.active { transform: translateX(0); }
    
    #sidebarToggle { display: flex !important; align-items: center; justify-content: center; }
    
    .stat-grid { grid-template-columns: 1fr; }
    .dashboard-wrapper { flex-direction: column; }
}

@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1rem; margin-bottom: 2rem; }
    
    .feature-card { padding: 2rem 1.5rem; }
    
    /* Grid adjustments */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    div[style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Landing Navbar */
    .public-nav {
        position: relative;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .navbar-container {
        flex-direction: row; /* Keep brand and hamburger side by side */
        justify-content: space-between;
        padding: 1.5rem;
    }

    .hamburger-btn {
        display: block;
    }
    
    .navbar-actions {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        padding: 1.5rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        border-top: 1px solid #f1f5f9;
        gap: 1rem;
        animation: fadeIn 0.3s ease-out;
    }

    .navbar-actions.active {
        display: flex;
    }

    .navbar-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding-top: 4rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem !important;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem !important;
    }

    /* Top Bar profile hide on small screens or wrap */
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .user-profile {
        width: 100%;
        justify-content: space-between;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 1.5rem;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
