html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100%;
    margin: 0;
    overscroll-behavior-y: none;
    background: #fff;
    /* The page itself must never scroll horizontally; only dedicated containers (the umbrella
       grid) may pan. This keeps the header pinned to the viewport width on phones. */
    max-width: 100%;
    overflow-x: hidden;
}

body {
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    box-sizing: border-box;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Sezlong Manager UI ---- */
.dashboard-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.business-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
}

.muted {
    color: #6c757d;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.95;
    margin-top: 0.25rem;
}

.stat-free { background: #2e9e5b; }
.stat-occupied { background: #c0392b; }
.stat-reserved { background: #e08e0b; }
.stat-blocked { background: #555e68; }
.stat-revenue { background: #1b6ec2; }

/* Touch-friendly sunbed grid */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #444;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.dot-free { background: #2e9e5b; }
.dot-occupied { background: #c0392b; }
.dot-reserved { background: #e08e0b; }
.dot-blocked { background: #555e68; }
.dot-cleaning { background: #3aa0c9; }

.sunbed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.9rem;
}

.sunbed-card {
    border-radius: 14px;
    padding: 1rem 0.5rem;
    text-align: center;
    color: #fff;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
    user-select: none;
}

.sunbed-code {
    font-size: 1.3rem;
    font-weight: 700;
}

.sunbed-status {
    font-size: 0.85rem;
    opacity: 0.95;
}

.sunbed-price {
    font-size: 0.8rem;
    opacity: 0.9;
}

.sunbed-card.is-free { background: #2e9e5b; }
.sunbed-card.is-occupied { background: #c0392b; }
.sunbed-card.is-reserved { background: #e08e0b; }
.sunbed-card.is-blocked { background: #555e68; }
.sunbed-card.is-cleaning { background: #3aa0c9; }

/* Sunbed card action buttons */
.sunbed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.6rem;
    justify-content: center;
}

.act {
    border: none;
    border-radius: 9px;
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.85);
    color: #1f2d3d;
}

.act:disabled {
    opacity: 0.55;
    cursor: default;
}

.act-primary {
    background: #ffffff;
    color: #11324d;
}

.act-ghost {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.alert-error { background: #fdecea; color: #a32018; border: 1px solid #f5c6c0; }
.alert-success { background: #e7f6ec; color: #1d6f3a; border: 1px solid #b7e3c5; }
.alert-info { background: #e7f0fb; color: #1b4f8a; border: 1px solid #b9d3f0; }

/* Modal — mobile-safe scroll contract.
   The overlay is bound to the DYNAMIC (visible) viewport (height:100dvh, not inset:0's layout
   viewport) so a centered dialog's footer can never be pushed behind the Android/iOS bottom bar.
   The box is a flex COLUMN that never scrolls itself (overflow:hidden); the header and footer are
   flex:none (always visible), and the BODY is the single scroller (flex:1; min-height:0;
   overflow-y:auto). Result: the Save/action footer is always reachable and long forms scroll inside
   the body with one finger — fixing "can't scroll to the lower fields / save button" on the create-user
   modal. (Previously the whole box scrolled only when it exceeded 90vh, so a short form centered in the
   layout viewport left its footer behind the nav bar with nothing to scroll.) */
.modal-overlay {
    position: fixed;
    inset: 0;
    bottom: auto;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

.modal-box {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;   /* header (pinned) + body (scrolls) + footer (pinned) */
    background: #fff;
    border-radius: 16px;
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: hidden;         /* the BODY scrolls, not the whole box — keeps header & footer reachable */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
    min-width: 40px;
    min-height: 40px;
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;                          /* lets the body shrink below content so it can scroll */
    overflow-x: hidden;
    overflow-y: auto;                       /* the ONE scroller inside the dialog */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;                    /* one finger scrolls the body; taps still work */
    padding: 1.25rem;
}

.modal-footer {
    flex: none;                             /* always visible at the bottom; never scrolls away */
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #eee;
}

/* Forms */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.form-row label {
    font-weight: 600;
    color: #333;
}

.form-row input,
.form-row select {
    padding: 0.7rem 0.8rem;
    border: 1px solid #ccd2da;
    border-radius: 10px;
    font-size: 1.05rem;
    min-height: 48px;
}

/* Modal / large buttons */
.btn-modal {
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    cursor: pointer;
}

.btn-cancel { background: #e9ecef; color: #333; }
.btn-confirm { background: #1b6ec2; color: #fff; }
.btn-confirm:disabled { opacity: 0.6; cursor: default; }
.btn-large { font-size: 1.15rem; padding: 0.9rem 1.6rem; }

.section-h {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.details-h {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

.payment-list {
    margin: 0.25rem 0 0.5rem 1rem;
    padding: 0;
}

.closing-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

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

/* Tariff quick-select buttons inside modals */
.tariff-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tariff-options .act {
    background: #eef3f8;
    color: #11324d;
    border: 1px solid #cdd9e5;
}

/* Two inputs side by side (e.g. start/end time) */
.form-row-inline {
    flex-direction: row;
    gap: 1rem;
}

.form-row-inline > div {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.form-row-inline input {
    padding: 0.7rem 0.8rem;
    border: 1px solid #ccd2da;
    border-radius: 10px;
    font-size: 1.05rem;
    min-height: 48px;
}

/* Maintenance / info section */
.info-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 720px; }

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.info-label { font-weight: 600; color: #333; }
.info-value { color: #555; text-align: right; word-break: break-all; }

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-field.filter-grow { flex: 1; min-width: 160px; }

.filter-field label { font-weight: 600; font-size: 0.85rem; color: #444; }

.filter-field select,
.filter-field input {
    padding: 0.6rem 0.7rem;
    border: 1px solid #ccd2da;
    border-radius: 10px;
    font-size: 1rem;
    min-height: 44px;
}

.filter-clear { align-self: flex-end; }

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    background: #f7f9fb;
    border: 1px dashed #cdd9e5;
    border-radius: 12px;
}

/* Payment list with inline actions */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.35rem 0;
}

.payment-item-actions { display: flex; gap: 0.4rem; }
.payment-item-actions .act { background: #eef3f8; color: #11324d; border: 1px solid #cdd9e5; }

/* Admin tables / lists */
.admin-section { margin-bottom: 2rem; }

.admin-list { display: flex; flex-direction: column; gap: 0.5rem; }

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    background: #fff;
}

.admin-row-main { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-row-title { font-weight: 700; font-size: 1.05rem; }
.admin-row-sub { color: #6c757d; font-size: 0.9rem; }
.admin-row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Reservations cards */
.res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.res-card {
    border: 1px solid #e3e8ee;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.res-card-title { font-weight: 700; font-size: 1.1rem; }
.res-card-line { color: #444; font-size: 0.92rem; }
.res-card-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.res-badge {
    align-self: flex-start;
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #e08e0b;
}

@media (max-width: 600px) {
    .content {
        padding-top: 0.9rem;
        padding-right: max(0.85rem, env(safe-area-inset-right, 0px)) !important;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
        padding-left: max(0.85rem, env(safe-area-inset-left, 0px)) !important;
    }

    .dashboard-header {
        align-items: flex-start;
        gap: 0.35rem 0.75rem;
        margin-bottom: 0.8rem;
    }

    .dashboard-header h1 {
        margin-bottom: 0;
        font-size: clamp(1.65rem, 8vw, 2rem);
        line-height: 1.15;
    }

    .business-date {
        font-size: 1rem;
        line-height: 1.5;
    }

    .section-h {
        margin-top: 1.15rem;
        margin-bottom: 0.65rem;
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
        margin-bottom: 0.85rem;
    }

    .stat-grid > .stat-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .stat-card {
        min-height: 88px;
        padding: 0.85rem 1rem;
        border-radius: 12px;
    }

    .stat-value {
        font-size: clamp(1.65rem, 8vw, 2rem);
        overflow-wrap: anywhere;
    }

    .stat-label {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .legend {
        gap: 0.55rem 0.9rem;
    }

    .sunbed-grid,
    .res-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .sunbed-card,
    .res-card,
    .admin-row {
        padding: 0.8rem;
    }

    .filter-bar,
    .filter-field,
    .filter-field.filter-grow {
        width: 100%;
        min-width: 0;
    }

    .filter-field select,
    .filter-field input {
        width: 100%;
    }

    .filter-clear,
    .closing-actions .btn-large {
        width: 100%;
    }

    .closing-actions {
        margin-top: 1.1rem;
        padding-bottom: 0.5rem;
    }

    .form-row-inline {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-box {
        max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .modal-footer {
        flex-wrap: wrap;
    }

    .modal-footer .btn-modal {
        flex: 1 1 140px;
    }

    .info-row {
        flex-direction: column;
        gap: 0.2rem;
    }

    .info-value {
        text-align: left;
    }
}

@media (max-width: 370px) {
    .stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-grid > .stat-card:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

/* ================================================================
   Online flow (umbrella-based beach app)
   ================================================================ */
.online-shell {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: #fffbe6;
    display: flex;
    flex-direction: column;
}

.online-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.login-card h1 { margin: 0 0 .25rem; font-size: 1.5rem; }

.login-brand-footer {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid #edf0f2;
    text-align: center;
}

.login-brand-link {
    border: 0;
    background: transparent;
    color: #6c7880;
    font-size: .78rem;
    letter-spacing: .02em;
    padding: .4rem .65rem;
    border-radius: 999px;
    cursor: pointer;
}

.login-brand-link span {
    color: #087f8c;
    font-weight: 700;
}

.login-brand-link:hover,
.login-brand-link:focus-visible {
    background: #eef8f9;
    color: #04323f;
    outline: none;
}

/* Beach map: fixed, mobile-first two-row command header. */
.beach-map-header {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: .55rem .65rem .65rem;
    color: #fff;
    background: linear-gradient(135deg, #064c5a 0%, #087f8c 100%);
    box-shadow: 0 2px 8px rgba(4, 50, 63, .2);
}

.beach-map-header-main {
    display: grid;
    grid-template-columns: minmax(3.25rem, auto) minmax(0, 1fr) 2.65rem;
    align-items: center;
    gap: .5rem;
}

.beach-map-header .online-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

.map-icon-button {
    min-height: 2.65rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: 0 .65rem;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.map-back-label {
    font-size: .78rem;
    font-weight: 700;
}

.map-refresh-button {
    width: 2.65rem;
    padding: 0;
    font-size: 1.35rem;
}

.map-icon-button:active,
.map-action-chip:active {
    transform: translateY(1px);
}

.beach-map-header-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    margin-top: .55rem;
}

.map-action-list {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.map-action-chip {
    min-width: 0;
    min-height: 2.1rem;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #064c5a;
    padding: .35rem .35rem;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    cursor: pointer;
}

.map-action-chip-danger {
    color: #9c2f25;
    background: #fff5f3;
}

.beach-map-header .live-badge {
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

@media (max-width: 350px) {
    .beach-map-header { padding-inline: .45rem; }
    .map-back-label { display: none; }
    .beach-map-header-actions { gap: .35rem; }
}

@media (min-width: 641px) {
    .beach-map-header { padding-inline: 1rem; }
    .beach-map-header-actions { grid-template-columns: auto auto; justify-content: flex-end; }
    .map-action-list { display: flex; }
    .map-action-chip { padding-inline: .8rem; }
}

.mobile-map-actions-button {
    display: none;
    min-height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: #fff;
    color: #064c5a;
    padding: .55rem 1rem;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.mobile-action-sheet {
    display: grid;
    gap: .65rem;
}

.mobile-action-sheet button {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid #c8d8db;
    border-radius: 12px;
    background: #f8fbfb;
    color: #064c5a;
    padding: .7rem 1rem;
    font: inherit;
    font-weight: 750;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.mobile-action-sheet .mobile-action-danger {
    border-color: #f0c2bd;
    background: #fff5f3;
    color: #9c2f25;
}

.online-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem .75rem;
    flex-wrap: wrap;
    padding: .6rem .85rem;
    background: #5bc0eb;
    color: #04323f;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
    flex: none; /* header keeps its height; it never scrolls */
}

.online-title {
    font-size: 1.05rem;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.online-topbar-right {
    display: flex;
    align-items: center;
    gap: .35rem .65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Keep the signed-in user's name from crowding the header on small phones. */
.online-topbar-right .muted {
    max-width: 42vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live-sync (SignalR) status pill on the beach map header. */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.4;
}
.live-badge::before {
    content: "";
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: currentColor;
}
.live-badge.live-on { background: #e3f9e5; color: #1b7a36; }
.live-badge.live-wait { background: #fff4d6; color: #8a6100; }
.live-badge.live-off { background: #fde2e0; color: #b02a20; }

.online-content { padding: 1rem; }

@media (max-width: 420px) {
    .online-topbar { padding: .5rem .6rem; }
    .online-title { font-size: .98rem; }
    .online-topbar-right { font-size: .9rem; }
    .online-topbar-right .muted { max-width: 36vw; }
}

.form-field { display: flex; flex-direction: column; margin-bottom: .75rem; }
.form-field label { font-size: .85rem; margin-bottom: .25rem; color: #444; }
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.form-control {
    padding: .55rem .65rem;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    font-size: 1rem;
}
.form-error { color: #c0392b; margin: .5rem 0; }
.form-warning { color: #b9770e; margin: .5rem 0; }

.btn-primary, .btn-secondary, .btn-danger {
    border: none;
    border-radius: 8px;
    padding: .6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary { background: #2e9e4f; color: #fff; width: 100%; }
.btn-secondary { background: #e0e0e0; color: #222; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { opacity: .6; cursor: default; }
.btn-link { background: none; border: none; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; }

/* Beach selection */
.beach-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.beach-card {
    text-align: left;
    background: #fff;
    border: 1px solid #e3e3c0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.beach-card-name { font-weight: 700; font-size: 1.05rem; }
.beach-card-meta { color: #777; font-size: .8rem; }

/* Beach map ----------------------------------------------------------------
   Layout: the map page fills the viewport. Header + summary stay fixed; only
   the .umbrella-scroll container pans (both axes). The grid inside it uses
   fixed-width cells and width:max-content, so it can be wider/taller than the
   viewport without ever making the page itself scroll horizontally. */
.map-shell {
    /* Pin the map to the viewport so it has a definite height: the header + summary stay put
       and the umbrella scroll area gets a bounded box to scroll inside. position:fixed ignores
       the body's safe-area padding, so we re-apply the insets here (no double padding). */
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fffbe6;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.beach-map-summary {
    flex: none;
    text-align: center;
    font-size: .95rem;
    padding: .6rem .75rem;
    color: #333;
    background: #fffef2;
    border-bottom: 1px solid #ece9c8;
}

.umbrella-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;                         /* the ONLY pannable area */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;           /* don't chain to the page */
    padding: 10px;
    box-sizing: border-box;
    touch-action: pan-x pan-y;
}

.umbrella-grid {
    --umbrella-cell: 66px;                   /* bigger touch target than before */
    --umbrella-gap: 10px;                    /* more breathing room between umbrellas */
    --consumption-badge-size: 24px;
    --count-badge-size: 24px;
    display: grid;
    gap: var(--umbrella-gap);
    width: max-content;                      /* may exceed the viewport */
    margin: 0;                               /* start at column 1 (top-left) */
    transform-origin: top left;
}

.sunbed-count-input {
    width: min(100%, 10rem);
    /* >= 16px so mobile Safari/Chrome never auto-zooms when the field is focused. */
    font-size: 16px;
}

/* Phones: larger, well-spaced cells so only ~5-6 umbrellas show per row and each is easy to tap.
   The grid still pans inside .umbrella-scroll; only the cell/gap sizing changes here. */
@media (max-width: 480px) {
    .umbrella-grid {
        --umbrella-cell: 60px;
        --umbrella-gap: 10px;
        --consumption-badge-size: 23px;
        --count-badge-size: 22px;
    }
}

@media (max-width: 360px) {
    .umbrella-grid {
        --umbrella-cell: 54px;
        --umbrella-gap: 8px;
        --consumption-badge-size: 21px;
        --count-badge-size: 20px;
    }
}

.umbrella {
    position: relative;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 2px;
}
.umbrella-icon { font-size: 1.6rem; line-height: 1; }
.umbrella-code {
    font-size: .72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 6px;
    padding: 0 .3rem;
    margin-top: 2px;
}
/* Sunbed-count badge: a small pill in the TOP-RIGHT corner — the opposite corner from the
   open-table/consumption indicator (top-left), so the two never collide and the centred umbrella
   icon is never covered. Always rendered (including 0); shows only the number. A teal ring keeps it
   visually distinct from the red/green consumption ring. Sized via a CSS var so it scales down on
   phones. */
.umbrella-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: var(--count-badge-size);
    height: var(--count-badge-size);
    box-sizing: border-box;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--count-badge-size) * 0.6);
    font-weight: 700;
    line-height: 1;
    color: #0f3d46;
    background: #fff;
    border: 2px solid #0c6b7d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
/* Cancelled historical reservation: the count stays visible but is clearly marked void (red ring +
   struck-through). It never contributes to finalized/paid totals — that exclusion lives in the
   service, this is display-only. */
.umbrella-count-cancelled {
    color: #a01f2b;
    border-color: #a01f2b;
    text-decoration: line-through;
}

/* Consumption indicator: a prominent circular badge in the TOP-LEFT corner (the sunbed count badge
   sits top-right, so the two never overlap). White fill keeps the icon legible on every cell colour
   (green/red/orange/blue/gray); the coloured ring + shadow make it pop on a small phone screen. */
.umbrella-consumption {
    position: absolute;
    top: -5px;
    left: -5px;
    width: var(--consumption-badge-size);
    height: var(--consumption-badge-size);
    box-sizing: border-box;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--consumption-badge-size) * 0.62);
    line-height: 1;
    background: #fff;
    border: 2px solid #d11;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
/* Unpaid consumption = warning red ring; paid = settled green ring. */
.umbrella-consumption.consumption-unpaid { border-color: #d11; }
.umbrella-consumption.consumption-paid { border-color: #1b7a36; }

.u-free { background: #2e9e4f; }
.u-cash { background: #d94141; }
.u-card { background: #e8881a; }
.u-protocol { background: #2f72d6; }
.u-disabled { background: #9aa0a6; }
.u-cancelled { background: #b4232d; }
.u-historical { box-shadow: inset 0 0 0 2px rgba(30, 45, 48, .28); }
.umbrella-cancelled {
    position: absolute;
    bottom: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff1f2;
    color: #a01f2b;
    font-size: .9rem;
    font-weight: 900;
}
.historical-day-notice {
    margin: .7rem 0;
    padding: .75rem .85rem;
    border-left: 4px solid #3f7780;
    border-radius: .6rem;
    background: #edf6f7;
    color: #274f55;
}
.historical-cancelled-label { color: #a01f2b; }

/* ---- Online administration (owners / users / beach create) ---- */
.empty-state { text-align: center; padding: 1.5rem 0; }
.empty-actions { margin-top: 1rem; display: flex; justify-content: center; }

.content-actions { margin-top: 1.25rem; }
.content-actions .btn-primary { width: 100%; }

.context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #eef7fb;
    border: 1px solid #cfe6f0;
    border-radius: 8px;
    padding: .5rem .75rem;
    margin-bottom: 1rem;
}

.form-card {
    background: #fff;
    border: 1px solid #e3e3c0;
    border-radius: 12px;
    padding: 1rem;
    max-width: 480px;
}
.form-card h3 { margin: 0 0 .75rem; font-size: 1.05rem; }
.form-card .btn-primary { width: 100%; margin-top: .5rem; }
.form-success { color: #2e7d32; margin: .5rem 0; }

.admin-list { display: flex; flex-direction: column; gap: .6rem; }
.admin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #fff;
    border: 1px solid #e3e3c0;
    border-radius: 10px;
    padding: .75rem .9rem;
}
.admin-card-main { display: flex; flex-direction: column; gap: .2rem; }
.admin-card-name { font-weight: 600; }
.admin-card-meta { color: #777; font-size: .8rem; display: flex; align-items: center; gap: .4rem; }
.admin-card-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.badge-inactive {
    background: #c0392b;
    color: #fff;
    border-radius: 999px;
    font-size: .65rem;
    padding: .05rem .4rem;
}

/* ---- Audit / history views ---- */
.last-occupation {
    background: #f5f9ff;
    border: 1px solid #d8e6f5;
    border-radius: 8px;
    padding: .6rem .75rem;
    margin-bottom: .9rem;
}
.last-occupation p { margin: .15rem 0; font-size: .9rem; }

.log-list { display: flex; flex-direction: column; gap: .5rem; }
.log-item {
    border: 1px solid #e3e3c0;
    border-radius: 8px;
    padding: .5rem .65rem;
    background: #fff;
}
.log-item-head { display: flex; justify-content: space-between; gap: .5rem; }
.log-action { font-weight: 700; }
.log-time { color: #777; font-size: .85rem; }
.log-item-meta { font-size: .85rem; color: #555; }
.log-item-note { font-size: .85rem; color: #b9770e; margin-top: .2rem; }
.log-item-values { font-size: .8rem; color: #666; margin-top: .2rem; word-break: break-word; }

/* Daily log page */
.log-toolbar {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .6rem .75rem;
    background: #fffef2;
    border-bottom: 1px solid #ece9c8;
}
.log-date { max-width: 180px; }
.log-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
    border: 1px solid #cfd6dd;
    background: #fff;
    border-radius: 999px;
    padding: .25rem .6rem;
    font-size: .8rem;
    cursor: pointer;
    white-space: nowrap;
}
.chip-active { background: #2e9e4f; color: #fff; border-color: #2e9e4f; }

/* Mobile-first: show stacked cards, hide the table. Wider screens flip this (see media query). */
.log-cards { display: flex; flex-direction: column; gap: .5rem; }
.log-table { display: none; }

.log-card {
    border: 1px solid #e3e3c0;
    border-radius: 10px;
    padding: .55rem .7rem;
    background: #fff;
}
.log-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .35rem;
}
.log-card-time { color: #777; font-size: .85rem; }
.log-card-action { font-weight: 700; }
.log-card-row {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .88rem;
    padding: .12rem 0;
}
.log-card-row .lbl { color: #777; flex: none; }
.log-card-row span:last-child { text-align: right; word-break: break-word; }

@media (min-width: 641px) {
    .log-cards { display: none; }
    .log-table { display: table; width: 100%; border-collapse: collapse; font-size: .85rem; }
    .log-table th, .log-table td {
        text-align: left;
        padding: .4rem .5rem;
        border-bottom: 1px solid #eee;
        vertical-align: top;
    }
    .log-table th { color: #555; font-weight: 700; position: sticky; top: 0; background: #fffbe6; }
    .log-table td { word-break: break-word; }
}

/* ---- Daily report (Raport zilnic) — mobile-first cards --------------------------------------- */
.report-empty {
    background: #eef7ff;
    border: 1px solid #cfe6fb;
    color: #225;
    border-radius: 10px;
    padding: .7rem .85rem;
    margin-bottom: .75rem;
    font-size: .9rem;
}

.report-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: .85rem;
    margin-bottom: .85rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.report-card-title {
    font-weight: 700;
    font-size: .95rem;
    color: #04323f;
    margin-bottom: .6rem;
}

.report-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
}

/* Two columns on phones, more on wider screens — never a cramped wide table. */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}
@media (min-width: 560px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat {
    display: flex;
    flex-direction: column;
    background: #f7f9fb;
    border-radius: 9px;
    padding: .5rem .55rem;
}
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; color: #0b3d2e; }
.stat-label { font-size: .72rem; color: #5a6a72; margin-top: .15rem; }

.emp-list { display: flex; flex-direction: column; gap: .5rem; }
.emp-row {
    border: 1px solid #eee;
    border-radius: 9px;
    padding: .5rem .6rem;
}
.emp-name { font-weight: 700; margin-bottom: .25rem; }
.emp-stats { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .9rem; }
.emp-stats .lbl { color: #7a868d; font-size: .72rem; display: block; }

.cmp-grid { display: flex; flex-direction: column; gap: .45rem; }
.cmp-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: baseline;
    gap: .5rem;
}
.cmp-label { color: #333; }
.cmp-today { font-weight: 700; font-size: 1.1rem; }
.cmp-prev { color: #8a949a; font-size: .85rem; }
.cmp-delta { font-weight: 700; font-size: .9rem; min-width: 2.5rem; text-align: right; }
.delta-pos { color: #1b7a36; }
.delta-neg { color: #b02a20; }
.delta-zero { color: #8a949a; }
.cmp-help { font-size: .72rem; margin: .5rem 0 0; }

/* ---- Day open/close (Închidere zi) ---------------------------------------------------------- */
.day-badge {
    display: inline-block;
    font-weight: 700;
    font-size: .8rem;
    padding: .2rem .6rem;
    border-radius: 999px;
}
.day-open { background: #e3f9e5; color: #1b7a36; }
.day-closed { background: #fde2e0; color: #b02a20; }
.day-closed-meta { font-size: .8rem; margin: .4rem 0 0; }
.day-notes { font-style: italic; color: #555; margin: .35rem 0 0; }

.day-warning {
    background: #fff4d6;
    border: 1px solid #f0dca0;
    color: #8a6100;
    border-radius: 10px;
    padding: .7rem .85rem;
    margin-bottom: .85rem;
    font-size: .9rem;
}
.day-success {
    background: #e3f9e5;
    border: 1px solid #b6e6c0;
    color: #1b7a36;
    border-radius: 10px;
    padding: .7rem .85rem;
    margin-bottom: .85rem;
    font-size: .9rem;
}
.day-force { font-weight: 600; margin-bottom: .6rem; }
.day-close-btn { width: 100%; margin-top: .4rem; }

/* ---- App self-update (Actualizare) --------------------------------------------------------- */
/* Optional update: dismissible banner pinned at the top of the shell. */
.update-banner {
    flex: none;
    background: #eef7ff;
    border-bottom: 1px solid #cfe6fb;
    padding: .6rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.update-banner-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}
.update-banner-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.update-version { font-size: .8rem; color: #04323f; }
.update-notes { font-size: .8rem; color: #555; }
.update-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* Mandatory update: full-screen blocking overlay (no access to operational pages). */
.update-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 50, 63, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.update-modal {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.update-title { margin: 0 0 .4rem; font-size: 1.15rem; color: #04323f; }
.update-sub { margin: 0 0 .5rem; color: #b02a20; font-weight: 600; }
.update-modal .update-version { font-size: .95rem; }
.update-modal .update-notes { margin: .4rem 0; }
.update-modal .update-actions { margin-top: 1rem; justify-content: flex-end; }

.update-progress {
    height: 8px;
    background: #e3e8ec;
    border-radius: 999px;
    overflow: hidden;
    margin-top: .6rem;
}
.update-progress-bar { height: 100%; background: #2e9e4f; transition: width .15s linear; }
.update-progress-text { font-size: .8rem; color: #555; margin: .3rem 0 0; }
.update-message { font-size: .85rem; color: #b02a20; margin: .4rem 0 0; }

.update-inline-note {
    flex: none;
    background: #fffef2;
    border-bottom: 1px solid #ece9c8;
    padding: .5rem .85rem;
    font-size: .85rem;
    color: #555;
    text-align: center;
}

.global-logout-button {
    position: fixed;
    z-index: 1200;
    top: calc(.5rem + env(safe-area-inset-top, 0px));
    right: calc(.5rem + env(safe-area-inset-right, 0px));
    min-height: 2.35rem;
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    padding: .4rem .7rem;
    border: 1px solid #9f2028;
    border-radius: 999px;
    background: #bd2731;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(76, 12, 18, .24);
    cursor: pointer;
}
.global-logout-button:hover { background: #9f2028; }
.online-topbar, .beach-map-header { padding-right: 6.7rem; }

@media (max-width: 420px) {
    .global-logout-button span:last-child { display: none; }
    .global-logout-button { width: 2.4rem; justify-content: center; padding-inline: .4rem; }
    .online-topbar, .beach-map-header { padding-right: 3.4rem; }
}

/* ================================================================
   AC Beach Manager — shared online visual polish
   Scoped to the online shell so the legacy local SQLite screens keep
   their existing appearance and behavior.
   ================================================================ */
.online-shell {
    color: #17343a;
    background:
        radial-gradient(circle at 12% 0%, rgba(91, 192, 235, .18), transparent 30rem),
        #f3f8f8;
}

.online-center {
    background:
        radial-gradient(circle at 50% 18%, rgba(91, 192, 235, .25), transparent 18rem),
        linear-gradient(180deg, #edf8fa 0%, #f8fbfb 100%);
}

.login-card {
    border: 1px solid rgba(8, 127, 140, .14);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(4, 50, 63, .14);
}

.login-card h1 {
    color: #064c5a;
    letter-spacing: -.025em;
}

.login-card .muted { margin-bottom: 1.25rem; }

.login-brand-footer { border-color: #e2eeee; }

.online-topbar {
    min-height: 3.65rem;
    padding: .6rem .7rem;
    color: #fff;
    background: linear-gradient(135deg, #064c5a 0%, #087f8c 100%);
    box-shadow: 0 2px 8px rgba(4, 50, 63, .18);
}

.online-topbar .online-title {
    color: #fff;
    font-weight: 700;
    letter-spacing: -.01em;
}

.online-topbar .muted { color: rgba(255, 255, 255, .8); }

.online-shell .btn-link {
    min-height: 2.15rem;
    border: 0;
    border-radius: 999px;
    padding: .38rem .7rem;
    color: #087f8c;
    background: #e8f5f6;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
}

.online-topbar .btn-link {
    color: #fff;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .22);
}

.online-shell .btn-link:active,
.online-shell .btn-primary:active,
.online-shell .btn-secondary:active,
.online-shell .btn-danger:active,
.beach-card:active {
    transform: translateY(1px);
}

.online-shell .btn-primary,
.online-shell .btn-secondary,
.online-shell .btn-danger {
    min-height: 2.65rem;
    border-radius: 12px;
    padding: .65rem .95rem;
    font-size: .92rem;
    box-shadow: 0 2px 5px rgba(4, 50, 63, .1);
}

.online-shell .btn-primary {
    background: linear-gradient(135deg, #087f8c, #086f7a);
    border-color: #087f8c;
}

.online-shell .btn-secondary {
    color: #064c5a;
    background: #e8f3f4;
    border: 1px solid #cfe3e5;
}

.online-shell .btn-danger {
    background: #b83a30;
}

.online-content {
    width: 100%;
    max-width: 960px;
    margin-inline: auto;
    box-sizing: border-box;
    padding: 1rem;
}

.beach-select-topbar {
    align-items: center;
}

.beach-select-topbar .online-title {
    flex-basis: 100%;
}

.beach-select-topbar .online-topbar-right {
    width: 100%;
    justify-content: center;
    gap: .4rem;
}

.form-field { margin-bottom: .9rem; }

.form-field label {
    color: #38565c;
    font-weight: 650;
}

.form-control {
    min-height: 2.75rem;
    box-sizing: border-box;
    border-color: #cadadd;
    border-radius: 11px;
    background: #fbfdfd;
    color: #17343a;
}

.form-control:focus {
    border-color: #1593a0;
    box-shadow: 0 0 0 .2rem rgba(8, 127, 140, .14);
}

.form-error,
.form-warning,
.form-success {
    border-radius: 10px;
    padding: .6rem .7rem;
    font-size: .87rem;
}

.form-error { background: #fff0ee; }
.form-warning { background: #fff7df; }
.form-success { background: #eaf8ed; }

.beach-list { gap: .8rem; }

.beach-card {
    min-height: 6.25rem;
    border-color: #d9e7e8;
    border-radius: 16px;
    padding: 1rem 1.05rem;
    color: #17343a;
    background: linear-gradient(145deg, #fff 0%, #f7fbfb 100%);
    box-shadow: 0 5px 16px rgba(4, 50, 63, .07);
}

.beach-card-name { color: #064c5a; font-size: 1.08rem; }
.beach-card-meta { color: #6b7e82; }

.empty-state {
    border: 1px dashed #bdd8db;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, .68);
}

.context-bar {
    border-color: #c9e2e4;
    border-radius: 13px;
    background: #eaf6f7;
    box-shadow: 0 2px 8px rgba(4, 50, 63, .04);
}

.form-card,
.admin-card,
.report-card,
.log-card,
.last-occupation {
    border-color: #dce8e9;
    background: #fff;
    box-shadow: 0 5px 18px rgba(4, 50, 63, .065);
}

.form-card {
    border-radius: 16px;
    padding: 1.1rem;
    margin-top: 1rem;
}

.online-content > .form-card:first-child { margin-top: 0; }

.form-card h3,
.report-card-title {
    color: #064c5a;
    letter-spacing: -.01em;
}

.admin-list { gap: .7rem; }

.admin-card {
    border-radius: 14px;
    padding: .85rem .9rem;
}

.admin-card-name { color: #17343a; font-weight: 700; }
.admin-card-meta { color: #708286; }

.log-toolbar {
    padding: .7rem;
    border-color: #dce8e9;
    background: #f8fbfb;
}

.chip {
    min-height: 2rem;
    border-color: #cadfe1;
    color: #31555b;
    background: #fff;
    font-weight: 650;
}

.chip-active {
    border-color: #087f8c;
    background: #087f8c;
    color: #fff;
}

.umbrella-scroll {
    background: #f3f8f8;
}

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

.stat {
    border: 1px solid #e1ecec;
    background: #f7fbfb;
}

.stat-value { color: #087f8c; }

.emp-row {
    border-color: #e1ecec;
    background: #fbfdfd;
}

.day-warning,
.day-success,
.report-empty {
    border-radius: 13px;
}

.update-banner {
    border-color: #c6e1e4;
    color: #17343a;
    background: linear-gradient(135deg, #edf9fa, #f8fcfc);
    box-shadow: 0 3px 12px rgba(4, 50, 63, .1);
}

.update-banner-main { align-items: center; }

.update-security-note {
    display: block;
    margin: .35rem 0 0;
    color: #63777b;
    font-size: .76rem;
    line-height: 1.35;
}

.update-actions { flex-wrap: wrap; }
.update-actions .btn-primary { width: auto; }

.update-permission {
    margin-top: .65rem;
    padding: .7rem .8rem;
    border: 1px solid #ecd493;
    border-radius: 12px;
    color: #765800;
    background: #fff8df;
}

.update-permission p {
    margin: 0 0 .55rem;
    font-size: .87rem;
}

.update-modal {
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.update-title { color: #064c5a; }
.update-progress-bar { background: linear-gradient(90deg, #087f8c, #27a7b3); }
.update-message { padding: .55rem .65rem; border-radius: 9px; background: #fff0ee; }
.update-inline-note { color: #31555b; background: #eef8f9; border-color: #d5e9eb; }

@media (max-width: 520px) {
    .online-center { padding: 1rem; }
    .login-card { padding: 1.35rem; }

    .online-topbar {
        gap: .45rem;
        padding: .55rem .6rem;
    }

    .online-topbar > .btn-link {
        max-width: 5.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .online-content { padding: .8rem; }

    .admin-card {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-card-actions > button { flex: 1 1 auto; }

    .update-banner-main { align-items: stretch; }
    .update-actions { width: 100%; }
    .update-actions > button { flex: 1 1 auto; }
}

@media (min-width: 641px) {
    .beach-select-topbar .online-title { flex-basis: auto; text-align: left; }
    .beach-select-topbar .online-topbar-right { width: auto; justify-content: flex-end; }
    .online-content { padding: 1.25rem; }
}

/* Role-based administration additions. */
/* Utilizatori uses a viewport-fitting pager on phones. This wrapper must stay non-scrolling; the
   mobile card pager below shows a compact group of users so actions remain reachable without vertical page
   scroll. */
.online-users-page {
    /* Desktop/tablet keep the full list. Mobile overrides this wrapper into a bounded flex region
       where the pager, not a vertical scroller, owns user browsing. */
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

.client-users-shell {
    flex: 1 1 auto;
    width: 100%;
}

.client-users-mobile-pager {
    display: none;
}

.client-users-desktop-list {
    display: flex;
}

.client-users-empty {
    display: grid;
    justify-items: center;
    gap: .75rem;
}

.client-users-empty p {
    margin: 0;
}

.client-users-empty .btn-primary {
    width: auto;
}

.client-users-position {
    margin: 0;
    color: #064c5a;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
}

.client-users-page-cards {
    display: grid;
    gap: .45rem;
}

.client-users-pager-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem;
}

.client-users-pager-controls > button {
    min-width: 0;
    width: 100%;
}

@media (max-width: 600px) {
    .client-users-shell {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        box-sizing: border-box;
        background: #f3f8f8;
        padding-top: env(safe-area-inset-top, 0px);
        padding-right: env(safe-area-inset-right, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-left: env(safe-area-inset-left, 0px);
    }

    .client-users-shell > .online-topbar {
        flex: none;
    }

    .online-users-page {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: .55rem;
        min-height: 0;
        max-width: none;
        margin: 0;
        overflow: hidden;
        padding: .65rem .7rem calc(.65rem + env(safe-area-inset-bottom, 0px));
    }

    .client-users-toolbar {
        flex: none;
        margin-bottom: 0;
    }

    .client-users-toolbar .btn-primary {
        min-height: 2.5rem;
        width: 100%;
        padding: .52rem .75rem;
    }

    .client-users-mobile-pager {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: .45rem;
        min-height: 0;
    }

    .client-users-desktop-list {
        display: none;
    }

    .client-users-page-cards {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        grid-template-rows: repeat(var(--visible-user-count), minmax(0, 1fr));
    }

    .client-user-card {
        align-items: stretch;
        flex-direction: column;
        justify-content: space-between;
        gap: .35rem;
        min-height: 0;
        overflow: hidden;
        padding: .55rem .6rem;
    }

    .client-user-card .admin-card-main {
        min-width: 0;
        gap: .2rem;
    }

    .client-user-card .admin-card-name {
        font-size: .92rem;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .client-user-card .admin-card-meta {
        flex-wrap: wrap;
        font-size: .76rem;
        line-height: 1.15;
    }

    .client-user-card .admin-card-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: .35rem;
        flex-shrink: 0;
        width: 100%;
    }

    .client-user-card .admin-card-actions > button {
        min-height: 2.1rem;
        min-width: 0;
        width: 100%;
        padding: .4rem .45rem;
        font-size: .78rem;
        line-height: 1.1;
    }

    .client-users-position {
        flex: none;
        font-size: .86rem;
    }

    .client-users-pager-controls {
        flex: none;
    }

    .client-users-pager-controls > button {
        min-height: 2.4rem;
        padding: .5rem .6rem;
    }

    .client-users-empty {
        flex: 1 1 auto;
        align-content: center;
        min-height: 0;
        padding: .9rem;
    }
}

.correction-panel {
    margin-top: 1rem;
    padding: .9rem;
    border: 1px solid #cfe3e5;
    border-radius: 14px;
    background: #f4fafb;
}

.cancel-confirmation-panel {
    padding: 1rem;
    border: 2px solid #c43b43;
    border-radius: 14px;
    background: #fff1f2;
    color: #6e171d;
}
.cancel-confirmation-panel h3 { margin: 0 0 .5rem; }
.cancel-confirmation-panel p { margin: 0; line-height: 1.5; }

/* Callout that tells the user the activity statistic cards are clickable. Accent bar + light teal
   fill make it noticeable without being noisy, matching the report's teal accent. */
.report-activity-callout {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: 0 0 .85rem;
    padding: .7rem .85rem;
    border-left: 4px solid #087f8c;
    border-radius: 8px;
    background: #eaf8f9;
    color: #0b4a52;
    font-size: .9rem;
    line-height: 1.45;
}
.report-activity-callout-icon { flex: none; font-size: 1.05rem; line-height: 1.35; }

/* Clickable daily-report statistics and their activity drilldown modal. The cards read as
   interactive at rest (pointer + tinted border) and lift on hover/focus. */
.report-filter-stat {
    width: 100%;
    border: 1px solid #cfe6e8;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.report-filter-stat:hover {
    border-color: #27a0ad;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 127, 140, .14);
    background: #f3fbfb;
}
.report-filter-stat:focus-visible { outline: 3px solid rgba(8, 127, 140, .28); outline-offset: 2px; }
.report-filter-stat.report-filter-active {
    border-color: #087f8c;
    box-shadow: 0 0 0 2px rgba(8, 127, 140, .2);
    background: #eaf8f9;
}
.report-drilldown { margin-top: .85rem; border-top: 1px solid #dce8e9; padding-top: .85rem; }
.report-drilldown-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .65rem; }
.report-drilldown-list { display: grid; gap: .55rem; }

/* ---- Activity drilldown modal: filters, compact rows, pagination ---- */
.log-modal-filters { margin-bottom: .9rem; }
.log-modal-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}
.log-modal-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.log-modal-field > span { font-size: .72rem; color: #5a6a72; font-weight: 600; }
.log-modal-field .form-control { width: 100%; }
.log-modal-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .55rem;
    flex-wrap: wrap;
}

.log-modal-list { display: grid; gap: .5rem; }
.log-modal-row {
    border: 1px solid #e1ecec;
    border-left: 4px solid #087f8c;
    border-radius: 8px;
    padding: .5rem .65rem;
    background: #fbfdfd;
}
.log-modal-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem .7rem;
}
.log-modal-time { font-variant-numeric: tabular-nums; color: #5a6a72; font-size: .82rem; }
.log-modal-action { font-weight: 700; color: #0b3d2e; }
.log-modal-umbrella { font-weight: 600; }
.log-modal-user { color: #5a6a72; font-size: .85rem; margin-left: auto; }
.log-modal-details { margin-top: .25rem; font-size: .85rem; color: #44524f; word-break: break-word; }

/* Cancellations are visually flagged as a destructive/void action. */
.log-modal-row-danger { border-color: #e0b4b4; border-left-color: #b4232d; background: #fdf3f3; }
.log-modal-row-danger .log-modal-action { color: #a01f2b; }

.log-modal-empty {
    padding: 1.25rem;
    text-align: center;
    color: #5a6a72;
    border: 1px dashed #cfdedf;
    border-radius: 8px;
    background: #f7fbfb;
}

.log-modal-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: .85rem;
}
.log-modal-page-indicator { font-size: .85rem; color: #5a6a72; font-weight: 600; }
.log-modal-pager .btn-secondary { min-width: 6rem; }
.log-modal-pager .btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 560px) {
    .log-modal-filter-grid { grid-template-columns: 1fr; }
    .log-modal-user { margin-left: 0; }
    .log-modal-pager .btn-secondary { min-width: 0; flex: 1 1 0; }
}

.critical-list {
    display: grid;
    gap: .65rem;
}
.critical-row {
    border: 1px solid #dbe9ea;
    border-left: 4px solid #087f8c;
    border-radius: 8px;
    background: #fbfdfd;
    padding: .75rem .85rem;
}
.critical-row p {
    margin: .45rem 0 0;
    color: #43575b;
    font-size: .92rem;
}
.critical-row-main,
.critical-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem .75rem;
}
.critical-action { font-weight: 800; color: #0b3d2e; }
.critical-entity { color: #44524f; font-weight: 650; }
.critical-time { margin-left: auto; color: #627175; font-size: .82rem; }
.critical-meta { margin-top: .25rem; color: #667477; font-size: .82rem; }
.critical-risk-high { border-left-color: #b7791f; background: #fffaf0; }
.critical-risk-blocked { border-left-color: #b4232d; background: #fff5f5; }

@media (max-width: 560px) {
    .critical-time { margin-left: 0; }
}

/* Modal actions must stay visible at tablet and phone widths. */
.modal-footer { flex-wrap: wrap; min-width: 0; }
.modal-footer > button {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
@media (max-width: 560px) {
    .modal-footer { align-items: stretch; padding: .8rem; }
    .modal-footer > button { flex: 1 1 100%; width: 100%; }
}

/* Map-only controls: header and summary remain fixed while the grid zooms/pans. */
.beach-map-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .45rem .65rem;
    min-width: 0;
}

.beach-map-tools .beach-map-summary { padding: 0; min-width: 0; }
.map-date-control {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.map-date-control label { font-size: .76rem; font-weight: 800; color: #526768; }
.map-date-control .form-control { width: auto; min-height: 2rem; padding: .25rem .45rem; }
.map-date-control .btn-link { font-size: .78rem; }
.map-tool-actions, .map-zoom-controls { display: flex; align-items: center; gap: .35rem; }
.map-zoom-controls {
    flex: 0 0 auto;
    padding: .2rem;
    border: 1px solid rgba(15, 90, 95, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
}
.map-zoom-controls button, .map-edit-link {
    min-height: 2rem;
    border: 0;
    border-radius: 999px;
    padding: .3rem .62rem;
    color: var(--primary, #0f6f73);
    background: transparent;
    font-weight: 700;
    white-space: nowrap;
}
.map-zoom-controls button:disabled { opacity: .35; }
.map-edit-link { background: rgba(15, 111, 115, .1); }

.map-editor-shell { height: 100dvh; overflow: hidden; background: var(--page-bg, #f5f8f7); }
.map-editor-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.map-editor-content {
    height: calc(100dvh - 4rem - env(safe-area-inset-top));
    overflow-y: auto;
    overflow-x: hidden;
    padding: .75rem;
    -webkit-overflow-scrolling: touch;
}
.map-editor-warning {
    padding: .7rem .8rem;
    margin-bottom: .65rem;
    border-left: 4px solid #d89b28;
    border-radius: .55rem;
    background: #fff7df;
    color: #65490f;
}
.map-editor-actions, .map-cell-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.map-editor-help { margin: .65rem 0; color: #5f6f70; font-size: .9rem; }
.map-editor-scroll { max-height: 48dvh; border-radius: .8rem; background: #e9dcc1; }
.map-editor-grid {
    --line-control: 2.05rem;
    padding: .8rem;
}
.map-line-control-spacer {
    width: var(--line-control);
    height: var(--line-control);
}
.map-line-delete {
    width: var(--line-control);
    height: var(--line-control);
    min-width: var(--line-control);
    min-height: var(--line-control);
    align-self: center;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(163, 53, 53, .28);
    border-radius: 999px;
    background: #fff7f4;
    color: #a33535;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}
.map-line-delete:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.map-line-delete:not(:disabled):hover {
    background: #ffe8e1;
    border-color: rgba(163, 53, 53, .48);
}
.map-editor-cell {
    position: relative;
    width: var(--umbrella-cell);
    height: var(--umbrella-cell);
    border: 2px solid transparent;
    border-radius: .65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    color: #274446;
}
.map-umbrella-cell { background: #e5f5ed; }
.map-disabled-cell { background: #d8dddd; opacity: .75; }
.map-path-cell { background: rgba(226, 199, 148, .45); border: 1px dashed rgba(112, 82, 39, .45); }
.map-editor-cell.is-selected { border-color: #0f6f73; box-shadow: 0 0 0 2px rgba(15,111,115,.18); }
.path-dots { letter-spacing: .18rem; }
.editor-occupied-badge { font-size: .58rem; padding: .1rem .25rem; border-radius: .3rem; background: #b93636; color: white; }
.map-cell-editor { margin-top: .75rem; padding: .85rem; border-radius: .8rem; background: white; box-shadow: 0 3px 14px rgba(30,55,55,.08); }
.map-cell-editor h2 { margin: 0 0 .65rem; font-size: 1.05rem; }

@media (max-width: 560px) {
    .beach-map-tools { align-items: stretch; flex-direction: column; }
    .map-date-control { align-items: flex-start; flex-direction: column; }
    .map-tool-actions { justify-content: space-between; }
    .map-zoom-controls { width: fit-content; }
    .map-editor-actions > button { flex: 1 1 8rem; }
}

/* Global authenticated chrome reserves a real gutter after all page-specific padding rules. */
.online-shell.session-active .online-topbar,
.online-shell.session-active .beach-map-header {
    padding-right: calc(7rem + env(safe-area-inset-right, 0px)) !important;
}
.online-shell.session-active .online-topbar-right {
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
    row-gap: .45rem;
}

@media (max-width: 520px) {
    .online-shell.session-active .online-topbar,
    .online-shell.session-active .beach-map-header {
        padding-right: calc(3.65rem + env(safe-area-inset-right, 0px)) !important;
    }
    .online-shell.session-active .online-topbar-right {
        flex-basis: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

.correction-panel h3,
.password-reset-panel h3 {
    margin: 0 0 .3rem;
    color: #064c5a;
    font-size: 1rem;
}

.correction-panel > .muted,
.password-reset-panel > .muted {
    margin: 0 0 .85rem;
    font-size: .8rem;
}

.password-reset-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dce8e9;
}

@media (max-width: 520px) {
    .online-users-page {
        width: 100%;
        max-width: 100%;
    }

    .online-users-page .form-card {
        margin-bottom: 1rem;
    }
}

/* Beach-map header actions: keep every primary label readable at phone widths. */
.online-shell.session-active .beach-map-header {
    padding-right: calc(.65rem + env(safe-area-inset-right, 0px)) !important;
    overflow: visible;
}

.beach-map-header-main {
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    box-sizing: border-box;
    padding-right: 6.35rem;
}

.beach-map-header-main.has-back {
    grid-template-columns: auto minmax(0, 1fr) 2.75rem;
}

/* Manual refresh button temporarily hidden: drop its trailing column so the title fills the row and no
   empty gap remains. Remove these two rules (and the .no-refresh class) when refresh returns. */
.beach-map-header-main.no-refresh {
    grid-template-columns: minmax(0, 1fr);
}
.beach-map-header-main.no-refresh.has-back {
    grid-template-columns: auto minmax(0, 1fr);
}

.beach-map-header .online-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

.beach-map-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

.beach-map-header-actions .map-action-list {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    gap: .4rem;
}

.map-action-chip {
    min-height: 2.75rem;
    padding: .55rem .75rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .online-shell.session-active .beach-map-header {
        padding-left: calc(.55rem + env(safe-area-inset-left, 0px));
        padding-right: calc(.55rem + env(safe-area-inset-right, 0px)) !important;
    }

    .beach-map-header-main { padding-right: 3rem; }

    .beach-map-header-actions {
        justify-content: flex-start;
        gap: .45rem;
    }

    .beach-map-header .live-badge {
        flex: 1 1 auto;
        min-height: 2rem;
    }

    .beach-map-header-actions .map-action-list {
        display: none !important;
    }

    .beach-map-header-actions .mobile-map-actions-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }
}

@media (min-width: 641px) {
    .online-shell.session-active .beach-map-header {
        padding-right: calc(1rem + env(safe-area-inset-right, 0px)) !important;
    }
}

/* ============================================================================================
   Beach selection: search box + inactive beach card
   ============================================================================================ */
.beach-search { margin-bottom: .85rem; }
.beach-search .form-control { width: 100%; box-sizing: border-box; }
.beach-card-inactive { opacity: .72; }
.beach-card-meta .badge-inactive { margin-left: .35rem; }

/* ============================================================================================
   Beach creation wizard: clear rows/columns + live preview
   ============================================================================================ */
.beach-wizard-sizes {
    display: grid;
    /* minmax(0, 1fr) — NOT 1fr — so the two number inputs may shrink below their (wide) intrinsic
       min-content size. With plain 1fr the bare <input type="number"> default width forced the grid
       wider than the phone viewport; focusing the right-hand "Coloane" field then scrolled the page
       sideways and clipped the form (screenshot 1). */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.beach-wizard-sizes > .form-field { min-width: 0; }
.beach-wizard-sizes .form-control {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* >= 16px keeps mobile Safari/Chrome from auto-zooming the page when the field gains focus. */
    font-size: 16px;
}
.field-help {
    display: block;
    margin-top: .3rem;
    color: #5f6f70;
    font-size: .78rem;
    line-height: 1.25;
}
.beach-wizard-total {
    margin: .85rem 0 .35rem;
    font-weight: 700;
    color: #064c5a;
    font-size: 1.02rem;
}
.beach-preview {
    margin: .5rem 0 1rem;
    padding: .75rem;
    border-radius: .7rem;
    background: #eef6f3;
    border: 1px solid #d6e6e2;
}
.beach-preview-caption {
    display: block;
    font-weight: 600;
    color: #17343a;
    margin-bottom: .5rem;
    font-size: .85rem;
}
.beach-preview-scroll {
    overflow: auto;
    max-height: 46dvh;
    -webkit-overflow-scrolling: touch;
}
.beach-preview-grid {
    --preview-cell: 30px;
    display: grid;
    gap: 4px;
    width: max-content;
    align-items: stretch;
}
.bp-corner { width: 1.4rem; }
.bp-colhead,
.bp-rowhead {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .66rem;
    font-weight: 700;
    color: #3d6b66;
}
.bp-rowhead { min-width: 1.4rem; padding-right: 2px; }
.bp-cell {
    width: var(--preview-cell);
    height: var(--preview-cell);
    border-radius: .35rem;
    background: #2e9e4f;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.bp-cell span { font-size: .8rem; }
.bp-cell small { font-size: .55rem; opacity: .92; }
.beach-preview-note { margin: .5rem 0 0; font-size: .76rem; }
.beach-preview-legend { margin: .35rem 0 0; font-size: .76rem; }

@media (max-width: 380px) {
    .beach-preview-grid { --preview-cell: 26px; }
    .beach-wizard-sizes { gap: .5rem; }
}

/* Narrowest phones: stack Rânduri/Coloane so each input keeps a comfortable tap size and the help
   text never has to wrap into the neighbouring column. */
@media (max-width: 360px) {
    .beach-wizard-sizes { grid-template-columns: 1fr; }
}

/* ============================================================================================
   Map editor: per-cell enable/disable toggle + add-row/column glow highlight
   ============================================================================================ */
.map-editor-cell-wrap {
    position: relative;
    width: var(--umbrella-cell);
    height: var(--umbrella-cell);
}
.map-editor-cell-wrap > .map-editor-cell { width: 100%; height: 100%; }

/* Small round enable/disable control in the cell's top-right corner. */
.cell-toggle {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #0c6b7d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    z-index: 2;
}
.cell-toggle.is-on { background: #0c6b7d; color: #fff; }
.cell-toggle.is-off { background: #fff; color: #0c6b7d; border-color: #9aa0a6; }
.cell-toggle:disabled { opacity: .5; cursor: not-allowed; }

.editor-disabled-badge {
    font-size: .54rem;
    padding: .1rem .25rem;
    border-radius: .3rem;
    background: #6b7378;
    color: #fff;
}
.map-editor-action-error { margin-top: .6rem; }

/* Freshly added row/column: a short teal glow that fades after ~1.6s (handled by removing the
   .cell-new class in code). Reduced-motion users get a static ring instead of the pulse. */
.cell-new > .map-editor-cell {
    animation: editorCellGlow 1.6s ease-out 1;
    border-color: #0f6f73;
}
@keyframes editorCellGlow {
    0%   { box-shadow: 0 0 0 0 rgba(15, 111, 115, .0); }
    20%  { box-shadow: 0 0 0 4px rgba(15, 111, 115, .55); background: #d4f0ec; }
    100% { box-shadow: 0 0 0 0 rgba(15, 111, 115, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .cell-new > .map-editor-cell {
        animation: none;
        box-shadow: 0 0 0 3px rgba(15, 111, 115, .45);
    }
}

/* ============================================================================================
   Password show/hide field
   ============================================================================================ */
.password-field { position: relative; display: block; }
.password-field .form-control { width: 100%; box-sizing: border-box; padding-right: 2.9rem; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: .4rem;
    transform: translateY(-50%);
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: .65;
}
.password-toggle:hover { opacity: 1; background: rgba(8, 127, 140, .08); }
.password-toggle.is-on { opacity: 1; background: rgba(8, 127, 140, .14); }
.password-toggle:focus-visible { outline: 2px solid #087f8c; outline-offset: 1px; }

/* ============================================================================================
   SuperAdmin clients admin: toolbar, filters, client card actions
   ============================================================================================ */
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .85rem;
}
.admin-search { flex: 1 1 16rem; min-width: 0; box-sizing: border-box; }
.admin-filters { display: flex; gap: .5rem; flex: 1 1 auto; }
.admin-filters .form-control { flex: 1 1 0; min-width: 0; }
.content-actions-top { margin-top: 0; margin-bottom: 1rem; }
.content-actions-top .btn-primary { width: auto; }

.client-card { flex-wrap: wrap; }
.client-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    width: 100%;
    margin-top: .5rem;
}
.client-card.is-inactive { opacity: .75; }

.form-warning-strong { font-weight: 700; color: #b02a20; }

/* Beach selection: per-beach management tools under each card.
   MOBILE-FIRST and on purpose: the full-width "Acțiuni" trigger is the DEFAULT (so it can never be
   hidden by a media query that fails to apply — the regression in the previous attempt), and the
   inline tools are layered back in only as a desktop/tablet enhancement at >= 561px. This guarantees
   that on phones there is always an accessible actions entry point. */
.beach-card-wrap { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }

.beach-card-tools {
    display: none;                          /* desktop enhancement, switched on at >= 561px */
    flex-wrap: wrap;
    gap: .5rem .75rem;
    padding-left: .15rem;
}
.beach-card-tools .btn-link.text-danger { color: #b02a20; }

.beach-card-actions-button {
    display: inline-flex;                   /* default (mobile): always visible */
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    margin-top: .15rem;
    border: 1px solid #cfe3e5;
    border-radius: 12px;
    background: #eef7fb;
    color: #064c5a;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.beach-card-actions-button:active { transform: translateY(1px); }

@media (min-width: 561px) {
    /* Desktop/tablet: inline tools (wrapped so nothing clips); the mobile trigger steps aside. */
    .beach-card-tools { display: flex; }
    .beach-card-actions-button { display: none; }
}

@media (max-width: 480px) {
    .admin-filters { flex-basis: 100%; }
    .client-card-actions .btn-link,
    .client-card-actions .btn-secondary,
    .client-card-actions .btn-danger { flex: 1 1 auto; }
}

/* Browser app update prompt. Kept below modals (z-index 3000) but above Logout (1200). */
.app-update-prompt {
    position: fixed;
    left: max(.75rem, env(safe-area-inset-left, 0px));
    right: max(.75rem, env(safe-area-inset-right, 0px));
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: .75rem .9rem;
    border: 1px solid #cfe3e5;
    border-radius: 10px;
    background: #f4fbfc;
    color: #17343a;
    box-shadow: 0 10px 30px rgba(4, 50, 63, .22);
    font-size: .9rem;
    line-height: 1.35;
}

.app-update-prompt.is-blocking {
    border-color: #ead391;
    background: #fff8df;
}

.app-update-prompt span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-update-prompt button {
    flex: 0 0 auto;
    min-height: 2.35rem;
    border: 0;
    border-radius: 999px;
    padding: .5rem .85rem;
    color: #fff;
    background: #087f8c;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 520px) {
    .app-update-prompt {
        align-items: stretch;
        flex-direction: column;
        bottom: calc(.55rem + env(safe-area-inset-bottom, 0px));
        font-size: .86rem;
    }

    .app-update-prompt button {
        width: 100%;
    }
}

/* ============================================================================================
   ONLINE MOBILE SCROLL CONTRACT  (read before adding/altering any Online page)
   --------------------------------------------------------------------------------------------
   ONE reusable model for every authenticated Online page whose content can exceed the screen:
   a fixed, viewport-bound flex column (the "shell") with a single bounded inner scroller.

       <div class="mobile-scroll-shell my-page-shell">      <- position:fixed; inset:0; flex column
           <div class="online-topbar"> ... </div>          <- flex:none header (may wrap freely)
           <div class="mobile-scroll-content">              <- flex:1; min-height:0; overflow:auto
               <div class="online-content my-page"> ... </div>
           </div>
       </div>
       <Modal .../>                                          <- siblings OUTSIDE the shell

   WHY a shell and not document/body scroll: body scroll is unreliable on real phones here because
   the body carries overscroll-behavior-y:none + safe-area padding, #app/.online-shell are pinned to
   min-height:100dvh, and a position:fixed Logout button overlays everything. Under those conditions
   iOS intermittently refuses to treat the body as the one-finger scroll target. A shell gives the
   scroller a DEFINITE height (flex:1 + min-height:0) and owns the gesture (touch-action:pan-x pan-y +
   -webkit-overflow-scrolling:touch), so one finger always scrolls.

   RULES (enforced by MobileLayoutSourceTests):
     * Never put touch-action:none on a page-level container.
     * Never preventDefault() a one-finger touch (see map-pinch.js: two-finger only).
     * Never cap the inner scroller with max-height:calc(100dvh - <fixed header px>) — the header wraps.
     * Never combine height:100dvh + overflow:hidden on a parent UNLESS its child is a verified scroller
       (min-height:0 + overflow:auto), which is exactly what .mobile-scroll-shell/.map-shell provide.

   PAGE -> STRATEGY MAP:
     Raport zilnic / Daily log / Day close / Live map   -> .map-shell      + .umbrella-scroll
     Map editor (Editare hartă)                          -> .map-editor-shell + .map-editor-content
     Clienți / Selectare plaje / Plaja nouă/ Client nou / Coș plaje / Activitate critică
                                                          -> .mobile-scroll-shell + .mobile-scroll-content
     Utilizatori                                         -> .client-users-shell + .client-users-mobile-pager
     Login / Start                                       -> .online-center (short, centred, no scroll)

   The .mobile-scroll-shell / .map-* shells reproduce the EXACT mechanics of the live-map shell, the
   layout proven to scroll with one finger on real phones. Do NOT diverge (no height:auto, no
   touch-action:pan-y-only, no overflow-x:hidden on the scroller) — that broke finger scroll before.
   ============================================================================================ */
/* These shells reproduce the EXACT mechanics of the live-map shell (.map-shell + .umbrella-scroll),
   which is the layout that scrolls reliably with one finger on real phones (Raport zilnic uses it).
   The previous version diverged (height:auto, flex:1 1 auto, overflow-x:hidden, touch-action:pan-y)
   and broke finger scroll on some devices. Do NOT add height:auto here: position:fixed + inset:0
   already gives the shell a definite viewport height, which the flex child needs to bound its
   scroll box. */
.mobile-scroll-shell,
.map-editor-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: #f3f8f8;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Bind the shell to the DYNAMIC (visible) viewport, not the layout viewport. With only
   position:fixed; inset:0 the shell is as tall as the LARGE viewport (URL bar retracted); on Android
   Chrome the inner .mobile-scroll-content then reports clientHeight == large viewport, so a user list
   shorter than that has NOTHING to scroll with one finger — while its bottom sits behind the URL/nav
   bar. A two-finger drag pans the visual viewport over the layout viewport at the compositor level
   (bypassing the inner scroller), which is precisely why two fingers scrolled and one finger did not.
   height:100dvh tracks the VISIBLE area, so the scroller always overflows the visible box and one
   finger scrolls. bottom:auto lets height drive the box instead of the layout-viewport bottom edge.
   .map-editor-shell already gets this via its own height:100dvh rule. (100vh is the dvh fallback.) */
.mobile-scroll-shell {
    bottom: auto;
    height: 100vh;
    height: 100dvh;
}

.mobile-scroll-shell > .online-topbar,
.map-editor-shell > .map-editor-header {
    flex: none;
}

.mobile-scroll-content,
.map-editor-content {
    flex: 1;                                 /* basis 0 — fills the shell regardless of content height */
    min-height: 0;                           /* lets the scroll box shrink below content (enables scroll) */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;               /* one finger pans/scrolls; never block vertical drag */
    box-sizing: border-box;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

.admin-clients-page,
.beach-new-page {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
}

.admin-clients-page .admin-list {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

.beach-new-page .form-card {
    margin-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* Beach creation preview must not become a vertical scroll trap on phones. It may pan sideways,
   but the page owns vertical movement so the Create button is reachable with one finger. */
.beach-new-page .beach-preview-scroll {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    touch-action: pan-x pan-y;
}

/* Editor map: horizontal pan and two-finger pinch live inside the map; vertical movement with one
   finger belongs to the page scroll area above, so the lower edit panel remains reachable. */
.map-editor-scroll {
    display: block;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    /* pan-x pan-y (NOT pinch-zoom): with the pinch-zoom token the browser claims the two-finger
       gesture for native page zoom — which the viewport meta disables — so the JS pinch helper never
       received a cancelable touchmove and editor zoom didn't work. Dropping it (matching the live
       map's .umbrella-scroll) lets sezlongMapPinch handle two-finger zoom while one finger still
       pans horizontally and bubbles vertical scroll up to .map-editor-content. */
    touch-action: pan-x pan-y;
    border-radius: .8rem;
    background: #e9dcc1;
}

.map-editor-grid {
    transform-origin: top left;
}

.map-editor-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    flex-wrap: wrap;
    margin: .55rem 0 .65rem;
}

.map-editor-touch-hint {
    font-size: .78rem;
}

.cell-toggle {
    width: 38px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.cell-toggle .toggle-track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid #0c6b7d;
    background: #0c6b7d;
    box-shadow: 0 1px 4px rgba(0,0,0,.28);
}

.cell-toggle .toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}

.cell-toggle.is-off .toggle-track {
    border-color: #8f9b9f;
    background: #f7f9fa;
}

.cell-toggle.is-off .toggle-knob {
    background: #8f9b9f;
}

.cell-toggle.is-on .toggle-knob {
    transform: translateX(14px);
}

@media (max-width: 560px) {
    .mobile-scroll-content,
    .map-editor-content {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }

    .admin-clients-page,
    .beach-new-page,
    .map-editor-content {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .map-editor-actions > button,
    .map-cell-actions > button,
    .beach-new-page .btn-primary {
        width: 100%;
    }

    .map-editor-tools {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Keep the fixed global Logout clear of the editor header as well. */
.online-shell.session-active .map-editor-header {
    padding-right: calc(7rem + env(safe-area-inset-right, 0px)) !important;
}

@media (max-width: 520px) {
    .online-shell.session-active .map-editor-header {
        padding-right: calc(3.65rem + env(safe-area-inset-right, 0px)) !important;
    }
}

/* ============================================================================================
   CARD-LIST TOUCH CONTRACT  (Clienți / Selectare plaje / Coș plaje / Activitate critică)
   --------------------------------------------------------------------------------------------
   One-finger vertical scroll must START even when the finger lands ON a card body, on static card
   text, or on a full-width action button — not only on the page margin.

   Bug it fixes: with the default touch-action:auto the browser holds the first touchmove on a
   <button> (press/active state) or on selectable card text (text-selection disambiguation) instead
   of handing it straight to the scroller. The big full-width „Editează"/„Dezactivează"/„Acțiuni"
   buttons cover most of each card, so a swipe that began on a card did nothing while a swipe on the
   scroller's padding margin (touch-action:pan-x pan-y) scrolled — the reported "scroll only from the
   margin" symptom.

   pan-y on the card surface AND its descendants (touch-action is per hit-target, so the leaf text
   spans / buttons need it too) tells the browser these regions only scroll vertically: a vertical
   drag scrolls immediately, a stationary tap still fires click. Horizontal drags do nothing here,
   which is correct for a vertical list.

   Deliberately NOT applied to the live-map umbrella grid or the map-editor cells: those need
   pan-x pan-y + two-finger pinch and live under .umbrella-scroll / .map-editor-scroll with their own
   classes — pinch zoom and cell select/toggle are unaffected. No card has a touch/pointer handler or
   calls preventDefault; this is CSS-only. */
.admin-card, .admin-card *,
.beach-card-wrap, .beach-card-wrap *,
.client-card, .client-card *,
.critical-row, .critical-row * {
    touch-action: pan-y;
}

/* ============================================================================
   AgerConcept demo chrome — the only additions on top of the ported real CSS.
   "Ieși din demo" reuses the real fixed logout button position/look; the banner
   marks the whole experience as fictional. Nothing here changes the app styling.
   ============================================================================ */
.demo-exit-button {
    text-decoration: none;
    gap: .35rem;
}

.global-logout-button.demo-exit-button {
    min-height: 2.25rem;
    align-items: center;
    padding: .34rem .68rem;
    font-size: .82rem;
    line-height: 1.15;
}

.demo-fictive-banner {
    position: fixed;
    left: 50%;
    bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 60;
    max-width: calc(100vw - 1rem);
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(15, 35, 40, .88);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* Demo login: quick role-switch under the standard login card. */
.demo-role-switch {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e3e6e8;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.demo-role-switch-title {
    font-size: .82rem;
    color: #6c757d;
}

.demo-role-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.demo-role-button {
    flex: 1 1 30%;
    min-width: 92px;
    padding: .55rem .4rem;
    border: 1px solid #cfd6da;
    border-radius: 10px;
    background: #f4f7f8;
    color: #064c5a;
    font: inherit;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
}

.demo-role-button:hover { background: #e7eef0; }
.demo-role-button.is-active { background: #2e9e4f; border-color: #2e9e4f; color: #fff; }

.demo-inline-note {
    margin: .75rem 0;
    padding: .6rem .8rem;
    border-radius: 10px;
    background: #eef7ff;
    color: #0b4a73;
    font-size: .85rem;
}

/* Demo account switch: kept intentionally small and piggybacks on the real topbar button classes. */
.demo-account {
    position: relative;
    display: inline-flex;
    min-width: 0;
}

.demo-account > summary {
    list-style: none;
}

.demo-account > summary::-webkit-details-marker {
    display: none;
}

.demo-account-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 2.15rem;
    padding: .38rem .68rem;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.demo-account-menu {
    position: absolute;
    top: calc(100% + .35rem);
    right: 0;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 12rem;
    padding: .4rem;
    border: 1px solid #dfe3e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(4, 50, 63, .22);
}

.demo-account-menu-title {
    padding: .15rem .5rem .35rem;
    color: #6c757d;
    font-size: .72rem;
    font-weight: 600;
}

.demo-account-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    color: #11343b;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.demo-account-option:hover {
    background: #eef5f3;
}

.demo-account-option.is-active {
    background: #e7f4ec;
    color: #1f7a43;
}

.demo-account-option-check {
    color: #2e9e4f;
    font-weight: 800;
}

/* Mobile: the header wraps and the trigger can land near either screen edge
   (e.g. centered on the beach-select page). Anchoring the menu to the trigger's
   right edge then pushes its 12rem body off-screen to the left. Pin the open menu
   to the viewport instead so it stays fully visible without horizontal scroll. */
@media (max-width: 640px) {
    .demo-account-menu {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        min-width: 0;
        width: auto;
        max-width: calc(100vw - 24px);
    }

    .demo-account-option-name {
        overflow-wrap: anywhere;
    }
}

.beach-map-header-main.has-demo-account {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.beach-map-header-main.no-refresh.has-demo-account,
.beach-map-header-main.no-refresh.has-back.has-demo-account {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.beach-map-header-main.has-demo-account .demo-account-trigger {
    white-space: nowrap;
}

.beach-map-header-actions {
    align-items: center;
}

.beach-map-header-actions .map-action-list {
    align-items: center;
}

.beach-map-header-actions .map-action-chip,
.beach-map-header-actions .mobile-map-actions-button,
.beach-map-header .live-badge {
    min-height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .7rem;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.beach-map-header .live-badge {
    padding-inline: .6rem;
    flex: 0 0 auto;
}

.map-tool-actions {
    align-items: center;
}

.map-zoom-controls button,
.map-edit-link,
.demo-reset-button {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .62rem;
    font-size: .82rem;
    line-height: 1.15;
    white-space: nowrap;
}

.beach-map-header-actions .mobile-map-actions-button {
    display: none;
}

@media (max-width: 640px) {
    .beach-map-header-actions .mobile-map-actions-button {
        display: inline-flex;
    }
}

@media (min-width: 641px) {
    .online-shell.session-active .beach-map-header-main.has-demo-account {
        padding-right: 12rem;
    }
}

@media (max-width: 420px) {
    .global-logout-button.demo-exit-button {
        width: 2.25rem;
        min-height: 2.25rem;
        padding-inline: .35rem;
    }

    .demo-account-name {
        max-width: 7.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Reset-demo affordance placed with the other map tools. */
.demo-reset-button {
    background: none;
    border: none;
    color: #b02a20;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.map-zoom-controls button,
.map-edit-link,
.demo-reset-button {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .62rem;
    font-size: .82rem;
    line-height: 1.15;
    white-space: nowrap;
}

/* Elements the real app renders as <button> but the demo renders as <a>. */
a.beach-card,
a.map-action-chip { text-decoration: none; }

/* Lightweight toast for actions that only exist in the real application. */
.demo-toast {
    position: fixed;
    left: 50%;
    bottom: 2.4rem;
    transform: translateX(-50%) translateY(8px);
    z-index: 80;
    max-width: calc(100vw - 1.5rem);
    padding: .6rem 1rem;
    border-radius: 10px;
    background: #04323f;
    color: #fff;
    font-size: .85rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.demo-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
