/* =========================================
   Cargo Boss — Driver Portal Styles
   ========================================= */

/* ── Gate / Login ── */
.dp-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at 25% 25%, rgba(78, 158, 255, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 80%, rgba(26, 110, 216, 0.05) 0%, transparent 60%);
}

.dp-login-card {
    width: 100%;
    max-width: 430px;
    padding: 48px 40px;
    text-align: center;
}

.dp-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.dp-login-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.dp-login-sub {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 28px;
    line-height: 1.6;
}

.dp-back {
    display: block;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.dp-back:hover {
    color: var(--blue);
}

/* ── Driver accent button ── */
.btn-driver {
    background: linear-gradient(135deg, #4e9eff, #1a6ed8);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-driver:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* ── Driver chip ── */
.driver-chip {
    background: rgba(78, 158, 255, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--blue);
}

/* ── Nav ── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Page header ── */
.dp-header {
    padding: 36px 0 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    background: linear-gradient(180deg, rgba(78, 158, 255, 0.04) 0%, transparent 100%);
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.page-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.dp-body {
    padding-bottom: 60px;
}

/* ── Stats ── */
.dp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.dp-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    text-align: center;
    min-width: 100px;
}

.dp-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
}

.dp-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Toolbar ── */
.dp-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.dp-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dp-filter-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    transition: all var(--transition-fast);
}

.dp-filter-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.dp-filter-btn.active {
    background: rgba(78, 158, 255, 0.12);
    border-color: var(--blue);
    color: var(--blue);
}

/* ── Trip cards ── */
.dp-trips-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dp-trip-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: stretch;
    gap: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.dp-trip-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.dp-trip-card.status-pending::before {
    background: var(--amber);
}

.dp-trip-card.status-transit::before {
    background: var(--blue);
}

.dp-trip-card.status-delivered::before {
    background: var(--green);
}

.dp-trip-card.status-cancelled::before {
    background: var(--red);
}

.dp-trip-card:hover {
    border-color: rgba(78, 158, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.dp-trip-left {
    flex: 1;
    min-width: 0;
}

.dp-trip-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.dp-trip-id {
    font-family: 'Courier New', monospace;
    font-size: 0.76rem;
    color: var(--blue);
    font-weight: 700;
    margin-bottom: 6px;
}

.dp-trip-route {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-trip-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dp-trip-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--green);
}

/* ── Driver quick-action panel in modal ── */
.dp-status-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.dp-action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    transition: all var(--transition-fast);
}

.dp-action-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.dp-action-btn.transit {
    border-color: rgba(78, 158, 255, 0.4);
    color: var(--blue);
    background: rgba(78, 158, 255, 0.08);
}

.dp-action-btn.delivered {
    border-color: rgba(62, 207, 142, 0.4);
    color: var(--green);
    background: rgba(62, 207, 142, 0.08);
}

/* ── modal-order-id ── */
.modal-order-id {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 8px;
}

.modal-sections {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 28px;
}

.modal-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--blue);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mdl {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.mdv {
    font-size: 0.92rem;
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Location sharing bar ── */
.loc-share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.loc-share-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.3s;
}

.loc-share-dot.active {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.loc-share-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.loc-share-text strong {
    color: var(--text-primary);
    display: block;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .dp-login-card {
        padding: 32px 20px;
    }

    .dp-trip-card {
        flex-direction: column;
    }

    .dp-trip-right {
        flex-direction: row;
        align-items: center;
    }

    .dp-stats {
        gap: 8px;
    }

    .modal-detail-grid {
        grid-template-columns: 1fr;
    }
}