/* Modern light UI layer for LiftRek */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    color-scheme: light;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --primary-glow: rgba(37, 99, 235, 0.18);
    --secondary: #475569;
    --secondary-dark: #334155;
    --danger: #e11d48;
    --danger-soft: #ffe4e6;
    --success: #16a34a;
    --success-soft: #dcfce7;
    --warning: #f59e0b;
    --bg: #f6f8fc;
    --bg-strong: #eef4ff;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-solid: #ffffff;
    --text: #14213d;
    --text-light: #64748b;
    --muted: #94a3b8;
    --border: #dce4f2;
    --border-strong: #c7d2e6;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.14);
    --gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 55%, #14b8a6 100%);
    --ring: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(37, 99, 235, 0.12), transparent 30rem),
        radial-gradient(circle at 88% 0%, rgba(20, 184, 166, 0.12), transparent 26rem),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 44%, #eef4ff 100%);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 70%);
}

::selection {
    background: rgba(37, 99, 235, 0.18);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 3vw, 2.5rem);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(220, 228, 242, 0.82);
    backdrop-filter: blur(18px) saturate(145%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

header .container {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo-link,
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    position: relative;
    color: var(--secondary);
    text-decoration: none;
    padding: 0.62rem 0.9rem;
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 650;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

nav a:hover,
nav a:focus-visible {
    color: var(--primary-dark);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.10);
    outline: none;
}

nav a:active {
    transform: translateY(1px);
}

/* Main */
main {
    flex: 1;
    padding: clamp(2rem, 4vw, 4rem) 0;
}

main > .container {
    display: flow-root;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(3.1rem, 7vw, 5.8rem) clamp(1.25rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
    border: 1px solid rgba(199, 210, 230, 0.72);
    border-radius: calc(var(--radius) + 18px);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.92) 54%, rgba(238,244,255,0.88) 100%);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.13), 0 1px 0 rgba(255,255,255,0.9) inset;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hero::before {
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0) 36%),
        linear-gradient(180deg, rgba(37, 99, 235, 0.055), rgba(37, 99, 235, 0));
}

.hero::after {
    inset: 18px;
    border: 1px solid rgba(37, 99, 235, 0.09);
    border-radius: calc(var(--radius) + 10px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.72) inset;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: min(245px, 58vw);
    width: 100%;
    height: auto;
    margin-bottom: 1.85rem;
    padding: clamp(0.7rem, 1.6vw, 1rem);
    border: 1px solid rgba(199, 210, 230, 0.72);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.92));
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.14), 0 1px 0 rgba(255,255,255,0.95) inset;
    filter: saturate(1.04) contrast(1.03);
}

.hero h1 {
    max-width: 860px;
    margin: 0 auto 0.9rem;
    font-size: clamp(2.45rem, 5.8vw, 4.65rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
    color: var(--text);
    text-wrap: balance;
}

.subtitle {
    max-width: 700px;
    margin: 0 auto;
    font-size: clamp(1.05rem, 1.9vw, 1.28rem);
    color: var(--text-light);
    text-wrap: balance;
}

/* Blocks */
.block {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(1.35rem, 3vw, 2.35rem);
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

.block::before,
.dashboard-header::before,
.dashboard-content::before,
.auth-form::before,
.survey-form::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--gradient);
    opacity: 0.85;
}

.block h2,
.dashboard-content h2,
.auth-page h1,
.survey-page h1,
.settings-section h3 {
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.block h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    margin-bottom: 1rem;
}

.block p + p {
    margin-top: 0.7rem;
}

/* Partners */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.partner {
    min-height: 190px;
    text-align: center;
    padding: 1.4rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.partner:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow-sm);
}

.partner-logo-img {
    max-height: 78px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    filter: saturate(1.04) contrast(1.02);
}

.partner-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.partner-desc {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* About */
.about-content ul {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    gap: 0.7rem;
}

.about-content li {
    position: relative;
    padding: 0.75rem 0.85rem 0.75rem 2.45rem;
    background: rgba(37, 99, 235, 0.055);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-sm);
}

.about-content li::before {
    content: "✓";
    position: absolute;
    left: 0.85rem;
    top: 0.72rem;
    display: grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
}

/* Participants */
.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.participant,
.meta-tag {
    background: #f1f6ff;
    border: 1px solid rgba(37, 99, 235, 0.11);
    color: #1e3a8a;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
}

.empty,
.loading,
.error,
.no-info {
    color: var(--text-light);
    font-style: italic;
}

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

/* Survey links */
.survey-links,
.auth-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.78rem 1.18rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
    text-align: center;
    white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    background: #eef4ff;
    border-color: rgba(37, 99, 235, 0.14);
    color: var(--primary-dark);
}

.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-outline:hover,
.btn-outline:focus-visible {
    background: #e0ecff;
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.22);
}

.btn-sm {
    min-height: 36px;
    padding: 0.48rem 0.86rem;
    font-size: 0.86rem;
}

.btn-outline {
    background: rgba(255,255,255,0.72);
    border-color: var(--border);
    color: var(--secondary-dark);
}

.btn-yandex {
    background: linear-gradient(135deg, #ff5a3d, #fc3f1d);
    color: white;
    box-shadow: 0 12px 28px rgba(252, 63, 29, 0.22);
}

.btn-yandex:hover,
.btn-yandex:focus-visible {
    box-shadow: 0 18px 36px rgba(252, 63, 29, 0.30);
}

/* Forms */
.form-group {
    margin-bottom: 1.35rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--secondary-dark);
    font-weight: 750;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select,
.modal-body textarea {
    width: 100%;
    padding: 0.86rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-group textarea,
.modal-body textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.70);
    box-shadow: var(--ring);
    background: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
}

.radio-group,
.checkbox-group {
    display: grid;
    gap: 0.6rem;
}

.radio-group label,
.checkbox-group label,
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 520;
    cursor: pointer;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.72);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.radio-group label:hover,
.checkbox-group label:hover,
.checkbox-label:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: var(--shadow-sm);
}

.radio-group input,
.checkbox-group input,
.checkbox-label input {
    accent-color: var(--primary);
    margin-top: 0.25rem;
}

.hint {
    font-size: 0.92rem;
    color: var(--text-light);
    margin-bottom: 0.55rem;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    transition: color 160ms ease, background 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Auth and survey pages */
.auth-page,
.survey-page {
    max-width: 720px;
    margin: 0 auto;
}

.auth-page {
    max-width: 520px;
}

.auth-page h1,
.survey-page h1 {
    margin-bottom: 1rem;
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
}

.auth-form,
.survey-form,
.dashboard-header,
.dashboard-content {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(1.35rem, 3vw, 2rem);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.auth-link {
    text-align: center;
    margin-top: 1.35rem;
    color: var(--text-light);
}

.auth-link a,
.block a:not(.btn),
.dashboard-content a:not(.btn) {
    color: var(--primary-dark);
    font-weight: 750;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}

.auth-link a:hover,
.block a:not(.btn):hover,
.dashboard-content a:not(.btn):hover {
    border-bottom-color: currentColor;
}

.oauth-section {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.oauth-section p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.error-message,
.success-message {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.error-message {
    background: var(--danger-soft);
    border-color: rgba(225, 29, 72, 0.18);
    color: #be123c;
}

.success-message {
    background: var(--success-soft);
    border-color: rgba(22, 163, 74, 0.18);
    color: #15803d;
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 1.4rem;
}

.dashboard-header {
    margin-bottom: 1.4rem;
}

.dashboard-header h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.user-info {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text-light);
    margin-bottom: 1.1rem;
}

.user-info span,
.file-size,
.file-date {
    color: var(--text-light);
    font-size: 0.92rem;
}

.dashboard-nav {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dashboard-content h2 {
    margin-bottom: 1.35rem;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.upload-section,
.files-section,
.settings-section {
    margin-bottom: 2rem;
}

/* Upload */
.upload-area {
    border: 1.5px dashed var(--border-strong);
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(1.5rem, 4vw, 2.6rem);
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,248,252,0.82)),
        repeating-linear-gradient(-45deg, rgba(37,99,235,0.035) 0 8px, transparent 8px 16px);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.upload-area:hover,
.upload-area.dragover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.065);
    box-shadow: var(--ring), var(--shadow-sm);
}

.upload-area input[type="file"] {
    margin: 1rem auto;
    max-width: 100%;
}

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

.progress-bar {
    flex: 1;
    height: 10px;
    background: #e6eef9;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    border-radius: inherit;
    transition: width 0.3s;
}

#upload-percent {
    font-size: 0.92rem;
    font-weight: 850;
    color: var(--primary);
    min-width: 42px;
    text-align: right;
}

/* Files list */
.files-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.76);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.file-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.20);
    box-shadow: var(--shadow-sm);
}

.file-info {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}

.file-name {
    font-weight: 850;
    color: var(--text);
}

.video-item {
    flex-wrap: wrap;
}

.video-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.8rem;
    white-space: nowrap;
}

.file-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.file-meta-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.file-addresses {
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.9rem 1rem;
    background: #f7faff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

.file-addresses strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.addresses-list {
    color: var(--text-light);
    line-height: 1.7;
}

/* Settings */
.settings-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-form {
    max-width: 460px;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--card-solid);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: calc(var(--radius) + 8px);
    width: min(100%, 540px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-color: var(--border);
}

.modal-header {
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: var(--danger-soft);
    color: var(--danger);
    transform: rotate(5deg);
    outline: none;
}

.modal-body {
    padding: 1.25rem;
}

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

/* Map */
.map-container {
    width: 100%;
    height: min(62vh, 560px);
    min-height: 420px;
    border-radius: calc(var(--radius) + 8px);
    border: 1px solid rgba(255, 255, 255, 0.76);
    margin: 1rem 0;
    overflow: hidden;
    background: #eaf2ff;
    box-shadow: var(--shadow);
}

.map-legend,
.map-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255,255,255,0.76);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.legend-item,
.stat-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(15,23,42,0.08), 0 6px 14px rgba(15,23,42,0.16);
}

.legend-dot.green {
    background: #22c55e;
}

.legend-dot.yellow {
    background: #facc15;
}

.map-stats {
    justify-content: center;
}

.stat-item {
    min-width: 150px;
    flex-direction: column;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    background: #f7faff;
}

.stat-count {
    font-size: 2.1rem;
    line-height: 1;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.04em;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.custom-circle-marker {
    --marker-color: #facc15;
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    appearance: none;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: var(--marker-color);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28), 0 0 0 2px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transform: scale(1);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.custom-circle-marker:hover,
.custom-circle-marker:focus-visible,
.custom-circle-marker.is-open {
    transform: scale(1.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32), 0 0 0 5px color-mix(in srgb, var(--marker-color) 24%, transparent);
    outline: none;
    z-index: 2;
}

.custom-circle-marker.green {
    --marker-color: #22c55e;
}

.custom-circle-marker.yellow {
    --marker-color: #facc15;
}

.custom-circle-marker__popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    width: max-content;
    max-width: 240px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-solid);
    color: var(--text);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: left;
    transform: translateX(-50%) translateY(6px) scale(0.96);
    transform-origin: bottom center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

.custom-circle-marker__popup::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 12px;
    height: 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--card-solid);
    transform: translate(-50%, -50%) rotate(45deg);
}

.custom-circle-marker__popup strong,
.custom-circle-marker__popup span {
    display: block;
}

.custom-circle-marker__popup strong {
    margin-bottom: 0.18rem;
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-circle-marker__popup span {
    color: var(--text);
    font-weight: 700;
}

.custom-circle-marker:hover .custom-circle-marker__popup,
.custom-circle-marker:focus-visible .custom-circle-marker__popup,
.custom-circle-marker.is-open .custom-circle-marker__popup {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.map-message {
    display: grid;
    min-height: 100%;
    place-items: center;
    padding: 2rem;
    color: var(--text-light);
    text-align: center;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.74);
    border-top: 1px solid rgba(220, 228, 242, 0.82);
    padding: 1.35rem 0;
    text-align: center;
    color: var(--text-light);
    backdrop-filter: blur(14px);
}

/* Responsive */
@media (max-width: 900px) {
    header .container {
        min-height: auto;
        padding-block: 0.9rem;
        flex-direction: column;
        align-items: stretch;
    }

    .logo-link,
    .logo {
        justify-content: center;
    }

    nav {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding-inline: 0.9rem;
    }

    main {
        padding: 1.4rem 0 2rem;
    }

    nav a {
        padding: 0.52rem 0.72rem;
        font-size: 0.88rem;
    }

    .hero {
        padding: 2.2rem 1rem;
        border-radius: calc(var(--radius) + 4px);
    }

    .survey-links,
    .auth-links,
    .dashboard-nav,
    .modal-footer,
    .upload-status {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .file-item,
    .file-info,
    .file-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-container {
        min-height: 360px;
        height: 55vh;
    }

    .map-stats,
    .map-legend {
        gap: 0.65rem;
    }

    .stat-item {
        flex: 1 1 130px;
        min-width: 130px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
