﻿/* Home-specific card grid for centered layout */
.proteus-home-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}
/* ─── OnlineStatus Component ───────────────────────── */
.online-status {
    color: var(--proteus-text);
    font-size: 0.8rem;
    font-weight: 500;
    gap: 0.5rem;
}
.status-dot {
    width: 0.85em;
    height: 0.85em;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.2em;
    box-shadow: 0 0 4px rgba(0,0,0,0.12);
}
.status-dot.online {
    background-color: var(--proteus-success);
    border: 1.5px solid var(--proteus-success);
}
.status-dot.offline {
    background-color: var(--proteus-danger);
    border: 1.5px solid var(--proteus-danger);
}

/* ─── Offline Mode Indicator ───────────────────────── */
.proteus-offline-indicator {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
    max-width: 90%;
    width: auto;
}

.proteus-offline-indicator.visible {
    transform: translateX(-50%) translateY(0);
}

.proteus-offline-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.proteus-offline-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.proteus-offline-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.proteus-offline-text strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.proteus-offline-subtext {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Sync status badge */
.proteus-sync-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.proteus-sync-badge .proteus-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--proteus-accent);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Online-only feature indicator */
.proteus-online-only {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.proteus-online-only::after {
    content: "Online Only";
    position: absolute;
    top: -20px;
    right: 0;
    background: var(--proteus-muted);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.proteus-online-only:hover::after {
    opacity: 1;
}

/* ─── Home Page Hero & Card ────────────────────────── */
.proteus-hero-banner {
    width: 100%;
    background-image: url(../images/05_home.jpg);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.10);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* min-height: 400px; */
    border-radius: 8px;
    border: 1px solid var(--proteus-border);
}
.proteus-hero-overlay {
    /* min-height: 400px; */
    width: 100%;
    /* height: 100%; */
    position: relative;
    backdrop-filter: blur(2px) brightness(.5);
    border-radius: 8px;
}
.proteus-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.proteus-hero-logo {
    height: 72px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 12px rgba(0,180,216,0.35));
}
.proteus-hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}
.proteus-hero-subtitle {
    color: var(--proteus-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.proteus-home-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    z-index: 1;
    position: relative;
}
.proteus-home-card {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: stretch;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.10);
    padding: 2.5rem 2.5rem 2.5rem 2rem;
}
.proteus-home-image-wrapper {
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--proteus-surface-2);
    border-radius: 8px;
    overflow: hidden;
    min-height: 220px;
    max-height: 320px;
    margin-right: 1.5rem;
}
.proteus-home-image {
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.10);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.proteus-home-details {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
}
.proteus-home-title {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 2rem;
    color: var(--proteus-text);
    margin-bottom: 0.5rem;
}
.proteus-home-desc {
    color: var(--proteus-muted);
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
}
@media (max-width: 900px) {
    .proteus-home-card {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.2rem;
        gap: 1.5rem;
    }
    .proteus-home-image-wrapper {
        margin-right: 0;
        margin-bottom: 1.2rem;
        min-width: 180px;
        max-width: 100%;
    }
}
/* ─── DiveDetails Page Hero & Card ────────────────────────── */
.proteus-divedetails-hero-banner {
    width: 100%;
    background-image: url(../images/01_home.jpg);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.10);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* min-height: 400px; */
    border-radius: 8px;
    border: 1px solid var(--proteus-border);
}
.proteus-divedetails-hero-overlay {
    /* min-height: 400px; */
    width: 100%;
    /* height: 100%; */
    position: relative;
    backdrop-filter: blur(2px) brightness(.5);
    border-radius: 8px;
}
.proteus-divedetails-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.proteus-divedetails-hero-logo {
    height: 72px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 12px rgba(0,180,216,0.35));
}
.proteus-divedetails-hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}
.proteus-divedetails-hero-subtitle {
    color: var(--proteus-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.proteus-divedetails-main {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    z-index: 1;
    position: relative;
    flex-direction: column;
}
.proteus-divedetails-card {    
    flex: 1 1 320px;
    max-width: 1200px;
    min-width: 260px;
    margin-bottom: 1rem;
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 8px;
    padding: 1.25rem;
}
.proteus-divedetails-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
}
/* Make card sizing configurable via CSS variable.
   Set `--proteus-divedetails-card-basis` to control column width (e.g. 48% or 100%). */
:root {
    --proteus-divedetails-card-basis: 100%;
}
.proteus-divedetails-card {
    box-sizing: border-box;
    /* Use variable for flex-basis so width can be adjusted in one place */
    flex: 1 1 var(--proteus-divedetails-card-basis);
    max-width: 100%;
}
@media (max-width: 900px) {
    :root { --proteus-divedetails-card-basis: 100%; }
}
.proteus-divedetails-image-wrapper {
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--proteus-surface-2);
    border-radius: 8px;
    overflow: hidden;
    min-height: 220px;
    max-height: 320px;
    margin-right: 1.5rem;
}
.proteus-divedetails-image {
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.10);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.proteus-divedetails-details {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
}
.proteus-divedetails-title {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 2rem;
    color: var(--proteus-text);
    margin-bottom: 0.5rem;
}
.proteus-divedetails-desc {
    color: var(--proteus-muted);
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
}

.proteus-survey-point-card {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.proteus-survey-point-card:hover {
    border-color: var(--proteus-accent);
    box-shadow: 0 0 0 1px rgba(0, 180, 216, 0.25);
}

.proteus-survey-point-card.selected {
    border-color: var(--proteus-accent);
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.4), 0 6px 18px rgba(0, 180, 216, 0.18);
    transform: translateY(-1px);
}

.proteus-survey-point-card:focus-visible {
    outline: 2px solid var(--proteus-accent);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .proteus-divedetails-card {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.2rem;
        gap: 1.5rem;
    }
    .proteus-divedetails-image-wrapper {
        margin-right: 0;
        margin-bottom: 1.2rem;
        min-width: 180px;
        max-width: 100%;
    }
}
/* =====================================================
   Proteus Exploration - App Theme
   Modern, minimal. Inspired by technical diving.
===================================================== */

@font-face {
    font-family: 'ProteusFont';
    src: url('/fonts/Popsky.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ExplorationFont';
    src: url('/fonts/Ailerons-Typeface.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --proteus-bg:         #0d1117;
    --proteus-surface:    #161b22;
    --proteus-surface-2:  #1e2530;
    --proteus-border:     #2a3140;
    --proteus-accent:     #00b4d8;
    --proteus-accent-dim: #0096b4;
    --proteus-text:       #e6edf3;
    --proteus-muted:      #8b949e;
    --proteus-danger:     #cf6679;
    --proteus-success:    #3fb950;
    --proteus-nav-height: 56px;
}

html, body {
    background-color: var(--proteus-bg);
    color: var(--proteus-text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { color: var(--proteus-text); }
h1:focus { outline: none; }

a { color: var(--proteus-accent); text-decoration: none; }
a:hover { color: var(--proteus-accent-dim); text-decoration: underline; }

.btn-primary {
    background-color: var(--proteus-accent);
    border-color: var(--proteus-accent);
    color: var(--proteus-text);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--proteus-accent-dim);
    border-color: var(--proteus-accent-dim);
    color: var(--proteus-text);
}
.btn-outline-secondary {
    border-color: var(--proteus-border);
    color: var(--proteus-muted);
}
.btn-outline-secondary:hover {
    background-color: var(--proteus-surface-2);
    color: var(--proteus-text);
    border-color: var(--proteus-border);
}
.btn-link { color: var(--proteus-accent); }
.btn-link:hover { color: var(--proteus-accent-dim); }

.form-control, .form-select {
    background-color: var(--proteus-surface-2);
    border-color: var(--proteus-border);
    color: var(--proteus-text);
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
}
.form-control:focus, .form-select:focus {
    background-color: var(--proteus-surface-2);
    border-color: var(--proteus-accent);
    color: var(--proteus-text);
    box-shadow: 0 0 0 0.15rem rgba(0, 180, 216, 0.25);
}
.form-select:disabled {
    cursor: not-allowed;
}
.form-control::placeholder { color: var(--proteus-muted); }
.form-label {
    color: var(--proteus-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table {
    --bs-table-bg: var(--proteus-surface);
    --bs-table-striped-bg: var(--proteus-surface-2);
    --bs-table-hover-bg: var(--proteus-surface-2);
    --bs-table-border-color: var(--proteus-border);
    --bs-table-color: var(--proteus-text);
    font-size: 0.9rem;
}
.table thead th {
    color: var(--proteus-muted);
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-bottom-color: var(--proteus-border);
}

.alert-danger {
    background-color: rgba(207, 102, 121, 0.15);
    border-color: var(--proteus-danger);
    color: var(--proteus-danger);
}
.alert-info {
    background-color: rgba(0, 180, 216, 0.1);
    border-color: var(--proteus-accent);
    color: var(--proteus-accent);
}
.alert-success {
    background-color: rgba(63, 185, 80, 0.1);
    border-color: var(--proteus-success);
    color: var(--proteus-success);
}

/* Top navbar */
.proteus-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--proteus-nav-height);
    background-color: var(--proteus-surface);
    border-bottom: 1px solid var(--proteus-border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    z-index: 1030;
    gap: 0.5rem;
}

.proteus-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    white-space: nowrap;
}
.proteus-brand-logo {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}
.proteus-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    line-height: 0.9;
}
.proteus-brand-name {
    font-family: 'ProteusFont', sans-serif;
    font-size: 1.35rem;
    color: var(--proteus-text);
    letter-spacing: 0.05em;
    text-shadow: rgba(255,255,255,0.15) 1px 1px 1px, rgba(0,0,0,0.4) -1px -1px 1px;
}
.proteus-brand-sub {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 0.6rem;
    color: var(--proteus-muted);
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.proteus-brand-h2 {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 1.6rem;
    color: var(--proteus-muted);
    text-transform: uppercase;
}

.proteus-nav-links {
    display: flex;
    gap: 0.1rem;
    flex: 1;
    padding: 0 1rem;
}
.proteus-nav-link {
    color: var(--proteus-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    text-decoration: none !important;
    transition: color 0.15s, background 0.15s;
}
.proteus-nav-link:hover, .proteus-nav-link.active {
    color: var(--proteus-text);
    background-color: var(--proteus-surface-2);
}

.proteus-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.proteus-icon-btn {
    background: none;
    border: none;
    color: var(--proteus-muted);
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    /* font-size: 1.1rem; */
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.proteus-icon-btn:hover {
    color: var(--proteus-text);
    background-color: var(--proteus-surface-2);
}

.proteus-dropdown { position: relative; }
.proteus-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 180px;
    background-color: var(--proteus-surface-2);
    border: 1px solid var(--proteus-border);
    border-radius: 6px;
    padding: 0.4rem 0;
    z-index: 1040;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.proteus-dropdown-menu a,
.proteus-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: var(--proteus-text);
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
}
.proteus-dropdown-menu a:hover,
.proteus-dropdown-menu button:hover {
    background-color: var(--proteus-border);
}
.proteus-dropdown-divider {
    border-top: 1px solid var(--proteus-border);
    margin: 0.3rem 0;
}
.proteus-dropdown-header {
    padding: 0.4rem 1rem 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--proteus-muted);
}

/* Content shell */
.proteus-content-shell {
    padding-top: var(--proteus-nav-height);
    min-height: 100vh;
}
.proteus-content {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .proteus-content {
        padding: 1rem 1rem;
        max-width: none;
    }
    .proteus-brand-text {
        display: none !important;
    }
    .proteus-view-toggle {
        display: none !important;
    }
    .btn-primary.add-btn-mobile {
        padding: 0.35rem 0.7rem;
        font-size: 0.95rem;
        min-width: 0;
        float: right;
        margin-left: auto;
        margin-right: 0;
        display: block;
    }
}

/* Auth / Login page */
.proteus-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--proteus-bg);
    padding: 1.5rem;
}
.proteus-auth-card {
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}
.proteus-auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.proteus-auth-logo img {
    height: 64px;
    width: auto;
    filter: drop-shadow(0 0 12px rgb(253, 236, 1));
}
.proteus-auth-logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}
.proteus-auth-logo-name {
    font-family: 'ProteusFont', sans-serif;
    font-size: 2rem;
    color: var(--proteus-text);
    letter-spacing: 0.08em;
    text-shadow: rgba(255,255,255,0.15) 1px 1px 1px, rgba(0,0,0,0.4) -1px -1px 1px;
}
.proteus-auth-logo-sub {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 1rem;
    color: var(--proteus-muted);
    letter-spacing: 0.4em;
    text-transform: uppercase;
}
.proteus-auth-subtitle {
    color: var(--proteus-muted);
    font-size: 0.82rem;
    text-align: center;
    margin-bottom: 2rem;
}

.proteus-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--proteus-border);
    margin-bottom: 1.75rem;
    gap: 0.5rem;
}
.proteus-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--proteus-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.proteus-tab.active {
    color: var(--proteus-accent);
    border-bottom-color: var(--proteus-accent);
}
.proteus-tab:hover:not(.active) {
    color: var(--proteus-text);
}

.proteus-tab-content {
    padding: 0.5rem 0;
}

/* Mobile optimizations for tabs */
@media (max-width: 767.98px) {
    .proteus-tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
    }
    .proteus-tab i {
        font-size: 1.1rem;
        margin-right: 0.25rem !important;
    }
}

/* ─── CaveMap Component Styles ───────────────────────── */
.cavemap-controls {
    background-color: var(--proteus-surface);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--proteus-border);
}

.cavemap-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 4px;
}

.cavemap-label {
    font-size: 0.85rem;
    color: var(--proteus-muted);
    font-weight: 500;
    white-space: nowrap;
}

.cavemap-slider {
    max-width: 120px;
}

.cavemap-speed-value {
    font-size: 0.8rem;
    color: var(--proteus-muted);
    min-width: 50px;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .cavemap-controls {
        padding: 0.5rem;
    }
    .cavemap-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .cavemap-slider {
        max-width: 80px;
    }
    .cavemap-label,
    .cavemap-speed-value {
        font-size: 0.75rem;
    }
}


.valid.modified:not([type=checkbox]) { outline: 1px solid var(--proteus-success); }
.invalid { outline: 1px solid var(--proteus-danger); }
.validation-message { color: var(--proteus-danger); font-size: 0.8rem; }

#blazor-error-ui {
    background: var(--proteus-surface-2);
    border-top: 1px solid var(--proteus-danger);
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: var(--proteus-danger);
}

/* ─── Bottom Navigation Bar (Mobile) ───────────────────────────── */
.proteus-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--proteus-surface);
    border-top: 1px solid var(--proteus-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
}
.proteus-bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--proteus-muted);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.2rem 0;
    border: none;
    background: none;
    transition: color 0.15s, background 0.15s;
}
.proteus-bottom-nav-item.active,
.proteus-bottom-nav-item:focus,
.proteus-bottom-nav-item:hover {
    color: var(--proteus-accent);
    background: var(--proteus-surface-2);
}
.proteus-bottom-nav-icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.1rem;
}
.proteus-bottom-nav-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}
@media (min-width: 768px) {
    .proteus-bottom-nav {
        display: none !important;
    }
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    background-color: #b32121;
    border-radius: 4px;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}
.loading-progress circle {
    fill: none;
    stroke: var(--proteus-border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--proteus-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--proteus-muted);
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* ─── Light theme overrides ──────────────────────────── */
[data-theme="light"] {
    --proteus-bg:         #f4f6f9;
    --proteus-surface:    #ffffff;
    --proteus-surface-2:  #eef1f5;
    --proteus-border:     #d0d7de;
    --proteus-accent:     #0085a3;
    --proteus-accent-dim: #006b87;
    --proteus-text:       #1c2128;
    --proteus-muted:      #57606a;
    --proteus-danger:     #c0392b;
    --proteus-success:    #2ea44f;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: var(--proteus-surface);
    border-color: var(--proteus-border);
    color: var(--proteus-text);
}
[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    background-color: var(--proteus-surface);
}

[data-theme="light"] .proteus-auth-logo img {
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.3));
}

[data-theme="light"] .proteus-brand-logo {
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
}

/* Smooth theme transition */
html, body, .proteus-topnav, .proteus-auth-card, .proteus-auth-shell,
.form-control, .form-select, .table, .proteus-dropdown-menu {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.15s ease;
}

/* ─── Avatar initials ────────────────────────────────── */
.proteus-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--proteus-accent);
    color: var(--proteus-text);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    line-height: 1;
}

/* ─── Notification bell badge ────────────────────────── */
.proteus-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.proteus-badge {
    position: absolute;
    top: -3px;
    right: 10px;
    background-color: var(--proteus-danger);
    color: #fff;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
}

/* ─── Card grid for Admin / Notifications ────────────── */
.proteus-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    align-items: stretch;
}

.proteus-card {
    flex: 1 1 320px;
    max-width: 370px;
    min-width: 260px;
    margin-bottom: 1rem;
}
.proteus-card {
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 8px;
    padding: 1.25rem;
}
.proteus-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.proteus-card-meta {
    color: var(--proteus-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

/* ─── View toggle button ─────────────────────────────── */
.proteus-view-toggle {
    display: flex;
    gap: 0.25rem;
}
.proteus-view-btn {
    background: none;
    border: 1px solid var(--proteus-border);
    border-radius: 4px;
    color: var(--proteus-muted);
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.proteus-view-btn.active,
.proteus-view-btn:hover {
    background-color: var(--proteus-surface-2);
    color: var(--proteus-text);
}

/* ─── Role badge ──────────────────────────────────────── */
.role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.role-badge-admin {
    background-color: rgba(0, 180, 216, 0.15);
    color: var(--proteus-accent);
}
.role-badge-user {
    background-color: rgba(139, 148, 158, 0.15);
    color: var(--proteus-muted);
}

/* ─── Inline edit panel ──────────────────────────────── */
.proteus-edit-panel {
    background-color: var(--proteus-surface-2);
    border: 1px solid var(--proteus-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ─── Hierarchical Survey Points ──────────────────────── */
.proteus-site-group {
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.proteus-site-header {
    background-color: var(--proteus-surface-2);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--proteus-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s;
}

.proteus-site-header:hover {
    background-color: var(--proteus-border);
}

/* Orphaned site styling */
.proteus-site-group.orphaned {
    border-color: var(--proteus-danger);
    border-width: 2px;
}

.proteus-site-group.orphaned .proteus-site-header {
    background-color: rgba(220, 53, 69, 0.1);
    border-bottom-color: var(--proteus-danger);
}

.proteus-site-group.orphaned .proteus-site-header:hover {
    background-color: rgba(220, 53, 69, 0.15);
}

.proteus-site-group.orphaned .proteus-site-title {
    color: var(--proteus-danger);
}

.proteus-site-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--proteus-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proteus-site-meta {
    color: var(--proteus-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.proteus-chevron {
    color: var(--proteus-muted);
    font-size: 0.9rem;
    transition: transform 0.2s;
    user-select: none;
}

.proteus-chevron.expanded {
    transform: rotate(90deg);
}

.proteus-site-content {
    padding: 1rem;
}

.proteus-dive-group {
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.proteus-dive-group:last-child {
    margin-bottom: 0;
}

.proteus-dive-header {
    background-color: rgba(0, 180, 216, 0.2);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--proteus-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s;
}

.proteus-dive-header:hover {
    background-color: rgba(0, 180, 216, 0.15);
}

.proteus-dive-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--proteus-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proteus-dive-meta {
    color: var(--proteus-muted);
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.proteus-dive-content {
    padding: 0.85rem;
}

.proteus-points-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.proteus-point-card {
    flex: 1 1 260px;
    max-width: 340px;
    min-width: 260px;
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 6px;
    padding: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.proteus-point-card:hover {
    border-color: var(--proteus-accent);
    box-shadow: 0 0 0 1px rgba(0, 180, 216, 0.25);
}

.proteus-orphan-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--proteus-border);
}

.proteus-orphan-header {
    color: var(--proteus-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Table view grouping */
.proteus-table-site-row {
    background-color: var(--proteus-surface-2);
    font-weight: 600;
    color: var(--proteus-text);
}

.proteus-table-site-row.orphaned {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid var(--proteus-danger);
}

.proteus-table-site-row.orphaned td {
    color: var(--proteus-danger);
}

.proteus-table-site-row.orphaned:hover td {
    background-color: rgba(220, 53, 69, 0.15);
}

.proteus-table-site-row td {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.proteus-table-site-row:hover td {
    background-color: var(--proteus-border);
}

.proteus-table-dive-row {
    background-color: rgba(0, 180, 216, 0.08);
    font-weight: 500;
    font-size: 0.9rem;
}

.proteus-table-dive-row td {
    padding: 0.6rem 1rem;
    padding-left: 2rem;
    cursor: pointer;
}

.proteus-table-dive-row:hover td {
    background-color: rgba(0, 180, 216, 0.15);
}

.proteus-table-point-row td {
    padding-left: 3rem;
}

@media (max-width: 767.98px) {
    .proteus-site-header,
    .proteus-dive-header {
        padding: 0.75rem 1rem;
    }

    .proteus-site-content,
    .proteus-dive-content {
        padding: 0.75rem;
    }

    .proteus-point-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ─── Confirm Dialog (Mobile-Friendly) ───────────────── */
.proteus-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.proteus-confirm-dialog {
    background-color: var(--proteus-surface);
    border: 1px solid var(--proteus-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: proteus-confirm-slide-in 0.2s ease-out;
}

@keyframes proteus-confirm-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proteus-confirm-message {
    color: var(--proteus-text);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.proteus-confirm-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.proteus-confirm-buttons .btn {
    flex: 1 1 auto;
    min-width: 80px;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .proteus-confirm-dialog {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }

    .proteus-confirm-message {
        font-size: 0.95rem;
    }

    .proteus-confirm-buttons {
        flex-direction: column-reverse;
    }

    .proteus-confirm-buttons .btn {
        width: 100%;
    }
}

/* ─── Orphaned Survey Points Styling ───────────────── */
/* Visual indicators for orphaned survey points (invalid DiveSiteId) */

.proteus-site-group.orphaned {
    border: 2px solid var(--proteus-danger);
    background-color: rgba(220, 53, 69, 0.05);
}

[data-theme="light"] .proteus-site-group.orphaned {
    background-color: rgba(220, 53, 69, 0.08);
}

.proteus-site-group.orphaned .proteus-site-header {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--proteus-danger);
    font-weight: 600;
}

[data-theme="light"] .proteus-site-group.orphaned .proteus-site-header {
    background-color: rgba(220, 53, 69, 0.15);
}

.proteus-table-site-row.orphaned {
    background-color: rgba(220, 53, 69, 0.1);
    font-weight: 600;
    color: var(--proteus-danger);
}

[data-theme="light"] .proteus-table-site-row.orphaned {
    background-color: rgba(220, 53, 69, 0.15);
}

.proteus-table-site-row.orphaned:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

/* ─── NotFound Page ───────────────────────── */
.proteus-notfound-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}

.proteus-notfound-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    width: 100%;
    gap: 1.5rem;
}

.proteus-notfound-logo {
    height: 80px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 16px rgba(0,180,216,0.4));
    animation: fadeInDown 0.6s ease-out;
}

.proteus-notfound-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
    animation: fadeInDown 0.8s ease-out;
}

.proteus-notfound-heading {
    font-family: 'ExplorationFont', sans-serif;
    font-size: 2rem;
    color: var(--proteus-text);
    margin: 0;
    letter-spacing: 0.1em;
    animation: fadeInUp 1s ease-out;
}

.proteus-notfound-text {
    color: var(--proteus-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    animation: fadeInUp 1.2s ease-out;
}

.proteus-notfound-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    animation: fadeInUp 1.4s ease-out;
    flex-wrap: wrap;
    justify-content: center;
}

.proteus-notfound-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--proteus-border);
    animation: fadeInUp 1.6s ease-out;
    flex-wrap: wrap;
    justify-content: center;
}

.proteus-notfound-link {
    color: var(--proteus-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.proteus-notfound-link:hover {
    color: var(--proteus-accent);
}

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

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

/* Mobile adjustments for NotFound page */
@media (max-width: 576px) {
    .proteus-notfound-logo {
        height: 60px;
    }

    .proteus-notfound-heading {
        font-size: 1.5rem;
    }

    .proteus-notfound-text {
        font-size: 1rem;
    }

    .proteus-notfound-actions {
        flex-direction: column;
        width: 100%;
    }

    .proteus-notfound-actions .btn {
        width: 100%;
    }

    .proteus-notfound-links {
        gap: 1rem;
    }
}
