html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    margin-bottom: 0;
    height: 100%;
    overflow: hidden;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.form-group {
    margin-bottom: 1em;
}

.navbar .nav-link.dropdown-toggle,
.navbar .btn-link.nav-link {
    color: var(--bs-navbar-color);
}

.navbar .nav-link.dropdown-toggle:hover,
.navbar .nav-link.dropdown-toggle:focus,
.navbar .btn-link.nav-link:hover,
.navbar .btn-link.nav-link:focus {
    color: var(--bs-navbar-hover-color);
}

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
}

.app-sidebar {
    width: 220px;
    background: #1f2227;
    color: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
}

.app-brand a {
    color: #00d9ff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.app-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-nav-item a,
.app-nav-item .nav-link {
    color: #a1a6ad;
    text-decoration: none;
    font-size: 0.9rem;
}

.app-nav-item a:hover,
.app-nav-item .nav-link:hover,
.app-nav-link-button:hover {
    color: #00d9ff;
}

.app-nav-link-button {
    background: transparent;
    border: none;
    color: #a1a6ad;
    padding: 0;
    font-size: 0.9rem;
    text-align: left;
}

.app-admin-group details summary {
    cursor: pointer;
    color: #d0d4da;
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
}

.app-admin-group details summary::-webkit-details-marker {
    display: none;
}

.app-admin-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-sidebar-footer {
    margin-top: auto;
}

.app-main {
    flex: 1;
    padding: 24px;
    min-height: 0;
    overflow-y: auto;
}

.home-page {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
}

.home-sidebar,
.home-sidebar-title,
.home-sidebar-nav,
.home-sidebar-nav li,
.home-sidebar-nav li.active {
    display: none;
}

.home-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-search input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #d0d7de;
    background: #ffffff;
}

.home-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-filters-title {
    font-weight: 600;
    color: #333;
}

.home-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid #c9cdd3;
    background: #f0f0f0;
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.filter-chip.active {
    background: #00d9ff;
    border-color: #0099cc;
    color: #ffffff;
    font-weight: 600;
}

.home-stations h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.station-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.station-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4ecdc4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
}

.station-details {
    flex: 1;
}

.station-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.station-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.station-status {
    font-size: 0.85rem;
    font-weight: 600;
}

.station-status.status-ok {
    color: #00aa44;
}

.station-status.status-warn {
    color: #ff9900;
}

.station-status.status-bad {
    color: #cc0000;
}

.station-actions {
    margin-left: auto;
}

.station-button {
    border: 2px solid #0099cc;
    background: #00d9ff;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
}

.station-button-success {
    border-color: #2f9e44;
    background: #37b24d;
}

.station-button-success:hover {
    border-color: #2b8a3e;
    background: #2f9e44;
}

.station-button-danger {
    border-color: #c92a2a;
    background: #e03131;
}

.station-button-danger:hover {
    border-color: #a51111;
    background: #c92a2a;
}

.station-button-compact {
    padding: 6px 12px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.station-empty {
    background: #ffffff;
    border: 1px dashed #d0d7de;
    border-radius: 12px;
    padding: 16px;
    color: #666;
}

.admin-feedback {
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.admin-feedback-success {
    color: #155724;
    background: #e8f5e9;
    border-color: #66bb6a;
}

.admin-feedback-error {
    color: #842029;
    background: #fdecea;
    border-color: #f5a3aa;
}

.home-vehicle-select {
    border: 1px solid #c9cdd3;
    background: #f0f0f0;
    color: #333;
    padding: 8px 40px 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 210px;
    min-height: 36px;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8L10 12L14 8' stroke='%23666' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.home-vehicle-select:hover {
    border-color: #0099cc;
    background: #eafcff;
}

.home-vehicle-select:focus,
.home-vehicle-select:focus-visible {
    border-color: #0099cc;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.25);
}

.vehicle-page {
    max-width: 980px;
}

.vehicle-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vehicle-card {
    margin-bottom: 0;
}

.vehicle-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-chip-danger {
    border-color: #cc0000;
    color: #cc0000;
    background: #fff5f5;
}

.vehicle-form-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.vehicle-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    width: 100%;
}

.vehicle-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vehicle-connectors-grid {
    gap: 8px;
}

.vehicle-connector-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.vehicle-connector-input {
    margin: 0;
}

.vehicle-connector-chip.active,
.vehicle-connector-chip:has(.vehicle-connector-input:checked) {
    background: #00d9ff;
    border-color: #0099cc;
    color: #ffffff;
    font-weight: 600;
}

.reservation-page {
    max-width: 1040px;
}

.reservation-station-header,
.reservation-section-card {
    align-items: flex-start;
}

.reservation-connector-grid,
.reservation-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reservation-connector-chip {
    background: #f7fcff;
}

.reservation-form-grid {
    width: 100%;
}

.figure2-page .reservation-station-header {
    border-radius: 10px;
}

.figure2-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.figure2-option-card {
    border: 1px solid #d5d9dd;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.figure2-option-card.active {
    border: 2px solid #00d9ff;
    background: #eafcff;
}

.figure2-option-title {
    font-weight: 700;
    color: #333;
}

.figure2-option-meta {
    color: #666;
    font-size: 0.85rem;
}

.figure2-calculator {
    background: #ffffff;
}

.figure2-battery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.figure2-battery-grid input[type="range"] {
    width: 100%;
}

.figure2-result-box {
    margin-top: 10px;
    border: 1px solid #53b563;
    background: #e8f5e9;
    border-radius: 8px;
    padding: 10px 12px;
    color: #155724;
    font-weight: 600;
}

.availability-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.availability-day-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.availability-day-title {
    font-weight: 700;
    color: #333;
    font-size: 0.85rem;
}

.station-reservation-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.station-reservation-day {
    background: #f8fbfd;
    border: 1px solid #d9e1e7;
    border-radius: 8px;
    padding: 10px;
}

.station-button.is-disabled,
.station-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard-filter-card {
    align-items: stretch;
}

.operator-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-accent {
    height: 6px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 4px;
}

.kpi-accent-primary { background: #00d9ff; }
.kpi-accent-secondary { background: #4ecdc4; }
.kpi-accent-tertiary { background: #95e1d3; }
.kpi-accent-warning { background: #ffc107; }

.kpi-title {
    font-size: 0.9rem;
    color: #666;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
}

.kpi-hint {
    font-size: 0.8rem;
    color: #888;
}

.operator-two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.operator-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.operator-table-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    background: #f8fbfd;
    border: 1px solid #dce3e8;
    font-size: 0.85rem;
}

.operator-table-head {
    background: #eef7fb;
    font-weight: 700;
}

.trend-card .station-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.trend-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f8ff;
    color: #047da3;
    font-weight: 700;
    font-size: 0.82rem;
}

.trend-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.trend-summary-item {
    background: #f8fbfd;
    border: 1px solid #dce3e8;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trend-summary-item span {
    font-size: 0.73rem;
    color: #64748b;
}

.trend-summary-item strong {
    font-size: 0.95rem;
    color: #172554;
}

.trend-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.trend-row {
    display: grid;
    grid-template-columns: minmax(66px, auto) 1fr auto;
    align-items: center;
    gap: 10px;
}

.trend-label {
    font-size: 0.76rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-track {
    height: 12px;
    background: #e5ecf1;
    border-radius: 999px;
    overflow: hidden;
}

.trend-fill {
    height: 100%;
    border-radius: 999px;
}

.trend-fill-utilization {
    background: linear-gradient(90deg, #00d9ff, #40b8ff);
}

.trend-fill-revenue {
    background: linear-gradient(90deg, #4ecdc4, #34d399);
}

.trend-value {
    font-size: 0.78rem;
    color: #1e293b;
    font-weight: 600;
}

.maintenance-card {
    margin-bottom: 10px;
}
