/* ==========================================================================
   Food Delivery Hub - Modern Design System (Professional & Clean UI)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand & Accent Colors */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --primary-gradient-horizontal: linear-gradient(90deg, #3B82F6 0%, #1E40AF 100%);
    --hero-gradient: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #7C3AED 100%);

    /* Platforms */
    --grab: #00B14F;
    --lineman: #06C755;
    --foodpanda: #D70F64;
    --shopee: #EE4D2D;
    --robinhood: #6B2FA0;

    /* Semantic States */
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --info: #0284C7;
    --info-light: #E0F2FE;

    /* Slate Neutrals */
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;

    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --white: #FFFFFF;

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 16px -1px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px -3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.12);

    --border: 1px solid #E2E8F0;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--primary-hover);
}

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

/* Layout */
.container {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 18px 40px;
    box-sizing: border-box;
}

.gradient-bg {
    min-height: 100vh;
    background: var(--hero-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* Header */
.header {
    background: var(--primary-gradient-horizontal);
    color: var(--white);
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.header-menu-btn,
.header-back-btn,
.header-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    padding: 0;
}

.header-menu-btn:hover,
.header-back-btn:hover,
.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    transform: none;
}

.header-title-container {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #FFFFFF;
}

.header-subtitle {
    font-size: 0.72rem;
    opacity: 0.85;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #FFFFFF;
    margin-top: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #EF4444;
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2563EB;
}

/* Sidebar Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 290px;
    height: 100%;
    background: var(--white);
    z-index: 999;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--slate-700);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-menu li a:hover {
    background: var(--slate-100);
    color: var(--primary);
    transform: translateX(3px);
}

.sidebar-menu li a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-menu .menu-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 12px 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    color: var(--slate-700);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    border: var(--border);
}

.sidebar-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 8px 4px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius-sm);
    color: #B45309;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: var(--border);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Stat KPI Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--slate-500);
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

/* Section Headings */
.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.section-title i {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-outline {
    background: var(--white);
    color: var(--slate-700);
    border: var(--border);
}

.btn-outline:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
    color: var(--slate-900);
}

.btn-outline-primary {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--slate-800);
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

/* Tab Filters */
.tab-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.tab-filters::-webkit-scrollbar {
    display: none;
}

.tab-filter-btn {
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: var(--border);
    background: var(--white);
    color: var(--slate-600);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.tab-filter-btn:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.tab-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--slate-200);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.timeline-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--slate-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--slate-400);
    margin-bottom: 6px;
    transition: var(--transition);
}

.timeline-step.completed .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.timeline-step.active .timeline-dot {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-500);
}

.timeline-step.active .timeline-label {
    color: var(--primary);
    font-weight: 600;
}

.timeline-step.completed .timeline-label {
    color: var(--slate-700);
}

/* SweetAlert2 Custom Styling */
.modern-swal-popup {
    font-family: 'Prompt', sans-serif !important;
    border-radius: 20px !important;
    padding: 24px 20px !important;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
    border: 1px solid #E2E8F0 !important;
}

.modern-swal-popup .swal2-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin-bottom: 8px !important;
}

.modern-swal-popup .swal2-html-container {
    font-size: 0.92rem !important;
    color: #64748B !important;
    margin: 8px 16px 20px !important;
}

.modern-swal-popup .swal2-actions {
    gap: 10px !important;
    margin-top: 16px !important;
}

.modern-swal-popup button.swal2-styled {
    padding: 10px 20px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.modern-swal-popup button.swal2-styled:hover {
    transform: translateY(-1px) !important;
}

.modern-swal-popup .swal2-input {
    border-radius: 10px !important;
    border: 1px solid #CBD5E1 !important;
    font-size: 0.95rem !important;
    font-family: 'Prompt', sans-serif !important;
    padding: 10px 14px !important;
    height: auto !important;
    box-shadow: none !important;
}

.modern-swal-popup .swal2-input:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* ==========================================================================
   Custom Dropdown Component
   ========================================================================== */
.custom-dropdown {
    position: relative;
    user-select: none;
}

.custom-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-800);
    cursor: pointer;
    transition: var(--transition);
}

.custom-dropdown-btn:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

.btn.custom-dropdown-btn {
    width: auto;
}

.btn-outline.custom-dropdown-btn {
    background: var(--white) !important;
    color: var(--slate-800) !important;
    border: var(--border) !important;
}

.btn-outline.custom-dropdown-btn:hover {
    background: var(--slate-50) !important;
    color: var(--slate-900) !important;
}

.btn-primary.custom-dropdown-btn {
    background: var(--primary-gradient) !important;
    color: var(--white) !important;
    border: none !important;
}

.btn-primary.custom-dropdown-btn:hover {
    background: var(--primary-gradient) !important;
    color: var(--white) !important;
}

.custom-dropdown.open .custom-dropdown-btn {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.custom-dropdown-btn .dropdown-chevron {
    font-size: 0.75rem;
    color: var(--slate-400);
    transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 180px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.15);
    padding: 6px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dropdown.open .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-700);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.custom-dropdown-item:hover {
    background: #F1F5F9;
    color: var(--slate-900);
}

.custom-dropdown-item.active {
    background: #EFF6FF;
    color: var(--primary);
    font-weight: 600;
}

/* Native select enhancement fallback */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px !important;
    cursor: pointer;
}

select.form-input option {
    padding: 10px 14px;
    background: #FFFFFF;
    color: #1E293B;
}


