/* ============================================================
   OkadaExpress — Professional Courier & Logistics UI
   ============================================================ */

/* ── Google Fonts import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS custom properties (Light Theme) ─────────────────── */
:root {
    --primary:       #FF6B35;
    --primary-dk:    #e55a22;
    --primary-lt:    #ff8a5c;
    --primary-glow:  rgba(255,107,53,0.25);
    --secondary:     #1B2845;
    --secondary-lt:  #243352;
    --secondary-md:  #162236;
    --accent:        #F7931E;
    --accent-lt:     #ffa94d;

    --bg:            #f0f2f5;
    --bg-alt:        #e8eaed;
    --card-bg:       #ffffff;
    --card-bg-hover: #f8f9fa;
    --text:          #1a1a2e;
    --text-secondary:#4a5568;
    --text-muted:    #718096;
    --border:        #e2e8f0;
    --border-lt:     #edf2f7;

    --success:       #22c55e;
    --success-bg:    #f0fdf4;
    --success-text:  #166534;
    --danger:        #ef4444;
    --danger-bg:     #fef2f2;
    --danger-text:   #991b1b;
    --warning:       #f59e0b;
    --warning-bg:    #fffbeb;
    --warning-text:  #92400e;
    --info:          #3b82f6;
    --info-bg:       #eff6ff;
    --info-text:     #1e40af;

    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     18px;
    --radius-xl:     24px;
    --radius-pill:   50px;

    --shadow-xs:     0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
    --shadow:        0 4px 16px rgba(0,0,0,0.10);
    --shadow-md:     0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg:     0 16px 48px rgba(0,0,0,0.16);

    --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
    --transition-md: 0.3s cubic-bezier(0.4,0,0.2,1);

    --nav-height:    64px;
    --sidebar-w:     240px;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme="dark"], .dark-mode {
    --bg:            #0f1117;
    --bg-alt:        #161822;
    --card-bg:       #1a1d2e;
    --card-bg-hover: #222639;
    --text:          #eef0f4;
    --text-secondary:#a0aec0;
    --text-muted:    #718096;
    --border:        #2d3148;
    --border-lt:     #252839;
    --shadow-xs:     0 1px 3px rgba(0,0,0,0.25);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
    --shadow:        0 4px 16px rgba(0,0,0,0.35);
    --shadow-md:     0 8px 30px rgba(0,0,0,0.4);
    --success-bg:    #14291f;
    --danger-bg:     #2a1215;
    --warning-bg:    #2a2010;
    --info-bg:       #1a2035;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #0f1117;
        --bg-alt:        #161822;
        --card-bg:       #1a1d2e;
        --card-bg-hover: #222639;
        --text:          #eef0f4;
        --text-secondary:#a0aec0;
        --text-muted:    #718096;
        --border:        #2d3148;
        --border-lt:     #252839;
        --shadow-xs:     0 1px 3px rgba(0,0,0,0.25);
        --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
        --shadow:        0 4px 16px rgba(0,0,0,0.35);
        --shadow-md:     0 8px 30px rgba(0,0,0,0.4);
        --success-bg:    #14291f;
        --danger-bg:     #2a1215;
        --warning-bg:    #2a2010;
        --info-bg:       #1a2035;
    }
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    transition: background var(--transition), color var(--transition);
}

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

img { max-width: 100%; height: auto; display: block; }

input, select, textarea, button { font-family: inherit; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   NAVBAR — Sticky top navigation bar
   ════════════════════════════════════════════════════════════ */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow var(--transition);
    gap: 16px;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

/* Brand */
.nav-brand {
    font-size: 1.3rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}
.nav-brand .brand-icon { font-size: 1.4rem; }
.nav-brand .brand-express { color: var(--primary); }

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav-links a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}
.nav-links a:hover {
    background: var(--bg);
    color: var(--text);
}
.nav-links a.active,
.nav-links a[class*="active"] {
    background: linear-gradient(135deg, rgba(255,107,53,0.10), rgba(255,107,53,0.05));
    color: var(--primary);
    font-weight: 600;
}

/* Nav User Section */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-user-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text);
}
.nav-role-badge {
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}
.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Logout Button */
.logout-btn {
    background: var(--bg);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.80rem;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}
.logout-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

/* Mobile Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
}
.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transition: right var(--transition-md);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    overflow-y: auto;
}
.mobile-nav.open { right: 0; }
.mobile-nav-close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    line-height: 1;
}
.mobile-nav-header {
    padding: 0 24px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.mobile-nav-header .nav-brand { margin-bottom: 10px; }
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: linear-gradient(90deg, rgba(255,107,53,0.08), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
}
.mobile-nav-footer {
    margin-top: auto;
    padding: 20px 24px 0;
    border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════════════════════════ */
.page-wrap {
    max-width: 1080px;
    margin: 28px auto;
    padding: 0 24px;
    animation: fadeUp 0.35s ease both;
}
.page-wrap.narrow  { max-width: 560px; }
.page-wrap.wide    { max-width: 1320px; }
.page-wrap.full    { max-width: 100%; padding: 0; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.page-title .title-icon { margin-right: 8px; }
.page-subtitle {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 0.90rem;
    font-weight: 400;
}

/* ════════════════════════════════════════════════════════════
   FLASH / ALERT MESSAGES
   ════════════════════════════════════════════════════════════ */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.90rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    border: 1px solid transparent;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.flash-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.flash-success { background: var(--success-bg); border-color: rgba(34,197,94,0.2); color: var(--success-text); }
.flash-error   { background: var(--danger-bg);  border-color: rgba(239,68,68,0.2);  color: var(--danger-text); }
.flash-warning { background: var(--warning-bg); border-color: rgba(245,158,11,0.2); color: var(--warning-text); }
.flash-info    { background: var(--info-bg);    border-color: rgba(59,130,246,0.2);  color: var(--info-text); }

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow); border-color: rgba(255,107,53,0.15); }
.card-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-header .card-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Colored card tops */
.card-accent-top { border-top: 3px solid var(--primary); }
.card-success-top { border-top: 3px solid var(--success); }
.card-info-top { border-top: 3px solid var(--info); }
.card-warning-top { border-top: 3px solid var(--warning); }

/* ════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard KPI Row)
   ════════════════════════════════════════════════════════════ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 22px 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
/* Subtle gradient background strip */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}
.stat-icon-wrap.orange  { background: rgba(255,107,53,0.10); }
.stat-icon-wrap.blue    { background: rgba(59,130,246,0.10); }
.stat-icon-wrap.green   { background: rgba(34,197,94,0.10); }
.stat-icon-wrap.purple  { background: rgba(139,92,246,0.10); }
.stat-icon-wrap.red     { background: rgba(239,68,68,0.10); }
.stat-icon-wrap.yellow  { background: rgba(245,158,11,0.10); }

.stat-content { flex: 1; min-width: 0; }
.stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.80rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-top: 3px;
}
/* Legacy support: emoji-style stat cards */
.stat-card .stat-icon  { font-size: 1.6rem; margin-bottom: 6px; text-align: center; }
.stat-card > .stat-value { text-align: center; }
.stat-card > .stat-label { text-align: center; }

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group .label-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-left: 6px;
}

/* Input Wrapper (for icon inputs) */
.input-wrap {
    position: relative;
}
.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}
.input-wrap input { padding-left: 42px !important; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.94rem;
    background: var(--card-bg);
    color: var(--text);
    transition: all var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--card-bg);
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* Form Row (2-col grid) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* File Upload Styled */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg);
}
.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(255,107,53,0.04);
}
.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-upload-area .upload-icon { font-size: 2rem; margin-bottom: 6px; }
.file-upload-area .upload-text { font-size: 0.85rem; color: var(--text-muted); }
.file-upload-area .upload-text strong { color: var(--primary); }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.90rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.96); }

/* Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: #fff;
    box-shadow: 0 3px 12px var(--primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 5px 18px rgba(255,107,53,0.40);
    color: #fff;
}

/* Secondary / Dark */
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-md));
    color: #fff;
    box-shadow: 0 3px 10px rgba(27,40,69,0.25);
}
.btn-secondary:hover {
    box-shadow: 0 5px 16px rgba(27,40,69,0.35);
    color: #fff;
}

/* Success / Danger / Warning / Info */
.btn-success  { background: linear-gradient(135deg, #22c55e, #16a34a); color:#fff; box-shadow: 0 3px 10px rgba(34,197,94,0.3); }
.btn-success:hover  { box-shadow: 0 5px 16px rgba(34,197,94,0.4); color:#fff; }
.btn-danger   { background: linear-gradient(135deg, #ef4444, #dc2626); color:#fff; box-shadow: 0 3px 10px rgba(239,68,68,0.3); }
.btn-danger:hover   { box-shadow: 0 5px 16px rgba(239,68,68,0.4); color:#fff; }
.btn-warning  { background: linear-gradient(135deg, #f59e0b, #d97706); color:#fff; box-shadow: 0 3px 10px rgba(245,158,11,0.3); }
.btn-warning:hover  { box-shadow: 0 5px 16px rgba(245,158,11,0.4); color:#fff; }
.btn-info     { background: linear-gradient(135deg, #3b82f6, #2563eb); color:#fff; box-shadow: 0 3px 10px rgba(59,130,246,0.3); }
.btn-info:hover     { box-shadow: 0 5px 16px rgba(59,130,246,0.4); color:#fff; }

/* Outline */
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline::after { display: none; }

/* Ghost */
.btn-ghost {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--card-bg-hover); border-color: var(--primary); color: var(--primary); }
.btn-ghost::after { display: none; }

/* Sizes */
.btn-full { width: 100%; }
.btn-sm   { padding: 7px 16px; font-size: 0.80rem; }
.btn-lg   { padding: 14px 32px; font-size: 1.00rem; }
.btn-xs   { padding: 4px 10px; font-size: 0.72rem; border-radius: 6px; }

/* Icon-only button */
.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius);
    font-size: 1.1rem;
}

/* ════════════════════════════════════════════════════════════
   MAP CONTAINER
   ════════════════════════════════════════════════════════════ */
.map-container {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.map-container.tall { height: 480px; }
.map-container.short { height: 280px; }

/* Map hint overlay */
.map-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(27,40,69,0.85);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.80rem;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    z-index: 10;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
}
table.okx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
table.okx-table th {
    background: var(--bg);
    color: var(--text-secondary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}
table.okx-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-lt);
    color: var(--text-secondary);
    vertical-align: middle;
}
table.okx-table tr:last-child td { border-bottom: none; }
table.okx-table tbody tr {
    transition: background var(--transition);
}
table.okx-table tbody tr:hover td { background: var(--card-bg-hover); }
table.okx-table td strong { color: var(--text); font-weight: 600; }

/* Empty state in table */
.table-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.table-empty .empty-icon { font-size: 2.5rem; margin-bottom: 8px; }
.table-empty p { font-size: 0.90rem; }

/* ════════════════════════════════════════════════════════════
   STATUS BADGES
   ════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-pending    { background: var(--warning-bg); color: var(--warning-text); }
.badge-pending::before { background: var(--warning); }
.badge-confirmed  { background: var(--info-bg);    color: var(--info-text); }
.badge-confirmed::before { background: var(--info); }
.badge-assigned   { background: #eef2ff; color: #3730a3; }
.badge-assigned::before { background: #6366f1; }
.badge-enroute, .badge-rider_en_route_pickup, .badge-en_route_delivery
                  { background: #fdf2f8; color: #be185d; }
.badge-enroute::before, .badge-rider_en_route_pickup::before, .badge-en_route_delivery::before
                  { background: #ec4899; }
.badge-picked_up  { background: #f0fdf4; color: #15803d; }
.badge-picked_up::before { background: #22c55e; }
.badge-delivered  { background: var(--success-bg);  color: var(--success-text); }
.badge-delivered::before { background: var(--success); }
.badge-cancelled  { background: var(--danger-bg);   color: var(--danger-text); }
.badge-cancelled::before { background: var(--danger); }
.badge-active     { background: var(--success-bg);  color: var(--success-text); }
.badge-active::before { background: var(--success); }
.badge-available  { background: var(--success-bg);  color: var(--success-text); }
.badge-available::before { background: var(--success); }
.badge-offline    { background: var(--bg); color: var(--text-muted); }
.badge-offline::before { background: var(--text-muted); }
.badge-busy       { background: var(--warning-bg); color: var(--warning-text); }
.badge-busy::before { background: var(--warning); }
.badge-pending    { background: var(--warning-bg); color: var(--warning-text); }
.badge-suspended  { background: var(--danger-bg); color: var(--danger-text); }
.badge-suspended::before { background: var(--danger); }

/* ════════════════════════════════════════════════════════════
   AVAILABILITY TOGGLE (Rider)
   ════════════════════════════════════════════════════════════ */
.avail-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.avail-btn {
    padding: 9px 22px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.87rem;
    font-weight: 600;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
}
.avail-btn:hover { border-color: var(--text-muted); }
.avail-btn .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}
.avail-btn.active-online  { border-color: var(--success);  background: var(--success-bg); color: var(--success-text); }
.avail-btn.active-online .dot  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.avail-btn.active-busy    { border-color: var(--warning);  background: var(--warning-bg); color: var(--warning-text); }
.avail-btn.active-busy .dot    { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.avail-btn.active-offline { border-color: var(--text-muted); background: var(--bg); color: var(--text-muted); }
.avail-btn.active-offline .dot { background: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   ORDER STATUS TIMELINE
   ════════════════════════════════════════════════════════════ */
.status-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 28px;
}
.status-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
}
.timeline-step {
    position: relative;
    padding: 10px 0 10px 18px;
}
.timeline-step .step-dot {
    position: absolute;
    left: -28px;
    top: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--border);
    background: var(--card-bg);
    z-index: 1;
    transition: all var(--transition);
}
.timeline-step.completed .step-dot {
    border-color: var(--success);
    background: var(--success);
}
.timeline-step.active .step-dot {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.timeline-step .step-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}
.timeline-step.completed .step-label { color: var(--success-text); }
.timeline-step.active .step-label    { color: var(--primary); }
.timeline-step .step-time {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════
   STAR RATING
   ════════════════════════════════════════════════════════════ */
.star-rating {
    display: flex;
    gap: 4px;
}
.star-rating input { display: none; }
.star-rating label {
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--border);
    transition: color var(--transition);
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   AUTH PAGES (Login / Register / Verify)
   ════════════════════════════════════════════════════════════ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(145deg, var(--secondary) 0%, #0f1e3a 50%, #081528 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}
/* Decorative blobs */
.auth-container::before,
.auth-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}
.auth-container::before {
    width: 400px; height: 400px;
    background: var(--primary);
    top: -100px; left: -100px;
}
.auth-container::after {
    width: 350px; height: 350px;
    background: var(--accent);
    bottom: -80px; right: -80px;
}

.auth-box {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 4px;
}
.auth-logo .logo-icon { font-size: 2.4rem; display: block; margin-bottom: 6px; }
.auth-logo .logo-text {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}
.auth-logo .logo-text .express { color: var(--primary); }

.expresstitle {
	color: #FF5533;
}	

.okadatitle {
	color: #0BBA11;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 30px;
    font-weight: 400;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.80rem;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.auth-footer a { font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   LANDING PAGE (index.php)
   ════════════════════════════════════════════════════════════ */
.landing {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--secondary) 0%, #0f1e3a 45%, #081528 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 60px 24px 40px;
    position: relative;
    overflow: hidden;
}

/* Animated background shapes */
.landing-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}
.landing-bg-shape:nth-child(1) { width: 500px; height: 500px; background: var(--primary); top: -150px; left: -100px; animation-delay: 0s; }
.landing-bg-shape:nth-child(2) { width: 400px; height: 400px; background: var(--accent); bottom: -100px; right: -80px; animation-delay: -3s; }
.landing-bg-shape:nth-child(3) { width: 300px; height: 300px; background: #3b82f6; top: 40%; left: 60%; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(20px, -20px) scale(1.05); }
    66%  { transform: translate(-15px, 15px) scale(0.95); }
}

/* Landing content */
.landing-content { position: relative; z-index: 1; max-width: 480px; width: 100%; }

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,107,53,0.12);
    border: 1px solid rgba(255,107,53,0.25);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-lt);
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}
.landing-badge .badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.landing-icon {
    font-size: 4.5rem;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 12px rgba(255,107,53,0.3));
    animation: bob 3s ease-in-out infinite;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.landing-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    line-height: 1.1;
}
.landing-title .express { color: var(--primary); }

.landing-sub {
    font-size: 1.05rem;
    opacity: 0.7;
    margin-bottom: 44px;
    line-height: 1.6;
    font-weight: 400;
}

/* Role Buttons */
.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.role-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-md);
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.role-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(255,107,53,0.15);
    color: #fff;
}
.role-btn .role-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: background var(--transition);
}
.role-btn:hover .role-icon-wrap { background: rgba(255,107,53,0.25); }

.role-btn .role-text { text-align: left; }
.role-btn .role-text strong { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.role-btn .role-text small  { opacity: 0.58; font-size: 0.82rem; font-weight: 400; }

.role-btn .role-arrow {
    margin-left: auto;
    opacity: 0.35;
    font-size: 1.1rem;
    transition: opacity var(--transition), transform var(--transition);
}
.role-btn:hover .role-arrow { opacity: 0.7; transform: translateX(3px); }

/* Landing Features Strip */
.landing-features {
    display: flex;
    gap: 24px;
    margin-top: 52px;
    justify-content: center;
    flex-wrap: wrap;
}
.landing-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    opacity: 0.55;
    font-weight: 500;
}
.landing-feature .feat-icon { font-size: 1rem; }

.landing-footer {
    margin-top: 36px;
    font-size: 0.80rem;
    opacity: 0.38;
    position: relative;
    z-index: 1;
}

/* DB status (dev) */
.db-status {
    margin-top: 20px;
    font-size: 0.78rem;
    opacity: 0.4;
    position: relative;
    z-index: 1;
}
.db-status .connected { color: #4ade80; font-weight: 600; }
.db-status .disconnected { color: #f87171; font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   DARK MODE TOGGLE (floating)
   ════════════════════════════════════════════════════════════ */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 500;
    transition: all var(--transition);
}
.theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

/* ════════════════════════════════════════════════════════════
   FARE SUMMARY BOX
   ════════════════════════════════════════════════════════════ */
.fare-summary {
    background: linear-gradient(135deg, #f8fafa, #f0f7ff);
    border: 1px solid #e0ecf5;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 4px;
}
.fare-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.fare-row .fare-label { font-weight: 500; }
.fare-row .fare-val   { font-weight: 600; color: var(--text); }
.fare-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    margin-top: 10px;
    border-top: 2px solid var(--border);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}
.fare-total .fare-val { color: var(--primary); font-size: 1.25rem; }

/* ════════════════════════════════════════════════════════════
   QUICK ACTION BUTTONS ROW
   ════════════════════════════════════════════════════════════ */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   ORDER DETAIL CARD (two-column info grid)
   ════════════════════════════════════════════════════════════ */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.info-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.info-item .info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.info-item .info-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   EARNINGS / TRIP CARD
   ════════════════════════════════════════════════════════════ */
.trip-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background var(--transition);
}
.trip-card:hover { background: var(--card-bg-hover); }
.trip-card .trip-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255,107,53,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.trip-card .trip-info { flex: 1; min-width: 0; }
.trip-card .trip-info strong { font-size: 0.90rem; color: var(--text); }
.trip-card .trip-info small  { font-size: 0.78rem; color: var(--text-muted); }
.trip-card .trip-earning { font-weight: 800; color: var(--success); font-size: 1rem; }

/* ════════════════════════════════════════════════════════════
   PERIOD TABS (Earnings)
   ════════════════════════════════════════════════════════════ */
.period-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}
.period-tab {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    transition: all var(--transition);
    text-decoration: none;
}
.period-tab:hover { color: var(--text); }
.period-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

/* ════════════════════════════════════════════════════════════
   FILTER PILLS ROW
   ════════════════════════════════════════════════════════════ */
.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.filter-pill {
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }
.text-secondary-color { color: var(--text-secondary) !important; }
.text-sm      { font-size: 0.82rem; }
.text-xs      { font-size: 0.74rem; }
.text-lg      { font-size: 1.1rem; }
.fw-bold      { font-weight: 700; }
.fw-800       { font-weight: 800; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.mb-4  { margin-bottom: 32px; }
.p-0   { padding: 0; }
.p-1   { padding: 8px; }
.p-2   { padding: 16px; }
.p-3   { padding: 24px; }

.d-none { display: none !important; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.flex-wrap { flex-wrap: wrap; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.border-0 { border: none !important; }
.shadow-none { box-shadow: none !important; }

/* Truncate long text */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════════════
   LOADING SPINNER
   ════════════════════════════════════════════════════════════ */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 34px; height: 34px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
   ════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .page-wrap { padding: 0 18px; margin: 20px auto; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-row, .form-row-3 { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .landing-title { font-size: 2.6rem; }
}

/* Mobile */
@media (max-width: 680px) {
    :root { --nav-height: auto; }

    .navbar {
        height: auto;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .page-wrap  { padding: 0 14px; margin: 16px auto; }
    .page-title { font-size: 1.35rem; }

    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 16px 14px; }
    .stat-value { font-size: 1.3rem; }

    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }

    .auth-box  { padding: 32px 22px; }
    .auth-logo .logo-text { font-size: 1.4rem; }

    .landing { padding: 50px 18px 36px; }
    .landing-title { font-size: 2rem; }
    .landing-icon  { font-size: 3.2rem; }
    .landing-sub   { font-size: 0.95rem; }
    .role-btn { padding: 16px 18px; }

    .map-container { height: 300px; }
    .map-container.tall { height: 340px; }

    table.okx-table th, table.okx-table td { padding: 10px 10px; font-size: 0.82rem; }

    .btn { padding: 10px 20px; font-size: 0.87rem; }
    .btn-lg { padding: 13px 26px; font-size: 0.95rem; }

    .period-tabs { width: 100%; }
    .period-tab  { flex: 1; text-align: center; }

    .landing-features { flex-direction: column; align-items: center; gap: 10px; }

    .theme-toggle { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* Very small screens */
@media (max-width: 380px) {
    .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px 10px; }
    .stat-value { font-size: 1.15rem; }
    .landing-title { font-size: 1.7rem; }
    .role-btn { gap: 12px; }
    .role-btn .role-icon-wrap { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ========================================================
   PAGINATION
   ======================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 18px 20px 10px;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
}
.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255,107,53,0.06);
}
.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,107,53,0.30);
}

/* ========================================================
   TIMELINE STEP DESCRIPTION
   ======================================================== */
.timeline-step .step-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.timeline-step.completed .step-desc { color: var(--text-muted); }
.timeline-step.active   .step-desc  { color: var(--text-muted); }

/* ========================================================
   NOTIFICATION BELL + DROPDOWN
   ======================================================== */
.notif-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.notif-bell {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
}
.notif-bell:hover {
    background: var(--bg);
    border-color: var(--primary);
}
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
    line-height: 1;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-width: 90vw;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 2000;
    display: none;
    flex-direction: column;
    animation: dropSlide 0.18s ease;
    overflow: hidden;
}
.notif-dropdown.open { display: flex; }
@keyframes dropSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}
.notif-dropdown-header .nd-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
}
.notif-dropdown-header .nd-mark-read {
    font-size: 0.78rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    border: none;
    background: none;
}
.notif-dropdown-header .nd-mark-read:hover { text-decoration: underline; }
.notif-list {
    max-height: 340px;
    overflow-y: auto;
}
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-lt);
    transition: background var(--transition);
    cursor: default;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--info-bg); }
.notif-item.unread:hover { background: #dbeafe; }
[data-theme="dark"] .notif-item.unread { background: #1a2035; }
.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-body .ni-text {
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 3px;
}
.notif-item-body .ni-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}
.notif-empty .ne-icon { font-size: 2rem; display: block; margin-bottom: 6px; }

/* ========================================================
   STAR RATING (customer rating a rider)
   ======================================================== */
.star-rating-wrap {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
}
.star-rating-wrap input[type="radio"] {
    display: none;
}
.star-rating-wrap label {
    font-size: 2.2rem;
    color: var(--border);
    cursor: pointer;
    transition: color 0.15s, transform 0.12s;
}
.star-rating-wrap input:checked ~ label,
.star-rating-wrap label:hover,
.star-rating-wrap label:hover ~ label {
    color: #f59e0b;
}
.star-rating-wrap label:hover { transform: scale(1.1); }
.rating-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rating-modal-overlay.open { display: flex; }
.rating-modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    padding: 32px 28px 28px;
    text-align: center;
    animation: modalPop 0.22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalPop {
    from { opacity:0; transform: scale(0.88); }
    to   { opacity:1; transform: scale(1); }
}
.rating-modal .rm-icon { font-size: 2.6rem; margin-bottom: 8px; }
.rating-modal .rm-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text);
}
.rating-modal .rm-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.rating-modal .rm-feedback {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text);
    resize: vertical;
    min-height: 64px;
    margin-top: 10px;
    margin-bottom: 16px;
}
.rating-modal .rm-feedback:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.rating-modal .rm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ========================================================
   INVOICE DOWNLOAD BUTTON
   ======================================================== */
.btn-invoice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-invoice:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255,107,53,0.06);
}

/* ========================================================
   PROFILE / SETTINGS PAGES
   ======================================================== */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 24px 28px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.profile-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
    position: relative;
}
.profile-avatar-lg img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar-lg .avatar-upload-btn {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: #fff;
    transition: background var(--transition);
}
.profile-avatar-lg .avatar-upload-btn:hover { background: var(--primary-dk); }
.profile-info-block { flex: 1; min-width: 0; }
.profile-info-block .pi-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}
.profile-info-block .pi-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.profile-info-block .pi-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.profile-stat {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
    box-shadow: var(--shadow-xs);
}
.profile-stat .ps-value {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
}
.profile-stat .ps-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: 16px;
    overflow: hidden;
}
.settings-section-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    padding: 14px 20px 10px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-lt);
    flex-wrap: wrap;
    gap: 10px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-left .sr-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.settings-row-left .sr-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.25s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ========================================================
   IN-APP CALL UI (WebRTC)
   ======================================================== */
.call-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
}
.call-modal-overlay.open { display: flex; }
.call-modal {
    background: #1B2845;
    border-radius: var(--radius-lg);
    width: 300px;
    max-width: 90vw;
    padding: 40px 28px 32px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.22s cubic-bezier(.34,1.56,.64,1);
}
.call-modal .cm-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 2.2rem;
}
.call-modal .cm-avatar.ringing {
    animation: pulse-ring 1.2s ease infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(255,107,53,0.5); }
    70%  { box-shadow: 0 0 0 16px rgba(255,107,53,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}
.call-modal .cm-name {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 4px;
}
.call-modal .cm-status {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
}
.call-modal .cm-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.call-modal .cm-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.call-modal .cm-btn:hover { transform: scale(1.08); filter: brightness(1.1); }
.call-modal .cm-btn.btn-answer { background: #22c55e; color: #fff; }
.call-modal .cm-btn.btn-decline { background: #ef4444; color: #fff; }
.call-modal .cm-btn.btn-hangup  { background: #ef4444; color: #fff; }
.call-modal .cm-btn.btn-mute    { background: rgba(255,255,255,0.15); color: #fff; }
.call-modal .cm-btn.btn-speaker { background: rgba(255,255,255,0.15); color: #fff; }
.call-modal .cm-btn-row-top {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}
.call-modal .cm-timer {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* ========================================================
   PAYMENT METHOD BADGES (expanded)
   ======================================================== */
.payment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}
.payment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.18s;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.payment-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.payment-chip.selected {
    border-color: var(--primary);
    background: rgba(255,107,53,0.08);
    color: var(--primary);
}
.payment-chip .pc-icon { font-size: 1.1rem; }

/* ========================================================
   RESPONSIVE ADDITIONS
   ======================================================== */
@media (max-width: 680px) {
    .notif-dropdown { width: 300px; }
    .profile-hero { padding: 18px; }
    .profile-avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
    .call-modal { width: 280px; }
}
@media (max-width: 380px) {
    .notif-dropdown { width: 90vw; }
    .rating-modal { padding: 24px 18px 20px; }
}

/* ========================================================
   INTERACTIVE STAR RATING
   ======================================================== */
.star-rating-wrap {
    padding: 16px 0 4px;
}
.star-rating-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.star-rating-row {
    display: flex;
    gap: 4px;
    direction: ltr;
}
.star-input {
    display: none;
}
.star-label {
    font-size: 2.2rem;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.15s ease, transform 0.12s ease;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1;
}
.star-label:hover,
.star-label.hovered,
.star-label.selected {
    color: #F7931E;
}
.star-label:hover {
    transform: scale(1.15);
}
.star-rating-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 6px;
    min-height: 1.2em;
    font-weight: 500;
    transition: color 0.2s;
}

/* ========================================================
   CONTACT BUTTONS (call / SMS)
   ======================================================== */
.contact-btns {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.contact-btn-call {
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.07);
}
.contact-btn-call:hover {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.6);
}
.contact-btn-sms {
    border-color: rgba(59,130,246,0.4);
    background: rgba(59,130,246,0.07);
}
.contact-btn-sms:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.6);
}

/* ========================================================
   PROFILE HERO & SETTINGS SECTIONS
   ======================================================== */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}
.profile-avatar-lg {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #1B2845);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(255,107,53,0.25);
}
.profile-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.avatar-upload-btn:hover { background: #e55a22; }
.profile-info-block {
    flex: 1;
    min-width: 0;
}
.pi-name {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pi-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.pi-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Profile Stats Row */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.profile-stat {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
    box-shadow: var(--shadow);
}
.ps-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}
.ps-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Settings Sections */
.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.settings-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 20px;
    background: var(--card-header-bg, rgba(27,40,69,0.04));
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .settings-section-title {
    background: rgba(255,255,255,0.04);
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-left { flex: 1; min-width: 0; }
.sr-label {
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--text);
}
.sr-desc {
    font-size: 0.79rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: background 0.25s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Form Label helper */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

/* ========================================================
   RESPONSIVE — profile hero
   ======================================================== */
@media (max-width: 480px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }
    .profile-info-block { text-align: center; }
    .pi-badges { justify-content: center; }
    .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
}
