html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background: #f4f6f9;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1f2937;
    margin-bottom: 60px;
}

.navbar {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    min-height: 66px;
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: .2px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.18);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar .nav-link {
    color: rgba(255,255,255,.88) !important;
    font-weight: 500;
    border-radius: 10px;
    padding: .55rem .85rem;
    margin: 0 .1rem;
}

    .navbar .nav-link:hover,
    .navbar .nav-link:focus {
        background: rgba(255,255,255,.14);
        color: #fff !important;
    }

.dropdown-menu {
    border-radius: 14px;
    padding: .5rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: .6rem .8rem;
    font-weight: 500;
}

    .dropdown-item:hover {
        background: #eef4ff;
    }

.user-area {
    white-space: nowrap;
}

.user-badge {
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: .35rem .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.user-dot {
    width: 9px;
    height: 9px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.logout-btn {
    border-radius: 999px;
    font-weight: 600;
    padding: .35rem .85rem;
}

.card {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    overflow: hidden;
}

.card-header {
    border: 0 !important;
    background: linear-gradient(to bottom, #ffffff, #f8fafc) !important;
    padding: 1.1rem 1.4rem;
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
}

.btn,
.form-control,
.form-select {
    border-radius: 14px;
}

.form-control,
.form-select {
    border: 1px solid #dbe4f0;
    min-height: 50px;
    box-shadow: none !important;
    transition: all .2s ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37,99,235,.12) !important;
    }

}

.table th {
    white-space: nowrap;
}

.table tbody td {
    border-color: #f1f5f9;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.app-footer {
    padding: 16px 24px;
    color: #6b7280;
    font-size: .85rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

    .page-header h1 {
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
    }

    .page-header p {
        margin: .25rem 0 0 0;
        color: #6b7280;
    }

.date-pill {
    background: #fff;
    border-radius: 999px;
    padding: .6rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    border: 1px solid #eef2ff;
    transition: all .2s ease;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(15,23,42,.10);
    }

    .stat-card::after {
        content: "";
        position: absolute;
        right: -25px;
        top: -25px;
        width: 90px;
        height: 90px;
        border-radius: 50%;
        background: rgba(37,99,235,.06);
    }

.stat-label {
    position: relative;
    z-index: 2;
    color: #64748b;
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .8rem;
}

.stat-value {
    position: relative;
    z-index: 2;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    color: #0f172a;
}

    .stat-value.small {
        font-size: 1.4rem;
        font-weight: 700;
    }

.stat-card:nth-child(1) {
    border-left: 5px solid #2563eb;
}

.stat-card:nth-child(2) {
    border-left: 5px solid #f59e0b;
}

.stat-card:nth-child(3) {
    border-left: 5px solid #10b981;
}

.stat-card:nth-child(4) {
    border-left: 5px solid #8b5cf6;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.quick-btn {
    border: 0;
    border-radius: 18px;
    padding: 1rem;
    color: white;
    font-weight: 700;
    font-size: .95rem;
    transition: all .2s ease;
    box-shadow: 0 10px 24px rgba(15,23,42,.12);
}

    .quick-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        filter: brightness(1.05);
    }

    .quick-btn:active:not(:disabled) {
        transform: scale(.98);
    }

    .quick-btn:disabled {
        opacity: .35;
        cursor: not-allowed;
        filter: grayscale(.4);
        box-shadow: none;
    }

    .quick-btn.start {
        background: linear-gradient(135deg, #22c55e, #16a34a);
    }

    .quick-btn.pause {
        background: linear-gradient(135deg, #f59e0b, #d97706);
    }

    .quick-btn.pause-end {
        background: linear-gradient(135deg, #0ea5e9, #0284c7);
    }

    .quick-btn.end {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }

    .quick-btn.trip-start {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    }

    .quick-btn.trip-end {
        background: linear-gradient(135deg, #6366f1, #4f46e5);
    }

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.calendar-table th,
.calendar-table td {
    font-size: .85rem;
    vertical-align: middle;
    white-space: nowrap;
}

.calendar-table td {
    min-width: 48px;
    height: 42px;
}

.modern-check {
    background: #f8fafc;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

    .modern-check .form-check-input {
        width: 1.2rem;
        height: 1.2rem;
        margin-top: .2rem;
    }

    .modern-check .form-check-label {
        margin-left: .5rem;
        font-weight: 600;
    }

@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem .8rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .2px;
}

    .status-badge.success {
        background: rgba(34,197,94,.14);
        color: #15803d;
    }

    .status-badge.warning {
        background: rgba(245,158,11,.16);
        color: #b45309;
    }

    .status-badge.danger {
        background: rgba(239,68,68,.14);
        color: #b91c1c;
    }

    .status-badge.neutral {
        background: rgba(107,114,128,.14);
        color: #374151;
    }

.live-status-card {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    border-radius: 22px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 12px 35px rgba(37, 99, 235, .25);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-status-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-status-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,.16);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-status-label {
    font-size: .85rem;
    opacity: .8;
}

.live-status-value {
    font-size: 1.45rem;
    font-weight: 800;
}

.live-status-right {
    text-align: right;
}

.live-status-time {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.live-status-location {
    margin-top: .35rem;
    opacity: .85;
    font-weight: 600;
}

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-block;
}

    .status-dot.working {
        background: #22c55e;
        box-shadow: 0 0 16px #22c55e;
    }

    .status-dot.pause {
        background: #f59e0b;
        box-shadow: 0 0 16px #f59e0b;
    }

    .status-dot.trip {
        background: #38bdf8;
        box-shadow: 0 0 16px #38bdf8;
    }

    .status-dot.offline {
        background: #ef4444;
        box-shadow: 0 0 16px #ef4444;
    }

.table {
    --bs-table-bg: transparent;
}

    .table thead th {
        background: #f8fafc;
        color: #475569;
        font-size: .85rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        border-bottom: 1px solid #e5e7eb;
    }

    .table tbody tr {
        transition: background .15s ease;
    }

        .table tbody tr:hover {
            background: #f8fafc;
        }

.badge {
    border-radius: 999px;
    padding: .45rem .7rem;
    font-weight: 700;
}

    .badge.text-bg-primary {
        background: rgba(37, 99, 235, .12) !important;
        color: #1d4ed8 !important;
    }

.quick-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(.4);
}
.quick-booking-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: .9rem;
}

.modern-divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 1.4rem 0;
}
