* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root, [data-theme="light"] {
    --primary: #E2581F;
    --primary-light: #F2632A;
    --primary-dark: #C2470F;
    --primary-bg: #FBE7DC;
    --accent: #E2581F;
    --accent-light: #FBE7DC;
    --accent-bg: rgba(226, 88, 31, 0.08);
    --bg: #ECE9E1;
    --card-bg: #FBFAF6;
    --card-2: #F3F0E8;
    --text: #13110D;
    --text-primary: #13110D;
    --text-secondary: #6C685E;
    --text-muted: #9C978B;
    --border: #DBD7CB;
    --border-2: #E8E4DA;
    --danger: #d63031;
    --success: #2F8F5B;
    --sidebar-bg: #15140F;
    --sidebar-hover: #211F18;
    --sidebar-active: #2B2820;
    --header-bg: #15140F;
    --radius: 8px;
    --radius-sm: 5px;
    --shadow: 0 1px 2px rgba(20,18,12,.05), 0 10px 30px rgba(20,18,12,.06);
    --shadow-lg: 0 1px 2px rgba(20,18,12,.05), 0 12px 34px rgba(20,18,12,.1);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
    --primary: #F2632A;
    --primary-light: #F2632A;
    --primary-dark: #D24E15;
    --primary-bg: #2A1810;
    --accent: #F2632A;
    --accent-light: #2A1810;
    --accent-bg: rgba(242, 99, 42, 0.08);
    --bg: #0E0D0A;
    --card-bg: #1A1813;
    --card-2: #211E18;
    --text: #F4F1E8;
    --text-primary: #F4F1E8;
    --text-secondary: #A39E90;
    --text-muted: #6E6A5E;
    --border: #2B2820;
    --border-2: #221F19;
    --danger: #e74c3c;
    --success: #46B377;
    --sidebar-bg: #000000;
    --sidebar-hover: #161510;
    --sidebar-active: #211F18;
    --header-bg: #000000;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.35);
    --shadow-lg: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.4);
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    height: 100%;
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 500;
    transition: background .25s, color .25s;
}

/* Type helpers */
.disp { font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .95; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.eyebrow.accent { color: var(--primary); }

/* Logo chip (round paper disc for dark backgrounds) */
.logo-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; background: #F4F1E9; flex-shrink: 0;
}
.logo-chip img { width: 29px; height: 29px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
.logo-chip.lg { width: 60px; height: 60px; }
.logo-chip.lg img { width: 46px; height: 46px; }

/* ===== LOGIN GATE ===== */
#login-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
    overflow: hidden;
    background: #0A0908;
}

#login-gate.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Gate video background */
.gate-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.55;
}

.login-gate-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,8,6,.5), rgba(8,8,6,.92));
    z-index: 1;
}

.login-gate-bg::before {
    display: none;
}

@keyframes gateShimmer {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-3%, 2%) scale(1.05); }
}

.login-gate-card {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 400px;
    background: transparent;
    padding: 2rem 0;
}

.login-gate-header {
    text-align: left;
    margin-bottom: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.login-gate-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin-bottom: 0;
    background: #F4F1E9;
    border: none;
    border-radius: 50%;
    padding: 7px;
}

.login-gate-title {
    color: #fff;
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.login-gate-subtitle {
    color: var(--primary);
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 4px;
}

/* Gate input fields */
.gate-input-group {
    margin-bottom: 0.75rem;
}

.gate-input-group input {
    width: 100%;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
    outline: none;
}

.gate-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.gate-input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 88, 31, 0.25);
}

.gate-input-group label,
.gate-input-group .field-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
}

.gate-input-group input:-webkit-autofill,
.gate-input-group input:-webkit-autofill:hover,
.gate-input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 30, 40, 1) inset !important;
    -webkit-text-fill-color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    transition: background-color 5000s ease-in-out 0s;
}

/* Gate button */
.gate-btn {
    width: 100%;
    padding: 13px 22px;
    margin-top: 0.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 0.15s;
    box-shadow: none;
}

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

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

.gate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Gate divider */
.gate-divider {
    display: none;
}

.gate-divider::before,
.gate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.gate-divider span {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Gate switch link */
.gate-switch {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 16px;
}

.gate-switch a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.gate-switch a:hover {
    color: #fff;
}

/* Gate error */
.gate-error {
    background: rgba(214, 48, 49, 0.12);
    border: 1px solid rgba(214, 48, 49, 0.25);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #ff6b6b;
    text-align: center;
}

/* Gate footer */
.login-gate-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
}

/* ===== TOPNAV (Desktop — repurposed sidebar) ===== */
#sidebar {
    display: none;
    width: 100%;
    height: 70px;
    background: var(--card-bg);
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
    position: relative;
    z-index: 60;
    transition: background .25s, border-color .25s;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-bottom: none;
    margin-right: 26px;
    flex-shrink: 0;
}

.sidebar-logo {
    display: none;
}

/* In topnav, no disc — logo sits directly on the bar */
#sidebar .logo-chip {
    background: none;
    width: auto;
    height: auto;
    border-radius: 0;
}
#sidebar .logo-chip img {
    width: 32px;
    height: 32px;
}

.sidebar-title {
    color: var(--text);
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    gap: 22px;
    margin-left: 14px;
    flex-shrink: 0;
    flex-grow: 0;
}

.snav-btn {
    display: flex;
    align-items: center;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.15s;
    text-align: left;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
}

.snav-btn:hover {
    background: transparent;
    color: var(--text);
}

.snav-btn.active {
    background: transparent;
    color: var(--text);
}

.snav-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--primary);
}

/* ===== APP CONTAINER ===== */
#app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

/* ===== HEADER ===== */
header {
    background: var(--card-bg);
    color: var(--text);
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    transition: background .25s, border-color .25s;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    padding: 5px;
    background: #F4F1E9;
    box-shadow: none;
    border: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.location-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg);
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.15s;
}

.location-badge:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.loc-icon { font-size: 0.8rem; }

.header-weather {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.hw-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.hw-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 800;
}
.hw-val { font-weight: 700; color: var(--text); }

/* ===== MAIN SCROLLABLE AREA ===== */
main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    padding-bottom: calc(96px + var(--safe-bottom));
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    min-height: 0;
}

@media (min-width: 1024px) {
    main {
        padding-bottom: 1rem;
    }
}

/* ===== BOTTOM NAV (Mobile) ===== */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--header-bg);
    border-top: none;
    padding: 0 12px;
    height: 68px;
    padding-bottom: var(--safe-bottom);
    z-index: 100;
    align-items: center;
    justify-content: space-around;
}

.bnav-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 2px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: 'Archivo', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    position: relative;
    white-space: nowrap;
}

.bnav-btn:active {
    transform: scale(0.95);
}

.bnav-btn.active {
    color: #fff;
}

.bnav-btn.active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    width: 18px;
    height: 2px;
    background: var(--primary);
}

/* ===== TABS ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
}

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

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

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 14px;
    box-shadow: none;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card h2 {
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -.01em;
}

.card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-split {
    display: flex;
    gap: 1rem;
}

.split-half {
    flex: 1;
    text-align: center;
}

/* ===== PAGE TITLE ===== */
.page-title {
    font-size: 40px;
    margin-bottom: 8px;
}

/* ===== HERO (Dashboard) ===== */
.hero {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--header-bg);
    color: #fff;
    min-height: 270px;
    display: flex;
    margin-bottom: 22px;
}

.hero-text {
    flex: 1;
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-pre {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin-top: 12px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

/* Hero video background */
.hero.has-bg { background: var(--header-bg); }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg-vid { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--header-bg) 0%, rgba(21,20,15,.95) 30%, rgba(21,20,15,.55) 60%, rgba(21,20,15,.10) 100%);
}

/* Editorial buttons for hero */
.btn {
    font-family: inherit; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    border: none; border-radius: 4px; padding: 13px 22px; cursor: pointer; transition: all .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn-accent { background: var(--primary); color: #fff; }
.btn-accent:hover { background: var(--primary-dark); }
.btn-accent:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--text); }
.btn-ghost.on-hero { color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost.on-hero:hover { border-color: #fff; }

/* ===== STAT BAND ===== */
.statband {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 0;
    margin-bottom: 22px;
}

.statcell {
    flex: 1;
    padding: 0 26px;
    border-right: 1px solid var(--border);
}

.statcell:last-child {
    border-right: none;
}

/* Legacy stats-grid fallback */
.stats-grid {
    display: none;
}

.stat-card {
    display: none;
}

.stat-number {
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: var(--text);
    line-height: .95;
    text-transform: uppercase;
    letter-spacing: -.02em;
}

.stat-number.accent, .num.accent {
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 9px;
}

/* ===== QUICK NAV BUTTONS (Dashboard) ===== */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.quick-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-nav-btn:hover {
    border-color: var(--primary);
}

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

.qnav-title {
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -.01em;
}

.qnav-desc {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.quick-nav-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Inside dashboard card, always 2×2 */
.dash-quicknav {
    grid-template-columns: 1fr 1fr !important;
    margin-bottom: 0;
}

/* ===== MAP BUTTONS ===== */
.btn-map {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-map:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-map:active, .btn-map.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

/* ===== MAP ===== */
.map-layout {
    display: block;
}

.card-map {
    padding: 0;
    overflow: hidden;
}

.card-map .card-header {
    padding: 0.75rem 1.1rem 0;
    margin-bottom: 0.5rem;
}

#map {
    height: 55vh;
    width: 100%;
    z-index: 1;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.1rem 0.5rem;
    flex-wrap: wrap;
}

.legend-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* External depth map links */
.depth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.depth-link-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
    cursor: pointer;
}

.depth-link-btn:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.depth-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0984e3, #0066cc);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.depth-link-title {
    font-weight: 700;
    font-size: 0.85rem;
}

.depth-link-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: var(--shadow);
}

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

.btn-icon:active, .btn-icon.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(0.93);
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-icon-sm:hover {
    border-color: var(--primary);
}

.btn-icon-sm:active {
    background: var(--primary-bg);
}

.map-legend {
    padding: 0.5rem 1.1rem 0.75rem;
    border-top: 1px solid var(--border);
}

.legend-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.legend-scale {
    display: flex;
    gap: 0.5rem;
}

.legend-scale span {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0;
    border-radius: 4px;
    color: white;
}

.depth-shallow { background: #74b9ff; }
.depth-medium { background: #0984e3; }
.depth-deep { background: #2d3436; }
.depth-vdeep { background: #0c0c1e; }

.drone-legend-scale {
    flex-wrap: wrap;
}

.drone-legend-scale span {
    flex: unset;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
}

.drone-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.search-bar input {
    flex: 1;
}

.spot-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.6rem;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

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

.spot-item:hover { background: var(--primary-bg); }
.spot-item:active { background: var(--primary-bg); }

.spot-icon {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.spot-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.spot-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.spot-delete {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1rem;
    opacity: 0.4;
    cursor: pointer;
    padding: 0.25rem;
    transition: opacity 0.15s;
}

.spot-delete:hover { opacity: 0.7; }
.spot-delete:active { opacity: 1; }

/* ===== FORMS ===== */
.form-row {
    display: flex;
    gap: 0.6rem;
}

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

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--card-2, var(--card-bg));
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

textarea { resize: vertical; min-height: 60px; }

/* Weather Buttons */
.weather-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.weather-btn {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 800;
    font-family: inherit;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.weather-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.weather-btn:active { transform: scale(0.95); }

.weather-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

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

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    width: auto;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.btn-secondary:active {
    background: var(--text);
    color: var(--bg);
}

.btn-chip {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn-chip:active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ===== FILTER ===== */
.filter-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.filter-bar select { flex: 1; font-size: 0.82rem; padding: 0.4rem 0.5rem; }

/* ===== BITE CHART (Editorial vertical bars) ===== */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 120px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    border-radius: 2px;
    background: var(--border);
    transition: height 0.5s cubic-bezier(.2,.8,.3,1);
}

.bar.hot {
    background: var(--primary);
}

.bar-h {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Archivo', sans-serif;
    color: var(--text-muted);
}

.bite-foot {
    margin-top: 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== CATCH LIST ===== */
.catch-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

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

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

.catch-species {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.catch-details {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catch-meta {
    text-align: right;
    flex-shrink: 0;
}

.catch-size {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
}

.catch-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.catch-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.catch-edit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    opacity: 0.35;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.catch-edit:hover { opacity: 0.7; }

.catch-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    opacity: 0.3;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.catch-delete:hover { opacity: 0.6; }
.catch-delete:active { opacity: 1; }

/* ===== BITE FORECAST ===== */
.bite-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.bite-time {
    width: 80px;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.bite-bar-container {
    flex: 1;
    background: var(--bg);
    border-radius: 6px;
    height: 22px;
    overflow: hidden;
    margin: 0 0.6rem;
}

.bite-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.bite-bar.low { background: linear-gradient(90deg, #fdcb6e, #e17055); }
.bite-bar.medium { background: linear-gradient(90deg, #ffeaa7, #fdcb6e); }
.bite-bar.high { background: linear-gradient(90deg, #55efc4, #00b894); }
.bite-bar.very-high { background: linear-gradient(90deg, var(--primary-light), var(--primary)); }

.bite-label {
    width: 52px;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 700;
}

.bite-label.low { color: #e17055; }
.bite-label.medium { color: #fdcb6e; }
.bite-label.high { color: #00b894; }
.bite-label.very-high { color: var(--primary); }

/* Moon & Sun */
.moon-display, .sun-display-compact {
    text-align: center;
    padding: 0.5rem 0;
}

.moon-name { font-size: 1rem; font-weight: 700; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary); }
.moon-info { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }

.sun-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.3rem;
}

.sun-item { text-align: center; }
.sun-time { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.sun-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Pressure */
.pressure-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.pressure-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.pressure-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pressure-trend {
    font-size: 0.85rem;
    font-weight: 600;
}

.pressure-tip {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== WISSEN TABS (sub-tabs) ===== */
.wissen-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 22px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--border);
}

.wissen-tab {
    flex: none;
    padding: 0 0 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.wissen-tab:hover {
    color: var(--text-secondary);
    background: transparent;
}

.wissen-tab.active {
    background: transparent;
    color: var(--text);
    box-shadow: none;
}

.wissen-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
}

.wissen-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.wissen-panel.active {
    display: block;
}

/* ===== SCHONZEITEN TAB ===== */
.schonzeit-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.schonzeit-toggle-btn {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schonzeit-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.schonzeit-toggle-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* Schonzeit row — editorial style */
.schonzeit-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-left: 3px solid var(--border);
    border-radius: 0 6px 6px 0;
    background: var(--card-2, var(--card-bg));
    margin-bottom: 8px;
    transition: all 0.15s;
    flex-direction: row;
}

.schonzeit-card.geschont {
    border-left-color: var(--primary);
}

.schonzeit-card.frei {
    border-left-color: var(--success);
}

.status-dot {
    display: none;
}

.schonzeit-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.schonzeit-status-icon {
    display: none;
}

.schonzeit-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.schonzeit-fish-name {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.schonzeit-fish-latin {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: normal;
    margin-top: 2px;
}

.schonzeit-card-details {
    display: flex;
    gap: 0;
    margin-top: 0;
    padding-left: 0;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    flex-direction: column;
}

/* Badge for geschont/frei status */
.schonzeit-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-left: auto;
}

.schonzeit-card.geschont .schonzeit-badge {
    background: var(--primary-bg);
    color: var(--primary);
}

.schonzeit-card.frei .schonzeit-badge {
    background: rgba(47, 143, 91, 0.12);
    color: var(--success);
}

.schonzeit-edit-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    color: var(--text-muted);
    transition: all 0.15s;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.schonzeit-edit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== FISH LEXICON ===== */
#fish-search { margin-bottom: 0.75rem; }

.fish-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.15s;
    cursor: pointer;
}

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

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

.fish-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.fish-latin {
    font-size: 0.72rem;
    font-style: italic;
    color: var(--text-muted);
}

.fish-card-expand {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.fish-card.expanded .fish-card-expand {
    transform: rotate(180deg);
}

.fish-card-body {
    display: none;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

.fish-card.expanded .fish-card-body { display: block; }
.fish-card.expanded { grid-column: 1 / -1; }

.fish-img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.03);
}

.fish-detail {
    display: flex;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

.fish-detail-label {
    font-weight: 600;
    width: 90px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.fish-detail-value { flex: 1; }

/* ===== GEAR ===== */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.gear-progress {
    margin-bottom: 0.75rem;
}

.gear-progress-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.gear-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.gear-progress-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: right;
}

.gear-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.gear-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 0.6rem;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.gear-name {
    flex: 1;
    font-size: 0.88rem;
}

.gear-item.checked .gear-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.gear-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    opacity: 0.3;
    transition: opacity 0.15s;
}

.gear-remove:hover { opacity: 0.6; }
.gear-remove:active { opacity: 1; }

.gear-category {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gear-category:last-child {
    margin-bottom: 0;
}

.gear-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.gear-category-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gear-category-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.gear-category .gear-item {
    padding: 0.5rem 0.75rem;
}

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

.gear-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ===== WEATHER DETAIL ===== */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.weather-item {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.weather-item-value { font-size: 1rem; font-weight: 700; color: var(--primary); }
.weather-item-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ===== UTILITIES ===== */
.info-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem 0.5rem;
    font-size: 0.85rem;
}

.toast {
    position: fixed;
    bottom: calc(5rem + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--text);
    color: var(--bg);
    padding: 13px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 800;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== LEAFLET OVERRIDES ===== */
.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    border-radius: 10px !important;
}

.leaflet-control-zoom {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: var(--shadow) !important;
    border: none !important;
}

.spot-popup {
    text-align: center;
}

.spot-popup h4 {
    margin-bottom: 0.25rem;
    color: var(--text);
}

.spot-popup p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.spot-popup button {
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ===== DESKTOP TWO-COL HELPER ===== */
.desktop-two-col,
.dashboard-grid {
    display: block;
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .desktop-two-col {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 22px;
    }
    .dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }
    .desktop-two-col > .card,
    .dashboard-grid > .card {
        margin-bottom: 0;
    }
}

/* ===== RESPONSIVE: Mobile ===== */
@media (max-width: 860px) {
    .page-title { font-size: 28px; }
    .hero { min-height: 0; flex-direction: column; }
    .hero h1.disp, .hero-text h1 { font-size: 44px !important; }
    .hero-text { padding: 22px; gap: 18px; }
    .statband { padding: 16px 0; }
    .statcell { padding: 0 14px; }
    .statcell .stat-number, .stat-number { font-size: 26px; }
    .statcell .stat-label, .stat-label { font-size: 9px; }
    .grid-2, .grid-2b, .desktop-two-col { display: block !important; }
}

/* ===== RESPONSIVE: Small phones ===== */
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .card-split {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== RESPONSIVE: Tablet ===== */
@media (min-width: 768px) {
    main {
        max-width: 900px;
        margin: 0 auto;
        padding: 1.25rem;
    }

    #map { height: 60vh; }

    .stats-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem 0.6rem;
    }

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

    .desktop-two-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .desktop-two-col > .card {
        margin-bottom: 0;
    }

    .dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .dashboard-grid > .card {
        margin-bottom: 0;
    }

    .card {
        padding: 1.25rem;
    }

    .header-logo {
        width: 48px;
        height: 48px;
    }

    header h1 {
        font-size: 1.4rem;
    }
}

/* ===== RESPONSIVE: Desktop ===== */
@media (min-width: 1024px) {
    /* Show topnav, hide bottom nav and mobile header brand */
    body {
        flex-direction: column;
    }

    #sidebar {
        display: flex;
    }

    #bottom-nav {
        display: none;
    }

    .header-brand {
        display: none;
    }

    header {
        display: none;
    }

    main {
        max-width: 1180px;
        margin: 0 auto;
        width: 100%;
        padding: 30px 30px 2rem;
    }

    .stats-grid {
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

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

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

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

    /* Map tab: side-by-side layout on desktop */
    .map-layout {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 1rem;
        align-items: start;
    }

    .map-layout .card-map {
        min-height: 0;
    }

    .map-layout .card-map #map {
        height: clamp(400px, 60vh, 600px);
        aspect-ratio: 16 / 10;
    }

    .map-sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    .card {
        padding: 1.35rem;
        border-radius: 16px;
    }

    .card h2 {
        font-size: 1.05rem;
    }

    .toast {
        bottom: 2rem;
    }

    /* Fish lexicon grid on desktop */
    #fish-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Dashboard grid uses full width */
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Community: full-width layout on desktop */
    #community {
        max-width: none;
    }

    #community-catches {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 0.75rem;
    }

    #community-spots-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 0.75rem;
    }

    #forum-posts-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 0.75rem;
    }

    .community-feed-card {
        margin-bottom: 0;
    }

    .community-feed-photo {
        max-height: 400px;
    }
}

/* ===== AUTH HEADER BUTTON ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-header-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

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

.auth-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-login-icon, .auth-login-text {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== SIDEBAR AUTH ===== */
.sidebar-auth {
    margin-left: auto;
    padding: 0;
    border-top: none;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.sidebar-auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s;
    text-align: left;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-auth-btn:hover {
    background: transparent;
    color: var(--text);
}

.sidebar-auth-btn .auth-avatar {
    width: 38px;
    height: 38px;
    font-size: 13px;
}

.sidebar-auth-btn .auth-name {
    flex: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loc-pill {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* ===== AUTH MODAL ===== */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.auth-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.auth-modal.show .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.15s;
}

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

.auth-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

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

.auth-error {
    background: rgba(214, 48, 49, 0.08);
    color: var(--danger);
    border: 1px solid rgba(214, 48, 49, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.profile-email {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===== SHARING TOGGLE ===== */
.share-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.15rem 0.4rem;
    color: var(--text-muted);
    transition: all 0.15s;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.share-toggle:hover { border-color: var(--primary); color: var(--primary); }
.share-toggle.shared { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

.shared-badge {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* ===== COMMUNITY ===== */

/* Community Sub-Tabs */
.community-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 22px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--border);
}

.community-tab {
    flex: none;
    padding: 0 0 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.community-tab:hover {
    color: var(--text-secondary);
    background: transparent;
}

.community-tab.active {
    background: transparent;
    color: var(--text);
    box-shadow: none;
}

.community-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
}

.community-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.community-panel.active {
    display: block;
}

/* Community Feed Cards (Editorial photo-overlay style) */
.community-feed-card {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    overflow: hidden;
    break-inside: avoid;
}

.cfeed-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--header-bg);
}

.cfeed-photo > img,
.cfeed-ph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cfeed-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
}

.cfeed-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 3px;
}

.cfeed-overlay {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
}

.cfeed-weight {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-size: 34px;
    line-height: 1;
    color: #fff;
}

.cfeed-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cfeed-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cfeed-author {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.cfeed-spot {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfeed-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
}

.cfeed-meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfeed-petri {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    flex-shrink: 0;
}

.cfeed-foot .mod-delete-catch {
    margin-left: 0;
    flex-shrink: 0;
}

/* Legacy community items (spots etc.) */
.community-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

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

.community-author {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
}

.community-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== FORUM ===== */
.forum-post {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: border-color 0.15s;
}

.forum-post.expanded {
    border-color: var(--primary);
}

.forum-post-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.forum-post-header:hover {
    background: rgba(255,255,255,0.02);
}

.forum-post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.forum-post-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
}

.forum-post-meta {
    flex: 1;
    min-width: 0;
}

.forum-post-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-post.expanded .forum-post-title {
    white-space: normal;
}

.forum-post-info {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.forum-post-body {
    padding: 0 0.75rem 0.65rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
    margin: 0 0.75rem;
    padding-left: 0;
    padding-right: 0;
    white-space: pre-wrap;
}

.forum-replies {
    padding: 0 0.75rem 0.5rem;
}

.forum-reply {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
}

.forum-reply-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.forum-reply-author {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-primary);
}

.forum-reply-date {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.forum-reply-body {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 28px;
    white-space: pre-wrap;
}

.forum-reply-header .btn-sm {
    margin-left: auto;
}

.forum-reply-form {
    padding: 0.5rem 0.75rem 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.forum-reply-input {
    flex: 1;
    min-height: 36px;
    resize: vertical;
}

.forum-reply-submit {
    white-space: nowrap;
}

/* ===== KNOTENDATENBANK ===== */
.knoten-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.knoten-filter-btn {
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.15s;
}

.knoten-filter-btn:hover {
    color: var(--text-secondary);
    border-color: var(--primary);
}

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

.knoten-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s;
    overflow: hidden;
}

.knoten-card:hover {
    border-color: var(--primary);
}

.knoten-card.expanded {
    border-color: var(--primary);
}

.knoten-card-header {
    padding: 0.65rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.knoten-card-title {
    flex: 1;
    min-width: 0;
}

.knoten-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.knoten-en {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.knoten-badges {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.knoten-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    white-space: nowrap;
}

.knoten-badge.cat {
    background: rgba(26, 138, 110, 0.12);
    color: var(--primary);
}

.knoten-badge.strength {
    background: rgba(0, 184, 148, 0.12);
    color: var(--accent);
}

.knoten-badge.diff {
    color: #f0932b;
    background: rgba(240, 147, 43, 0.1);
    letter-spacing: 1px;
}

.knoten-use {
    padding: 0 0.75rem 0.65rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.knoten-steps {
    border-top: 1px solid var(--border);
    padding: 0.75rem;
    background: rgba(0,0,0,0.1);
}

.knoten-steps-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.knoten-steps-list {
    margin: 0;
    padding-left: 1.3rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.knoten-steps-list li {
    margin-bottom: 0.2rem;
}

/* Sync indicator */
.sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.sync-badge.offline {
    background: rgba(214, 48, 49, 0.08);
    color: var(--danger);
}

/* ===== RESPONSIVE: Wide Desktop (16:9) ===== */
@media (min-width: 1400px) {
    #sidebar {
        width: 100%;
    }

    main {
        max-width: none;
        padding: 2rem 3rem;
    }

    .stats-grid {
        gap: 1.25rem;
    }

    .stat-card {
        padding: 1.4rem 1.25rem;
    }

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

    .quick-nav {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .desktop-two-col {
        gap: 1rem;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .map-layout .card-map #map {
        height: clamp(450px, 60vh, 650px);
    }

    .map-layout {
        grid-template-columns: 1fr 380px;
    }

    /* Fish lexicon 3-col on very wide screens */
    #fish-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===== PROFILE AVATAR UPLOAD ===== */
.profile-avatar-wrapper {
    position: relative;
    width: 80px;
    margin: 0.5rem auto 0.25rem;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-upload {
    position: absolute;
    bottom: 0;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.15s;
}

.profile-avatar-upload:hover {
    background: var(--primary-dark);
}

.avatar-edit-icon {
    font-style: normal;
    line-height: 1;
}

/* ===== PROFILE CATCHES SECTION ===== */
.profile-catches-section {
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.profile-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.profile-catch-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.profile-catch-photo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* ===== CATCH PHOTO UPLOAD ===== */
.photo-upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}

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

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.photo-upload-icon {
    font-size: 1.5rem;
}

.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0.2rem;
    box-shadow: var(--shadow);
}

.admin-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.55rem 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.admin-tab.active {
    background: var(--accent);
    color: white;
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.admin-filter-row {
    display: flex;
    gap: 0.5rem;
}

.admin-filter-row select {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    font-family: inherit;
}

/* Admin Feedback Item */
.admin-feedback-item {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: var(--bg);
}

.admin-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.admin-feedback-type {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.admin-feedback-type.bug {
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
}

.admin-feedback-type.feature {
    background: rgba(26, 138, 110, 0.1);
    color: var(--primary);
}

.admin-feedback-type.other {
    background: rgba(224, 138, 46, 0.1);
    color: var(--accent);
}

.admin-feedback-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.admin-feedback-subject {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.admin-feedback-message {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.admin-feedback-author {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.admin-feedback-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

/* Admin User Item */
.admin-user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

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

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.admin-user-role {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.admin-user-role.admin {
    background: rgba(224, 138, 46, 0.1);
    color: var(--accent);
}

.admin-user-role.moderator {
    background: rgba(26, 138, 110, 0.1);
    color: var(--primary);
}

.admin-user-role.user {
    background: var(--bg);
    color: var(--text-muted);
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-role-select {
    font-size: 0.72rem;
    padding: 0.15rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    font-family: inherit;
    cursor: pointer;
}

.admin-ban-btn {
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: none;
    color: var(--accent);
    text-transform: uppercase;
}

.admin-ban-btn.unban {
    color: var(--success);
    border-color: var(--success);
}

.admin-delete-btn {
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--danger);
    background: none;
    color: var(--danger);
    text-transform: uppercase;
}

.admin-user-item.banned {
    opacity: 0.6;
}

.banned-badge {
    display: inline-block;
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.05rem 0.3rem;
    border-radius: 6px;
    margin-left: 0.25rem;
    text-transform: uppercase;
}

.mod-delete-catch,
.mod-delete-spot {
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--danger);
    background: none;
    color: var(--danger);
    flex-shrink: 0;
    text-transform: uppercase;
}

/* ===== CATCH THUMBNAIL ===== */
.catch-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* ===== SPOT EDIT BUTTON ===== */
.spot-edit-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    color: var(--text-muted);
    transition: all 0.15s;
    flex-shrink: 0;
}

.spot-edit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== SPOT DETAIL FORM ===== */
#spot-detail-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spot-info-badge {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    margin-left: 0.3rem;
}

.spot-detail-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ===== GEAR TABS ===== */
.gear-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 22px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border);
}

.gear-tab {
    flex: none;
    background: transparent;
    border: none;
    padding: 0 0 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    border-radius: 0;
    transition: color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.gear-tab.active {
    background: transparent;
    color: var(--text);
}

.gear-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
}

.gear-panel {
    display: none;
}

.gear-panel.active {
    display: block;
}

/* ===== MY GEAR ===== */
.my-gear-section {
    margin-bottom: 1rem;
}

.my-gear-cat-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}

.my-gear-add-form {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.65rem;
    margin-top: 0.35rem;
}

.my-gear-add-form label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
    display: block;
}

.my-gear-add-form input,
.my-gear-add-form select {
    font-size: 0.78rem;
    padding: 0.3rem 0.4rem;
}

.my-gear-add-form .form-row {
    margin-bottom: 0.35rem;
}

.my-gear-add-form .btn-primary {
    margin-top: 0.35rem;
}

.my-gear-specs {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.my-gear-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}

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

.my-gear-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
    line-height: 1;
}

/* ===== GEAR RECOMMENDATION ===== */
#gear-recommendation .recommend-card {
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-top: 0.5rem;
}

#gear-recommendation .recommend-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#gear-recommendation .recommend-section {
    margin-bottom: 0.5rem;
}

#gear-recommendation .recommend-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

#gear-recommendation .recommend-item {
    font-size: 0.82rem;
    padding: 0.2rem 0;
    color: var(--text);
}

#gear-recommendation .recommend-item.match {
    color: var(--success);
    font-weight: 600;
}

#gear-recommendation .recommend-item.missing {
    color: var(--text-muted);
    font-style: italic;
}

#gear-recommendation .recommend-warning {
    background: rgba(224, 138, 46, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--accent);
}

/* ===== FEEDBACK BUTTON ===== */
.feedback-fab {
    position: fixed;
    bottom: calc(70px + var(--safe-bottom));
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(224, 138, 46, 0.3);
    z-index: 90;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.feedback-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(224, 138, 46, 0.4);
}

@media (min-width: 900px) {
    .feedback-fab {
        bottom: 24px;
        right: 24px;
    }
}

/* ===== Ultra-Wide Desktop ===== */
@media (min-width: 1920px) {
    main {
        padding: 2rem 4rem;
    }

    .stats-grid {
        gap: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem 1.5rem;
    }

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

    .card {
        padding: 1.75rem;
    }

    .card h2 {
        font-size: 1.15rem;
    }
}

/* ===== Legal Pages (Impressum, DSGVO) ===== */
.legal-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.legal-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.legal-card p,
.legal-card li {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.legal-card ul {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-card li {
    margin-bottom: 0.25rem;
}

.legal-card a {
    color: var(--primary);
    text-decoration: underline;
}

.legal-card .btn-secondary {
    margin-top: 2rem;
}

.legal-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

/* App Footer — inside #app-container, not fixed */
.app-footer {
    text-align: center;
    padding: 0.45rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}


.app-footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 1rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.app-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.app-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.app-footer-sep {
    font-size: 0.6rem;
}

/* ===== Account Settings ===== */
.settings-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0.5rem auto 1rem;
}

.settings-avatar-wrapper .profile-avatar-large {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.profile-name-display {
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.danger-zone {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1.5px solid var(--danger);
    border-radius: var(--radius-sm);
    background: rgba(214, 48, 49, 0.04);
}

.danger-title {
    color: var(--danger);
    margin-top: 0;
}

.btn-danger {
    display: block;
    width: 100%;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--danger);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Desktop: footer neben sidebar */
@media (min-width: 769px) {
    .app-footer {
        left: 0;
        bottom: 0;
    }
}

/* Mobile: footer über bottom-nav */
@media (max-width: 768px) {
    .app-footer {
        bottom: calc(3.2rem + var(--safe-bottom));
    }
}
