/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Light theme (default) ─── */
:root {
    --bg: #f9fafb;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-sidebar: #111827;
    --bg-hover: #f3f4f6;
    --border: #e5e7eb;
    --border-input: #d1d5db;
    --text: #111827;
    --text-secondary: #6b7280;
    --text-sidebar: #d1d5db;
    --text-sidebar-hover: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success-bg: #f0fdf4;
    --success-text: #16a34a;
    --success-border: #bbf7d0;
    --error-bg: #fef2f2;
    --error-text: #dc2626;
    --error-border: #fecaca;
    --badge-published-bg: #dcfce7;
    --badge-published-text: #166534;
    --badge-draft-bg: #fef3c7;
    --badge-draft-text: #92400e;
    --badge-cancelled-bg: #fee2e2;
    --badge-cancelled-text: #991b1b;
    --badge-active-bg: #dcfce7;
    --badge-active-text: #166534;
    --badge-inactive-bg: #fee2e2;
    --badge-inactive-text: #991b1b;
    --code-bg: #f3f4f6;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --sidebar-width: 240px;
    --radius: 6px;
}

/* ─── Dark theme ─── */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #1e293b;
    --bg-sidebar: #0f172a;
    --bg-hover: #334155;
    --border: #334155;
    --border-input: #475569;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-sidebar: #94a3b8;
    --text-sidebar-hover: #f1f5f9;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success-bg: #052e16;
    --success-text: #4ade80;
    --success-border: #166534;
    --error-bg: #450a0a;
    --error-text: #fca5a5;
    --error-border: #7f1d1d;
    --badge-published-bg: #052e16;
    --badge-published-text: #4ade80;
    --badge-draft-bg: #422006;
    --badge-draft-text: #fbbf24;
    --badge-cancelled-bg: #450a0a;
    --badge-cancelled-text: #fca5a5;
    --badge-active-bg: #052e16;
    --badge-active-text: #4ade80;
    --badge-inactive-bg: #450a0a;
    --badge-inactive-text: #fca5a5;
    --code-bg: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

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

/* ─── Auth Page ─── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
}

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

/* ─── Admin Layout ─── */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.25s ease;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 { font-size: 1.1rem; }
.sidebar-header a { color: white; text-decoration: none; }

/* ─── Tenant context bar ─── */
.tenant-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
}

.tenant-context-label {
    opacity: 0.8;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.tenant-context-name {
    font-weight: 600;
    flex: 1;
}

.tenant-context-exit {
    color: white;
    opacity: 0.7;
    font-size: 1.1rem;
    line-height: 1;
    text-decoration: none;
    padding: 0 0.25rem;
}

.tenant-context-exit:hover {
    opacity: 1;
    text-decoration: none;
}

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

.nav-menu {
    list-style: none;
    padding: 0.5rem 0;
    flex: 1;
}

.nav-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-sidebar);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-sidebar-hover);
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sidebar-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.sidebar-user .user-name { color: var(--text-sidebar); }
.sidebar-user .logout-link { color: var(--text-secondary); }
.sidebar-user .logout-link:hover { color: white; }

/* ─── Language switcher ─── */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
}

.lang-switcher a {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}

.lang-switcher a:hover {
    text-decoration: none;
    color: var(--text);
}

.lang-switcher a.active {
    background: var(--primary);
    color: white;
}

/* Auth page lang switcher */
.auth-container .lang-switcher {
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* ─── Theme toggle ─── */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-sidebar);
    cursor: pointer;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* ─── Mobile header ─── */
.mobile-header {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.hamburger {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text);
}

.mobile-title {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    flex: 1;
    max-width: 1200px;
    min-width: 0;
}

/* ─── Alerts ─── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

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

.page-header h1 { font-size: 1.5rem; }

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    line-height: 1.5;
    white-space: nowrap;
}

.btn:hover { background: var(--bg-hover); text-decoration: none; }

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

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

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

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

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

.btn-block { display: block; width: 100%; text-align: center; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

/* ─── Forms ─── */
.form { max-width: 600px; }

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

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

.form-group label small {
    font-weight: normal;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input[type="color"] {
    height: 38px;
    padding: 2px;
    cursor: pointer;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
}

.form-group input[type="file"] {
    color: var(--text);
}

.form-row {
    display: flex;
    gap: 1rem;
}

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

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ─── Tables ─── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.table th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    white-space: nowrap;
}

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

.actions-cell {
    white-space: nowrap;
    width: 1%;
}

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--code-bg);
    color: var(--text);
}

.badge-published { background: var(--badge-published-bg); color: var(--badge-published-text); }
.badge-draft { background: var(--badge-draft-bg); color: var(--badge-draft-text); }
.badge-cancelled { background: var(--badge-cancelled-bg); color: var(--badge-cancelled-text); }
.badge-active { background: var(--badge-active-bg); color: var(--badge-active-text); }
.badge-inactive { background: var(--badge-inactive-bg); color: var(--badge-inactive-text); }

/* ─── Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ─── Utilities ─── */
.inline-form { display: inline; }
.text-muted { color: var(--text-secondary); }

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.api-key-display {
    background: var(--code-bg);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.preview-image,
.image-preview {
    max-width: 300px;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    object-fit: cover;
}

.image-preview-container {
    margin-bottom: 0.5rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.actions-bar {
    margin-bottom: 1.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    color: var(--text);
}

h1 { margin-bottom: 1rem; }
h2 { margin-bottom: 0.75rem; margin-top: 1.5rem; font-size: 1.2rem; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-overlay.open {
        display: block;
    }

    .sidebar-close {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form { max-width: 100%; }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .table th {
        font-size: 0.7rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    h1 { font-size: 1.25rem; }

    /* Filter tabs: horizontal scroll on mobile */
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .filter-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Modal: reduce padding for more content space */
    .modal-overlay {
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    /* Modal detail rows: stack on mobile */
    .modal-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    /* Location picker: stack text and buttons */
    .location-picker-display {
        flex-wrap: wrap;
    }

    .location-picker-text {
        white-space: normal;
        min-width: 0;
        width: 100%;
    }

    .location-picker-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /* Multi-select: allow label wrapping */
    .multi-select-item {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .multi-select-label {
        flex: 1;
        min-width: 0;
        word-break: break-word;
    }

    /* Pagination: compact on mobile */
    .pagination {
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    /* Section header: stack */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Maps: shorter on mobile */
    .location-map {
        height: 280px;
    }

    .location-map-small {
        height: 150px;
    }

    .location-map-detail {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 0.75rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        text-align: center;
    }

    .btn-sm {
        padding: 0.35rem 0.6rem;
    }

    /* Tables: tighter padding */
    .table th,
    .table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .table th {
        font-size: 0.65rem;
    }

    /* Hide less important table columns on small phones */
    .table .hide-mobile {
        display: none;
    }

    /* Stat cards: compact */
    .stat-card {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* Touch-friendly sizing on mobile */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-sm {
        min-height: 36px;
    }

    .nav-menu li a {
        padding: 0.75rem 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* ─── Filter tabs ─── */
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.filter-tab {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.875rem;
    transition: color 0.15s, border-color 0.15s;
}

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

.filter-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ─── Multi-select (organizer assignment) ─── */
.multi-select-container {
    border: 1px solid var(--border-input);
    border-radius: 0.375rem;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-input);
}

.multi-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.multi-select-item:last-child {
    border-bottom: none;
}

.multi-select-item:hover {
    background: var(--bg-hover);
}

.multi-select-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.multi-select-edit-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: normal;
}

.multi-select-edit-toggle input:disabled {
    opacity: 0.4;
}

/* ─── Event Detail Modal ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    margin: auto;
    animation: modalIn 0.2s ease-out;
}

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

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

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text);
}

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

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.modal-image {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.modal-detail-row:last-child {
    border-bottom: none;
}

.modal-detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.modal-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text);
    line-height: 1.6;
}

/* Event detail link in table */
.event-detail-link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.event-detail-link:hover {
    text-decoration: underline;
}

/* ─── Location Picker ─── */
.location-picker-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--bg-input);
    min-height: 38px;
}

.location-picker-text {
    flex: 1;
    color: var(--text);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-picker-text.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.location-picker-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.location-search-bar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.location-search-bar input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text);
}

.location-search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.location-search-results {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    box-shadow: var(--shadow);
}

.location-search-results.visible {
    display: block;
}

.location-search-result-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.location-search-result-item:last-child {
    border-bottom: none;
}

.location-search-result-item:hover {
    background: var(--bg-hover);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ─── Map sizes ─── */
.location-map {
    height: 400px;
}

.location-map-small {
    height: 180px;
    border-radius: 6px;
    margin: 0.5rem 0;
}

.location-map-detail {
    height: 200px;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
}

/* Leaflet dark mode */
[data-theme="dark"] .leaflet-tile-pane {
    filter: brightness(0.8) contrast(1.1) saturate(0.8);
}

[data-theme="dark"] .leaflet-control-zoom a {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-secondary);
}

[data-theme="dark"] .leaflet-control-attribution a {
    color: var(--primary);
}
