/* ============================================
   OBECNÍ APLIKACE — PWA Stylesheet
   Obec Světlá Hora
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700&display=swap');

/* --- CSS Variables --- */
:root {
    --bg: #F0F4FF;
    --bg2: #E8EEFF;
    --card: #FFFFFF;
    --primary: #3B6FD4;
    --primary-light: #E8EEFF;
    --primary-dark: #2952A8;
    --primary-gradient: linear-gradient(135deg, #3B6FD4 0%, #5B8AE8 100%);
    --accent: #F59E0B;
    --accent-soft: #FEF3C7;
    --accent-gradient: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    --text: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --info: #2563EB;
    --info-bg: #EFF6FF;
    --success: #16A34A;
    --success-bg: #F0FDF4;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    --shadow-primary: 0 4px 14px rgba(59, 111, 212, 0.3);
    --shadow-accent: 0 4px 14px rgba(245, 158, 11, 0.35);
    --nav-height: calc(72px + env(safe-area-inset-bottom, 0px));
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
a, button {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: radial-gradient(circle at 20% 0%, rgba(91, 138, 232, 0.06) 0%, transparent 60%),
                      radial-gradient(circle at 80% 100%, rgba(59, 111, 212, 0.04) 0%, transparent 60%);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- App Shell --- */
.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
    position: relative;
    box-shadow: 0 0 60px rgba(59, 111, 212, 0.08);
}

/* --- Header --- */
.header {
    background: transparent;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(59, 111, 212, 0.92) 0%, rgba(91, 138, 232, 0.88) 100%);
    backdrop-filter: saturate(180%) blur(40px);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    z-index: -1;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow:
        0 8px 32px rgba(59, 111, 212, 0.2),
        inset 0 -0.5px 0 rgba(255, 255, 255, 0.15);
}

.header-home {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 22px 22px;
}

.header-inner {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 22px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.header-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0;
    border: none;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.header-brand-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-label {
    font-size: 10px;
    letter-spacing: 2.5px;
    opacity: 0.55;
    text-transform: uppercase;
    font-weight: 600;
}

.header-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-family: 'Playfair Display', serif;
}

.header-page-title {
    font-size: 17px;
    font-weight: 700;
    flex: 1;
}

.header-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

.header-bell:hover {
    background: rgba(255, 255, 255, 0.22);
}

.header-bell .dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid rgba(59, 111, 212, 0.9);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.notif-wrapper {
    position: relative;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 150;
    max-height: 400px;
    overflow-y: auto;
}

.notif-dropdown.active {
    display: block;
}

.notif-dropdown__header {
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.notif-dropdown__section {
    padding: 8px 0;
}

.notif-dropdown__section-title {
    padding: 4px 16px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.notif-dropdown__item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.notif-dropdown__item:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.notif-dropdown__item-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
}

.notif-dropdown__item-title {
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-dropdown__empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-back {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

.btn-back:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

/* --- Alert Banner --- */
.alert-banner {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}

.alert-banner svg {
    flex-shrink: 0;
}

/* --- Content Area --- */
.content {
    padding: 16px 16px calc(var(--nav-height) + 16px);
}

/* --- Quick Actions Grid --- */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 6px 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.6) 0%, transparent 60%);
    pointer-events: none;
}

.quick-action:active {
    transform: scale(0.94);
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.quick-action.accent {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

.quick-action__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #d0dcf5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(59, 111, 212, 0.12);
}

.quick-action.accent .quick-action__icon {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: var(--warning);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.18);
}

.quick-action__label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: var(--text-muted);
}

/* --- Section Header --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
}

.section-header a {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    transition: background 0.15s;
}

.section-header a:hover {
    background: #d4dffa;
}

/* --- Pickup Reminder --- */
.pickup-reminder {
    background: var(--primary-gradient);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border: none;
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.pickup-reminder::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}

.pickup-reminder__label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

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

.pickup-reminder__type {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.pickup-reminder__date {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

.pickup-reminder__badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}

/* --- Cards --- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.8) 50%, transparent 100%);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--border-strong);
}

.card + .card {
    margin-top: 10px;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}
.card-link:active {
    transform: scale(0.97);
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: -0.1px;
}

.card__date {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.card__image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 10px;
    object-fit: cover;
    max-height: 180px;
}

.card__excerpt {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* --- Badge --- */
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

.badge-color {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Urgent dot --- */
.urgent-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.urgent-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.urgent-indicator span {
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
}

/* --- Event cards horizontal scroll --- */
.events-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.events-scroll::-webkit-scrollbar {
    display: none;
}

.event-mini-card {
    background: var(--card);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    min-width: 155px;
    flex: 0 0 auto;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.event-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.event-mini-card:active {
    transform: scale(0.95);
}

.event-mini-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.18);
}

.event-mini-card__title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.35;
}

.event-mini-card__meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Event list card --- */
.event-list-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    display: block;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.event-list-card__row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.event-list-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.event-list-card__date-box {
    width: 52px;
    border-radius: 14px;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    flex-shrink: 0;
    box-shadow: var(--shadow-primary);
}

.event-list-card__day {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.event-list-card__month {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-list-card__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-list-card__meta {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-add-cal {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-add-cal:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(27,94,59,0.06);
}

.event-list-card__image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 10px;
    object-fit: cover;
    max-height: 180px;
    cursor: pointer;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox--active {
    display: flex;
}

.lightbox img {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    border-radius: 8px;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* --- Waste list --- */
.waste-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.waste-item__color {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.waste-item__color-dot {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

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

.waste-item__name {
    font-size: 15px;
    font-weight: 600;
}

.waste-item__freq {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.waste-item__next {
    text-align: right;
    flex-shrink: 0;
}

.waste-item__next-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.waste-item__next-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Info box --- */
.info-box {
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
}

.info-box.accent {
    background: var(--accent-soft);
    border: 1px solid rgba(232, 167, 48, 0.2);
}

.info-box__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-box__text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Contact card --- */
.contact-emergency {
    background: var(--danger-bg);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid rgba(192, 57, 43, 0.15);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-emergency__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-emergency__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--danger);
}

.contact-emergency__number {
    font-size: 18px;
    font-weight: 800;
    color: var(--danger);
}

.contact-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.contact-card__name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

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

.contact-card__hours {
    font-size: 13px;
    color: var(--text-muted);
}

.contact-card__phone {
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-primary);
    transition: filter 0.15s;
}

.contact-card__phone:hover {
    filter: brightness(1.08);
}

/* --- Budget --- */
.budget-header {
    background: var(--primary-gradient);
    border-radius: 18px;
    padding: 22px 20px;
    border: none;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-primary);
}

.budget-header__label {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.budget-header__total {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    margin-top: 6px;
    letter-spacing: -1px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.budget-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    height: 14px;
    margin-top: 16px;
    gap: 2px;
}

.budget-bar__segment {
    border-radius: 2px;
    min-width: 4px;
}

.budget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.budget-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.budget-item__name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.budget-item__amount {
    text-align: right;
    flex-shrink: 0;
}

.budget-item__value {
    font-size: 14px;
    font-weight: 700;
}

.budget-item__pct {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Services grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.service-tile {
    background: var(--card);
    border-radius: 18px;
    padding: 20px 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.service-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.service-tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--border-strong);
}

.service-tile:active {
    transform: scale(0.95);
}

.service-tile.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.service-tile__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #d0dcf5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(59, 111, 212, 0.12);
}

.service-tile__label {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.3;
}

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

.form-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

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

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 111, 212, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-file {
    width: 100%;
}

.photo-upload {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--bg);
    transition: border-color 0.2s;
}

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

.photo-upload__text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.gps-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
}

.gps-box span {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    letter-spacing: -0.1px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 111, 212, 0.4);
    filter: brightness(1.05);
}

/* --- Success Page --- */
.success-page {
    padding: 48px 16px;
    text-align: center;
}

.success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border: 2px solid rgba(22, 163, 74, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

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

.success-text {
    color: var(--text-muted);
    font-size: 14px;
}

/* --- Article --- */
.article {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.article__title {
    font-size: 20px;
    font-weight: 700;
    margin: 14px 0 8px;
    line-height: 1.35;
}

.article__date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.article__body {
    font-size: 15px;
    line-height: 1.7;
}

.article__body p {
    margin-bottom: 1em;
}

.article__image {
    border-radius: 12px;
    margin-bottom: 16px;
    width: 100%;
    object-fit: cover;
    max-height: 250px;
}

/* --- Bottom Navigation (iOS 26 Liquid Glass) --- */
.bottom-nav {
    position: fixed;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 410px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 6px;
    z-index: 1000;
}

/* Glass bar behind the nav items (excludes the floating report button) */
.bottom-nav::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: saturate(180%) blur(50px) brightness(1.05);
    -webkit-backdrop-filter: saturate(180%) blur(50px) brightness(1.05);
    border-radius: 24px;
    border: 0.5px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.08),
        0 0 0 0.5px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -0.5px 0 rgba(255, 255, 255, 0.15);
    z-index: -1;
}

.nav-item {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 12px 8px;
    text-decoration: none;
    color: rgba(60, 60, 67, 0.45);
    transition: color 0.3s ease, transform 0.2s ease;
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.nav-item:active {
    transform: scale(0.88);
}

/* ---- Active state: glowing pill ---- */
.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px 2px rgba(59, 111, 212, 0.5);
}

/* ---- Report button: floating above navbar ---- */
.nav-item.report-btn {
    position: relative;
    transform: translateY(-18px);
    padding: 0;
    color: #fff;
    border: none;
    gap: 0;
}

.nav-item.report-btn svg {
    width: 26px;
    height: 26px;
}

.nav-item.report-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #F5A623, #F28B0A);
    box-shadow:
        0 6px 24px rgba(245, 158, 11, 0.45),
        0 2px 8px rgba(245, 158, 11, 0.3),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    z-index: -1;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-item.report-btn .nav-item__label {
    position: relative;
    margin-top: 36px;
    color: var(--accent);
    font-weight: 700;
}

.nav-item.report-btn svg {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.nav-item.report-btn:active::before {
    transform: translateX(-50%) scale(0.92);
    box-shadow:
        0 3px 12px rgba(245, 158, 11, 0.4),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.4);
}

.nav-item__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

/* --- Status steps --- */
.status-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
}

.status-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.status-step__indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    background: var(--bg);
}

.status-step.completed .status-step__indicator {
    background: var(--primary);
    border-color: var(--primary);
}

.status-step.active .status-step__indicator {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.status-step__label {
    font-size: 14px;
    font-weight: 600;
}

.status-step__date {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Helpers --- */
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }

/* --- Django Messages --- */
.messages {
    list-style: none;
    padding: 0 16px;
    margin: 8px 0;
}

.messages li {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.messages .success {
    background: var(--success-bg);
    color: var(--success);
}

.messages .error {
    background: var(--danger-bg);
    color: var(--danger);
}

.messages .warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.messages .info {
    background: var(--info-bg);
    color: var(--info);
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state__icon {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.45;
    filter: grayscale(0.2);
}

.empty-state__text {
    font-size: 14px;
    font-weight: 500;
}

/* --- PWA Install Banner --- */
.pwa-install-banner {
    background: var(--primary-gradient);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    position: relative;
}

.pwa-install-banner.hidden {
    display: none;
}

.pwa-install-banner__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-banner__text {
    flex: 1;
    min-width: 0;
}

.pwa-install-banner__title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.pwa-install-banner__desc {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}

.pwa-install-banner__btn {
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.pwa-install-banner__close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.pwa-install-banner__close:hover {
    color: rgba(255,255,255,0.9);
}

/* PWA Install Modal */
.pwa-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.pwa-modal-overlay.active {
    display: flex;
}

.pwa-modal {
    background: var(--card);
    border-radius: 20px 20px 0 0;
    max-width: 430px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 20px max(20px, env(safe-area-inset-bottom));
    animation: pwa-slide-up 0.3s ease-out;
}

@keyframes pwa-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.pwa-modal__handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 0 auto 20px;
}

.pwa-modal__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pwa-modal__subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.pwa-modal__platform {
    display: none;
}

.pwa-modal__platform.active {
    display: block;
}

.pwa-modal__platform-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-step {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.pwa-step__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.pwa-step__content {
    flex: 1;
    padding-top: 4px;
}

.pwa-step__text {
    font-size: 14px;
    line-height: 1.5;
}

.pwa-step__text strong {
    color: var(--primary);
}

.pwa-step__icon-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    background: var(--bg);
    border-radius: 6px;
    padding: 2px 6px;
    margin: 0 2px;
}

.pwa-modal__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.pwa-modal__tab {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    transition: all 0.15s;
}

.pwa-modal__tab.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.pwa-modal__close {
    display: flex;
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    justify-content: center;
}

.pwa-modal__native-btn {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* --- Polls --- */
.poll-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.poll-status--active {
    background: var(--success-bg);
    color: var(--success);
}

.poll-status--closed {
    background: var(--bg);
    color: var(--text-muted);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.poll-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(2px);
}

.poll-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.poll-option__text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.poll-option__check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.15s;
}

.poll-option input[type="radio"]:checked ~ .poll-option__check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.poll-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.poll-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.poll-result__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.poll-result__text {
    font-size: 14px;
    font-weight: 600;
}

.poll-result__pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.poll-result__bar {
    height: 10px;
    background: var(--bg);
    border-radius: 5px;
    overflow: hidden;
}

.poll-result__fill {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    min-width: 0;
    transition: width 0.4s ease;
}

.poll-result__votes {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.poll-total {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.poll-total strong {
    color: var(--text);
}

/* --- Header User / Auth --- */
.header-user-wrapper {
    position: relative;
}

.header-user-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

.header-user-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.header-login-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}

.header-login-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 150;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown__name {
    padding: 14px 16px 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.user-dropdown__item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.user-dropdown__item:hover {
    background: var(--bg);
}

.user-dropdown__logout {
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.user-dropdown form {
    margin: 0;
}

/* --- Auth Card --- */
.auth-card {
    background: var(--card);
    border-radius: 16px;
    padding: 28px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

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

.auth-card__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-card__subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.auth-card form {
    text-align: left;
}

.auth-card__footer {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.auth-card__footer a {
    font-weight: 600;
}

.auth-card__icon--logout {
    background: var(--info-bg);
}

.auth-card__icon--success {
    background: var(--success-bg);
}

.auth-error {
    background: var(--danger-bg);
    color: var(--danger);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}

/* --- Map --- */
.map-marker-wrapper {
    background: none !important;
    border: none !important;
}

.map-marker {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid #fff;
}

.map-marker i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 14px;
}

.map-popup strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.map-popup__desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.map-legend-toggle {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    left: 16px;
    z-index: 500;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.map-legend-toggle.hidden {
    display: none;
}

.map-legend {
    display: none;
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    left: 12px;
    right: 12px;
    max-width: 406px;
    z-index: 500;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-height: 40vh;
    overflow-y: auto;
}

.map-legend.active {
    display: block;
}

.map-legend__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.map-legend__close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.map-legend__items {
    padding: 8px 0;
}

.map-legend__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.map-legend__item--link {
    cursor: pointer;
    transition: background 0.15s;
}

.map-legend__item--link:hover {
    background: var(--primary-light);
}

.map-legend__item--link:active {
    background: var(--border);
}

.map-legend__arrow {
    margin-left: auto;
    color: var(--text-muted);
    flex-shrink: 0;
}

.map-legend__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.map-legend__label {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Make sure the app doesn't get wider on desktop */
@media (min-width: 431px) {
    body {
        background: #d8dfe8;
    }
}

/* ── Spinner ──────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}
.photo-upload--loading {
    border-color: var(--primary);
    background: var(--primary-light);
}
.photo-upload--loading .photo-upload__text {
    color: var(--primary);
}

/* GDPR souhlas */
.gdpr-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    cursor: pointer;
}

.gdpr-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.gdpr-consent-label a {
    color: var(--primary);
    text-decoration: underline;
}

/* ── HTMX ────────────────────────────────────────────── */
@keyframes htmx-fade-in {
    from { opacity: 0; }
}
@keyframes htmx-fade-out {
    to { opacity: 0; }
}
@keyframes page-slide-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes page-slide-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-6px); }
}
::view-transition-old(root) {
    animation: 150ms ease-out both page-slide-out;
}
::view-transition-new(root) {
    animation: 240ms cubic-bezier(0.22, 1, 0.36, 1) both page-slide-in;
}
.htmx-request.btn {
    opacity: 0.7;
    pointer-events: none;
}

/* ── Progress bar ────────────────────────────────────── */
.nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, #7EB3FF 100%);
    z-index: 9999;
    opacity: 0;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(59, 111, 212, 0.5);
    pointer-events: none;
    transition: width 0.4s cubic-bezier(0.1, 0.6, 0.4, 1), opacity 0.3s ease;
}
.nav-progress.active {
    opacity: 1;
    width: 75%;
}
.nav-progress.done {
    width: 100%;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.35s ease 0.1s;
}

/* ── Skeleton loading ────────────────────────────────── */
@keyframes skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg2) 25%, #f5f8ff 50%, var(--bg2) 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.6s infinite linear;
    border-radius: 8px;
    display: block;
}
.skeleton-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}
.skeleton-line {
    height: 13px;
    margin-bottom: 9px;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line--short  { width: 38%; }
.skeleton-line--medium { width: 62%; }
.skeleton-line--full   { width: 100%; }
.skeleton-line--title  { height: 17px; width: 78%; }

/* ── Inline form validation ──────────────────────────── */
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}
.form-error-msg {
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
    margin-top: 5px;
    display: none;
}
.form-error-msg.visible {
    display: block;
}
