:root {
    --rota-blue: #132b5b;
    --rota-cyan: #2ea7ad;
    --rota-lime: #c8f66a;
    --rota-green: #7fd37c;
    --rota-yellow: #f4d000;
    --rota-red: #ff2d2d;
    --bg: #f6f8fb;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #0f172a;
    --muted: #64748b;
    --shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

html,
body {
    min-height: 100%;
}

body.app-body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 80% 0%, rgba(46, 167, 173, 0.10), transparent 60%),
        radial-gradient(900px 420px at 10% 0%, rgba(200, 246, 106, 0.12), transparent 60%),
        var(--bg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
}

.container-fluid {
    max-width: none;
    padding-left: 24px;
    padding-right: 24px;
}

.rota-topbar {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    background: linear-gradient(90deg, #7fd37c 0%, #2ea7ad 45%, #132b5b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    position: sticky;
    top: 0;
    z-index: 50;
}

.rota-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.rota-logo {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.22));
}

.rota-brand {
    line-height: 1.1;
}

.rota-brand-title {
    font-size: 16px;
    font-weight: 900;
    color: white;
}

.rota-brand-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.rota-nav {
    display: flex;
    gap: 10px;
    margin: auto;
}

.rota-link,
.rota-btn,
.rota-badge {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.rota-link {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    padding: 7px 14px;
    border: 1px solid transparent;
}

.rota-link:hover,
.rota-link.active {
    background: rgba(0, 0, 0, 0.16);
    border-color: rgba(255, 255, 255, 0.30);
}

.rota-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rota-badge,
.rota-btn {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: white;
    background: rgba(0, 0, 0, 0.16);
    text-decoration: none;
}

.rota-btn-logout {
    border-color: rgba(255, 45, 45, 0.45);
    background: rgba(255, 45, 45, 0.14);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    font-weight: 900;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(46, 167, 173, 0.16), rgba(127, 211, 124, 0.14));
}

.kpi-strip {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.kpi-chip {
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--rota-cyan);
    background: #fff;
}

.kpi-chip.kpi-warn {
    border-left-color: var(--rota-yellow);
}

.kpi-chip.kpi-danger {
    border-left-color: var(--rota-red);
}

.kpi-label {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.kpi-value {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.rota-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid var(--border);
}

.status-ok {
    color: #166534;
    background: #dcfce7;
}

.status-warning {
    color: #854d0e;
    background: #fef9c3;
}

.status-overdue {
    color: #991b1b;
    background: #fee2e2;
}

.mini-list,
.history-list {
    max-height: 420px;
    overflow: auto;
}

.row-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.row-item:last-child {
    border-bottom: 0;
}

.row-title {
    font-weight: 900;
}

.row-sub {
    color: var(--muted);
    font-size: 13px;
}

.selected-maintenance {
    border: 1px solid var(--border);
    border-left: 5px solid var(--rota-cyan);
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
    font-weight: 800;
}

.current-meter-box,
.report-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.current-meter-box {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--muted);
}

.current-meter-box strong {
    color: var(--text);
}

.maintenance-map {
    height: 260px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f7;
}

.summary-chip {
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.summary-chip span {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-chip strong {
    display: block;
    margin-top: 2px;
    font-size: 20px;
}

.report-title {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.report-list {
    max-height: 260px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.type-card {
    margin: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--rota-cyan);
    border-radius: 12px;
    background: #fff;
}

.type-count {
    margin-top: 4px;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.vehicle-select-multiple {
    min-height: 230px;
}

.link-form-shell {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.calibration-hint {
    color: var(--muted);
    font-size: 13px;
}

.calibration-table th {
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.calibration-table td {
    vertical-align: middle;
}

.calibration-table .form-control {
    min-width: 120px;
}

.calibration-table .form-select {
    min-width: 160px;
}

.select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border-color: #dee2e6;
}

#linkModal .select2-container {
    width: 100% !important;
}

#linkModal .select2-dropdown {
    border-color: #dee2e6;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.maintenance-row {
    cursor: pointer;
}

.maintenance-row:hover {
    background: rgba(46, 167, 173, 0.06);
}

.detail-grid {
    display: grid;
    gap: 14px;
}

.detail-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.detail-section-title {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.detail-grid-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

.detail-item {
    min-width: 0;
}

.detail-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.detail-value {
    margin-top: 3px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .detail-grid-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .detail-grid-inner {
        grid-template-columns: 1fr;
    }
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c8f66a 0%, #2ea7ad 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    overflow: hidden;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    padding: 30px;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, #132b5b 0%, #2ea7ad 70%, #c8f66a 100%);
}

.login-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.login-header p {
    margin: 6px 0 0;
    opacity: .9;
}

.login-body {
    padding: 30px;
}

.input-icon-group {
    position: relative;
}

.input-icon-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-icon-group .form-control {
    padding-left: 40px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, #132b5b 0%, #2ea7ad 100%);
}

.login-footer {
    margin-top: 16px;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .rota-nav {
        display: none;
    }

    .rota-left {
        min-width: auto;
    }

    .rota-brand-sub,
    .rota-badge {
        display: none;
    }
}
