/* =============================================
   NEXRIDE PRO - MOBILE-FIRST APP DESIGN
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --success: #34d399;
    --danger: #f43f5e;
    --warning: #fbbf24;
    --bg-app: #0a0a0f;
    --bg-card: #13131a;
    --bg-elevated: #1a1a24;
    --glass-bg: rgba(19, 19, 26, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-muted: #6b7280;
    --radius: 16px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   AUTH SCREENS (Login / Register)
   ============================================= */
.auth-wrapper {
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, #0a0a0f 0%, #0d1117 50%, #101820 100%);
}

.auth-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; }
.auth-header h1 i { color: var(--primary); margin-right: 0.5rem; }
.auth-header p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.95rem; }

.input-group { margin-bottom: 1.2rem; }
.input-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 0.9rem 1rem; font-size: 1rem;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
    border-radius: 12px; color: #fff; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}
.input-group select option { background: var(--bg-card); color: #fff; }

.error-msg {
    background: rgba(244, 63, 94, 0.1); color: var(--danger);
    padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.9rem;
    margin-bottom: 1.2rem; border: 1px solid rgba(244, 63, 94, 0.2);
}

.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 0.85rem 1.5rem; font-size: 1rem; font-weight: 600;
    border: none; border-radius: 14px; cursor: pointer; font-family: inherit;
    transition: transform 0.15s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #000; }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); color: #000; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #dc2626); color: #fff; }
.btn-small { padding: 0.4rem 0.7rem; font-size: 0.78rem; width: auto; display: inline-flex; border-radius: 10px; }

/* =============================================
   APP LAYOUT (Mobile-First)
   ============================================= */
.dashboard-layout {
    display: flex; flex-direction: column;
    height: 100vh; height: 100dvh;
    position: relative; overflow: hidden;
}

/* Top Bar - App Header */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.2rem;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.topbar h2 { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }

.user-profile { display: flex; align-items: center; gap: 0.8rem; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: #000; font-weight: 700;
}

/* Bottom Nav Bar - Mobile App Style */
.sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding-bottom: var(--safe-bottom);
}
.sidebar .logo { display: none; }
.sidebar .nav-links {
    list-style: none; display: flex; justify-content: space-around;
    padding: 0.5rem 0.3rem;
}
.sidebar .nav-links li { flex: 1; }
.sidebar .nav-links li.logout-link { display: none; }
.sidebar .nav-links a {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    text-decoration: none; color: var(--text-muted);
    font-size: 0.65rem; font-weight: 500; padding: 0.4rem 0;
    transition: color 0.2s;
    position: relative;
}
.sidebar .nav-links a i { font-size: 1.2rem; }
.sidebar .nav-links a.active { color: var(--primary); }
.sidebar .nav-links a.active::before {
    content: ''; position: absolute; top: -0.5rem;
    width: 24px; height: 3px; background: var(--primary);
    border-radius: 0 0 4px 4px;
}

/* Badge on nav items */
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; font-size: 0.65rem; font-weight: 700;
    border-radius: 10px; padding: 0 5px; line-height: 1;
}
.badge-success { background: rgba(52, 211, 153, 0.2); color: var(--success); }
.badge-danger { background: rgba(244, 63, 94, 0.2); color: var(--danger); }
.badge-warning { background: rgba(251, 191, 36, 0.2); color: var(--warning); }

/* Main Content Area */
.main-content {
    flex: 1; overflow: hidden;
    padding-bottom: calc(65px + var(--safe-bottom));
}

/* =============================================
   DATA TABLES (Scrollable on Mobile)
   ============================================= */
.data-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
    white-space: nowrap;
}
.data-table thead th {
    background: rgba(255,255,255,0.03); color: var(--text-muted);
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 0.8rem 1rem; text-align: left;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0;
}
.data-table tbody td {
    padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:active { background: rgba(255,255,255,0.03); }

/* =============================================
   FLOATING PANEL (Map Overlay)
   ============================================= */
.floating-panel {
    position: absolute; bottom: 75px; left: 1rem; right: 1rem;
    z-index: 800;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    max-height: 70vh; overflow-y: auto;
}

/* =============================================
   KYC BANNER
   ============================================= */
.kyc-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem; background: rgba(251, 191, 36, 0.08);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

/* =============================================
   CATEGORY CARDS
   ============================================= */
.cat-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px; cursor: pointer;
    transition: all 0.2s;
}
.cat-card:active, .cat-card.selected {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}
.cat-info { display: flex; align-items: center; gap: 0.8rem; }
.cat-icon {
    font-size: 1.3rem; color: var(--primary);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 212, 255, 0.1); border-radius: 12px;
}
.cat-price { font-weight: 700; font-size: 1.05rem; color: var(--success); }

/* =============================================
   SKELETON LOADER
   ============================================= */
.skeleton-loader {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%; border-radius: 12px;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   TICKET / LIST ITEM
   ============================================= */
.ticket {
    background: var(--bg-card);
    border-left: 3px solid var(--primary);
    padding: 1rem; border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary);
}

/* =============================================
   DESKTOP OVERRIDES (768px+)
   ============================================= */
@media (min-width: 769px) {
    .dashboard-layout { flex-direction: row; }

    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0;
        width: 220px; border-top: none; border-right: 1px solid var(--border-color);
        padding-bottom: 0; flex-direction: column;
    }
    .sidebar .logo {
        display: flex; align-items: center; gap: 0.6rem;
        padding: 1.2rem; font-size: 1.2rem; font-weight: 800;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar .logo i { color: var(--primary); }
    .sidebar .nav-links {
        flex-direction: column; padding: 0.5rem;
        height: calc(100% - 60px); overflow-y: auto;
    }
    .sidebar .nav-links li { flex: unset; }
    .sidebar .nav-links li.logout-link { display: block; margin-top: auto; }
    .sidebar .nav-links a {
        flex-direction: row; gap: 0.8rem; font-size: 0.9rem;
        padding: 0.75rem 1rem; border-radius: 12px;
    }
    .sidebar .nav-links a.active::before { display: none; }
    .sidebar .nav-links a.active { background: rgba(0, 212, 255, 0.1); }

    .topbar { left: 220px; }
    .main-content { margin-left: 220px; padding-bottom: 0; }

    .floating-panel {
        left: 20px; right: auto; bottom: 20px;
        width: 400px; max-height: 85vh;
    }
}

/* =============================================
   SMALL PHONE TWEAKS (375px and below)
   ============================================= */
@media (max-width: 375px) {
    .auth-card { padding: 1.5rem; }
    .sidebar .nav-links a { font-size: 0.58rem; }
    .sidebar .nav-links a i { font-size: 1rem; }
    .floating-panel { padding: 1rem; bottom: 70px; }
}
