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

:root {
    --primary: #1a8a6e;
    --primary-light: #22b892;
    --primary-dark: #0d5c4a;
    --primary-bg: rgba(26, 138, 110, 0.08);
    --accent: #e08a2e;
    --accent-light: #f5d9b3;
    --accent-bg: rgba(224, 138, 46, 0.08);
    --bg: #f5f7f9;
    --card-bg: #ffffff;
    --text: #1a2433;
    --text-secondary: #526070;
    --text-muted: #8d9bab;
    --border: #e4e9ef;
    --danger: #d63031;
    --success: #00b894;
    --sidebar-bg: #0a1a2e;
    --sidebar-hover: #122a44;
    --sidebar-active: #1a3a58;
    --header-bg: #0d2240;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 8px rgba(10, 26, 46, 0.05);
    --shadow-lg: 0 8px 32px rgba(10, 26, 46, 0.1);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
    font-family: 'Rajdhani', -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;
}

/* ===== 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;
}

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

.login-gate-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #050d1a 0%, #0a1e3d 30%, #0d3555 55%, #0a2e1f 80%, #071510 100%);
    z-index: 0;
}

.login-gate-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(26, 138, 110, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(20, 53, 96, 0.15) 0%, transparent 50%);
    animation: gateShimmer 12s ease-in-out infinite alternate;
}

@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: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.login-gate-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-gate-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    margin-bottom: 0.75rem;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.login-gate-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.login-gate-subtitle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    font-weight: 500;
}

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

.gate-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
}

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

.gate-input-group input:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 184, 146, 0.15);
}

.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: 0.8rem;
    margin-top: 0.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(26, 138, 110, 0.3);
}

.gate-btn:hover {
    box-shadow: 0 6px 24px rgba(26, 138, 110, 0.4);
    transform: translateY(-1px);
}

.gate-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(26, 138, 110, 0.2);
}

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

/* Gate divider */
.gate-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    gap: 0.75rem;
}

.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: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.gate-switch a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
    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;
}

/* ===== SIDEBAR (Desktop) ===== */
#sidebar {
    display: none;
    width: 240px;
    background: var(--sidebar-bg);
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    background: #ffffff;
}

.sidebar-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.25rem;
}

.snav-btn {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
    text-align: left;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.snav-btn:hover {
    background: var(--sidebar-hover);
    color: rgba(255, 255, 255, 0.85);
}

.snav-btn.active {
    background: var(--sidebar-active);
    color: #fff;
}

/* snav-icon removed – text only navigation */

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

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--header-bg) 0%, #143560 50%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 50;
}

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

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

.header-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

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: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.location-badge:hover {
    background: rgba(255, 255, 255, 0.18);
}

.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 rgba(255, 255, 255, 0.1);
}

.hw-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    opacity: 0.85;
}

.hw-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}
.hw-val { font-weight: 600; }

/* ===== MAIN SCROLLABLE AREA ===== */
main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    padding-bottom: calc(5.5rem + 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(--card-bg);
    border-top: 1px solid var(--border);
    padding: 0.4rem 0.25rem;
    padding-bottom: calc(0.4rem + var(--safe-bottom));
    z-index: 100;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
}

.bnav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
}

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

.bnav-btn.active {
    color: var(--primary);
}

.bnav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* ===== 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: var(--radius);
    padding: 1.1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.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;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
}

.stat-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

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

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

.quick-nav-btn:active {
    background: var(--primary-bg);
    transform: scale(0.97);
}

.qnav-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qnav-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

/* ===== MAP BUTTONS ===== */
.btn-map {
    padding: 0.4rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

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

/* ===== 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: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text);
    background: var(--card-bg);
    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: 0.4rem 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

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

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

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    box-shadow: 0 4px 12px rgba(26, 138, 110, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 138, 110, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 6px rgba(26, 138, 110, 0.2);
}

.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: 0.45rem 0.9rem;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.btn-secondary:active {
    background: var(--primary);
    color: white;
}

.btn-chip {
    padding: 0.35rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

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

/* ===== 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; }

/* ===== 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-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: 0.25rem;
    margin-bottom: 0.75rem;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    border: 1px solid var(--border);
}

.wissen-tab {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.wissen-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 138, 110, 0.2);
}

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

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

/* ===== SCHONZEITEN TAB ===== */
.schonzeit-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg);
    border-radius: 8px;
    padding: 0.2rem;
}

.schonzeit-toggle-btn {
    flex: 1;
    padding: 0.45rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

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

.schonzeit-toggle-btn.active {
    background: var(--card-bg);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.schonzeit-card {
    display: flex;
    flex-direction: column;
    padding: 0.65rem 0.75rem;
    border-left: 4px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    margin-bottom: 0.4rem;
    transition: all 0.15s;
}

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

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

.schonzeit-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schonzeit-status-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}

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

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

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

.schonzeit-card-details {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
    padding-left: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.schonzeit-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
    opacity: 0.5;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.schonzeit-edit-btn:hover {
    opacity: 1;
}

/* ===== 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(100px);
    background: var(--header-bg);
    color: white;
    padding: 0.65rem 1.3rem;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 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;
}

/* ===== 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 sidebar, hide bottom nav and mobile header brand */
    #sidebar {
        display: flex;
    }

    #bottom-nav {
        display: none;
    }

    .header-brand {
        display: none;
    }

    header {
        padding: 0.6rem 2rem;
    }

    .header-content {
        max-width: 1400px;
    }

    .header-weather {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .header-top {
        justify-content: flex-end;
    }

    .header-weather {
        gap: 1.5rem;
    }

    .hw-item {
        font-size: 0.85rem;
    }

    main {
        max-width: none;
        padding: 1.5rem 2.5rem;
        padding-bottom: 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;
    }
}

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

.auth-header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.auth-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    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-top: auto;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-auth-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
    text-align: left;
}

.sidebar-auth-btn:hover {
    background: var(--sidebar-hover);
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-auth-btn .auth-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.sidebar-auth-btn .auth-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    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-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;
}

/* 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: 260px;
    }

    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: 0;
    margin-bottom: 0.75rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0.2rem;
    box-shadow: var(--shadow);
}

.gear-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;
}

.gear-tab.active {
    background: var(--primary);
    color: white;
}

.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: 220px;
        bottom: 0;
    }
}

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