/* =========================================
   Vehicle Booking - Tablet-First Styles
   ========================================= */

:root {
    --color-bg: #0f1419;
    --color-surface: #1a1f26;
    --color-surface-hover: #242b35;
    --color-border: #2d3640;
    --color-text: #e7e9ea;
    --color-text-muted: #8899a6;
    --color-primary: #1d9bf0;
    --color-primary-hover: #1a8cd8;
    --color-success: #00ba7c;
    --color-warning: #ffad1f;
    --color-danger: #f4212e;
    --color-disabled: #6e767d;
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    
    --header-height: 60px;
    --sidebar-width: 240px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =========================================
   Header
   ========================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.header-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--color-primary);
    color: white;
}

/* =========================================
   Main Content
   ========================================= */

.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
    padding: calc(var(--header-height) + 24px) 24px 24px;
}

/* =========================================
   Vehicles Grid
   ========================================= */

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.vehicle-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s;
    display: block;
}

.vehicle-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.vehicle-card.disabled {
    opacity: 0.7;
    border-color: var(--color-danger);
}

.vehicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.vehicle-reg {
    font-family: monospace;
    font-size: 0.9rem;
    background: var(--color-bg);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-available {
    background: rgba(0, 186, 124, 0.15);
    color: var(--color-success);
}

.status-badge.status-busy {
    background: rgba(255, 173, 31, 0.15);
    color: var(--color-warning);
}

.status-badge.status-disabled {
    background: rgba(244, 33, 46, 0.15);
    color: var(--color-danger);
}

.vehicle-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.vehicle-model {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.vehicle-parking {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.vehicle-disabled-info,
.vehicle-current-res {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.vehicle-disabled-info .disabled-reason {
    color: var(--color-danger);
    font-weight: 500;
}

.vehicle-disabled-info .disabled-until,
.vehicle-current-res .res-until {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.vehicle-current-res .res-person {
    font-weight: 500;
}

.vehicle-upcoming {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border);
}

.upcoming-item {
    font-size: 0.65rem;
    color: rgba(136, 153, 166, 0.6);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upcoming-item + .upcoming-item {
    margin-top: 1px;
}

/* =========================================
   Vehicle View
   ========================================= */

.vehicle-view {
    max-width: 1600px;
    margin: 0 auto;
}

.vehicle-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.back-link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.vehicle-info {
    flex: 1;
    min-width: 300px;
}

.vehicle-info h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.vehicle-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.vehicle-details .reg {
    font-family: monospace;
    background: var(--color-surface);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.vehicle-status {
    min-width: 200px;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.status-box.status-available {
    border-left: 4px solid var(--color-success);
}

.status-box.status-busy {
    border-left: 4px solid var(--color-warning);
}

.status-box.status-disabled {
    border-left: 4px solid var(--color-danger);
}

.status-icon {
    font-size: 1.5rem;
}

.status-text strong {
    display: block;
    margin-bottom: 4px;
}

.status-text p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

.status-text .note {
    font-style: italic;
}

/* =========================================
   Timeline
   ========================================= */

.timeline-container {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timeline-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.timeline-actions {
    display: flex;
    gap: 8px;
}

.timeline-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 700px; /* Minimalna szerokość dla czytelności */
}

.timeline-hours {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-surface);
}

.timeline-corner {
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
}

.hour-label {
    flex: 1;
    min-width: 28px;
    text-align: center;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    padding: 6px 0;
    border-left: 1px solid var(--color-border);
    white-space: nowrap;
    overflow: hidden;
}

.timeline-day {
    display: flex;
    border-top: 1px solid var(--color-border);
}

.day-label {
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.day-label .day-name {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.day-label .day-date {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.hour-slot {
    flex: 1;
    min-width: 28px;
    height: 50px;
    border-left: 1px solid var(--color-border);
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
}

.hour-slot:hover:not(.reserved):not(.past) {
    background: rgba(29, 155, 240, 0.1);
}

.hour-slot.past {
    background: rgba(110, 118, 125, 0.1);
    cursor: not-allowed;
}

/* Cały poprzedni dzień wyszarzony */
.timeline-day.past-day {
    opacity: 0.5;
}

.timeline-day.past-day .day-label {
    color: var(--color-text-muted);
}

.timeline-day.past-day .hour-slot {
    background: rgba(110, 118, 125, 0.15);
    cursor: not-allowed;
}

.hour-slot.selected {
    background: rgba(29, 155, 240, 0.3) !important;
}

.hour-slot.reserved {
    cursor: pointer;
}

.reservation-block {
    position: absolute;
    top: 3px;
    left: 2px;
    bottom: 3px;
    /* Szerokość ustawiana dynamicznie przez JS */
    background: linear-gradient(135deg, var(--color-primary), #0d7bc4);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    font-size: 0.65rem;
    color: white;
    overflow: hidden;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
}

.reservation-block .res-person {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reservation-block .res-time {
    opacity: 0.9;
    font-size: 0.6rem;
}

/* Większe ekrany - więcej miejsca */
@media (min-width: 1200px) {
    .timeline {
        min-width: 900px;
    }
    
    .hour-label {
        font-size: 0.7rem;
        min-width: 35px;
    }
    
    .hour-slot {
        height: 55px;
        min-width: 35px;
    }
    
    .reservation-block {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

/* Tablet landscape */
@media (max-width: 1199px) and (min-width: 768px) {
    .timeline {
        min-width: 650px;
    }
}

/* =========================================
   Dashboard
   ========================================= */

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard h1 {
    font-size: 1.75rem;
    margin-bottom: 32px;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text-muted);
}

.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reservation-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.reservation-item.current {
    border-left: 4px solid var(--color-success);
}

.res-vehicle {
    min-width: 200px;
}

.res-vehicle a {
    font-weight: 600;
    color: var(--color-text);
}

.res-vehicle .reg {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: 8px;
}

.res-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    min-width: 100px;
}

.res-time {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--color-text);
    min-width: 120px;
}

.res-person {
    flex: 1;
}

.res-person .phone {
    font-size: 0.85rem;
    margin-left: 8px;
}

.empty-state {
    color: var(--color-text-muted);
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* =========================================
   Buttons
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-border);
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-warning {
    background: var(--color-warning);
    color: black;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* =========================================
   Forms
   ========================================= */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-help {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* Searchable Select */
.searchable-select {
    position: relative;
}

.searchable-select .form-input {
    cursor: text;
}

.searchable-select .form-input.selected {
    background: rgba(29, 155, 240, 0.1);
    border-color: var(--color-primary);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow);
}

.search-dropdown.active {
    display: block;
}

.search-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

.search-option:last-child {
    border-bottom: none;
}

.search-option:hover,
.search-option.highlighted {
    background: var(--color-surface-hover);
}

.search-option.add-new {
    color: var(--color-primary);
    font-weight: 500;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.search-option.add-new:hover {
    background: rgba(29, 155, 240, 0.1);
}

.search-option .option-name {
    font-weight: 500;
}

.search-option .option-phone {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.search-option.hidden {
    display: none;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

.info-table {
    width: 100%;
}

.info-table th,
.info-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.info-table th {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-muted);
    width: 150px;
}

.inline-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-edit .form-input {
    width: auto;
    min-width: 200px;
}

/* =========================================
   Alerts
   ========================================= */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(0, 186, 124, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(0, 186, 124, 0.3);
}

.alert-error {
    background: rgba(244, 33, 46, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(244, 33, 46, 0.3);
}

/* =========================================
   Modal
   ========================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-sm {
    max-width: 360px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
}

/* =========================================
   Access Page
   ========================================= */

.access-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-bg) 0%, #1a2634 100%);
}

.access-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.access-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.access-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.access-box h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.access-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.access-form {
    margin-top: 24px;
}

.access-form .form-input {
    text-align: center;
}

.access-page .back-link {
    display: block;
    margin-top: 24px;
    font-size: 0.9rem;
}

/* =========================================
   Admin Layout
   ========================================= */

.admin-body {
    display: flex;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-header a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.sidebar-nav a.active {
    background: rgba(29, 155, 240, 0.1);
    color: var(--color-primary);
    border-right: 3px solid var(--color-primary);
}

.sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
}

.sidebar-footer a {
    display: block;
    padding: 12px 20px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.sidebar-footer a.logout {
    color: var(--color-danger);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 24px;
}

.admin-content {
    max-width: 1200px;
}

.admin-content h1 {
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header .back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.page-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* =========================================
   Cards
   ========================================= */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-danger {
    border-color: rgba(244, 33, 46, 0.3);
}

.card-danger .card-header {
    background: rgba(244, 33, 46, 0.1);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.cards-row .card {
    margin-bottom: 0;
}

/* =========================================
   Stats
   ========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.quick-actions h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--color-text-muted);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    text-decoration: none;
}

.action-icon {
    font-size: 1.5rem;
}

/* =========================================
   Tables
   ========================================= */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--color-surface-hover);
}

.table .actions {
    white-space: nowrap;
}

.table .actions form.inline {
    display: inline;
}

/* =========================================
   Badges
   ========================================= */

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(0, 186, 124, 0.15);
    color: var(--color-success);
}

.badge-danger {
    background: rgba(244, 33, 46, 0.15);
    color: var(--color-danger);
}

.badge-secondary {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

/* =========================================
   Status Info
   ========================================= */

.status-info {
    padding: 16px;
    border-radius: var(--radius-md);
}

.status-info.status-enabled {
    background: rgba(0, 186, 124, 0.1);
    border: 1px solid rgba(0, 186, 124, 0.2);
}

.status-info.status-disabled {
    background: rgba(244, 33, 46, 0.1);
    border: 1px solid rgba(244, 33, 46, 0.2);
}

.status-info p {
    margin-bottom: 12px;
}

.status-info .btn {
    margin-top: 8px;
}

.status-info .form-group {
    margin-top: 16px;
}

/* =========================================
   Info Box
   ========================================= */

.info-box {
    background: rgba(29, 155, 240, 0.1);
    border: 1px solid rgba(29, 155, 240, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.info-box code {
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: monospace;
}

/* =========================================
   Error Page
   ========================================= */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.error-container h1 {
    font-size: 6rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.error-container p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main {
        margin-left: 200px;
    }
    
    --sidebar-width: 200px;
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 16px;
        padding-top: calc(var(--header-height) + 16px);
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .cards-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Success Popup
   ========================================= */

.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.success-popup.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    position: relative;
    background: linear-gradient(135deg, #1a2634 0%, #0f1419 100%);
    border: 2px solid var(--color-success);
    border-radius: var(--radius-lg);
    padding: 40px 50px;
    text-align: center;
    min-width: 320px;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 186, 124, 0.3);
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(-20px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s ease 0.2s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.popup-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
    margin-bottom: 8px;
}

.popup-message p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.popup-timer {
    margin-top: 24px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    background: var(--color-success);
    width: 100%;
    transition: width linear;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.popup-close:hover {
    opacity: 1;
}

