/* ================================================================
   ParkRadar — Material Design Styles
   ================================================================ */

:root {
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #BBDEFB;
    --primary-50: #E3F2FD;
    --on-primary: #ffffff;
    --secondary: #FF9800;
    --secondary-light: #FFE0B2;
    --tertiary: #4CAF50;
    --tertiary-light: #C8E6C9;
    --error: #F44336;
    --error-light: #FFCDD2;
    --surface: #ffffff;
    --surface-dim: #F5F5F5;
    --on-surface: rgba(0,0,0,0.87);
    --on-surface-variant: rgba(0,0,0,0.6);
    --outline: rgba(0,0,0,0.12);
    --outline-variant: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.16);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.2);
    --shadow-topbar: 0 2px 4px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 25px;
    --topbar-height: 56px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Cost colors */
    --cost-free: rgba(76,175,80,1);
    --cost-free-bg: #E8F5E9;
    --cost-cheap: rgba(139,195,74,1);
    --cost-cheap-bg: #F1F8E9;
    --cost-regular: rgba(255,193,7,1);
    --cost-regular-bg: #FFF8E1;
    --cost-expensive: rgba(244,67,54,1);
    --cost-expensive-bg: #FFEBEE;
    --cost-default: rgba(158,158,158,1);
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: var(--font);
    color: var(--on-surface);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   TOP BAR
   ================================================================ */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--topbar-height);
    background: var(--surface);
    box-shadow: var(--shadow-topbar);
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 16px;
    gap: 4px;
}

.app-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--on-surface);
    user-select: none;
    text-decoration: none;
}

.spacer {
    flex: 1;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--on-surface);
    transition: background 0.15s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.06);
}

.icon-btn:active {
    background: rgba(0,0,0,0.12);
}

.icon-btn.car-saved .material-symbols-outlined {
    color: var(--secondary);
    font-variation-settings: 'FILL' 1;
}

/* ================================================================
   MAP
   ================================================================ */
#map {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
}

.mapboxgl-ctrl-attrib,
.mapboxgl-ctrl-logo {
    opacity: 0.6;
}

/* ================================================================
   MAP CONTROLS
   ================================================================ */
#map-controls {
    position: fixed;
    right: 16px;
    bottom: 100px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: bottom 0.3s ease;
}

.map-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    color: var(--on-surface);
    transition: background 0.15s, box-shadow 0.15s;
}

.map-control-btn:hover {
    background: var(--surface-dim);
}

.map-control-btn:active {
    box-shadow: var(--shadow-sm);
}

.map-control-btn .material-symbols-outlined {
    font-size: 22px;
}

/* ================================================================
   SEARCH BAR (Stage 1)
   ================================================================ */
#search-bar-container {
    position: fixed;
    bottom: 28px;
    left: 20px;
    right: 20px;
    z-index: 500;
    transition: opacity 0.2s, transform 0.2s;
}

#search-bar {
    display: flex;
    align-items: center;
    height: 50px;
    background: var(--surface);
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.26);
    padding: 0 20px;
    cursor: pointer;
    gap: 12px;
    transition: box-shadow 0.15s;
}

#search-bar:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.search-icon {
    color: rgba(0,0,0,0.38);
    font-size: 22px;
}

.search-placeholder {
    color: rgba(0,0,0,0.38);
    font-size: 16px;
    user-select: none;
}

/* ================================================================
   LOCATION PANEL (Stage 2)
   ================================================================ */
#location-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

#location-panel.hidden {
    transform: translateY(100%);
}

/* Parking list */
#parking-list-container {
    height: 90px;
    padding: 0 8px;
    position: relative;
    overflow: visible;
}

#parking-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 8px 8px;
    height: 100%;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#parking-list::-webkit-scrollbar {
    display: none;
}

.parking-card {
    flex-shrink: 0;
    width: 140px;
    min-height: 72px;
    padding: 10px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border 0.15s, background 0.15s;
    border: 2px solid transparent;
}

.parking-card.selected {
    background: var(--primary-50);
    border-color: var(--primary);
}

.parking-card-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.parking-card-type-icon {
    font-size: 16px;
    color: var(--primary);
}

.parking-card-type {
    font-size: 12px;
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parking-card-price {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.parking-card-slots {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
}

.parking-card-walk {
    font-size: 11px;
    color: rgba(0,0,0,0.45);
}

#parking-list-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Location card */
#location-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
}

.location-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.location-card-icon .material-symbols-outlined {
    color: var(--primary);
    font-size: 24px;
}

.location-card-info {
    flex: 1;
    min-width: 0;
}

.location-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-distance {
    font-size: 13px;
    color: var(--on-surface-variant);
}

/* ================================================================
   NAVIGATION PANEL (Stage 3)
   ================================================================ */
#nav-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

#nav-panel.hidden {
    transform: translateY(100%);
}

#nav-maneuver-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    border-radius: 14px;
    padding: 8px 12px;
}

.nav-maneuver-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.24);
    border-radius: 10px;
    flex-shrink: 0;
}

.nav-maneuver-icon-box .material-symbols-outlined {
    color: white;
    font-size: 22px;
}

.nav-maneuver-text {
    flex: 1;
    min-width: 0;
}

.nav-instruction {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.nav-street {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-distance {
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.nav-info-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nav-info-tile {
    background: var(--surface-dim);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 8px 6px;
    text-align: center;
}

.nav-tile-label {
    font-size: 11px;
    color: var(--on-surface-variant);
    font-style: italic;
    display: block;
    margin-bottom: 4px;
}

.nav-tile-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nav-tile-value .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.nav-tile-value span:last-child {
    font-weight: 700;
    font-size: 13px;
}

.nav-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ================================================================
   SEARCH OVERLAY
   ================================================================ */
#search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}

#search-overlay.visible {
    transform: translateY(0);
}

.search-overlay-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-dim);
    border-radius: 24px;
    height: 48px;
    padding: 0 16px;
}

.search-input-wrapper .material-symbols-outlined {
    color: var(--on-surface-variant);
    font-size: 22px;
    flex-shrink: 0;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--on-surface);
    outline: none;
    font-family: var(--font);
}

#search-input::placeholder {
    color: rgba(0,0,0,0.38);
}

.text-btn {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    font-family: var(--font);
    white-space: nowrap;
}

#search-results {
    flex: 1;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px 14px 56px;
    cursor: pointer;
    border-bottom: 1px solid var(--outline-variant);
    position: relative;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--surface-dim);
}

.search-result-item .material-symbols-outlined {
    position: absolute;
    left: 16px;
    color: var(--on-surface-variant);
    font-size: 22px;
}

.search-result-name {
    font-size: 15px;
    color: var(--on-surface);
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
    color: rgba(0,0,0,0.3);
}

.search-empty-state .material-symbols-outlined {
    font-size: 48px;
}

.search-empty-state p {
    font-size: 15px;
}

/* ================================================================
   SIDE PANEL (Parking Detail)
   ================================================================ */
.side-panel {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    pointer-events: auto;
}

.side-panel.visible {
    transform: translateX(0);
}

.side-panel.hidden {
    pointer-events: none;
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline);
    flex-shrink: 0;
}

.side-panel-title {
    font-size: 18px;
    font-weight: 700;
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

/* ================================================================
   BOTTOM SHEETS
   ================================================================ */
.bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
}

.bottom-sheet.visible {
    pointer-events: auto;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.bottom-sheet.visible .sheet-backdrop {
    opacity: 1;
}

.sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 12px 20px 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    max-height: 80vh;
}

.sheet-scrollable {
    overflow-y: auto;
    max-height: 60vh;
}

.bottom-sheet.visible .sheet-content {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ================================================================
   FILTER SHEET
   ================================================================ */
.filter-section {
    margin-bottom: 24px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--on-surface);
}

.choice-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.choice-chip {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--outline);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    color: var(--on-surface);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.choice-chip:hover {
    background: var(--surface-dim);
}

.choice-chip.active {
    background: var(--primary-50);
    color: var(--primary);
    border-color: var(--primary);
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-row input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

.slider-row span {
    font-size: 14px;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(0,0,0,0.26);
    border-radius: 14px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* ================================================================
   PARKING DETAIL
   ================================================================ */
.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.detail-type-icon .material-symbols-outlined {
    color: var(--primary);
    font-size: 26px;
}

.detail-header-info {
    flex: 1;
    min-width: 0;
}

.detail-header-title {
    font-size: 17px;
    font-weight: 700;
}

.detail-header-walk {
    font-size: 13px;
    color: var(--on-surface-variant);
}

.detail-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.detail-tile {
    background: var(--surface-dim);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.detail-tile .material-symbols-outlined {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}

.detail-tile-value {
    font-size: 14px;
    font-weight: 700;
    display: block;
}

.detail-tile-label {
    font-size: 11px;
    color: var(--on-surface-variant);
    display: block;
}

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--outline);
}

.detail-chip .material-symbols-outlined {
    font-size: 14px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
    flex: 1;
}

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

.btn-orange {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-orange:hover {
    background: var(--secondary-light);
}

.btn-red {
    color: var(--error);
    border-color: var(--error);
}

.btn-red:hover {
    background: var(--error-light);
}

.btn-elevated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
    flex: 1;
}

.btn-elevated.btn-red {
    background: var(--error);
    color: white;
    border: none;
}

.btn-elevated.btn-green {
    background: var(--tertiary);
    color: white;
    border: none;
}

.btn-full {
    width: 100%;
}

.btn-tall {
    height: 50px;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ================================================================
   DIALOG
   ================================================================ */
.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.dialog-overlay.visible {
    opacity: 1;
}

.dialog-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 340px;
    box-shadow: var(--shadow-lg);
}

.dialog-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dialog-card p {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 16px;
}

.dialog-card input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font);
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.15s;
}

.dialog-card input:focus {
    border-color: var(--primary);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ================================================================
   FULLSCREEN VIEWS
   ================================================================ */
#fullscreen-views {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
}

#fullscreen-views.active {
    pointer-events: auto;
}

.fullscreen-view {
    position: absolute;
    inset: 0;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
}

.fullscreen-view.visible {
    transform: translateX(0);
    pointer-events: auto;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--topbar-height);
    padding: 0 8px;
    background: var(--surface);
    box-shadow: var(--shadow-topbar);
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    z-index: 1;
}

.view-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.back-btn {
    color: var(--on-surface);
}

/* ================================================================
   AUTH FORMS
   ================================================================ */
.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    max-height: 100%;
}

.auth-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--primary-50);
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
}

.auth-icon-box .material-symbols-outlined {
    font-size: 40px;
    color: var(--primary);
}

.centered-form h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 24px;
}

.error-banner {
    width: 100%;
    padding: 12px;
    background: var(--error-light);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 14px;
    margin-bottom: 16px;
}

.form-field {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-md);
    padding: 0 12px;
    margin-bottom: 12px;
    height: 50px;
    transition: border-color 0.15s;
}

.form-field:focus-within {
    border-color: var(--primary);
}

.field-icon {
    color: var(--on-surface-variant);
    font-size: 22px;
    flex-shrink: 0;
}

.form-field input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: var(--font);
    color: var(--on-surface);
    outline: none;
}

.form-field input::placeholder {
    color: rgba(0,0,0,0.38);
}

.visibility-toggle .material-symbols-outlined {
    font-size: 22px;
    color: var(--on-surface-variant);
}

.auth-switch {
    margin-top: 16px;
    font-size: 14px;
    color: var(--on-surface-variant);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ================================================================
   PROFILE
   ================================================================ */
.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: var(--primary-50);
    border-radius: 50%;
    margin: 0 auto 12px;
}

.profile-avatar .material-symbols-outlined {
    font-size: 48px;
    color: var(--primary);
}

.profile-avatar .avatar-letter {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
}

.profile-name {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-email {
    text-align: center;
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 24px;
}

.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--outline-variant);
    transition: background 0.15s;
}

.menu-item:hover {
    background: var(--surface-dim);
}

.menu-item .material-symbols-outlined:first-child {
    color: var(--on-surface-variant);
    font-size: 24px;
}

.menu-item span:nth-child(2) {
    flex: 1;
    font-size: 15px;
}

.menu-item .chevron {
    color: var(--on-surface-variant);
    font-size: 20px;
}

/* ================================================================
   SETTINGS
   ================================================================ */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.settings-desc {
    font-size: 13px;
    color: var(--on-surface-variant);
    margin-bottom: 16px;
}

.tier-preview {
    background: var(--surface-dim);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
}

.tier-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.tier-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tier-label {
    font-size: 13px;
    font-weight: 600;
    width: 80px;
}

.tier-range {
    font-size: 12px;
    color: var(--on-surface-variant);
}

.settings-slider-group {
    margin-bottom: 16px;
}

.settings-slider-group label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.settings-slider-group input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

/* ================================================================
   SUBMISSIONS
   ================================================================ */
.reputation-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.reputation-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.reputation-stat {
    text-align: center;
}

.reputation-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.reputation-stat-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submission-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.submission-card:hover {
    background: var(--surface-dim);
}

.submission-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-50);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.submission-type-icon .material-symbols-outlined {
    color: var(--primary);
}

.submission-info {
    flex: 1;
    min-width: 0;
}

.submission-title {
    font-size: 14px;
    font-weight: 600;
}

.submission-meta {
    font-size: 12px;
    color: var(--on-surface-variant);
}

.submission-status .material-symbols-outlined {
    font-size: 24px;
}

.status-approved { color: var(--tertiary); }
.status-rejected { color: var(--error); }
.status-pending { color: var(--cost-regular); }

/* ================================================================
   SPOT DETAIL VIEW
   ================================================================ */
.spot-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.spot-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
}

.spot-detail-icon .material-symbols-outlined {
    font-size: 32px;
    color: var(--primary);
}

.spot-header-info {
    flex: 1;
}

.spot-header-title {
    font-size: 18px;
    font-weight: 700;
}

.spot-header-sub {
    font-size: 13px;
    color: var(--on-surface-variant);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-approved {
    background: var(--tertiary-light);
    color: #2E7D32;
}

.badge-rejected {
    background: var(--error-light);
    color: var(--error);
}

.badge-pending {
    background: var(--cost-regular-bg);
    color: #F57F17;
}

.voting-section {
    background: var(--surface-dim);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.vote-score {
    font-size: 36px;
    font-weight: 700;
}

.vote-score.positive { color: var(--tertiary); }
.vote-score.negative { color: var(--error); }
.vote-score.neutral { color: var(--on-surface-variant); }

.vote-details {
    font-size: 13px;
    color: var(--on-surface-variant);
    margin-bottom: 12px;
}

.vote-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--outline);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s, border-color 0.15s;
}

.vote-btn.upvote { color: var(--tertiary); }
.vote-btn.upvote.active {
    background: var(--tertiary-light);
    border-color: var(--tertiary);
}

.vote-btn.downvote { color: var(--error); }
.vote-btn.downvote.active {
    background: var(--error-light);
    border-color: var(--error);
}

.approval-card {
    background: var(--primary-50);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
}

.approval-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
}

.approval-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

/* ================================================================
   ADD PARKING
   ================================================================ */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
    width: 100%;
    transition: background 0.15s, border-color 0.15s;
}

.mode-option:hover {
    background: var(--surface-dim);
    border-color: var(--primary);
}

.mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.mode-icon.blue {
    background: var(--primary-50);
    color: var(--primary);
}

.mode-icon.teal {
    background: #E0F2F1;
    color: #00897B;
}

.mode-icon .material-symbols-outlined {
    font-size: 28px;
}

.mode-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--on-surface);
}

.mode-desc {
    font-size: 13px;
    color: var(--on-surface-variant);
}

/* Draw map overlay elements */
.draw-instructions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(33,150,243,0.85);
    color: white;
    padding: 10px 16px;
    font-size: 12px;
    text-align: center;
    z-index: 10;
}

.draw-toolbar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.draw-toolbar .icon-btn {
    width: 36px;
    height: 36px;
}

.point-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--on-surface-variant);
    padding: 0 8px;
}

.road-side-picker {
    position: absolute;
    bottom: 72px;
    left: 16px;
    right: 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.road-side-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface-variant);
}

.road-side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.road-side-btn.active {
    border-color: var(--primary);
    background: var(--primary-50);
}

.snapping-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    color: white;
    font-size: 14px;
}

/* Properties form (Step 1) */
.form-section {
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--on-surface);
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.info-box.blue {
    background: var(--primary-50);
    color: var(--primary);
}

.info-box.orange {
    background: var(--secondary-light);
    color: #E65100;
}

.info-box.green {
    background: var(--tertiary-light);
    color: #2E7D32;
}

.info-box .material-symbols-outlined {
    font-size: 22px;
    flex-shrink: 0;
}

.number-input {
    display: flex;
    align-items: center;
    gap: 16px;
}

.number-input button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--outline);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--primary);
    font-size: 20px;
    transition: background 0.15s;
}

.number-input button:hover {
    background: var(--primary-50);
}

.number-input input {
    width: 60px;
    text-align: center;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 16px;
    font-family: var(--font);
    font-weight: 700;
    outline: none;
}

.number-input input:focus {
    border-color: var(--primary);
}

/* Review (Step 2) */
.review-card {
    background: var(--surface-dim);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.review-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--outline-variant);
}

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

.review-row .material-symbols-outlined {
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.review-label {
    font-size: 13px;
    color: var(--on-surface-variant);
    width: 100px;
}

.review-value {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.time-rule-card {
    background: #EDE7F6;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

/* ================================================================
   TOAST
   ================================================================ */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   SPINNER
   ================================================================ */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--outline);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    gap: 12px;
    color: rgba(0,0,0,0.3);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
}

/* ================================================================
   COST COLORS
   ================================================================ */
.cost-free { background: var(--cost-free-bg); color: #2E7D32; }
.cost-cheap { background: var(--cost-cheap-bg); color: #558B2F; }
.cost-regular { background: var(--cost-regular-bg); color: #F57F17; }
.cost-expensive { background: var(--cost-expensive-bg); color: var(--error); }

/* ================================================================
   UTILITY
   ================================================================ */
.hidden {
    display: none !important;
}

/* Price badge for detail & cards */
.price-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 768px) {
    #search-bar-container {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    #location-panel {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    #location-panel.hidden {
        transform: translateX(-50%) translateY(100%);
    }

    #nav-panel {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    #nav-panel.hidden {
        transform: translateX(-50%) translateY(100%);
    }

    .sheet-content {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .bottom-sheet.visible .sheet-content {
        transform: translateX(-50%) translateY(0);
    }
}

/* ================================================================
   CUSTOM MAPBOX MARKERS
   ================================================================ */
.search-pin-marker {
    width: 30px;
    height: 42px;
    position: relative;
    cursor: pointer;
}

.search-pin-marker svg {
    width: 100%;
    height: 100%;
}

.car-pin-marker {
    width: 32px;
    height: 32px;
    background: var(--secondary);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.car-pin-marker .material-symbols-outlined {
    font-size: 18px;
    color: white;
}

.car-pin-label {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary);
    text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
    margin-top: 2px;
}

/* Time Rule Dialog */
.time-rule-dialog {
    padding: 4px 0;
}

.day-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.day-chip {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--outline);
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s, border-color 0.15s;
}

.day-chip.active {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.time-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.time-range-row input[type="time"] {
    flex: 1;
    padding: 8px;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
}

.time-range-row input[type="time"]:focus {
    border-color: var(--primary);
}

.time-range-separator {
    font-size: 14px;
    color: var(--on-surface-variant);
    font-weight: 600;
}
