/* Extracted from fleet.html */

/* =========================================================================
       BASE RESET & SHELL
       ========================================================================= */

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

    html, body {
      height: 100%;
    }

    body {
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      color: var(--color-text-primary);
      background-color: var(--color-bg-base);
      overflow: hidden;
    }

    [data-theme="modern"] body {
      background-image: radial-gradient(
        circle,
        var(--dot-grid-color) 1px,
        transparent 1px
      );
      background-size: var(--dot-grid-size) var(--dot-grid-size);
    }

    /* =========================================================================
       LAYOUT
       ========================================================================= */

    .page-shell {
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    .main-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }

    .page-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-4) var(--space-6);
      border-bottom: 1px solid var(--color-border);
      background: var(--color-bg-elevated);
      flex-shrink: 0;
      gap: var(--space-4);
    }

    .page-header h1 {
      font-family: var(--font-heading);
      font-size: var(--text-h3);
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      color: var(--color-text-primary);
      white-space: nowrap;
    }

    .page-header__actions {
      display: flex;
      gap: var(--space-3);
      align-items: center;
    }

    .page-content {
      flex: 1;
      overflow-y: auto;
      padding: var(--space-5) var(--space-6);
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb, #444) var(--scrollbar-track, #222);
    }

    /* =========================================================================
       STATS ROW
       ========================================================================= */

    .stats-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: var(--space-4);
      margin-bottom: var(--space-5);
    }

    .stat-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      padding: var(--space-4) var(--space-5);
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
    }

    [data-theme="industrial"] .stat-card {
      clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    }

    [data-theme="modern"] .stat-card {
      border-radius: var(--radius-lg);
    }

    .stat-card__label {
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
    }

    .stat-card__value {
      font-family: var(--font-heading);
      font-size: var(--text-h2);
      font-weight: var(--font-weight-extrabold);
      color: var(--color-text-primary);
    }

    .stat-card__value--warn {
      color: var(--color-warning, #E3B341);
    }

    .stat-card__value--danger {
      color: var(--color-error, #F85149);
    }

    /* =========================================================================
       TABS
       ========================================================================= */

    .tabs {
      display: flex;
      gap: 0;
      border-bottom: 2px solid var(--color-border);
      margin-bottom: var(--space-5);
      flex-shrink: 0;
    }

    .tab-btn {
      padding: var(--space-3) var(--space-5);
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
      color: var(--color-text-muted);
      transition: all var(--duration-fast) var(--ease-in-out);
    }

    .tab-btn:hover {
      color: var(--color-text-primary);
    }

    .tab-btn.is-active {
      color: var(--color-primary);
      border-bottom-color: var(--color-primary);
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.is-active {
      display: block;
    }

    /* =========================================================================
       TABLE
       ========================================================================= */

    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: var(--text-body-sm);
    }

    .data-table th {
      text-align: left;
      padding: var(--space-3) var(--space-4);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
      border-bottom: 1px solid var(--color-border);
      background: var(--color-surface-2);
      white-space: nowrap;
    }

    .data-table td {
      padding: var(--space-3) var(--space-4);
      border-bottom: 1px solid var(--color-border);
      color: var(--color-text-secondary);
      vertical-align: middle;
    }

    .data-table tr:hover td {
      background: var(--color-surface-2);
    }

    .data-table .mono {
      font-family: var(--font-mono);
      font-size: 0.8125rem;
    }

    /* =========================================================================
       BADGES
       ========================================================================= */

    .badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-1);
      padding: 2px var(--space-2);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      border: 1px solid;
    }

    [data-theme="modern"] .badge {
      border-radius: var(--radius-full);
    }

    .badge--active {
      background: rgba(63, 185, 80, 0.15);
      border-color: rgba(63, 185, 80, 0.3);
      color: #3FB950;
    }

    .badge--inactive {
      background: rgba(139, 148, 158, 0.15);
      border-color: rgba(139, 148, 158, 0.3);
      color: #8B949E;
    }

    .badge--overdue {
      background: rgba(248, 81, 73, 0.15);
      border-color: rgba(248, 81, 73, 0.3);
      color: #F85149;
    }

    .badge--upcoming {
      background: rgba(227, 179, 65, 0.15);
      border-color: rgba(227, 179, 65, 0.3);
      color: #E3B341;
    }

    /* =========================================================================
       BUTTONS
       ========================================================================= */

    .btn {
      display: inline-flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-2) var(--space-4);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-wide);
      border: 1px solid var(--color-border);
      cursor: pointer;
      transition: all var(--duration-fast) var(--ease-in-out);
      white-space: nowrap;
      background: var(--color-surface-2);
      color: var(--color-text-primary);
    }

    [data-theme="modern"] .btn {
      border-radius: var(--radius-md);
    }

    .btn--primary {
      background: var(--color-primary);
      color: var(--color-text-inverse, #000);
      border-color: var(--color-primary);
    }

    .btn--primary:hover {
      opacity: 0.85;
    }

    .btn--ghost {
      background: none;
      border-color: transparent;
      color: var(--color-text-secondary);
    }

    .btn--ghost:hover {
      color: var(--color-text-primary);
      background: var(--color-surface-2);
    }

    .btn--sm {
      padding: var(--space-1) var(--space-3);
      font-size: var(--text-caption);
    }

    .btn--danger {
      background: rgba(248, 81, 73, 0.15);
      border-color: rgba(248, 81, 73, 0.3);
      color: #F85149;
    }

    .btn--danger:hover {
      background: rgba(248, 81, 73, 0.25);
    }

    /* =========================================================================
       SEARCH BAR
       ========================================================================= */

    .search-input {
      padding: var(--space-2) var(--space-4);
      border: 1px solid var(--color-border);
      background: var(--color-surface-2);
      color: var(--color-text-primary);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
      width: 280px;
      transition: border-color var(--duration-fast);
    }

    [data-theme="modern"] .search-input {
      border-radius: var(--radius-md);
    }

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

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

    /* =========================================================================
       VEHICLE GRID (alternative view)
       ========================================================================= */

    .vehicle-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: var(--space-4);
    }

    .vehicle-card {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      padding: var(--space-4) var(--space-5);
      cursor: pointer;
      transition: all var(--duration-fast) var(--ease-in-out);
    }

    [data-theme="industrial"] .vehicle-card {
      clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    }

    [data-theme="modern"] .vehicle-card {
      border-radius: var(--radius-lg);
    }

    .vehicle-card:hover {
      border-color: var(--color-primary);
      box-shadow: 0 0 0 1px var(--color-primary);
    }

    .vehicle-card__header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: var(--space-3);
    }

    .vehicle-card__plate {
      font-family: var(--font-heading);
      font-size: var(--text-h4);
      font-weight: var(--font-weight-extrabold);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      color: var(--color-primary);
    }

    .vehicle-card__info {
      font-size: var(--text-body-sm);
      color: var(--color-text-secondary);
      line-height: 1.6;
    }

    .vehicle-card__info strong {
      color: var(--color-text-primary);
    }

    .vehicle-card__footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: var(--space-3);
      padding-top: var(--space-3);
      border-top: 1px solid var(--color-border);
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    /* =========================================================================
       MODAL
       ========================================================================= */

    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      z-index: 500;
      align-items: center;
      justify-content: center;
    }

    .modal-overlay.is-open {
      display: flex;
    }

    .modal {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border);
      width: 90%;
      max-width: 560px;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    [data-theme="modern"] .modal {
      border-radius: var(--radius-lg);
    }

    .modal__header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: var(--space-4) var(--space-6);
      border-bottom: 1px solid var(--color-border);
    }

    .modal__title {
      font-family: var(--font-heading);
      font-size: var(--text-h4);
      font-weight: var(--font-weight-bold);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    .modal__close {
      background: none;
      border: none;
      color: var(--color-text-muted);
      cursor: pointer;
      font-size: 1.25rem;
      padding: var(--space-1);
    }

    .modal__close:hover {
      color: var(--color-text-primary);
    }

    .modal__body {
      padding: var(--space-5) var(--space-6);
      overflow-y: auto;
      flex: 1;
    }

    .modal__footer {
      padding: var(--space-4) var(--space-6);
      border-top: 1px solid var(--color-border);
      display: flex;
      justify-content: flex-end;
      gap: var(--space-3);
    }

    /* =========================================================================
       FORM
       ========================================================================= */

    .form-group {
      margin-bottom: var(--space-4);
    }

    .form-group label {
      display: block;
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--color-text-muted);
      margin-bottom: var(--space-1);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%;
      padding: var(--space-2) var(--space-3);
      border: 1px solid var(--color-border);
      background: var(--color-surface-2);
      color: var(--color-text-primary);
      font-family: var(--font-body);
      font-size: var(--text-body-sm);
    }

    [data-theme="modern"] .form-group input,
    [data-theme="modern"] .form-group select,
    [data-theme="modern"] .form-group textarea {
      border-radius: var(--radius-md);
    }

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

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-4);
    }

    /* =========================================================================
       ALERT CARD
       ========================================================================= */

    .alert-card {
      background: var(--color-bg-elevated);
      border: 1px solid rgba(248, 81, 73, 0.3);
      border-left: 4px solid #F85149;
      padding: var(--space-4) var(--space-5);
      margin-bottom: var(--space-3);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    [data-theme="modern"] .alert-card {
      border-radius: var(--radius-md);
    }

    .alert-card__info {
      flex: 1;
    }

    .alert-card__vehicle {
      font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary);
      margin-bottom: var(--space-1);
    }

    .alert-card__detail {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    /* =========================================================================
       PAGINATION
       ========================================================================= */

    .pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-2);
      padding: var(--space-4) 0;
    }

    .pagination__btn {
      padding: var(--space-1) var(--space-3);
      border: 1px solid var(--color-border);
      background: var(--color-surface-2);
      color: var(--color-text-secondary);
      cursor: pointer;
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
    }

    [data-theme="modern"] .pagination__btn {
      border-radius: var(--radius-sm);
    }

    .pagination__btn:hover {
      border-color: var(--color-primary);
      color: var(--color-primary);
    }

    .pagination__btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .pagination__info {
      font-size: var(--text-caption);
      color: var(--color-text-muted);
    }

    /* =========================================================================
       EMPTY STATE
       ========================================================================= */

    .empty-state {
      text-align: center;
      padding: var(--space-8) var(--space-4);
      color: var(--color-text-muted);
    }

    .empty-state__icon {
      font-size: 3rem;
      margin-bottom: var(--space-3);
      opacity: 0.4;
    }

    .empty-state__text {
      font-size: var(--text-body);
      margin-bottom: var(--space-4);
    }

    /* =========================================================================
       RESPONSIVE
       ========================================================================= */

    @media (max-width: 768px) {
      .page-header {
        padding: var(--space-3) var(--space-4);
        flex-wrap: wrap;
      }
      .page-content {
        padding: var(--space-4);
      }
      .search-input {
        width: 100%;
      }
      .form-row {
        grid-template-columns: 1fr;
      }
      .vehicle-grid {
        grid-template-columns: 1fr;
      }
      .stats-row {
        grid-template-columns: 1fr 1fr;
      }
    }
