/* Uwimana Transit — operations UI */

:root {
    --primary: #0369A1;
    --primary-dark: #025684;
    --primary-light: #e0f2fe;
    --accent: #EA580C;
    --accent-light: #fff7ed;
    --danger: #111111;
    --success: #0369A1;
    --warning: #EA580C;
    --info: #0369A1;
    --navy: #013958;

    --sidebar-w: 258px;
    --sidebar-bg: #012f48;
    --sidebar-txt: rgba(255,255,255,0.72);
    --sidebar-hover: rgba(255,255,255,0.07);
    --topbar-h: 64px;
    --body-bg: #F7F1E6;
    --card-bg: #ffffff;
    --border: #E8DCC8;
    --text: #14241b;
    --text-muted: #66786e;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: var(--text);
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
a.btn, a.btn:hover, a.stat-card, a.stat-card:hover, a.settings-tile, a.settings-tile:hover {
    text-decoration: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 1040;
    transition: transform .25s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.login-left .brand-icon { width: 72px; height: 72px; overflow: hidden; }
.brand-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, #5b9dc1, #0369A1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(21, 128, 61, .4);
    flex-shrink: 0;
}

.brand-name { display: block; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -.3px; }
.brand-tag { font-size: 10px; color: #fbbf24; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: rgba(255,255,255,.32);
    padding: 16px 20px 6px;
    text-transform: uppercase;
}

.sidebar-nav { padding: 0 10px 10px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--sidebar-txt);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
}

.sidebar-nav a i { width: 18px; text-align: center; font-size: 16px; }
.sidebar-nav a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
    font-weight: 650;
    box-shadow: 0 6px 16px rgba(21, 128, 61, .35);
}

.nav-badge {
    margin-left: auto;
    background: #EA580C;
    color: #111;
    font-size: 10px;
    font-weight: 800;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav a.active .nav-badge { background: #fff; color: var(--primary); }

.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    overflow: visible;
}
.topbar .dropdown { position: relative; }

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }

.sidebar-toggle {
    border: 0;
    background: transparent;
    color: var(--text);
    width: 40px; height: 40px;
    border-radius: 10px;
}
.sidebar-toggle:hover { background: var(--body-bg); }

.quick-search {
    width: min(360px, 42vw);
    position: relative;
}
.quick-search i {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.quick-search input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px 9px 36px;
    background: #fff;
    font-size: 13px;
}
.quick-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21,128,61,.12);
}

.user-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 10px 4px 4px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    cursor: pointer;
}
.user-btn:hover, .user-btn:focus, .user-btn:active, .user-btn.show {
    background: var(--body-bg);
    color: var(--text);
    border-color: var(--border);
    box-shadow: none;
}
.user-btn::after { display: none; }
.topbar .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 8px);
    min-width: 220px;
    padding: 8px;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 1080;
}
.topbar .dropdown-menu.show { display: block; }
.topbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
}
.topbar .dropdown-item:hover, .topbar .dropdown-item:focus {
    background: var(--body-bg);
    color: var(--text);
}
.topbar .dropdown-item.text-danger,
.topbar .dropdown-item.text-danger:hover {
    color: var(--danger);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}

.page-content { flex: 1; padding: 22px 24px 40px; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-title { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.5px; }
.page-subtitle { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 700;
}
.card-body { padding: 20px; }

.stat-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    padding: 18px;
    display: flex;
    gap: 14px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .18s, box-shadow .18s;
    height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.green { background: var(--primary-light); color: var(--primary); }
.stat-icon.orange { background: var(--accent-light); color: var(--accent); }
.stat-icon.blue { background: #e0f2fe; color: var(--info); }
.stat-icon.red { background: #fee2e2; color: var(--danger); }
.stat-icon.navy { background: #e2e8f0; color: var(--navy); }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }

.table { font-size: 13.4px; margin: 0; }
.table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: #f8faf9;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    padding: 11px 12px;
}
.table tbody td { padding: 12px; vertical-align: middle; border-color: var(--border); }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--primary-light); }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.status-pill.paid { background: var(--primary-light); color: var(--primary); }
.status-pill.partial { background: var(--accent-light); color: #b45309; }
.status-pill.due { background: #fee2e2; color: #b91c1c; }

.form-label { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 14px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21,128,61,.12);
}

.btn,
a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.2;
    border-radius: 8px;
    padding: 8px 14px;
    border-width: 1.5px;
    white-space: nowrap;
    text-decoration: none;
}
.btn-sm, a.btn-sm, button.btn-sm {
    padding: 5px 11px;
    font-size: 12.5px;
    min-height: 32px;
    border-radius: 7px;
}
.btn-primary, a.btn-primary, button.btn-primary,
.btn-primary:hover, a.btn-primary:hover, button.btn-primary:hover,
.btn-primary:focus, a.btn-primary:focus,
.btn-primary:active, a.btn-primary:active {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    color: #fff;
    background-color: var(--primary);
    background-image: none;
    border-color: var(--primary);
}
.btn-primary:hover, a.btn-primary:hover, button.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-warning, a.btn-warning {
    color: #fff;
    background-color: var(--accent);
    border-color: var(--accent);
}
.btn-danger, a.btn-danger, button.btn-danger {
    color: #fff;
    background-color: var(--danger);
    border-color: var(--danger);
}
.btn-outline-secondary, a.btn-outline-secondary, button.btn-outline-secondary,
.btn-outline-secondary:hover, a.btn-outline-secondary:hover {
    color: var(--text);
    background-color: #fff;
    border-color: #cfd8d3;
}
.btn-outline-secondary:hover, a.btn-outline-secondary:hover {
    background-color: var(--body-bg);
    color: var(--text);
}
.btn-outline-danger, a.btn-outline-danger, button.btn-outline-danger {
    color: var(--danger);
    background-color: #fff;
    border-color: #fecaca;
}
.btn-outline-danger:hover, a.btn-outline-danger:hover {
    color: #fff;
    background-color: var(--danger);
    border-color: var(--danger);
}
.btn-icon {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px;
}
.table .btn { min-width: auto; }
.table td .btn + .btn { margin-left: 6px; }

.flash {
    border: 0;
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 16px;
}
.flash.danger { border-color: var(--danger); background: #fee2e2; color: #991b1b; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 36px; color: var(--primary); display: block; margin-bottom: 10px; }

.settings-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform .18s, box-shadow .18s;
}
.settings-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.settings-tile .icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}

.route-cell { font-weight: 700; }
.route-cell span { color: var(--text-muted); font-weight: 500; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(12,26,20,.45);
    z-index: 1035;
}

body.sidebar-open .sidebar-overlay { display: block; }

.hero-panel {
    background: linear-gradient(135deg, #012f48 0%, #14532d 55%, #025684 100%);
    color: #fff;
    border-radius: 18px;
    padding: 26px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.hero-panel::after {
    content: '';
    position: absolute;
    right: -40px; bottom: -50px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.hero-kicker { color: #fbbf24; font-size: 11px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.hero-panel h2 { font-weight: 800; margin: 6px 0 8px; }
.hero-panel p { color: rgba(255,255,255,.75); margin: 0; }

.login-shell {
    min-height: 100vh;
    display: flex;
    background: #f3f6f4;
}
.login-left {
    flex: 1;
    background: linear-gradient(150deg, #07130e 0%, #14532d 50%, #07130e 100%);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-left::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 22px 22px;
}
.login-right {
    width: 480px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-size: 28px; font-weight: 800; }
.feature-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); position: relative; }
.feature-row:last-child { border-bottom: 0; }
.feature-ico {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(21,128,61,.4); color: #86efac;
    display: flex; align-items: center; justify-content: center;
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: none; }
    .main-wrapper { margin-left: 0; }
    .quick-search { display: none; }
    .login-left { display: none; }
    .login-right { width: 100%; }
}

@media print {
    .sidebar, .topbar, .btn, .page-header .d-flex { display: none !important; }
    .main-wrapper { margin: 0; }
    .page-content { padding: 0; }
    .card { box-shadow: none; border: 0; }
}

/* IPLINK brand palette override */
.sidebar { background: #013f60 !important; }
.btn-primary {
  --bs-btn-bg: #0369A1; --bs-btn-border-color: #0369A1;
  --bs-btn-hover-bg: #025684; --bs-btn-hover-border-color: #025684;
  background: #0369A1 !important; border-color: #0369A1 !important;
}
.sidebar a.active { background: #0369A1 !important; }

/* === IPLINK TWO-COLOR LOCK START === */
:root {
  --iplink-primary: #0369A1;
  --iplink-primary-deep: #025684;
  --iplink-secondary: #EA580C;
  --iplink-secondary-deep: #C94B0A;
  --iplink-ink: #111111;
  --iplink-cream: #F7F1E6;
  --iplink-white: #ffffff;
}
.btn-primary, .btn-success, .btn-info, .btn-login,
button[type=submit].btn, .btn-primary:not(:disabled):not(.disabled) {
  background: #0369A1 !important;
  border-color: #0369A1 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover, .btn-login:hover {
  background: #025684 !important;
  border-color: #025684 !important;
  color: #fff !important;
}
.btn-warning, .badge-warning, .bg-warning, .badge.bg-warning {
  background: #EA580C !important;
  border-color: #EA580C !important;
  color: #111 !important;
}
.btn-danger, .badge-danger, .bg-danger, .badge.bg-danger {
  background: #111111 !important;
  border-color: #111111 !important;
  color: #fff !important;
}
.btn-danger:hover {
  background: #000000 !important;
  border-color: #000000 !important;
}
.text-primary, .text-info, .text-success { color: #0369A1 !important; }
.text-warning { color: #C94B0A !important; }
.text-danger { color: #111111 !important; }
.bg-primary, .bg-info, .bg-success,
.badge-primary, .badge-info, .badge-success,
.badge.bg-primary, .badge.bg-info, .badge.bg-success {
  background: #0369A1 !important;
  color: #fff !important;
}
.alert-success, .alert-info {
  background: #fff !important;
  color: #111 !important;
  border-color: #0369A1 !important;
}
.alert-warning {
  background: #F7F1E6 !important;
  color: #111 !important;
  border-color: #EA580C !important;
}
.alert-danger {
  background: #F7F1E6 !important;
  color: #111 !important;
  border-color: #111111 !important;
}
.progress-bar { background-color: #0369A1 !important; }
.nav-pills .nav-link.active,
.page-item.active .page-link,
.dropdown-item.active,
.dropdown-item:active {
  background-color: #0369A1 !important;
  border-color: #0369A1 !important;
  color: #fff !important;
}
.form-control:focus, .form-select:focus, .inp:focus {
  border-color: #0369A1 !important;
  box-shadow: 0 0 0 0.15rem rgba(3, 105, 161, 0.18) !important;
}
.custom-control-input:checked ~ .custom-control-label::before,
.form-check-input:checked {
  background-color: #0369A1 !important;
  border-color: #0369A1 !important;
}
.form-check-input { accent-color: #0369A1; }
[style*="color:blue"], [style*="color: blue"] { color: #0369A1 !important; }
[style*="color:green"], [style*="color: green"] { color: #EA580C !important; }
[style*="color:red"], [style*="color: red"] { color: #111111 !important; }
.err, .kabox-alert.err, .qulider-alert.err {
  background: #F7F1E6 !important;
  color: #111 !important;
  border: 1px solid #111111 !important;
}
.creds, .kabox-creds, .demo-info, .qulider-creds {
  background: rgba(3, 105, 161, 0.08) !important;
  color: #111 !important;
  border: 1px solid rgba(3, 105, 161, 0.18) !important;
}
/* === IPLINK TWO-COLOR LOCK END === */
