/* ============================================
   ANTAR'KI DRIVER - PREMIUM DESIGN SYSTEM
   ============================================ */

:root {
    --primary: #FF6B00;
    --primary-dark: #E65100;
    --primary-light: #FF8A3D;
    --secondary: #1976D2;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --dark: #0F172A;
    --dark-2: #1E293B;
    --dark-3: #334155;
    --gray: #64748B;
    --gray-light: #94A3B8;
    --light: #F1F5F9;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 30px rgba(255, 107, 0, 0.4);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   SPLASH SCREEN
   ============================================ */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: splashFade 0.5s ease-out 2.5s forwards;
}

@keyframes splashFade {
    to { opacity: 0; pointer-events: none; }
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo .logo-icon {
    font-size: 5rem;
    margin-bottom: 16px;
    animation: logoBounce 1s ease-in-out infinite;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.splash-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.splash-subtitle {
    font-size: 0.9rem;
    letter-spacing: 8px;
    opacity: 0.8;
    margin-top: 4px;
}

.splash-loader {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}

.loader-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderPulse {
    0%, 100% { transform: scale(0.6); opacity: 0.5; }
    50% { transform: scale(1); opacity: 1; }
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-bg {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.login-gradient {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(60px);
}

.login-content {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.login-logo {
    font-size: 4rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.5));
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

.login-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input::placeholder {
    color: var(--gray-light);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.login-footer {
    text-align: center;
    color: var(--gray-light);
    margin-top: 24px;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-glow {
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4);
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-glow:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: white;
    color: var(--dark);
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active {
    background: var(--light);
}

.btn-danger {
    width: 100%;
    padding: 14px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-block {
    margin-top: 16px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    font-size: 0.9rem;
}

/* ============================================
   MAIN APP LAYOUT
   ============================================ */
.main-app {
    min-height: 100vh;
    padding-bottom: 90px;
    background: var(--light);
}

/* ============================================
   APP HEADER
   ============================================ */
.app-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color: white;
    padding: 20px 20px 24px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(40px);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.driver-greeting {
    font-size: 0.85rem;
    opacity: 0.7;
}

.driver-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--dark);
}

/* ============================================
   STATUS TOGGLE
   ============================================ */
.status-toggle-container {
    position: relative;
    z-index: 1;
}

.status-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.status-card.online {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: var(--gray);
    border-radius: 50%;
    transition: all 0.3s;
}

.status-card.online .status-dot {
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 12px var(--success); }
    50% { box-shadow: 0 0 20px var(--success); }
}

.status-label {
    font-weight: 600;
    font-size: 1rem;
}

.status-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: 0.3s;
}

.slider::before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--success), #059669);
}

input:checked + .slider::before {
    transform: translateX(26px);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.app-content {
    padding: 20px;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

/* ============================================
   SUMMARY CARD
   ============================================ */
.summary-card {
    padding: 20px;
    margin-bottom: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.summary-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.summary-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.summary-item {
    text-align: center;
}

.summary-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin: 20px 0 12px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.quick-action-btn {
    background: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.quick-action-btn:active {
    transform: scale(0.95);
}

.qa-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.quick-action-btn span {
    font-size: 0.75rem;
    color: var(--dark);
    font-weight: 500;
}

/* ============================================
   ACTIVITY LIST
   ============================================ */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--light);
    flex-shrink: 0;
}

.activity-icon.ride { background: #DBEAFE; }
.activity-icon.food { background: #FEF3C7; }
.activity-icon.courier { background: #D1FAE5; }
.activity-icon.titip { background: #FCE7F3; }

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--gray);
}

.activity-amount {
    font-weight: 700;
    color: var(--success);
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ============================================
   VIEW HEADER
   ============================================ */
.view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.view-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ============================================
   EARNINGS VIEW
   ============================================ */
.earnings-hero {
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.earnings-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.earnings-amount {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.earnings-period {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.period-btn {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
}

.earnings-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.earn-stat {
    background: white;
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.earn-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.earn-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.text-danger {
    color: var(--danger) !important;
}

/* ============================================
   TRANSACTION LIST
   ============================================ */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.transaction-item {
    background: white;
    padding: 14px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.transaction-info h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.transaction-info p {
    font-size: 0.75rem;
    color: var(--gray);
}

.transaction-amount {
    font-weight: 700;
    color: var(--success);
}

/* ============================================
   WALLET CARD
   ============================================ */
.wallet-card {
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color: white;
    border: none;
}

.wallet-bg {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(40px);
}

.wallet-content {
    position: relative;
    z-index: 1;
}

.wallet-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.wallet-balance {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.wallet-actions {
    display: flex;
    gap: 10px;
}

.wallet-btn {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-btn.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wallet-btn:active {
    transform: scale(0.98);
}

/* ============================================
   INFO CARD
   ============================================ */
.info-card {
    padding: 16px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-row:last-of-type {
    border-bottom: none;
}

.info-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   PROFILE HERO
   ============================================ */
.profile-hero {
    padding: 32px 20px;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-hero h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.profile-hero p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.profile-rating {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}

.rating-count {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* ============================================
   DOCUMENTS GRID
   ============================================ */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.doc-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.doc-card:active {
    transform: scale(0.98);
}

.doc-card.uploaded {
    border-color: var(--success);
}

.doc-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.doc-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.doc-status {
    font-size: 0.75rem;
    color: var(--gray);
}

.doc-card.uploaded .doc-status {
    color: var(--success);
    font-weight: 600;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray);
    transition: all 0.2s;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.4rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-btn.central {
    flex: 0;
    margin-top: -20px;
}

.central-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.4);
    transition: all 0.2s;
}

.nav-btn.central:active .central-icon {
    transform: scale(0.92);
}

/* ============================================
   ORDER INCOMING MODAL
   ============================================ */
.modal-fullscreen {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s;
}

.order-incoming-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.incoming-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border: 3px solid var(--primary);
    border-radius: 50%;
    animation: pulseRing 2s infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.order-type-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4);
}

.order-incoming-content h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.incoming-subtitle {
    color: var(--gray);
    margin-bottom: 24px;
}

.incoming-details {
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.incoming-detail-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.detail-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 2px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-word;
}

.incoming-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 12px 0;
}

.incoming-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.incoming-stat {
    text-align: center;
}

.incoming-stat .stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.incoming-stat .stat-lbl {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 2px;
}

.incoming-timer {
    margin-bottom: 20px;
}

.timer-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.incoming-timer p {
    font-size: 0.8rem;
    color: var(--gray);
}

.incoming-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.btn-reject {
    padding: 14px;
    background: white;
    border: 2px solid var(--danger);
    color: var(--danger);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.btn-accept {
    padding: 14px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* ============================================
   GENERIC MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: var(--light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

/* ============================================
   ACTIVE ORDER VIEW
   ============================================ */
.active-order-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    text-align: center;
}

.active-order-hero .order-type {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.active-order-hero h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.active-order-hero p {
    opacity: 0.9;
    font-size: 0.85rem;
}

.active-order-map {
    height: 200px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.active-order-steps {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.order-step {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light);
}

.order-step:last-child {
    border-bottom: none;
}

.order-step.completed .step-icon {
    background: var(--success);
    color: white;
}

.order-step.current .step-icon {
    background: var(--primary);
    color: white;
    animation: pulse 2s infinite;
}

.step-icon {
    width: 32px;
    height: 32px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.step-desc {
    font-size: 0.8rem;
    color: var(--gray);
}

.active-order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.3);
}

.btn-action.secondary {
    background: white;
    color: var(--dark);
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-sm);
}

.btn-action.danger {
    background: white;
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 0.9rem;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 380px) {
    .summary-number {
        font-size: 1rem;
    }
    
    .earnings-amount {
        font-size: 1.8rem;
    }
    
    .wallet-balance {
        font-size: 1.6rem;
    }
}

/* ============================================
   MERCHANT SPECIFIC STYLES
   ============================================ */

.store-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.order-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-number {
    font-weight: 700;
    font-size: 0.95rem;
}

.order-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.order-items {
    margin-bottom: 12px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.order-item-name {
    color: var(--dark);
}

.order-item-qty {
    color: var(--gray);
    font-weight: 500;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.05rem;
    padding-top: 12px;
    border-top: 1px dashed #E2E8F0;
    margin-bottom: 12px;
}

.order-actions {
    display: flex;
    gap: 8px;
}

.order-actions button {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-accept { background: var(--success); color: white; }
.btn-prepare { background: var(--secondary); color: white; }
.btn-ready { background: var(--primary); color: white; }
.btn-view { background: var(--light); color: var(--dark); }

.product-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.product-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    background: var(--light);
    object-fit: cover;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.product-meta {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    gap: 8px;
}

.btn-sm-primary {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.wallet-sub {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.status-paid { background: #FEF3C7; color: #92400E; }
.status-processing { background: #DBEAFE; color: #1E40AF; }
.status-preparing { background: #E0E7FF; color: #3730A3; }
.status-ready { background: #D1FAE5; color: #065F46; }
.status-completed { background: #F3F4F6; color: #374151; }