/* =====================================================================
   Likeit Fleet Manager — Dashboard Styles
   Palette & variables calquées sur le projet Taxido principal
   ===================================================================== */

:root {
    --primary:          #199675;
    --primary-dark:     #137a5f;
    --sidebar-bg:       linear-gradient(178.98deg, #199675 -453.29%, #212121 91.53%);
    --sidebar-width:    260px;
    --font-family:      "Inter", serif;
    --border-radius:    12px;
    --shadow:           0 4px 12px rgba(0, 0, 0, 0.10);
    --transition:       all 0.3s ease;

    /* Status / alert colours */
    --success:  #4caf50;
    --warning:  #ff9800;
    --danger:   #f44336;
    --info:     #2196f3;

    /* Neutral */
    --dark:       #212529;
    --gray:       #6c757d;
    --gray-light: #e9ecef;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: #f4f6f9;
    color: #222;
    margin: 0;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.3px;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.72rem;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-nav .nav-label {
    padding: 10px 20px 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.sidebar-nav a i {
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.60);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.sidebar-footer a:hover { color: #fff; }

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 64px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #555;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ── Main Content ── */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: 64px;
    min-height: 100vh;
}

.page-body {
    padding: 28px;
}

/* ── Cards ── */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 16px 20px;
    font-weight: 600;
}

/* ── Stat Cards ── */
.stat-card {
    border-radius: var(--border-radius);
    padding: 20px;
    color: #fff;
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 14px;
}

.stat-card .stat-label {
    font-size: 0.80rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.approved  { background: #e8f5e9; color: #2e7d32; }
.status-badge.pending   { background: #fff8e1; color: #f57f17; }
.status-badge.rejected  { background: #fce4ec; color: #c62828; }

/* ── Buttons ── */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* ── Tables ── */
.table th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    background: #fafafa;
}

.table td { vertical-align: middle; }

/* ── Alerts ── */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

/* ── Auth pages ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.auth-logo h4 {
    font-weight: 700;
    color: #222;
    margin: 0;
}

.auth-card h5 {
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 28px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(25, 150, 117, 0.20);
}

.auth-footer-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 20px;
}

.auth-footer-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-link a:hover { text-decoration: underline; }

/* ── Form sections ── */
.form-section-title {
    font-size: 0.80rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gray);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .topbar {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
}
