@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/OpenSans.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --driver-green: #31c96b;
    --driver-dark: #005b52;
    --driver-bg: #f3f6f8;
    --driver-text: #334155;
}

body {
    background: var(--driver-bg);
    color: var(--driver-text);
    font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* AUTH */
.driver-auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #31c96b, #005b52);
}

.driver-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.driver-auth-card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 26px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.driver-auth-logo {
    text-align: center;
    margin-bottom: 26px;
}

    .driver-auth-logo img {
        height: 82px;
        object-fit: contain;
        margin-bottom: 12px;
    }

    .driver-auth-logo h1 {
        font-size: 1.5rem;
        font-weight: 900;
        margin: 0;
        color: var(--driver-dark);
    }

    .driver-auth-logo p {
        margin: 6px 0 0;
        color: #64748b;
    }

.otp-input {
    letter-spacing: 10px;
    font-weight: 900;
}

/* TOP HEADER */
.driver-top {
    background: var(--driver-green);
    color: #fff;
    text-align: center;
    padding: 14px 16px 30px;
}

.driver-brand {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: .5px;
}

    .driver-brand small {
        font-weight: 500;
        margin-inline-start: 6px;
    }

.driver-top h1 {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 16px 0 4px;
}

.driver-top p {
    margin: 0;
    opacity: .95;
}

/* PAGE */
.driver-page {
    direction: rtl;
    width: min(620px, 94vw);
    margin: -14px auto 24px;
}

.driver-tabs {
    background: #fff;
    border-radius: 999px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    margin-bottom: 18px;
}

    .driver-tabs button {
        border: 0;
        background: transparent;
        border-radius: 999px;
        padding: 10px;
        font-weight: 900;
        color: var(--driver-dark);
    }

        .driver-tabs button.active {
            background: var(--driver-dark);
            color: #fff;
        }

.driver-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--driver-dark);
    margin: 0 4px 14px;
}

    .driver-section-title span {
        color: var(--driver-green);
        font-weight: 800;
    }

.driver-orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.driver-order-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    position: relative;
}

.order-card-link {
    color: inherit;
    text-decoration: none;
}

.order-drag-handle {
    position: absolute;
    left: 12px;
    top: 16px;
    color: #94a3b8;
    font-size: 1.3rem;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-left: 26px;
}

    .order-card-header strong {
        display: block;
        font-weight: 900;
        margin-bottom: 6px;
    }

    .order-card-header span {
        display: block;
        color: #475569;
        margin-top: 3px;
    }

.order-price {
    font-weight: 900;
    color: var(--driver-dark);
    white-space: nowrap;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

    .order-actions a {
        flex: 1;
        background: #f8fafc;
        color: #0f172a;
        text-decoration: none;
        border-radius: 12px;
        padding: 10px;
        text-align: center;
        font-weight: 800;
        border: 1px solid #e5e7eb;
    }

        .order-actions a:hover {
            color: var(--driver-green);
            background: #ecfdf5;
        }

.driver-empty,
.driver-map-placeholder {
    min-height: 280px;
    background: #fff;
    border-radius: 18px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    font-weight: 800;
}

    .driver-map-placeholder i {
        font-size: 3rem;
        color: var(--driver-green);
    }

/* DETAILS */
.driver-details-header {
    background: var(--driver-dark);
    color: #fff;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .driver-details-header h5 {
        margin: 0;
        font-weight: 900;
    }

.back-btn {
    position: absolute;
    right: 16px;
    color: #fff;
    font-size: 1.4rem;
    text-decoration: none;
}

.driver-details-page {
    width: min(620px, 94vw);
    margin: 28px auto 110px;
    background: #fff;
    border-radius: 18px;
    padding: 18px;
}

.details-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
}

    .details-row strong {
        display: block;
        color: #334155;
    }

    .details-row span {
        color: #94a3b8;
    }

.details-actions {
    display: flex;
    gap: 10px;
}

.circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--driver-green);
    color: #fff;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.driver-note {
    margin-top: 16px;
    background: #fff8e1;
    border-radius: 14px;
    padding: 14px;
    color: #92400e;
    font-weight: 800;
}

.products-list {
    margin-top: 16px;
}

    .products-list > div {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px dashed #e5e7eb;
    }

.driver-bottom-action {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    padding: 16px;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .12);
}

.slide-confirm {
    width: min(620px, 94vw);
    margin: auto;
    height: 56px;
    border-radius: 999px;
    background: var(--driver-green);
    position: relative;
    overflow: hidden;
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: pan-y;
}

.slide-text {
    pointer-events: none;
}

.slide-handle {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--driver-green);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    z-index: 2;
}

.slide-confirm.completed {
    background: var(--driver-dark);
}

@media (max-width: 576px) {
    .driver-auth-card {
        padding: 24px;
    }

    .order-actions {
        grid-template-columns: 1fr;
    }

    .details-row {
        grid-template-columns: 70px 1fr;
    }
}
