/* ============================================
   RunMeet Design System
   Mobile-first | Teal/Orange | Material Icons
   Gestalt: Proximity, Similarity, Common Region
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --primary: #1976D2;
    --primary-dark: #1565C0;
    --primary-light: #E3F2FD;
    --primary-surface: #BBDEFB;

    --accent: #7B1FA2;
    --accent-dark: #4A148C;
    --accent-light: #F3E5F5;

    --surface: #FFFFFF;
    --bg: #FAFAFA;
    --bg-elevated: #FFFFFF;

    --text: #212121;
    --text-secondary: #616161;
    --text-hint: #9E9E9E;
    --text-on-primary: #FFFFFF;
    --text-on-accent: #FFFFFF;

    --border: #E0E0E0;
    --divider: #EEEEEE;

    --success: #2E7D32;
    --success-light: #E8F5E9;
    --error: #C62828;
    --error-light: #FFEBEE;
    --warning: #F9A825;
    --warning-light: #FFF8E1;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;

    --navbar-h: 56px;
    --bottom-nav-h: 64px;
    --filters-h: auto;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-h);
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    color: var(--primary);
    font-size: 28px;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

/* Desktop nav hidden on mobile */
.navbar-desktop {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hamburger visible on mobile */
.navbar-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    color: var(--text);
    transition: background 0.2s;
}

.navbar-hamburger:hover {
    background: var(--bg);
}

/* Mobile dropdown menu */
.mobile-menu {
    display: none;
    background: var(--surface);
    border-top: 1px solid var(--divider);
    padding: 8px 16px;
    box-shadow: var(--shadow-md);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-align: left;
}

.mobile-menu-item:hover {
    background: var(--primary-light);
}

.mobile-menu-item .material-icons {
    color: var(--primary);
    font-size: 22px;
}

/* ============================================
   BOTTOM NAVIGATION (mobile, authenticated)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-hint);
    font-size: 0.625rem;
    font-family: var(--font);
    font-weight: 500;
    transition: color 0.2s;
    padding: 0;
}

.bottom-nav-item .material-icons {
    font-size: 24px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    margin-top: -20px;
    transition: background 0.2s, transform 0.2s;
}

.bottom-nav-fab:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.bottom-nav-fab .material-icons {
    font-size: 28px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn .material-icons {
    font-size: 18px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-on-accent);
}
.btn-accent:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-text:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #1B5E20;
}

.btn-danger {
    background: var(--error);
    color: white;
}
.btn-danger:hover {
    background: #B71C1C;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--text);
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--divider);
    padding: 8px 0;
}

.filters-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filters-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-chip-group {
    display: flex;
    gap: 8px;
    flex: 1;
}

.filter-select {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616161' d='M3 5l3 3 3-3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-dates {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-date {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
}

.filter-date:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-date-sep {
    color: var(--text-hint);
    font-size: 0.875rem;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border-radius: var(--radius-full);
    padding: 3px;
    align-self: flex-start;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn .material-icons {
    font-size: 18px;
}

.view-toggle-btn.active {
    background: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-sm);
}

.view-toggle-label {
    display: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding-bottom: var(--bottom-nav-h);
}

/* Map */
#map {
    height: calc(100vh - var(--navbar-h) - 90px - var(--bottom-nav-h));
    min-height: 300px;
}

#createRunMap {
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
}

/* ============================================
   RUNS GRID (List View)
   ============================================ */
.runs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
}

.run-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid var(--divider);
}

.run-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-surface);
}

.run-card:active {
    transform: scale(0.99);
}

.run-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.run-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.run-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.run-type-run {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.run-type-race {
    background: var(--warning-light);
    color: #F57F17;
}

.run-type-club_run {
    background: var(--success-light);
    color: var(--success);
}

.run-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.run-card-info div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.run-card-info .material-icons {
    font-size: 16px;
    color: var(--text-hint);
    width: 16px;
    flex-shrink: 0;
}

.run-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.run-organizer {
    font-size: 0.8125rem;
    color: var(--text-hint);
}

.run-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.run-status-open {
    background: var(--success-light);
    color: var(--success);
}

.run-status-closed {
    background: var(--error-light);
    color: var(--error);
}

.run-privacy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--text-hint);
}

.run-privacy .material-icons {
    font-size: 14px;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.2s;
    -webkit-overflow-scrolling: touch;
}

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

.modal-content {
    background: var(--surface);
    margin: 0;
    padding: 24px;
    width: 100%;
    min-height: 100vh;
    position: relative;
    animation: slideUp 0.3s;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.125rem;
}

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

.modal-lg {
    max-width: 800px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

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

.label-optional {
    font-weight: 400;
    color: var(--text-hint);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.2s;
}

.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(0,137,123,0.1);
}

.form-group textarea {
    resize: vertical;
}

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

.input-icon {
    position: relative;
}

.input-icon .material-icons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-hint);
    pointer-events: none;
}

.input-icon input {
    padding-left: 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 16px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--divider);
}

.form-footer {
    text-align: center;
    padding-top: 8px;
}

.error-message {
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 8px;
    padding: 0 16px;
}

.success-message {
    color: var(--success);
    font-size: 0.8125rem;
    margin-top: 8px;
    padding: 0 16px;
}

/* ============================================
   RUN DETAILS
   ============================================ */
.run-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.run-details-header {
    padding: 16px;
    border-bottom: 1px solid var(--divider);
}

.run-details-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.run-details-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.run-details-description {
    padding: 16px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.run-details-section {
    padding: 16px;
    border-bottom: 1px solid var(--divider);
}

.run-details-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.run-details-section h3 .material-icons {
    font-size: 18px;
    color: var(--primary);
}

.run-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.run-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.run-detail-label {
    font-size: 0.6875rem;
    color: var(--text-hint);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.run-detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

/* ============================================
   PARTICIPANTS
   ============================================ */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    gap: 8px;
}

.participant-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.participant-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.participant-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--warning);
    font-weight: 500;
}

.rating-stars .material-icons {
    font-size: 16px;
}

/* ============================================
   CLUBS
   ============================================ */
.clubs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
}

.club-card {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.club-card:hover {
    background: var(--surface);
    border-color: var(--primary-surface);
    box-shadow: var(--shadow-sm);
}

.club-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.club-card-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.club-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-hint);
}

.club-card-meta .material-icons {
    font-size: 16px;
    vertical-align: text-bottom;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-header {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
}

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

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
}

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

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-stat-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-section {
    padding: 16px;
}

.profile-section h3 {
    margin-bottom: 12px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--divider);
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8125rem;
    font-family: var(--font);
    color: var(--text-hint);
    transition: all 0.2s;
    white-space: nowrap;
}

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

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.loading {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-hint);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-hint);
}

.empty-state .material-icons {
    font-size: 48px;
    color: var(--text-hint);
    margin-bottom: 12px;
    display: block;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 0.9375rem;
}

/* ============================================
   LEAFLET POPUP OVERRIDE
   ============================================ */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    box-shadow: none  !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-family: var(--font) !important;
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
}

.leaflet-popup {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    background-color: #FFF;
}

.custom-marker {
    background: none !important;
    border: none !important;
}

/* ============================================
   RESPONSIVE — Tablet (600px+)
   ============================================ */
@media (min-width: 600px) {
    .runs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0 16px;
    }

    .filters-row {
        flex-direction: row;
        align-items: center;
    }

    .view-toggle-label {
        display: inline;
    }

    .modal-content {
        margin: 5% auto;
        width: 90%;
        min-height: auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: var(--radius-xl);
    }

    .modal-header {
        position: relative;
    }
}

/* ============================================
   RESPONSIVE — Desktop (768px+)
   ============================================ */
@media (min-width: 768px) {
    h2 { font-size: 1.5rem; }

    .navbar-desktop {
        display: flex;
    }

    .navbar-hamburger {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    .bottom-nav {
        display: none !important;
    }

    .main-content {
        padding-bottom: 0;
    }

    #map {
        height: calc(100vh - var(--navbar-h) - 90px);
        border-radius: 0;
    }

    .runs-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 16px;
    }

    .clubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .run-card {
        padding: 20px;
    }

    .modal-content.modal-sm {
        max-width: 440px;
    }

    .modal-content.modal-lg {
        max-width: 800px;
    }
}

/* ============================================
   RESPONSIVE — Large Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .navbar-inner {
        padding: 0 24px;
    }

    .filters-bar-inner {
        padding: 0 24px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .filters-row {
        flex: 1;
    }
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing {
    overflow: hidden;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center 30%;
    padding: 0 16px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 105, 92, 0.75) 0%,
        rgba(0, 137, 123, 0.6) 40%,
        rgba(0, 0, 0, 0.65) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 680px;
    color: white;
    padding: 80px 0 40px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: white;
}

.hero-subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 40px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-hero-outline {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(4px);
    text-decoration: none;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.15);
    min-width: 240px;
}

.hero-stat .material-icons {
    font-size: 28px;
    color: var(--accent);
}

.hero-stat div {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.hero-stat strong {
    font-size: 0.9375rem;
    font-weight: 600;
}

.hero-stat span {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* Landing Sections */
.landing-section {
    padding: 48px 0;
}

.landing-section-alt {
    background: var(--primary-light);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.step-card {
    position: relative;
    text-align: center;
    padding: 32px 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--divider);
}

.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-icon .material-icons {
    font-size: 28px;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.feature-card {
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--divider);
    transition: all 0.2s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-surface);
}

.feature-icon {
    display: block;
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.landing-cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 56px 0;
}

.cta-content {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.cta-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

/* Landing Responsive — Tablet */
@media (min-width: 600px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .hero-stat {
        min-width: auto;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* Landing Responsive — Desktop */
@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .landing-section {
        padding: 72px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
/* ============================================
   VERIFICATION TOAST
   ============================================ */
.verification-toast {
    position: fixed;
    top: calc(var(--navbar-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--success);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    max-width: 90%;
    animation: slideDown 0.3s ease;
}

.verification-toast .material-icons:first-child {
    font-size: 22px;
    color: var(--success);
    flex-shrink: 0;
}

.verification-toast.toast-error {
    border-color: var(--error);
}

.verification-toast.toast-error .material-icons:first-child {
    color: var(--error);
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-hint { color: var(--text-hint); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
