/*
 * Fleet Inventory Manager — Main Stylesheet
 * ==========================================
 * Mobile-first design using CSS custom properties (injected from config.php).
 * All color values reference --color-* variables so the palette is fully
 * customizable without touching this file.
 *
 * Structure:
 *   1. Reset & Base
 *   2. Layout (shell, sidebar, topbar, main)
 *   3. Navigation
 *   4. Typography
 *   5. Components (buttons, forms, cards, tables, badges, alerts)
 *   6. Vehicle Use Page (QR landing — optimized for touch)
 *   7. Reports
 *   8. Utilities
 *   9. Responsive breakpoints
 */


/* ═══════════════════════════════════════════════════════════
   1. Reset & Base
   ═══════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
                 Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
}

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

a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

ul, ol { list-style: none; }

input, select, textarea, button {
    font: inherit;
}


/* ═══════════════════════════════════════════════════════════
   2. Layout
   ═══════════════════════════════════════════════════════════ */

/* Top bar is fixed at the top */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--color-nav-bg);
    color: var(--color-nav-text);
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.topbar__inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    gap: 1rem;
}

.topbar__brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-nav-text);
    text-decoration: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.topbar__user-name {
    font-size: 0.875rem;
    display: none; /* Hidden on mobile */
}

.topbar__logout {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.topbar__logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

/* Hamburger toggle button */
.topbar__menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.topbar__menu-toggle span {
    display: block;
    height: 2px;
    background: var(--color-nav-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* App shell: sidebar + main content sit below the topbar */
.app-shell {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

/* ── Sidebar ─────────────────────────────────────────────── */

.sidebar {
    width: 240px;
    background: var(--color-nav-bg);
    color: var(--color-nav-text);
    flex-shrink: 0;
    overflow-y: auto;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);  /* Hidden on mobile by default */
    transition: transform 0.25s ease;
    z-index: 90;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 80;
}

.sidebar-overlay.is-visible {
    display: block;
}

/* ── Main Content ─────────────────────────────────────────── */

.main-content {
    flex: 1;
    padding: 1.5rem 1rem;
    min-width: 0; /* Prevent flex overflow */
    /* No left margin on mobile — sidebar is overlay */
}


/* ═══════════════════════════════════════════════════════════
   3. Navigation
   ═══════════════════════════════════════════════════════════ */

.nav-list { padding: 0.5rem 0 1.5rem; }

.nav-section {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 1rem 1rem 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}

.nav-item--active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.nav-item__icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}


/* ═══════════════════════════════════════════════════════════
   4. Typography
   ═══════════════════════════════════════════════════════════ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }
h3 { font-size: 1rem;   font-weight: 600; margin-bottom: 0.5rem; }

p { margin-bottom: 0.75rem; }


/* ═══════════════════════════════════════════════════════════
   5. Components
   ═══════════════════════════════════════════════════════════ */

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
    user-select: none;
}

.btn:active { transform: translateY(1px); }
.btn:hover  { text-decoration: none; }

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); }

.btn--danger {
    background: var(--color-danger);
    color: #fff;
}
.btn--danger:hover { filter: brightness(0.9); }

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

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}
.btn--ghost:hover { background: var(--color-bg); }

.btn--sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn--lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    border-radius: 8px;
}

.btn--full { width: 100%; justify-content: center; }

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

/* ── Forms ───────────────────────────────────────────────── */

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

/* Inline form actions row */
.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Tables ──────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--color-surface);
}

.table th {
    background: var(--color-bg);
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: rgba(0,0,0,0.02); }

/* ── Badges ──────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.badge--blue   { background: #e8f0fe; color: #1967d2; }
.badge--purple { background: #f3e8fd; color: #7b1fa2; }
.badge--orange { background: #fce8b2; color: #b06000; }
.badge--gray   { background: #e8eaed; color: #3c4043; }
.badge--green  { background: #e6f4ea; color: #137333; }
.badge--red    { background: #fce8e6; color: #c5221f; }

/* ── Alerts / Flash Messages ─────────────────────────────── */

.alert {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
}

.alert--success {
    background: #e6f4ea;
    color: #137333;
    border-left-color: var(--color-success);
}

.alert--error {
    background: #fce8e6;
    color: #c5221f;
    border-left-color: var(--color-danger);
}

.alert--warning {
    background: #fef7e0;
    color: #b06000;
    border-left-color: var(--color-warning);
}

.alert--info {
    background: #e8f0fe;
    color: #1967d2;
    border-left-color: var(--color-primary);
}

/* ── Modal ───────────────────────────────────────────────── */

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: flex-end;  /* Slides up from bottom on mobile */
    justify-content: center;
}

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

.modal {
    background: var(--color-surface);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem 1.25rem 2rem;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.modal__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text-muted);
    line-height: 1;
    padding: 0.25rem;
}

/* ── Stat Cards (Dashboard) ──────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-card__number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* ── Empty State ─────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state h2 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--color-text); }

/* ── Quantity Stepper ────────────────────────────────────── */

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
}

.qty-stepper__btn {
    padding: 0.6rem 1rem;
    border: none;
    background: var(--color-bg);
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1;
    transition: background 0.1s;
    min-width: 44px;
    text-align: center;
}

.qty-stepper__btn:hover { background: var(--color-border); }

.qty-stepper__input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.6rem 0;
}

.qty-stepper__input:focus { outline: none; background: #fff; }


/* ═══════════════════════════════════════════════════════════
   6. Vehicle Use Page (QR Landing)
   ═══════════════════════════════════════════════════════════ */

/* Vehicle picker list */
.vehicle-picker {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vehicle-picker__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.vehicle-picker__item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.vehicle-picker__number {
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.vehicle-picker__notes {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: right;
}

/* Vehicle header banner */
.vehicle-banner {
    background: var(--color-nav-bg);
    color: var(--color-nav-text);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-banner__number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.vehicle-banner__type {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}

/* Search bar on vehicle use page */
.search-bar {
    display: flex;
    gap: 0;
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.search-bar__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 1rem;
    background: var(--color-surface);
}

.search-bar__input:focus { outline: none; }

.search-bar__btn {
    padding: 0 1rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Storage area tabs */
.storage-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.storage-tabs::-webkit-scrollbar { display: none; }

.storage-tab {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--color-surface);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.15s;
}

.storage-tab.is-active, .storage-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #e8f0fe;
}

/* Parts list in vehicle use page */
.parts-list { display: flex; flex-direction: column; }

.part-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    border-top: 1px solid var(--color-border);
}

.part-item:first-child { border-top: none; }
.part-item:hover { background: var(--color-bg); }

.part-item__info { flex: 1; min-width: 0; }

.part-item__name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.part-item__sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.part-item__qty {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    flex-shrink: 0;
    min-width: 2.5rem;
    text-align: right;
    white-space: nowrap;
}

.part-item__qty--low { color: var(--color-danger); }

.part-item__use-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.65rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 48px;
    text-align: center;
}

.part-item__use-btn:hover    { background: var(--color-primary-dark); }
.part-item__use-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Out-of-stock styling */
.part-item--out-of-stock { opacity: 0.5; }
.part-item--out-of-stock .part-item__qty { color: var(--color-danger); }

/* Variant group header */
.part-group-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: 0.5rem 0.75rem 0.25rem 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
}
.part-group-header:first-child { border-top: none; margin-top: 0; }

/* Variant rows: left border visually connects them to the group header */
.part-item--variant {
    padding-left: 1.5rem;
    border-left: 3px solid var(--color-border) !important;
    border-top: none !important;
}
.part-item--variant + .part-item--variant {
    border-top: 1px solid var(--color-border) !important;
}


/* ═══════════════════════════════════════════════════════════
   7. Reports
   ═══════════════════════════════════════════════════════════ */

.report-filters {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.report-filters .form-group { margin-bottom: 0; min-width: 160px; }

/* Print-specific overrides */
@media print {
    .topbar, .sidebar, .sidebar-overlay, .topbar__menu-toggle,
    .btn, .report-filters, .no-print {
        display: none !important;
    }

    .app-shell { margin-top: 0; }
    .main-content { padding: 0; margin: 0; }
    .table-wrap { border: none; }
    .table th { background: #eee !important; }
    body { font-size: 12px; }

	.page-header {
		display: none !important;
	}

    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 1rem;
        border-bottom: 2px solid #000;
        padding-bottom: 0.5rem;
    }
	.print-td,.print-th {
		display: table-cell !important;
		padding: 0 !important;
		text-align: center;
		
	}
	.print-td {
		font-size: 2em;
	}
}

.print-header,.print-td,.print-th { display: none; }


/* ═══════════════════════════════════════════════════════════
   8. Login Page
   ═══════════════════════════════════════════════════════════ */

body.page-login {
    background: var(--color-nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-box__logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-box__logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
}

.login-box__logo p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
    margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════
   9. Utilities
   ═══════════════════════════════════════════════════════════ */

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.text-muted   { color: var(--color-text-muted); }
.text-danger  { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-small   { font-size: 0.825rem; }
.text-center  { text-align: center; }
.font-bold    { font-weight: 700; }

.flex         { display: flex; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.d-none { display: none !important; }
.d-grid { display: grid; }

/* Grid helpers */
.grid-2,
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.dashboard-panels {
    grid-template-columns: 1fr;
}


/* ═══════════════════════════════════════════════════════════
   10. Responsive Breakpoints
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet and up (768px+) ──────────────────────────────── */
@media (min-width: 768px) {

    .topbar__user-name { display: block; }

    /* Sidebar is always visible on tablet+ */
    .sidebar {
        transform: translateX(0);
        position: fixed;
    }

    /* Push main content to the right of the sidebar */
    .main-content {
        margin-left: 240px;
        padding: 2rem 1.5rem;
    }

    /* Modal opens centered (not bottom sheet) */
    .modal-backdrop { align-items: center; }
    .modal { border-radius: 12px; }

    /* Hide hamburger on desktop */
    .topbar__menu-toggle { display: none; }

    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .dashboard-panels { grid-template-columns: 1fr; }
}

/* ── Desktop (1024px+) ───────────────────────────────────── */
@media (min-width: 1024px) {
    .main-content { padding: 2rem; }
    .dashboard-panels { grid-template-columns: 1fr 1fr; }
}


/* ═══════════════════════════════════════════════════════════
   11. Storage Area Accordion (vehicle-use page)
   ═══════════════════════════════════════════════════════════ */

.area-section {
    margin-bottom: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.area-section__header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    transition: background 0.15s;
}

.area-section__header:hover { background: var(--color-bg); }

.area-section__name  { flex: 1; }

.area-section__meta  {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.area-section__chevron {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    transition: transform 0.2s;
}

.area-section.is-open .area-section__chevron {
    transform: rotate(180deg);
}

.area-section__body {
    display: none;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 0.5rem 0;
}

.area-section.is-open .area-section__body {
    display: block;
}
