/* File: assets/css/style.css */

:root {
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --primary-btn: #5a55d1;
    --primary-btn-hover: #4338ca;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* =========================================
   Login Page Styles
   ========================================= */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--white);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.login-container h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-main);
    background-color: #fafafa;
    outline: none;
    transition: all 0.2s;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus {
    border-color: var(--primary-btn);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(90, 85, 209, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-btn);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-btn-hover);
}

.error-alert {
    background-color: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #f87171;
}

.login-footer {
    text-align: center;
    margin-top: 35px;
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================
   Admin Panel & Dashboard Styles
   ========================================= */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #1e293b;
    color: var(--white);
    transition: transform var(--transition);
    padding-top: 20px;
}

.sidebar h3 {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
    margin-bottom: 10px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    transition: background var(--transition);
}

.sidebar .nav-link:hover {
    background-color: #334155;
    color: var(--white);
}

.sidebar .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    fill: currentColor;
}

.main-content {
    flex: 1;
    padding: 30px;
    background-color: #f1f5f9;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-card.warning .value { color: #dc2626; }
.stat-card.success .value { color: #16a34a; }

/* Data Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, 
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active { background: #dcfce7; color: #166534; }
.badge-low { background: #fee2e2; color: #991b1b; }

.btn {
    padding: 8px 16px;
    background-color: #3b82f6;
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #2563eb;
}

/* Mobile Responsiveness for Admin Panel */
.menu-toggle {
    display: none;
}

@media screen and (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .sidebar {
        position: fixed;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: inline-block;
        background: #1e293b;
        color: white;
        padding: 10px 15px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        margin-bottom: 20px;
        font-weight: 600;
    }
    
    .main-content {
        padding: 20px 15px;
    }
}

/* Settings Page Styles (Zero directional borders) */
.settings-container {
    max-width: 600px;
    margin-top: 20px;
}

.settings-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition);
}

.settings-card:hover {
    box-shadow: var(--shadow-lg);
}

.settings-card form .form-group {
    margin-bottom: 25px;
}

.settings-card form .form-control {
    background-color: #f8fafc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    border: none; /* Removing all borders for a cleaner look */
    padding: 14px;
}

.settings-card form .form-control:focus {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(90, 85, 209, 0.2);
    background-color: var(--white);
}