/* =====================================================
   PT ABC - DTS Custom Styles
   ===================================================== */

:root {
    --dts-primary: #0d6efd;
    --dts-primary-dark: #0b5ed7;
    --dts-sidebar-bg: #1e2a3a;
    --dts-sidebar-text: #b8c4d4;
    --dts-sidebar-active: #0d6efd;
    --dts-topbar-bg: #0b1623;
    --dts-bg: #f4f6f9;
    --dts-card-border: #e7ebf0;
}

body { background: var(--dts-bg); }

/* ===== Layout ===== */
.dts-wrapper { min-height: 100vh; }
.dts-topbar {
    background: var(--dts-topbar-bg);
    height: 56px;
    padding: 0 .5rem;
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1030;
    display: flex; align-items: center;
}
.dts-topbar .navbar-brand { font-weight: 700; }

.dts-sidebar {
    position: fixed;
    top: 56px; left: 0; bottom: 0;
    width: 240px;
    background: var(--dts-sidebar-bg);
    overflow-y: auto;
    padding: 1rem 0;
    z-index: 1020;
}
.dts-sidebar .nav-link {
    color: var(--dts-sidebar-text);
    padding: .6rem 1.25rem;
    border-left: 3px solid transparent;
}
.dts-sidebar .nav-link i { width: 22px; text-align: center; margin-right: 8px; }
.dts-sidebar .nav-link:hover {
    background: rgba(255,255,255,.04);
    color: #fff;
}
.dts-sidebar .nav-link.active {
    background: rgba(13,110,253,.15);
    color: #fff;
    border-left-color: var(--dts-sidebar-active);
}
.dts-menu-group {
    color: #6c7a8a;
    font-size: 11px;
    font-weight: 700;
    padding: .75rem 1.25rem .25rem;
    letter-spacing: 1px;
}

.dts-main {
    margin-left: 240px;
    margin-top: 56px;
    padding: 1.5rem;
    min-height: calc(100vh - 56px);
}

@media (max-width: 767.98px) {
    .dts-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .dts-sidebar.open { transform: translateX(0); }
    .dts-main { margin-left: 0; }
}

/* ===== Avatar ===== */
.avatar-circle {
    width: 36px; height: 36px; border-radius: 50%;
    background: #0d6efd; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* ===== Stats cards ===== */
.stat-card {
    border: 1px solid var(--dts-card-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: #fff;
    position: relative;
    overflow: hidden;
}
.stat-card .stat-label { color: #6c757d; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: #1e2a3a; margin-top: .25rem; }
.stat-card .stat-icon {
    position: absolute; right: 14px; top: 14px;
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}

.stat-card.stat-primary .stat-icon { background: #0d6efd; }
.stat-card.stat-success .stat-icon { background: #198754; }
.stat-card.stat-warning .stat-icon { background: #ffc107; }
.stat-card.stat-danger  .stat-icon { background: #dc3545; }
.stat-card.stat-info    .stat-icon { background: #0dcaf0; }

/* ===== Card general ===== */
.card { border-color: var(--dts-card-border); }
.card-header { background: #fff; border-bottom: 1px solid var(--dts-card-border); font-weight: 600; }

/* ===== Table ===== */
.table thead th { background: #f8f9fa; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: #4a5568; }
.table td { vertical-align: middle; }

/* ===== Map ===== */
.dts-map { width: 100%; height: 500px; border-radius: 10px; }
.dts-map-full { height: calc(100vh - 120px); }

/* ===== Login page ===== */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 1rem;
}
.login-card {
    background: #fff; border-radius: 12px;
    max-width: 440px; width: 100%;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.login-card .brand {
    text-align: center;
    color: #0d6efd; font-size: 2rem; font-weight: 800;
    margin-bottom: .25rem;
}
.login-card .brand small { color: #6c757d; font-size: 0.95rem; font-weight: 400; display:block; }

/* ===== Driver/Admin PWA styles (mobile) ===== */
.pwa-body { background:#f1f3f6; }
.pwa-topbar {
    background:#0d6efd; color:#fff; padding:14px 16px;
    position:sticky; top:0; z-index:10;
    display:flex; align-items:center; gap:10px;
    box-shadow:0 2px 6px rgba(0,0,0,.12);
}
.pwa-bottom-nav {
    position:fixed; left:0; right:0; bottom:0;
    background:#fff; border-top:1px solid #dee2e6;
    display:flex; padding:6px 0;
    z-index:50;
}
.pwa-bottom-nav a {
    flex:1; text-align:center; color:#6c757d;
    padding:6px 0; font-size:11px; text-decoration:none;
}
.pwa-bottom-nav a i { display:block; font-size:20px; margin-bottom:2px; }
.pwa-bottom-nav a.active { color:#0d6efd; }
.pwa-content { padding:16px 16px 80px; }

.trip-card {
    background:#fff; border-radius:10px; padding:14px;
    margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.trip-card .trip-head { display:flex; justify-content:space-between; align-items:center; }
.trip-card .trip-code { font-weight:700; color:#0d6efd; }
.trip-route { display:flex; gap:8px; margin-top:10px; }
.trip-route .dot { width:12px; display:flex; flex-direction:column; align-items:center; padding-top:4px; }
.trip-route .dot .circle { width:10px; height:10px; border-radius:50%; background:#0d6efd; }
.trip-route .dot .circle.end { background:#198754; }
.trip-route .dot .line { flex:1; width:2px; background:#dee2e6; margin:2px 0; }
.trip-route .txt { flex:1; font-size:13px; }
.trip-route .txt .lbl { color:#6c757d; font-size:11px; }

/* misc */
.text-muted-2 { color:#8a94a6; }
.cursor-pointer { cursor: pointer; }
