@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --navy: #0C1E3E;
    --navy2: #162B52;
    --orange: #E8650A;
    --green: #1D9E75;
    --red: #E24B4A;
    --amber: #BA7517;
    --blue: #185FA5;
    --bg: #F2F4F8;
    --card: #fff;
    --border: #DDE1EA;
    --text: #0C1E3E;
    --muted: #6B7594;
    --light: #B8BECE;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'IBM Plex Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 13px; }

/* ── Shell ── */
.nfl-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ── */
.nfl-topbar {
    background: var(--navy); height: 52px; padding: 0 20px;
    display: flex; align-items: center; gap: 16px; flex-shrink: 0;
    position: sticky; top: 0; z-index: 100;
}
.nfl-logo { color: #E8650A; font-size: 14px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; }
.nfl-logo span { color: #fff; }
.topbar-sep { width: 1px; height: 24px; background: rgba(255,255,255,.1); flex-shrink: 0; }
.topbar-title { color: rgba(255,255,255,.7); font-size: 12px; white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-btn {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.8); font-size: 11px; padding: 5px 12px;
    border-radius: 6px; cursor: pointer; font-family: 'IBM Plex Sans', sans-serif; white-space: nowrap;
}
.tb-btn:hover { background: rgba(255,255,255,.14); }
.tb-btn.orange { background: #E8650A; border-color: #E8650A; color: #fff; }
.tb-btn.orange:hover { background: #d45a09; }
.tb-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,.6); white-space: nowrap; }
.dot-green { width: 7px; height: 7px; background: #1D9E75; border-radius: 50%; flex-shrink: 0; }

/* ── Main ── */
.nfl-main { display: flex; flex: 1; overflow: hidden; height: calc(100vh - 52px); }

/* ── Sidebar ── */
.nfl-sidebar {
    width: 200px; background: var(--navy2); flex-shrink: 0;
    padding: 16px 0; overflow-y: auto;
}
.nfl-sidebar .nav-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 16px; font-size: 12px; font-weight: 500;
    color: rgba(255,255,255,.5); cursor: pointer;
    border-left: 2px solid transparent; transition: .12s;
    text-decoration: none;
}
.nfl-sidebar .nav-item:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.05); }
.nfl-sidebar .nav-item.active,
.nfl-sidebar .nav-item[href].active { color: #fff; background: rgba(232,101,10,.12); border-left-color: #E8650A; }
.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: #E24B4A; color: #fff; font-size: 9px; font-weight: 600; border-radius: 10px; padding: 1px 6px; }
.nav-section { font-size: 9px; color: rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .1em; padding: 14px 16px 4px; }

/* ── Content ── */
.nfl-content { flex: 1; overflow-y: auto; padding: 16px; }

/* ── Page header ── */
.page-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* ── KPI row ── */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi-card {
    background: var(--card); border-radius: 10px; padding: 14px 16px;
    border: 1px solid var(--border);
}
.kpi-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.kpi-val { font-size: 24px; font-weight: 600; color: var(--text); line-height: 1; }
.kpi-sub { font-size: 10px; margin-top: 4px; }
.kpi-sub.up { color: var(--green); }
.kpi-sub.down { color: var(--red); }
.kpi-sub.neu { color: var(--muted); }

/* ── Two-col layout ── */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 12px; }

/* ── Card ── */
.card { background: var(--card); border-radius: 10px; border: 1px solid var(--border); }
.card-head {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 12px; font-weight: 600; color: var(--text); }
.card-action { font-size: 11px; color: var(--orange); cursor: pointer; }
.card-action:hover { text-decoration: underline; }

/* ── Filters ── */
.filter-row { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.filter-chip {
    font-size: 10px; padding: 3px 10px; border-radius: 12px;
    border: 1px solid var(--border); background: transparent;
    color: var(--muted); cursor: pointer; font-family: 'IBM Plex Sans', sans-serif;
    transition: .1s;
}
.filter-chip:hover { border-color: var(--orange); color: var(--orange); }
.filter-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.search-in {
    flex: 1; min-width: 120px; border: 1px solid var(--border);
    border-radius: 6px; padding: 4px 10px; font-size: 11px;
    font-family: 'IBM Plex Sans', sans-serif; color: var(--text); background: var(--bg);
    outline: none;
}
.search-in:focus { border-color: var(--navy); }
.nfl-select {
    border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px;
    font-size: 11px; font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text); background: var(--bg); outline: none; cursor: pointer;
}

/* ── Orders table ── */
.orders-list { max-height: 360px; overflow-y: auto; }
.th-row {
    display: grid; grid-template-columns: 110px 1fr 80px 90px 90px 80px;
    gap: 8px; padding: 7px 14px; background: #FAFBFD;
    border-bottom: 1px solid var(--border);
    font-size: 9px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.order-row {
    display: grid; grid-template-columns: 110px 1fr 80px 90px 90px 80px;
    align-items: center; gap: 8px; padding: 9px 14px;
    border-bottom: 1px solid var(--border); font-size: 11px;
    transition: .1s; cursor: pointer;
}
.order-row:hover { background: #FAFBFD; }
.order-row.selected { background: #FFF6F0; border-left: 2px solid #E8650A; }
.order-row:last-child { border-bottom: none; }
.order-id { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); }
.order-addr { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.order-livreur, .order-col { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cod-val { font-weight: 600; color: var(--amber); font-size: 10px; }

/* ── Status pills ── */
.status-pill { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: 12px; text-align: center; white-space: nowrap; }
.s-attente { background: #FFF3E8; color: #E8650A; }
.s-transit { background: #E8F5EE; color: #0F6E56; }
.s-echec { background: #FFF0EE; color: #E24B4A; }
.s-livre { background: #EAF3DE; color: #3B6D11; }
.s-attribue { background: #E6F1FB; color: #0C447C; }
.s-pending { background: #FFF3E8; color: #E8650A; }
.s-pickedup { background: #E8F5EE; color: #0F6E56; }
.s-cancelled { background: #F3F4F6; color: #6B7280; }
.s-returned { background: #F3F0FF; color: #5B21B6; }
.s-failedattempt { background: #FFF0EE; color: #E24B4A; }
.s-delivered { background: #EAF3DE; color: #3B6D11; }
.s-assigned { background: #E6F1FB; color: #0C447C; }
.s-intransit { background: #E8F5EE; color: #0F6E56; }

/* legacy badge compat */
.badge { padding: 3px 9px; border-radius: 12px; font-size: 10px; font-weight: 600; display: inline-block; }
.badge-orange { background: #FFF3E8; color: #E8650A; }
.badge-blue { background: #E6F1FB; color: #0C447C; }
.badge-cyan { background: #E0F7FA; color: #00695C; }
.badge-green-light { background: #E8F5EE; color: #0F6E56; }
.badge-green { background: #1D9E75; color: #fff; }
.badge-red { background: #FFF0EE; color: #E24B4A; }
.badge-gray { background: #F3F4F6; color: #6B7280; }
.badge-dark { background: #1E293B; color: #fff; }

/* ── Map area ── */
.map-area { position: relative; height: 220px; border-bottom: 1px solid var(--border); overflow: hidden; }
.map-sim {
    width: 100%; height: 100%;
    background: linear-gradient(160deg, #E8EEF8 0%, #D4DFEF 60%, #C8D5E8 100%);
    position: relative;
}
.street-h { position: absolute; background: rgba(255,255,255,.65); height: 12px; width: 100%; }
.street-v { position: absolute; background: rgba(255,255,255,.55); width: 12px; height: 100%; }
.zone-label { position: absolute; font-size: 9px; font-family: 'IBM Plex Mono', monospace; font-weight: 500; color: rgba(12,30,62,.45); pointer-events: none; }
.livreur-dot {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    border: 2.5px solid #fff; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.colis-pin { position: absolute; width: 14px; height: 14px; background: #E8650A; border-radius: 50%; border: 2px solid #fff; }
.map-legend { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 6px; }
.leg-item {
    background: rgba(255,255,255,.9); border-radius: 5px; padding: 3px 8px;
    font-size: 9px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 4px;
}
.leg-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Detail panel ── */
.detail-panel { padding: 12px 14px; }
.dp-id { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--orange); font-weight: 500; }
.dp-addr { font-size: 13px; font-weight: 600; color: var(--text); margin: 4px 0; }
.dp-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.dp-field { font-size: 10px; }
.dp-label { color: var(--muted); margin-bottom: 1px; }
.dp-val { color: var(--text); font-weight: 500; }
.dp-btns { display: flex; gap: 6px; margin-top: 10px; }
.dp-btn { flex: 1; padding: 8px; border-radius: 7px; border: none; font-size: 11px; font-weight: 600; cursor: pointer; font-family: 'IBM Plex Sans', sans-serif; }
.dp-btn.p { background: #E8650A; color: #fff; }
.dp-btn.p:hover { background: #d45a09; }
.dp-btn.s { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.dp-btn.s:hover { background: var(--border); }
.dp-btn.d { background: #FFF0EE; color: #E24B4A; border: 1px solid #FAC1C1; }
.dp-btn.d:hover { background: #fee2e2; }
.assign-select {
    width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px;
    font-size: 11px; font-family: 'IBM Plex Sans', sans-serif; color: var(--text); margin: 8px 0 0; background: var(--bg); outline: none;
}

/* ── Buttons ── */
.btn-primary { background: var(--orange); color: #fff; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; }
.btn-primary:hover { background: #d45a09; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-family: 'IBM Plex Sans', sans-serif; }
.btn-outline:hover { border-color: var(--navy); }
.btn-sm { background: var(--navy); color: #fff; padding: 4px 10px; border-radius: 6px; text-decoration: none; font-size: 11px; display: inline-block; }
.btn-sm:hover { background: var(--navy2); }

/* ── Filters bar (orders page) ── */
.filters-bar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }

/* ── Full table (orders page) ── */
.nfl-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.nfl-table thead { background: var(--navy); }
.nfl-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 600; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .06em; }
.nfl-table td { padding: 10px 14px; font-size: 12px; border-bottom: 1px solid var(--border); }
.nfl-table tbody tr:hover { background: #FAFBFD; }
.nfl-table tbody tr:last-child td { border-bottom: none; }

/* ── Cards livreurs ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dm-card {
    background: var(--card); border-radius: 10px; padding: 14px;
    border: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start;
}
.dm-avatar { font-size: 28px; color: var(--navy); flex-shrink: 0; }
.dm-info { flex: 1; min-width: 0; }
.dm-name { font-weight: 600; color: var(--text); font-size: 13px; }
.dm-phone { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dm-meta { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 11px; }
.dm-stats { display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.dm-vehicle { font-size: 11px; color: var(--muted); margin-top: 4px; }
.dm-zone { font-size: 10px; background: #EEF2FF; color: #3730A3; padding: 2px 6px; border-radius: 4px; }
.dm-actions { flex-shrink: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-available { background: var(--green); }
.status-onmission { background: var(--blue); }
.status-offline { background: var(--muted); }
.status-suspended { background: var(--red); }

/* ── Pagination ── */
.pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; justify-content: center; }
.pagination span { font-size: 12px; color: var(--muted); }

/* ── Topbar new classes ── */
.nfl-topbar-left { display: flex; align-items: center; }
.nfl-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nfl-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nfl-logo-img { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; }
.login-logo-img { width: 100px; height: 100px; border-radius: 22px; flex-shrink: 0; display: block; margin: 0 auto; }
.nfl-logo-mark {
    width: 32px; height: 32px; background: #E8650A; color: #fff;
    font-weight: 700; font-size: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nfl-logo-text { display: flex; flex-direction: column; }
.nfl-logo-name { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; }
.nfl-logo-role { color: rgba(255,255,255,.45); font-size: 10px; }
.nfl-status-dot { width: 7px; height: 7px; background: #1D9E75; border-radius: 50%; flex-shrink: 0; }
.nfl-status-label { font-size: 11px; color: rgba(255,255,255,.55); }
.nfl-topbar-btn {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.7); width: 32px; height: 32px; border-radius: 7px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.nfl-topbar-btn:hover { background: rgba(255,255,255,.15); }
.nfl-avatar {
    width: 30px; height: 30px; background: #E8650A; color: #fff;
    font-weight: 700; font-size: 13px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ── Sidebar nav new classes ── */
.nav-section-label {
    font-size: 9px; color: rgba(255,255,255,.25); text-transform: uppercase;
    letter-spacing: .1em; padding: 14px 16px 4px;
}
.nav-links { list-style: none; }
.nav-label { flex: 1; }

/* ── Page header new classes ── */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 16px;
}
.page-title { font-size: 18px; font-weight: 600; color: var(--text); }
.page-sub { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: capitalize; }
.nfl-btn-primary {
    background: var(--orange); color: #fff; border: none; padding: 8px 14px;
    border-radius: 8px; cursor: pointer; font-weight: 600;
    font-family: 'IBM Plex Sans', sans-serif; font-size: 12px;
    display: flex; align-items: center; gap: 6px;
}
.nfl-btn-primary:hover { background: #d45a09; }
.nfl-link { font-size: 11px; color: var(--orange); text-decoration: none; }
.nfl-link:hover { text-decoration: underline; }

/* ── KPI icon wrap ── */
.kpi-card { display: flex; align-items: center; gap: 14px; }
.kpi-icon-wrap {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}

/* ── Table extras ── */
.tracking-code { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); }
.date-col { color: var(--muted); font-size: 10px; }
.empty-state { padding: 28px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.col-main { min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ── Map extras ── */
.map-area { height: auto; border-bottom: none; }
.map-sim { height: 200px; position: relative; border-radius: 0 0 10px 10px; overflow: hidden; }
.map-label {
    position: absolute; top: 20%; left: 15%; font-size: 9px;
    font-family: 'IBM Plex Mono', monospace; color: rgba(12,30,62,.4);
    pointer-events: none;
}
.livreur-dot { background: #E8650A; }
.colis-pin { font-size: 11px; color: #fff; display: flex; align-items: center; justify-content: center; }
.map-legend { background: rgba(255,255,255,.9); border-radius: 5px; padding: 4px 8px; font-size: 9px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.map-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.map-dot.livreur { background: #E8650A; }
.map-dot.colis { background: #2563eb; }

/* ── Detail panel extras ── */
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-tracking { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--orange); }
.dp-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.dp-row:last-of-type { border-bottom: none; }
.dp-lbl { color: var(--muted); flex-shrink: 0; }
.dp-actions { display: flex; gap: 6px; margin-top: 10px; }

/* ── Responsive ── */
@media (max-width: 1200px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .nfl-sidebar { display: none; }
    .kpi-row { grid-template-columns: 1fr 1fr; }
}

/* ── Login page ── */
.login-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, #1e3a6e 100%);
    padding: 24px;
}
.login-card {
    background: var(--card); border-radius: 18px; width: 100%; max-width: 400px;
    box-shadow: 0 24px 64px rgba(0,0,0,.3); overflow: hidden;
}
.login-logo {
    background: var(--navy); padding: 20px 28px 16px;
    display: flex; justify-content: center; align-items: center;
}
.login-logo-mark {
    width: 44px; height: 44px; background: var(--orange); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 22px; color: #fff; flex-shrink: 0;
}
.login-logo-name { color: #fff; font-weight: 700; font-size: 16px; }
.login-logo-role { color: rgba(255,255,255,.45); font-size: 11px; margin-top: 2px; }
.login-form-wrap { padding: 28px; }
.login-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.login-error {
    background: #FFF0EE; border: 1px solid #FAC1C1; color: var(--red);
    border-radius: 8px; padding: 10px 14px; font-size: 12px; font-weight: 500;
    margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
}
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 6px; }
.login-input {
    width: 100%; padding: 11px 14px; border: 2px solid var(--border);
    border-radius: 9px; font-size: 14px; outline: none;
    font-family: 'IBM Plex Sans', sans-serif; color: var(--text);
    transition: border-color .15s;
}
.login-input:focus { border-color: var(--navy); }
.input-pw-wrap { position: relative; }
.input-pw-wrap .login-input { padding-right: 42px; }
.pw-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px;
}
.login-btn {
    width: 100%; margin-top: 22px; padding: 13px; background: var(--navy); color: #fff;
    border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
    cursor: pointer; font-family: 'IBM Plex Sans', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: .15s;
}
.login-btn:hover:not(:disabled) { background: var(--navy2); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.login-footer { padding: 16px 28px; text-align: center; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); }

/* ── Topbar user widget ── */
.nfl-user-widget {
    position: relative; display: flex; align-items: center; gap: 10px;
}
.nfl-user-info {
    display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2;
}
.nfl-user-name { font-size: 12px; font-weight: 600; color: #fff; }
.nfl-user-role { font-size: 10px; color: rgba(255,255,255,.45); }
.nfl-avatar-wrap {
    display: flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 3px 6px; border-radius: 8px;
    transition: background .15s;
}
.nfl-avatar-wrap:hover { background: rgba(255,255,255,.1); }
.nfl-chevron { font-size: 10px; color: rgba(255,255,255,.5); transition: transform .2s; }
.nfl-chevron.open { transform: rotate(180deg); }

/* ── Dropdown ── */
.nfl-user-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12); width: 220px; z-index: 500;
    overflow: hidden;
}
.nfl-dropdown-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
}
.nfl-avatar-lg {
    width: 38px; height: 38px; font-size: 16px; flex-shrink: 0;
}
.nfl-dropdown-name { font-size: 13px; font-weight: 600; color: var(--text); }
.nfl-dropdown-role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.nfl-dropdown-divider { height: 1px; background: var(--border); }
.nfl-dropdown-item {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 16px; font-size: 12px; color: var(--text);
    text-decoration: none; cursor: pointer; width: 100%;
    background: none; border: none; font-family: 'IBM Plex Sans', sans-serif;
    transition: background .12s;
}
.nfl-dropdown-item:hover { background: var(--bg); }
.nfl-dropdown-logout { color: var(--red); }
.nfl-dropdown-logout:hover { background: #FFF0EE; }
.nfl-dropdown-backdrop {
    position: fixed; inset: 0; z-index: 499;
}

/* ── Page profil ── */
.nfl-page-header { margin-bottom: 20px; }
.nfl-page-title { font-size: 20px; font-weight: 700; color: var(--text); }
.profile-card {
    background: var(--card); border-radius: 14px; border: 1px solid var(--border);
    max-width: 520px; overflow: hidden;
}
.profile-avatar-section {
    display: flex; align-items: center; gap: 18px;
    padding: 24px; background: var(--navy);
}
.profile-avatar-lg {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--orange); color: #fff;
    font-size: 28px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-name { font-size: 18px; font-weight: 700; color: #fff; }
.profile-role-badge {
    display: inline-block; margin-top: 5px;
    background: rgba(255,255,255,.15); color: rgba(255,255,255,.8);
    font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
    text-transform: uppercase; letter-spacing: .05em;
}
.profile-info-grid {
    display: flex; flex-direction: column; gap: 0;
    padding: 0;
}
.profile-info-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.profile-info-item:last-child { border-bottom: none; }
.profile-info-label { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.profile-info-value { font-weight: 600; color: var(--text); }
.profile-actions {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; gap: 10px;
}
.nfl-btn { padding: 9px 18px; border-radius: 8px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'IBM Plex Sans', sans-serif; display: flex; align-items: center; gap: 7px; text-decoration: none; }
.nfl-btn-danger { background: #FFF0EE; color: var(--red); border: 1px solid #FAC1C1; }
.nfl-btn-danger:hover { background: #fee2e2; }

/* ── Detail page ── */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-body { padding: 4px 0; }
.detail-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 12px; gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.back-link { font-size: 12px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.back-link:hover { color: var(--text); }
.text-green { color: var(--green); font-weight: 600; }
.text-red   { color: var(--red);   font-weight: 600; }

/* ── Timeline ── */
.timeline { padding: 12px 16px; display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 4px; }
.timeline-content { flex: 1; }
.timeline-status { margin-bottom: 2px; }
.timeline-note { font-size: 11px; color: var(--text); margin: 2px 0; }
.timeline-meta { font-size: 10px; color: var(--muted); }

/* ── DM mini ── */
.dm-mini { display: flex; gap: 10px; align-items: center; }
.dm-mini .dm-avatar { font-size: 32px; color: var(--navy); flex-shrink: 0; }

/* ── Alert ── */
.alert-success { background: #E8F5EE; border: 1px solid #A7D9C0; color: #0F6E56; border-radius: 7px; padding: 8px 12px; font-size: 12px; }
.alert-error   { background: #FFF0EE; border: 1px solid #FAC1C1; color: var(--red); border-radius: 7px; padding: 8px 12px; font-size: 12px; margin-bottom: 14px; }

/* ── Zones page ── */
.zones-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.zone-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px; cursor: pointer; transition: .15s;
}
.zone-card:hover { border-color: var(--orange); }
.zone-card-active { border-color: var(--orange); background: #FFF6F0; }
.zone-card-head { display: flex; align-items: center; gap: 10px; }
.zone-icon { font-size: 22px; color: var(--orange); flex-shrink: 0; }
.zone-name { font-weight: 600; font-size: 13px; color: var(--text); }
.zone-city { font-size: 11px; color: var(--muted); }
.zone-status { margin-left: auto; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 10px; }
.zone-active { background: #E8F5EE; color: #0F6E56; }
.zone-inactive { background: #F3F4F6; color: #6B7280; }
.tariffs-section { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* ── Relay points ── */
.relay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.relay-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.relay-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.relay-icon { font-size: 24px; color: var(--blue); flex-shrink: 0; }
.relay-name { font-weight: 600; font-size: 13px; color: var(--text); }
.relay-addr { font-size: 11px; color: var(--muted); margin-top: 2px; }
.relay-info { flex: 1; min-width: 0; }
.relay-details { display: flex; flex-direction: column; gap: 5px; }
.relay-detail-item { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ── Form card (new delivery man) ── */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-width: 600px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.nfl-input {
    padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; font-family: 'IBM Plex Sans', sans-serif; color: var(--text);
    background: var(--bg); outline: none; transition: border-color .15s; width: 100%;
}
.nfl-input:focus { border-color: var(--navy); background: #fff; }
.req { color: var(--red); }

/* ── Stat mini ── */
.stat-mini { text-align: center; padding: 8px; background: var(--bg); border-radius: 8px; }
.stat-mini-val { font-size: 20px; font-weight: 700; color: var(--text); }
.stat-mini-lbl { font-size: 10px; color: var(--muted); margin-top: 2px; }
