:root {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --secondary: #c2410c;
    --accent: #fb923c;
    --background: #fffaf5;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.1), 0 2px 4px -1px rgba(249, 115, 22, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(249, 115, 22, 0.1), 0 4px 6px -2px rgba(249, 115, 22, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* Base Mobile Elements (Hidden on Desktop) */
.mobile-bottom-nav {
    display: none;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header & Nav */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: var(--white);
    padding: 2rem 1rem;
    border-radius: var(--radius);
    height: fit-content;
}

.sidebar ul {
    list-style: none;
}

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

.sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.sidebar a:hover, .sidebar a.active {
    background: #f1f5f9;
    color: var(--primary);
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Media Queries for Mobile App Experience */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none; /* Hide sidebar on mobile in favor of bottom nav */
    }
    
    .main-content {
        padding: 1rem !important;
        padding-bottom: 5rem !important; /* Space for bottom nav */
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 4rem; /* Buffer for bottom nav */
    }

    nav {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        display: none !important;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    /* Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        height: 65px;
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #f1f5f9;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 600;
        gap: 4px;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
    }

    .mobile-nav-item.active {
        color: var(--primary);
        background: #fff5f5;
        border-radius: 12px;
        padding: 5px 10px;
    }

    /* Card App-Style */
    .card {
        border-radius: 16px;
        padding: 1.2rem;
        margin-bottom: 1rem;
        width: 100%;
        overflow: hidden;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
    }

    .stats-grid .card {
        padding: 1rem !important;
    }

    .stats-grid .card h3 {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .stats-grid .card p {
        font-size: 1.2rem;
    }

    /* Table Mobile Fix */
    .card table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 500px; /* Reduced from 600px */
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    /* Form Mobile Fix */
    input, select, textarea {
        font-size: 16px; /* Prevents auto-zoom on iOS */
    }

    /* General Layout */
    .container {
        padding: 0.75rem;
    }
    
    .hero h1 {
        font-size: 2rem !important;
        text-align: center;
    }
    
    .hero p {
        text-align: center;
        margin: 0 auto 2rem;
    }

    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }

    /* Fix for profile grid */
    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important; /* Stack stats on very small screens */
    }
}

