:root {
    --logi-green: #07934a;
    --logi-dark: #0f172a;
    --logi-muted: #64748b;
    --logi-bg: #f4f7fb;
}

* { box-sizing: border-box; }
body {
    background: var(--logi-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 270px;
    min-height: 100vh;
    background: linear-gradient(180deg, #063b25, #0f172a 68%);
    color: #fff;
    padding: 22px;
    position: sticky;
    top: 0;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-logo {
    width: 54px; height: 54px; border-radius: 14px;
    background: var(--logi-green); color: white;
    display: grid; place-items: center;
    font-weight: 900; letter-spacing: -1px;
    box-shadow: 0 10px 25px rgba(0,0,0,.22);
}
.brand-title { font-weight: 800; font-size: 1.05rem; }
.brand-subtitle { color: rgba(255,255,255,.65); font-size: .8rem; }
.nav-link {
    color: rgba(255,255,255,.78);
    border-radius: 12px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.12); color: white; }
.sidebar-footer { position: absolute; left: 22px; right: 22px; bottom: 22px; }
.app-main { flex: 1; padding: 26px; overflow-x: hidden; }
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.user-chip {
    background: white; border: 1px solid #e5e7eb; padding: 10px 14px;
    border-radius: 999px; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.card-soft {
    border: 0; border-radius: 18px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, .06);
}
.stat-card { overflow: hidden; position: relative; }
.stat-card::after {
    content: ""; position: absolute; right: -25px; top: -25px;
    width: 100px; height: 100px; border-radius: 50%;
    background: rgba(7,147,74,.10);
}
.stat-icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center;
    background: #ecfdf3; color: var(--logi-green);
    font-size: 1.3rem;
}
.table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.btn-green { background: var(--logi-green); border-color: var(--logi-green); color: #fff; }
.btn-green:hover { background: #067a3e; border-color: #067a3e; color: #fff; }
.badge { font-weight: 600; }
.search-panel {
    background: white; border-radius: 18px; padding: 18px;
    box-shadow: 0 12px 28px rgba(15,23,42,.05);
}
.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 10%, rgba(7,147,74,.28), transparent 35%), linear-gradient(135deg, #052e1e, #0f172a);
    display: grid; place-items: center;
    padding: 20px;
}
.login-card {
    width: min(440px, 100%);
    background: white;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 30px 70px rgba(0,0,0,.25);
}
@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar { width: 100%; min-height: auto; position: static; }
    .sidebar-footer { position: static; margin-top: 22px; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Public driver page */
.public-page {
    background: #f4f7fb;
    min-height: 100vh;
}
.public-navbar {
    background: linear-gradient(90deg, #063b25, #0f172a);
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.public-navbar .navbar-brand,
.public-navbar .navbar-brand small {
    color: #fff;
}
.public-navbar .navbar-brand small {
    opacity: .7;
    font-size: .75rem;
}
.small-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: .85rem;
    flex: 0 0 42px;
}
.public-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(7,147,74,.35), transparent 30%),
        linear-gradient(135deg, #052e1e, #0f172a 70%);
    padding: 42px 0;
}
.public-hero.compact { padding: 30px 0; }
.public-search-card {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.20);
}
.public-stat-card {
    background: #fff;
    border-left: 5px solid var(--logi-green);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15,23,42,.05);
}
.public-stat-card span {
    display: block;
    color: #64748b;
    font-size: .85rem;
    margin-bottom: 8px;
}
.public-stat-card strong {
    font-size: 1.8rem;
    line-height: 1;
}
.border-warning-soft { border-left-color: #f59e0b; }
.border-info-soft { border-left-color: #0ea5e9; }
.border-success-soft { border-left-color: #16a34a; }
.public-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.public-tabs a {
    text-decoration: none;
    color: #334155;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.public-tabs a:hover,
.public-tabs a.active {
    color: #fff;
    background: var(--logi-green);
    border-color: var(--logi-green);
}
.public-table th,
.public-table td {
    white-space: nowrap;
}
.container-code {
    letter-spacing: .06em;
    color: #0f5132;
}
@media (max-width: 768px) {
    .public-hero { padding: 28px 0; }
    .public-tabs a { width: 100%; text-align: center; }
    .public-search-card { border-radius: 16px; }
}
