/* Root Design Variables - Premium Curated Palette */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Outfit', sans-serif;
    
    /* Elegant Light Green theme from reference mockup */
    --bg-main: #F3F4F6;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAFAFA;
    --border-color: #E5E7EB;
    --border-hover: #D1D5DB;
    
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --primary: #10B981; /* Green color match */
    --primary-hover: #059669;
    --primary-light: rgba(16, 185, 129, 0.1);
    
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #3B82F6;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition-speed: 0.2s;
    --border-radius: 10px;
}

/* Global Reset & Base Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}
a:hover {
    color: var(--primary-hover);
}

/* Glassmorphism Background Elements */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}
.glass-panel:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* Premium Navigation / Header */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #FFFFFF;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
    background-color: var(--bg-main);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

.text-gradient {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* Form inputs styling */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}
.btn-primary {
    background: var(--primary);
    color: #FFF;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.btn-danger {
    background: var(--danger);
    color: #FFF;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Grid & Dashboard layout */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stat-val {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--text-primary);
}

/* Custom Table Design */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
table.custom-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    color: var(--text-primary);
    text-align: left;
}
table.custom-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
table.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}
table.custom-table tr:last-child td {
    border-bottom: none;
}
table.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
