/* ── Delivery App Inline Styles ── */
#app {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

@media(min-width:1024px) {
    body {
        background: var(--bg-secondary);
    }

    #app {
        box-shadow: var(--shadow-xl);
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

.screen-view {
    display: none;
    min-height: 100vh;
}

.screen-view.active-view {
    display: block;
}

/* Splash */
.splash {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A5F, #0A0A10);
}

.splash .icon {
    font-size: 4rem;
    color: #3B82F6;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

.splash h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
}

.splash h1 span {
    color: #3B82F6;
}

.splash p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 8px;
}

.splash .bar-wrap {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 40px;
    overflow: hidden;
}

.splash .bar-fill {
    height: 100%;
    background: #3B82F6;
    border-radius: 10px;
    animation: progressBar 2s ease-in-out forwards;
}

/* Auth */
.auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.auth-card .logo {
    font-size: 2.5rem;
    color: #3B82F6;
    margin-bottom: 16px;
}

.auth-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-card .sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.input-g {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    margin-bottom: 14px;
    transition: border-color 0.3s;
}

.input-g:focus-within {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-g i {
    color: var(--text-muted);
    width: 20px;
}

.input-g input {
    flex: 1;
    padding: 16px 12px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    border: none;
    outline: none;
}

.btn-d {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-d:hover {
    background: #2563EB;
}

.btn-d:active {
    transform: scale(0.96);
}

.btn-out {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-out:hover {
    border-color: #3B82F6;
    color: #3B82F6;
    background: transparent;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
    width: auto;
}

.btn-danger {
    background: #EF4444;
}

/* Dashboard Header */
.d-header {
    background: linear-gradient(135deg, #1E3A5F, #3B82F6);
    padding: 24px 20px 30px;
    border-radius: 0 0 24px 24px;
    color: white;
}

.d-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.d-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.toggle-w {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-s {
    width: 56px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-s.on {
    background: #60A5FA;
}

.toggle-s .k {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: left 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-s.on .k {
    left: 31px;
}

.stat-g {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.stat-c {
    background: rgba(255, 255, 255, 0.12);
    padding: 16px;
    border-radius: 16px;
    text-align: center;
}

.stat-c .label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.stat-c .val {
    font-size: 1.6rem;
    font-weight: 900;
}

.stat-c .sub {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Content */
.d-content {
    padding: 20px;
    padding-bottom: 100px;
}

.section-t {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-t i {
    color: #3B82F6;
}

/* Delivery Request Overlay */
.req-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

.req-overlay.active {
    display: flex;
}

.req-card {
    width: 100%;
    background: var(--bg);
    border-radius: 24px;
    overflow: hidden;
    animation: scaleBounce 0.5s ease-out;
}

.req-head {
    background: #3B82F6;
    color: white;
    padding: 20px;
    text-align: center;
}

.req-timer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 12px;
}

.req-body {
    padding: 20px;
}

.req-route {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.req-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.req-point .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.req-info {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 20px;
}

.req-info .v {
    font-size: 1.3rem;
    font-weight: 800;
}

.req-info .l {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.req-actions {
    display: flex;
    gap: 12px;
}

.req-actions .btn-d {
    flex: 1;
}

/* Active Delivery */
.active-card {
    background: var(--bg-card);
    border: 2px solid #3B82F6;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ac-header {
    background: rgba(59, 130, 246, 0.08);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.ac-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #3B82F6;
    color: white;
}

.ac-body {
    padding: 16px;
}

.ac-contact {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.ac-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #3B82F6;
}

.ac-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ac-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.ac-step:hover {
    background: var(--bg-secondary);
}

.ac-step.active {
    background: rgba(59, 130, 246, 0.05);
}

.ac-step .num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.ac-step.done .num {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

.ac-step.active .num {
    border-color: #3B82F6;
    color: #3B82F6;
}

/* History Card */
.h-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.h-card:hover {
    box-shadow: var(--shadow-md);
}

.h-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.h-id {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
}

.h-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
}

.h-completed {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.h-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.h-route {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.h-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.h-fare {
    font-weight: 800;
    font-size: 1.1rem;
}

.h-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Earnings Card */
.earn-card {
    background: linear-gradient(135deg, #1E3A5F, #3B82F6);
    border-radius: 24px;
    padding: 24px;
    color: white;
    margin-bottom: 24px;
}

.earn-amount {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 8px 0;
}

.earn-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.earn-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    margin-bottom: 20px;
}

.ec-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ec-fill {
    width: 100%;
    border-radius: 6px 6px 0 0;
    background: rgba(59, 130, 246, 0.3);
    min-height: 4px;
    position: relative;
}

.ec-fill .fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #60A5FA;
    border-radius: 6px 6px 0 0;
}

.ec-day {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Profile */
.prof-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1E3A5F, #3B82F6);
    border-radius: 24px;
    color: white;
    margin-bottom: 24px;
}

.prof-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 14px;
}

.prof-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.prof-badge {
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
    font-weight: 600;
}

/* Bottom Nav */
.bot-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 70px;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.n-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.n-item i {
    font-size: 1.2rem;
}

.n-item.active {
    color: #3B82F6;
}

/* Screen Header */
.s-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-light);
}

.s-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    flex: 1;
}

.back-b {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    background: none;
    border: none;
}

.s-body {
    padding: 20px;
    padding-bottom: 100px;
}

/* Empty */
.empty {
    text-align: center;
    padding: 60px 30px;
}

.empty i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 16px;
}

.empty h3 {
    margin-bottom: 8px;
}

.empty p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Note: Shared button classes (.btn-site, .btn-site-primary, .btn-site-outline) are defined in shared/site.css */

/* Info Card */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
}

.info-row .key {
    color: var(--text-muted);
}

.info-row .val {
    font-weight: 700;
}