/* ==========================================
   CARD
========================================== */

.app-card{

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:22px;

    box-shadow:var(--shadow);

    transition:.25s;
}

.app-card:hover{

    transform:translateY(-2px);
}

/* ==========================================
   BUTTON
========================================== */

.btn-app{

    background:var(--primary);

    color:white;

    border:none;

    border-radius:12px;

    padding:12px 22px;

    font-weight:600;

    transition:.25s;
}

.btn-app:hover{

    background:var(--primary-hover);

    transform:translateY(-1px);
}

/* ==========================================
   INPUT
========================================== */

.input-app{

    width:100%;

    background:var(--background);

    border:1px solid var(--border);

    color:white;

    border-radius:12px;

    padding:14px;

    margin-bottom:15px;
}

.input-app:focus{

    outline:none;

    border-color:var(--primary);
}

/* ==========================================
   BADGES
========================================== */

.badge-success{

    background:var(--success);

    padding:6px 12px;

    border-radius:999px;

    color:white;
}

.badge-warning{

    background:var(--warning);

    color:black;

    padding:6px 12px;

    border-radius:999px;
}

/* ==========================================
   TIMER
========================================== */

.timer{

    font-size:36px;

    font-weight:700;

    color:var(--warning);

    letter-spacing:2px;
}
/* ==========================================
   DASHBOARD GRID
========================================== */

.dashboard-grid{

    display:grid;

    grid-template-columns:420px 1fr;

    gap:25px;

    align-items:start;
}

/* ==========================================
   OFFER CARD
========================================== */

.offer-card{

    background:var(--background);

    border:1px solid var(--border);

    border-radius:14px;

    padding:18px;

    margin-bottom:15px;

    transition:.25s;
}

.offer-card:hover{

    transform:translateY(-2px);

    border-color:var(--primary);
}

.offer-top{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:12px;
}

.offer-price{

    font-size:28px;

    font-weight:700;

    color:var(--success);
}

.offer-eta{

    color:var(--text-muted);

    font-size:14px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.stat-value {
    font-size: 32px;
    line-height: 1;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        90px
        90px
        100px;

    gap: 14px;
    align-items: center;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
    border-bottom: 0;
}

.activity-route {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);

    font-size: 12px;
}

.activity-price {
    font-weight: 700;
}

.activity-eta,
.activity-status {
    color: var(--text-muted);

    font-size: 13px;
}

@media (max-width: 900px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .activity-row {
        grid-template-columns:
            minmax(0, 1fr)
            80px
            80px;
    }

    .activity-status {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

}
.orders-page-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-history-card {
    box-shadow: none;
}

.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.history-card-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-price {
    color: var(--success);
    font-size: 24px;
}

.history-route {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.history-route span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.history-route strong {
    display: block;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;

    padding-top: 14px;
    border-top: 1px solid var(--border);

    color: var(--text-muted);
    font-size: 12px;
}

.history-status {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.history-completed {
    background: rgba(34, 197, 94, .13);
    color: var(--success);
}

.history-lost {
    background: rgba(239, 68, 68, .13);
    color: var(--danger);
}

.lost-history-card {
    opacity: .78;
}

@media (max-width: 640px) {
    .history-route {
        grid-template-columns: 1fr;
    }

    .history-card-header {
        align-items: flex-start;
    }
}
.navbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-logout-form {
    margin: 0;
}

.navbar-logout {
    padding: 8px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: transparent;
    color: var(--text-muted);

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.navbar-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);

    border-color: rgba(239, 68, 68, 0.35);
}

.navbar-logout:active {
    transform: translateY(1px);
}

@media (max-width: 640px) {
    .navbar-user {
        gap: 8px;
    }

    .navbar-logout {
        padding: 7px 10px;
        font-size: 12px;
    }
}
/* ==========================================
   HISTORY
========================================== */

.history-section {
    margin-top: 32px;
}

.history-section:first-child {
    margin-top: 0;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0 0 4px;

    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.section-heading p {
    margin: 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--text-secondary);
}


/* ==========================================
   HISTORY LIST
========================================== */

.history-list {
    display: grid;
    gap: 16px;
}


/* ==========================================
   HISTORY CARD
========================================== */

.history-card {
    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 22px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.history-card:hover {
    transform: translateY(-1px);
}


/* ==========================================
   HEADER
========================================== */

.history-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.history-card-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-order-number {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.history-date {
    font-size: 13px;
    line-height: 1.4;

    color: var(--text-secondary);
}


/* ==========================================
   ROUTE
========================================== */

.history-route {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: stretch;
    gap: 18px;

    padding: 18px;

    border-radius: 14px;

    background:
        var(--surface-secondary);
}

.history-route-item {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
}

.history-route-item strong {
    font-size: 15px;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

.history-route-label {
    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: var(--text-secondary);
}

.history-route-divider {
    width: 1px;

    align-self: stretch;

    background:
        var(--border-color);
}


/* ==========================================
   DETAILS
========================================== */

.history-details-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.history-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;

    padding: 14px 16px;

    border: 1px solid
        var(--border-color);

    border-radius: 12px;
}

.history-detail span {
    font-size: 12px;
    font-weight: 600;

    color: var(--text-secondary);
}

.history-detail strong {
    font-size: 15px;
    font-weight: 700;

    overflow-wrap: anywhere;
}


/* ==========================================
   CUSTOMER BLOCK
========================================== */

.history-card .customer-block {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.history-card .customer-item {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
}

.history-card .customer-item span {
    font-size: 12px;
    font-weight: 600;

    color: var(--text-secondary);
}

.history-card .customer-item strong {
    font-size: 14px;
    line-height: 1.4;

    overflow-wrap: anywhere;
}


/* ==========================================
   HISTORY NOTE
========================================== */

.history-note {
    padding: 14px 16px;

    border-radius: 12px;

    background:
        var(--surface-secondary);

    font-size: 14px;
    line-height: 1.5;

    color: var(--text-secondary);
}


/* ==========================================
   STATUS BADGES
========================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    min-height: 28px;

    padding:
        5px
        10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
}

.status-completed {
    background:
        rgba(34, 197, 94, 0.12);

    color:
        rgb(22, 163, 74);
}

.status-cancelled {
    background:
        rgba(239, 68, 68, 0.12);

    color:
        rgb(220, 38, 38);
}

.status-lost {
    background:
        rgba(107, 114, 128, 0.12);

    color:
        rgb(75, 85, 99);
}


/* ==========================================
   LOST CARD
========================================== */

.history-card-lost {
    opacity: 0.92;
}

.history-card-lost:hover {
    opacity: 1;
}


/* ==========================================
   EMPTY STATE
========================================== */

.history-list > .empty-state {
    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 36px 24px;
}

.history-list > .empty-state
.empty-state-icon {
    margin-bottom: 12px;

    font-size: 34px;
}

.history-list > .empty-state h3 {
    margin: 0 0 6px;

    font-size: 18px;
}

.history-list > .empty-state p {
    max-width: 420px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.5;
}


/* ==========================================
   DARK MODE FALLBACKS
========================================== */

@media (prefers-color-scheme: dark) {

    .status-completed {
        background:
            rgba(34, 197, 94, 0.16);

        color:
            rgb(74, 222, 128);
    }

    .status-cancelled {
        background:
            rgba(239, 68, 68, 0.16);

        color:
            rgb(248, 113, 113);
    }

    .status-lost {
        background:
            rgba(156, 163, 175, 0.16);

        color:
            rgb(209, 213, 219);
    }
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 900px) {

    .history-details-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .history-card .customer-block {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 640px) {

    .history-section {
        margin-top: 26px;
    }

    .history-card {
        gap: 16px;

        padding: 17px;
    }

    .history-card-header {
        align-items: flex-start;

        gap: 12px;
    }

    .history-order-number {
        font-size: 16px;
    }


    /* ROUTE */

    .history-route {
        grid-template-columns:
            1fr;

        gap: 14px;

        padding: 15px;
    }

    .history-route-divider {
        width: 100%;
        height: 1px;
    }


    /* DETAILS */

    .history-details-grid {
        grid-template-columns:
            1fr;
    }


    /* CUSTOMER */

    .history-card .customer-block {
        grid-template-columns:
            1fr;
    }


    /* SECTION HEADER */

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .section-heading h2 {
        font-size: 20px;
    }


    /* BADGE */

    .status-badge {
        min-height: 26px;

        padding:
            5px
            9px;

        font-size: 11px;
    }
}