:root {
    --sand: #edf4f8;
    --cream: #ffffff;
    --line: #c6d7e3;
    --ink: #163449;
    --muted: #617d8f;
    --sea: #0d7b97;
    --sea-deep: #0a5a75;
    --sky: #2b8eb4;
    --foam: #dcecf5;
    --sun: #de7f1d;
    --bg-radial-top: rgba(43, 142, 180, 0.16);
    --bg-radial-bottom: rgba(13, 123, 151, 0.1);
    --bg-gradient: linear-gradient(145deg, #f8fbfd, #eef5f9 42%, #e8f1f6 78%, #fdfefe);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --surface-soft: rgba(238, 245, 249, 0.96);
    --surface-input: rgba(248, 251, 253, 0.98);
    --surface-elevated: rgba(255, 255, 255, 0.98);
    --surface-button-light: #e3eef5;
    --alert-bg: rgba(43, 142, 180, 0.12);
    --alert-border: rgba(43, 142, 180, 0.24);
    --alert-text: #1a526d;
    --danger-bg: #d45369;
    --danger-soft-bg: rgba(212, 83, 105, 0.1);
    --danger-soft-border: rgba(212, 83, 105, 0.22);
    --danger-soft-text: #8c3043;
    --shadow: 0 18px 36px rgba(62, 96, 120, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, var(--bg-radial-top), transparent 20%),
        radial-gradient(circle at bottom right, var(--bg-radial-bottom), transparent 24%),
        var(--bg-gradient);
    transition: background 0.25s ease, color 0.25s ease;
}

.layout {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.login-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.hero {
    padding: 20px 4px 8px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: nowrap;
}

.top-bar > .brand-mark {
    flex: 1 1 auto;
    min-width: 0;
}

.top-bar-actions {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    flex-direction: column;
}

.top-bar-actions .logout-form {
    align-self: flex-end;
}

.header-nav {
    margin-top: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.header-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.header-nav-meta {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    flex-direction: column;
    margin-left: auto;
    flex: 0 0 auto;
}

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid rgba(40, 167, 217, 0.2);
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
}

.top-user-card {
    width: min(320px, 100%);
    padding: 14px 16px;
    border-radius: 24px;
    border: 1px solid rgba(40, 167, 217, 0.18);
    background:
        radial-gradient(circle at top left, rgba(52, 174, 214, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(14, 39, 58, 0.96), rgba(10, 30, 46, 0.92));
    box-shadow: 0 18px 34px rgba(8, 23, 35, 0.22);
    align-self: flex-end;
}

.top-user-card .profile-pill-avatar,
.top-user-card .profile-pill-avatar-fallback {
    width: 56px;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    max-height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 18px rgba(8, 23, 35, 0.18);
}

.top-user-card .profile-pill-text {
    gap: 4px;
}

.top-user-card .profile-pill-text strong {
    font-size: 1.02rem;
    line-height: 1.2;
}

.top-user-card .profile-pill-text small {
    font-size: 0.96rem;
}

.profile-pill-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-pill-text small {
    color: var(--muted);
}

.guest-chat-image-link {
    display: inline-flex;
    margin: 10px 0 8px;
    text-decoration: none;
}

.guest-chat-image {
    width: min(280px, 100%);
    max-height: 220px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(40, 80, 109, 0.9);
    background: rgba(6, 17, 27, 0.75);
}

.guest-chat-love-form {
    margin: 0 0 8px;
}

.guest-request-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.guest-portal-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: start;
}

.guest-request-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.guest-request-actions {
    display: flex;
    justify-content: flex-start;
}

.guest-request-actions .btn {
    min-width: 240px;
}

.guest-available-days {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-day-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guest-day-chip {
    border: 1px solid rgba(40, 167, 217, 0.22);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(14, 39, 58, 0.92);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.guest-day-chip:hover,
.guest-day-chip.is-active {
    background: rgba(23, 110, 147, 0.35);
    border-color: rgba(40, 167, 217, 0.55);
}

.guest-traveler-picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(11, 31, 46, 0.5);
    border: 1px solid rgba(40, 80, 109, 0.75);
}

.guest-traveler-picker-label {
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.guest-traveler-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.guest-traveler-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(14, 39, 58, 0.88);
    border: 1px solid rgba(40, 80, 109, 0.75);
    cursor: pointer;
}

.guest-traveler-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.guest-traveler-card strong {
    display: block;
    margin-bottom: 6px;
}

.guest-traveler-card p {
    margin: 0;
    color: var(--muted);
}

.profile-pill-avatar,
.profile-editor-image,
.report-person-avatar,
.team-chip-avatar {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    max-height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 48px;
    display: block;
}

.profile-pill-avatar-fallback,
.profile-editor-fallback,
.report-person-avatar-fallback,
.team-chip-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(23, 110, 147, 0.9), rgba(11, 31, 46, 0.92));
    color: #fff;
    font-weight: 800;
}

.brand-logo {
    width: 180px;
    max-width: 180px;
    max-width: 100%;
    height: auto;
    display: block;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    overflow: hidden;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--sun);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4.8vw, 3.7rem);
    line-height: 1.08;
    margin-bottom: 12px;
}

.hero-copy {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.06rem;
}

html .hero {
    padding: 26px 28px 22px;
    margin-bottom: 18px;
    border-radius: 30px;
    border: 1px solid rgba(120, 157, 182, 0.28);
    background:
        radial-gradient(circle at top left, rgba(43, 142, 180, 0.12), transparent 24%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.94));
    box-shadow: 0 20px 44px rgba(88, 124, 146, 0.12);
}

html .top-bar {
    align-items: flex-start;
    gap: 24px;
}

html .brand-mark {
    align-items: flex-start;
    gap: 22px;
}

html .brand-logo-link {
    padding: 10px 12px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(233, 243, 249, 0.98), rgba(247, 251, 253, 0.98));
    border: 1px solid rgba(120, 157, 182, 0.22);
    box-shadow: 0 14px 28px rgba(88, 124, 146, 0.1);
}

html .brand-mark > div:last-child {
    max-width: min(980px, 100%);
}

html .eyebrow {
    margin-bottom: 10px;
    color: #d97817;
    letter-spacing: 0.1em;
}

html h1 {
    color: #173b54;
    font-size: clamp(2.05rem, 4vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: none;
    white-space: nowrap;
    text-wrap: nowrap;
}

html h1[data-day-page-title] {
    font-size: clamp(1.55rem, 2.5vw, 2.4rem);
    line-height: 1.08;
    max-width: none;
    white-space: nowrap;
    text-wrap: nowrap;
}

@media (max-width: 900px) {
    html h1 {
        white-space: normal;
        text-wrap: balance;
    }
}

html .hero-copy {
    max-width: 860px;
    color: #58788e;
    font-size: 1.08rem;
    line-height: 1.42;
}

html .logout-form .btn-light {
    background: linear-gradient(145deg, #e4eef5, #f6fafc);
    border: 1px solid rgba(120, 157, 182, 0.24);
    box-shadow: 0 12px 22px rgba(88, 124, 146, 0.08);
}

.panel {
    margin-top: 22px;
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
    border: 1px solid rgba(40, 80, 109, 0.8);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.panel-nested {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.profile-dashboard-panels {
    align-items: start;
}

.guest-summary-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dashboard-panels .panel {
    margin-top: 22px;
}

.profile-dashboard-panels > .panel {
    min-height: 0;
    height: fit-content;
}

.compact-panel {
    min-height: 220px;
}

.profile-editor-avatar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.profile-editor-image {
    width: 128px;
    height: 128px;
    flex-basis: 128px;
    border: 3px solid rgba(40, 167, 217, 0.25);
    box-shadow: var(--shadow);
}

.admin-cleanup-box {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(40, 80, 109, 0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-cleanup-box .panel-head {
    margin-bottom: 0;
}

.admin-cleanup-box h3 {
    margin: 0;
    font-size: 1.15rem;
}

.admin-cleanup-box form {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.update-publish-form {
    padding: 18px 20px;
    border: 1px solid rgba(55, 142, 180, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    gap: 16px 18px;
}

.update-management-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.update-publish-form label {
    min-width: 0;
}

.update-publish-form textarea {
    min-height: 96px;
    resize: vertical;
}

.update-publish-form button[type="submit"] {
    align-self: end;
    min-height: 56px;
    padding-inline: 22px;
}

.app-update-panel {
    margin-top: 22px;
    border-color: rgba(55, 142, 180, 0.24);
}

.app-update-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.app-update-card,
.app-update-history-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid rgba(55, 142, 180, 0.14);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(55, 142, 180, 0.08), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    box-shadow: 0 16px 30px rgba(18, 40, 60, 0.06);
}

.app-update-copy,
.app-update-history-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-update-copy strong,
.app-update-history-card strong {
    font-size: 1.12rem;
    color: var(--text);
}

.app-update-copy p,
.app-update-copy small,
.app-update-history-card span,
.app-update-history-card small {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.app-update-actions,
.app-update-history-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-update-download-button {
    position: relative;
    border-radius: 18px;
    padding-inline: 20px;
    box-shadow: 0 12px 24px rgba(31, 134, 168, 0.14);
}

.app-update-download-button::before {
    content: "Official";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html .update-publish-form,
html .app-update-card,
html .app-update-history-card {
    background:
        radial-gradient(circle at top right, rgba(55, 142, 180, 0.08), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 249, 253, 0.92));
    border-color: rgba(55, 142, 180, 0.16);
    box-shadow: 0 18px 34px rgba(24, 68, 94, 0.08);
}

.btn-light.app-update-download-button::before,
html .app-update-download-button::before {
    background: rgba(31, 134, 168, 0.1);
    color: #245c74;
}

.app-update-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    grid-column: 1 / -1;
}

.app-update-live-card {
    min-height: 100%;
}

.top-dashboard-panels {
    align-items: stretch;
}

.top-dashboard-panels .panel {
    padding: 30px;
}

.top-dashboard-panels .compact-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.login-panel {
    width: min(520px, 100%);
    margin: 0 auto;
}

.login-topbar {
    width: min(520px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.login-brand-stack {
    flex-direction: column;
    align-items: flex-start;
}

.login-form-stack {
    display: grid;
    grid-template-columns: minmax(260px, 1fr);
    max-width: 420px;
    gap: 18px;
}

.login-form-stack.form-vertical {
    grid-template-columns: 1fr;
    max-width: 420px;
}

.register-form-stack.form-vertical {
    grid-template-columns: 1fr;
    max-width: 420px;
}

.login-actions {
    margin-top: 52px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.android-download-card {
    margin-top: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(56, 136, 171, 0.18);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(233, 246, 252, 0.92)),
        var(--panel);
    display: grid;
    gap: 14px;
}

.android-download-copy {
    display: grid;
    gap: 6px;
}

.android-download-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(51, 170, 104, 0.16), rgba(32, 129, 84, 0.24));
    color: #2f985f;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(47, 152, 95, 0.12);
}

.android-download-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

.android-download-kicker {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d58123;
}

.android-download-copy strong {
    font-size: 1.1rem;
    color: var(--ink);
}

.android-download-copy p {
    margin: 0;
    color: var(--muted);
}

.android-download-button {
    width: 100%;
    justify-content: center;
}

.password-input-wrap {
    position: relative;
    width: 100%;
}

.password-input-wrap input {
    width: 100%;
    padding-right: 104px;
}

.password-toggle {
    min-width: 84px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.login-check {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-weight: 700;
    color: var(--ink);
    flex-wrap: nowrap;
}

.login-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.login-check span {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .login-layout {
        justify-content: flex-start;
        gap: 12px;
    }

    .login-topbar,
    .login-panel {
        width: min(100%, 520px);
    }

    .login-topbar {
        justify-content: center;
    }

    .login-panel {
        padding: 24px 18px;
    }

    .login-actions {
        margin-top: 28px;
    }

    .android-download-card {
        padding: 16px;
    }
}

.panel-head {
    margin-bottom: 18px;
}

.actions-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.panel-head p {
    color: var(--muted);
}

.alerts {
    margin-top: 16px;
}

.alert {
    background: var(--alert-bg);
    border: 1px solid var(--alert-border);
    color: var(--alert-text);
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 600;
}

.alert-error {
    background: var(--danger-soft-bg);
    border-color: var(--danger-soft-border);
    color: var(--danger-soft-text);
}

.work-alerts-panel {
    margin-top: 22px;
    border-color: rgba(227, 93, 117, 0.34);
    background:
        radial-gradient(circle at top right, rgba(227, 93, 117, 0.16), transparent 28%),
        linear-gradient(145deg, rgba(58, 14, 27, 0.96), rgba(34, 11, 23, 0.94));
}

[data-guest-submissions-panel] {
    margin-top: 22px;
    border-color: rgba(61, 167, 116, 0.28);
    background:
        radial-gradient(circle at top right, rgba(61, 167, 116, 0.16), transparent 28%),
        radial-gradient(circle at bottom left, rgba(43, 142, 180, 0.1), transparent 24%),
        linear-gradient(145deg, rgba(18, 40, 39, 0.96), rgba(11, 28, 29, 0.94));
}

[data-guest-submissions-panel] .panel-head h2 {
    color: #d8ffec;
}

[data-guest-submissions-panel] .panel-head p {
    color: #afdbc4;
}

[data-guest-submissions-panel] .history-result-card {
    border-color: rgba(61, 167, 116, 0.24);
    background:
        linear-gradient(145deg, rgba(23, 48, 46, 0.94), rgba(16, 36, 36, 0.92));
    box-shadow: 0 18px 34px rgba(7, 16, 25, 0.18);
}

.work-alerts-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.work-alerts-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 95, 122, 0.18);
    border: 1px solid rgba(255, 120, 144, 0.34);
    color: #ffe5ea;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.work-alerts-list {
    display: grid;
    gap: 14px;
}

.work-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 120, 144, 0.28);
    background: linear-gradient(145deg, rgba(80, 18, 38, 0.76), rgba(54, 16, 31, 0.72));
    box-shadow: 0 18px 36px rgba(27, 7, 14, 0.28);
}

.work-alert-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.work-alert-copy strong {
    font-size: 1.08rem;
}

.work-alert-copy p {
    margin: 0;
    color: #ffdbe3;
}

.work-alert-kicker {
    color: #ffb4c2;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.work-alert-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.work-alert-seen-button {
    background: linear-gradient(145deg, #dff6e8, #cfeedd);
    border-color: rgba(69, 156, 108, 0.24);
    color: #1f6a44;
}

.work-alert-seen-button:hover,
.work-alert-seen-button:focus-visible {
    background: linear-gradient(145deg, #d2f0de, #c1e8d0);
    color: #155233;
}

.file-viewer-panel {
    max-width: 1200px;
}

.file-viewer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.file-viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.file-viewer-page-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(208, 229, 241, 0.62);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
}

.file-viewer-frame-wrap {
    min-height: 78vh;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
}

.file-viewer-pdf-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 18px;
    overflow: auto;
    min-height: 78vh;
}

.file-viewer-pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 34, 52, 0.14);
}

@media (max-width: 768px) {
    .file-viewer-panel {
        padding: 18px;
    }

    .file-viewer-toolbar {
        gap: 8px;
    }

    .file-viewer-toolbar .btn {
        min-height: 40px;
        padding: 0 12px;
    }

    .file-viewer-page-indicator {
        min-height: 40px;
        padding: 0 12px;
    }

    .file-viewer-frame-wrap {
        min-height: 72vh;
        border-radius: 18px;
    }

    .file-viewer-pdf-wrap {
        padding: 10px;
        min-height: 72vh;
    }
}

.file-viewer-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 0;
    background: #fff;
}

html .work-alerts-panel {
    border-color: rgba(212, 83, 105, 0.22);
    background:
        radial-gradient(circle at top right, rgba(212, 83, 105, 0.1), transparent 28%),
        linear-gradient(145deg, #fff8fa, #fff1f4);
}

html [data-guest-submissions-panel] {
    border-color: rgba(61, 167, 116, 0.22);
    background:
        radial-gradient(circle at top right, rgba(61, 167, 116, 0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(43, 142, 180, 0.07), transparent 22%),
        linear-gradient(145deg, #f6fff9, #eefbf2);
}

html [data-guest-submissions-panel] .panel-head h2 {
    color: #1d5d3f;
}

html [data-guest-submissions-panel] .panel-head p {
    color: #4f7f67;
}

html [data-guest-submissions-panel] .history-result-card {
    border-color: rgba(61, 167, 116, 0.18);
    background: linear-gradient(145deg, rgba(252, 255, 253, 0.98), rgba(241, 251, 245, 0.98));
    box-shadow: 0 16px 30px rgba(61, 167, 116, 0.08);
}

html .work-alert-card {
    border-color: rgba(212, 83, 105, 0.18);
    background: linear-gradient(145deg, rgba(255, 247, 250, 0.98), rgba(255, 239, 244, 0.98));
    box-shadow: 0 16px 30px rgba(212, 83, 105, 0.08);
}

html .work-alerts-badge {
    background: linear-gradient(145deg, rgba(255, 215, 224, 0.95), rgba(255, 201, 214, 0.95));
    border-color: rgba(212, 83, 105, 0.32);
    color: #b3364f;
}

html .work-alert-copy p,
html .work-alert-kicker {
    color: #8c3043;
}

html .work-alert-seen-button {
    background: linear-gradient(145deg, #dbf5e6, #ccebd9);
    border-color: rgba(69, 156, 108, 0.22);
    color: #1d6a44;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.form-vertical {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    max-width: 980px;
}

.password-form {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.password-form .btn {
    align-self: end;
}

.header-password-toggle {
    position: relative;
}

.header-password-body {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    width: min(720px, calc(100vw - 40px));
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-elevated);
    border: 1px solid rgba(40, 80, 109, 0.85);
    box-shadow: var(--shadow);
}

.toggle-panel[open] .toggle-summary {
    margin-bottom: 18px;
}

.toggle-summary {
    display: inline-flex;
    align-items: center;
    list-style: none;
    padding: 15px 24px;
}

.panel > .toggle-panel > .toggle-summary {
    min-height: 54px;
    padding: 14px 24px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(40, 143, 185, 0.98), rgba(23, 110, 147, 0.98));
    border: 1px solid rgba(53, 193, 236, 0.35);
    color: #f5fcff;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(7, 28, 43, 0.22);
}

.panel > .toggle-panel > .toggle-summary:hover {
    background: linear-gradient(145deg, rgba(47, 157, 202, 1), rgba(28, 122, 163, 1));
}

.toggle-summary::-webkit-details-marker {
    display: none;
}

.toggle-body {
    margin-top: 2px;
}

.toggle-head {
    margin-bottom: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

label small,
.field-hint {
    color: var(--muted);
    font-size: 0.8rem;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--surface-input);
    color: var(--ink);
    font: inherit;
}

select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--surface-input);
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 2px solid rgba(10, 108, 116, 0.14);
    border-color: var(--sea);
}

select:focus {
    outline: 2px solid rgba(10, 108, 116, 0.14);
    border-color: var(--sea);
}

input[type="file"]::file-selector-button {
    background: #f4fbff;
    color: #0b2940;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.25);
    opacity: 1;
    cursor: pointer;
}

html input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0) brightness(0.45);
}

.wide {
    grid-column: 1 / -1;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.btn-primary {
    background: var(--sea);
    color: #fff;
}

.btn-secondary {
    background: var(--sky);
    color: #fff;
}

.btn-warning {
    background: #f2b84b;
    color: #17324a;
}

.btn-light {
    background: var(--surface-button-light);
    color: var(--ink);
}

.btn-danger {
    background: var(--danger-bg);
    color: #fff;
}

.action-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.action-row .btn {
    min-width: 140px;
    text-align: center;
}

.action-row-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.action-row-bottom {
    align-self: flex-end;
    margin-top: 18px;
}

.logout-form {
    margin: 0;
    margin-left: auto;
    flex: 0 0 auto;
}

.date-starter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
}

.date-starter-vertical {
    flex-direction: column;
    align-items: flex-start;
    max-width: 360px;
}

.date-starter-vertical > label {
    width: 100%;
}

.dashboard-boat-input-wrap {
    position: relative;
    width: 100%;
}

.dashboard-boat-input-wrap input {
    width: 100%;
}

.dashboard-boat-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 20;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    min-width: 100%;
    width: max-content;
    max-width: min(720px, calc(100vw - 40px));
    border-radius: 16px;
    background: var(--surface-elevated);
    border: 1px solid rgba(40, 80, 109, 0.3);
    box-shadow: var(--shadow);
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-boat-dropdown[hidden] {
    display: none !important;
}

.dashboard-boat-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    max-width: 100%;
}

.dashboard-boat-pick,
.dashboard-boat-save,
.dashboard-boat-delete {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.dashboard-boat-pick,
.dashboard-boat-save {
    flex: 0 1 auto;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(23, 110, 147, 0.12);
    color: var(--ink);
    white-space: nowrap;
}

.dashboard-boat-pick:hover,
.dashboard-boat-save:hover {
    background: rgba(23, 110, 147, 0.2);
}

.dashboard-boat-save {
    font-weight: 800;
}

.dashboard-boat-delete {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(212, 83, 105, 0.12);
    color: #d45369;
    font-weight: 900;
    line-height: 1;
}

.dashboard-boat-delete:hover {
    background: rgba(212, 83, 105, 0.2);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
}

.stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.guest-form-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.guest-form-stats .stat-card {
    min-width: 150px;
    min-height: 116px;
    padding: 18px 14px;
    flex: 0 0 auto;
}

.guest-form-stats .stat-card strong {
    white-space: nowrap;
    font-size: clamp(0.72rem, 1.05vw, 0.96rem);
}

.guest-form-stats .guest-form-stat-wide {
    min-width: max-content;
}

.summary-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.summary-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(43, 142, 180, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(18, 49, 71, 0.08), rgba(13, 123, 151, 0.12));
    border: 1px solid rgba(43, 142, 180, 0.2);
}

.summary-toolbar-copy h3 {
    margin: 4px 0 0;
    font-size: 1.2rem;
}

.summary-toolbar-eyebrow {
    display: inline-block;
    color: var(--sun);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.summary-toolbar-copy {
    text-align: left;
}

.summary-actions {
    margin-top: 0;
    justify-content: flex-start;
    align-self: center;
    width: 100%;
}

.history-search-bar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.history-search-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.history-search-form label {
    min-width: min(320px, 100%);
}

.history-search-actions {
    justify-content: flex-start;
}

.diver-role-picker {
    margin-bottom: 14px;
    max-width: 280px;
}

.split-table-head {
    margin-top: 10px;
}

.guest-transfer-toolbar {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(12, 33, 49, 0.82);
    border: 1px solid rgba(40, 167, 217, 0.18);
}

html .guest-transfer-toolbar {
    background: rgba(228, 239, 247, 0.92);
    border-color: rgba(38, 96, 132, 0.14);
    box-shadow: 0 14px 28px rgba(81, 118, 142, 0.1);
}

.guest-transfer-start {
    margin: 0 0 16px;
}

.guest-transfer-toolbar-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 320px;
    min-width: 220px;
}

.guest-transfer-toolbar-copy strong {
    font-size: 1rem;
    color: var(--ink);
}

.guest-transfer-toolbar-copy span {
    color: var(--muted);
    line-height: 1.45;
}

.guest-transfer-toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: min(260px, 100%);
}

.guest-transfer-toolbar-field span {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.guest-transfer-toolbar-field select {
    min-width: 220px;
}

.move-guest-select-cell {
    display: none;
}

[data-day-customers-panel].is-move-guests-mode .move-guest-select-cell {
    display: table-cell;
}

.history-results {
    display: grid;
    gap: 14px;
    margin-bottom: 10px;
}

.history-result-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(12, 33, 49, 0.82);
    border: 1px solid rgba(40, 167, 217, 0.18);
}

.history-result-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.history-result-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.history-result-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.guest-submission-approve-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.guest-submission-boat-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-submission-boat-picker span {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
}

.guest-submission-boat-input {
    min-width: 180px;
    width: 180px;
}

.guest-submission-reject-form {
    margin-left: auto;
}

.saved-boat-chip-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.saved-boat-chip-form .icon-action-btn {
    width: 38px;
    height: 38px;
}

.history-result-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.history-result-actions-top-right {
    justify-content: flex-end;
    margin-bottom: 0;
}

.history-owner-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(23, 110, 147, 0.16);
    border: 1px solid rgba(40, 167, 217, 0.22);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.guest-focus-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(39, 147, 103, 0.96), rgba(61, 179, 126, 0.96));
    border: 1px solid rgba(35, 132, 92, 0.96);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(35, 132, 92, 0.18);
}

.guest-birth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.guest-birth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-birth-field small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.guest-birth-field input {
    min-height: 48px;
}

.guest-link-qr-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.guest-link-qr-toggle {
    list-style: none;
}

.guest-link-qr-toggle::-webkit-details-marker {
    display: none;
}

.guest-link-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 18px;
    align-items: start;
}

.guest-link-main {
    min-width: 0;
}

.guest-link-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-link-inline .guest-link-inline-copy {
    flex: 0 0 auto;
}

.guest-link-inline .guest-link-inline-share {
    flex: 0 0 auto;
}

.guest-link-inline input[data-guest-link-input] {
    flex: 1 1 auto;
    min-width: 0;
}

.guest-link-qr-image {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    border: 1px solid rgba(40, 167, 217, 0.2);
    background: #ffffff;
    padding: 8px;
}

.history-result-head strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.history-result-head p {
    color: var(--muted);
    margin-bottom: 0;
}

.history-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.history-stat {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(23, 110, 147, 0.18);
    color: #d9f4ff;
    font-size: 0.9rem;
    font-weight: 700;
}

.history-months {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-month-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(8, 63, 90, 0.9);
    border: 1px solid rgba(40, 167, 217, 0.18);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.table-history {
    min-width: 220px;
}

.table-history strong {
    display: block;
    margin-bottom: 8px;
}

.table-history-months {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.table-history-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(23, 110, 147, 0.16);
    border: 1px solid rgba(40, 167, 217, 0.16);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.table-history-chip-muted {
    background: rgba(152, 183, 202, 0.12);
    border: 1px solid rgba(152, 183, 202, 0.12);
    color: var(--muted);
}

.table-history-more {
    display: inline-block;
}

.table-history-more-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 63, 90, 0.9);
    border: 1px solid rgba(40, 167, 217, 0.2);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.table-history-more-toggle::-webkit-details-marker {
    display: none;
}

.table-history-more-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.table-presence {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 180px;
}

.table-presence-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(23, 110, 147, 0.16);
    border: 1px solid rgba(40, 167, 217, 0.16);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.stat-card {
    min-width: 180px;
    background: rgba(23, 110, 147, 0.18);
    border: 1px solid rgba(40, 167, 217, 0.16);
    border-radius: 18px;
    padding: 16px 18px;
}

.stat-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.boat-rename-toggle {
    margin-top: 12px;
}

.boat-rename-form {
    margin-top: 12px;
    min-width: min(320px, 100%);
}

.table-shell {
    overflow-x: auto;
    position: relative;
}

.old-guests-table-scroll {
    max-height: 620px;
    overflow-y: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.old-guests-table {
    min-width: 760px;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #eadfce;
    white-space: nowrap;
}

th {
    color: #dbf5ff;
    background: rgba(23, 110, 147, 0.25);
}

.table-shell th:first-child,
.table-shell td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgba(8, 32, 51, 0.98);
    box-shadow: 10px 0 14px -12px rgba(2, 18, 31, 0.42);
}

.table-shell th:first-child {
    z-index: 4;
    background: rgba(23, 110, 147, 0.94);
}

html th {
    color: #19455e;
    background: rgba(43, 142, 180, 0.12);
}

html .table-shell th:first-child,
html .table-shell td:first-child {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 10px 0 14px -12px rgba(43, 92, 125, 0.24);
}

html .table-shell th:first-child {
    background: #e9f5fb;
}

html td {
    border-bottom-color: #d8e6ef;
}

tbody tr {
    transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

tbody tr.is-deleting {
    opacity: 0.55;
    filter: saturate(0.7);
}

tbody tr.is-removing {
    opacity: 0;
    transform: translateX(18px);
}

.file-link {
    color: var(--sea);
    text-decoration: none;
    font-weight: 700;
}

.file-link:hover {
    text-decoration: underline;
}

.file-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(23, 110, 147, 0.28), rgba(16, 126, 161, 0.18));
    border: 1px solid rgba(40, 167, 217, 0.26);
    color: #e6f9ff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(2, 18, 31, 0.18);
}

.file-link-button:hover {
    text-decoration: none;
    background: linear-gradient(145deg, rgba(23, 110, 147, 0.42), rgba(16, 126, 161, 0.28));
    transform: translateY(-1px);
}

.customer-file-cell {
    min-width: 170px;
}

.customer-file-cell .file-link-button,
.customer-file-cell .toggle-summary {
    min-width: 0;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    box-shadow: 0 4px 12px rgba(69, 104, 126, 0.12);
}

.customer-file-cell .file-link-button {
    background: rgba(233, 243, 249, 0.9);
    border: 1px solid rgba(183, 206, 221, 0.8);
    color: #284861;
}

.customer-file-cell .file-link-button-uploaded {
    background: rgba(228, 245, 239, 0.96);
    border-color: rgba(153, 206, 184, 0.9);
    color: #245245;
}

.customer-file-cell .file-link-button:hover {
    background: rgba(223, 237, 246, 0.98);
    transform: translateY(-1px);
}

.customer-file-cell .file-link-button-uploaded:hover {
    background: rgba(218, 240, 231, 0.98);
}

.customer-file-cell .inline-form {
    margin-top: 6px;
}

.customer-file-cell .toggle-panel {
    display: block;
}

.customer-file-cell .toggle-summary {
    background: rgba(233, 243, 249, 0.9);
    color: #284861;
    border: 1px solid rgba(183, 206, 221, 0.8);
}

.customer-file-cell .toggle-summary:hover {
    background: rgba(223, 237, 246, 0.98);
}

.date-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.inline-form {
    margin: 0;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.icon-action-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1.5px solid currentColor;
    background: rgba(255, 255, 255, 0.06);
    color: #dceeff;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 10px 24px rgba(2, 18, 31, 0.18);
}

.icon-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(2, 18, 31, 0.24);
}

.icon-action-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.icon-action-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

.icon-action-btn-edit {
    color: #1d72bd;
    background: rgba(14, 51, 82, 0.14);
}

.icon-action-btn-edit:hover {
    background: rgba(29, 114, 189, 0.12);
}

.icon-action-btn-delete {
    color: #ff566c;
    background: rgba(110, 22, 38, 0.12);
}

.icon-action-btn-delete:hover {
    background: rgba(255, 86, 108, 0.12);
}

.icon-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-empty-row td {
    padding: 22px 16px;
}

.table-empty-state {
    border-radius: 16px;
    border: 1px dashed rgba(40, 167, 217, 0.26);
    background: rgba(11, 31, 46, 0.36);
    color: var(--muted);
    text-align: center;
    padding: 18px 16px;
}

html .file-link-button,
html .guest-traveler-card,
html .guest-traveler-picker,
html .report-line,
html .table-empty-state,
html .team-chip,
html .history-result-card,
html .day-alert-card,
html .date-card,
html .chat-bubble-other,
html .chat-bubble-self,
html .report-person,
html .profile-pill {
    background: rgba(255, 255, 255, 0.88);
    border-color: #d8e6ef;
    color: var(--ink);
}

html .top-user-card {
    background:
        radial-gradient(circle at top left, rgba(71, 173, 210, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 254, 0.98));
    border-color: #cfe0ea;
    box-shadow: 0 18px 34px rgba(102, 142, 167, 0.14);
}

html .top-user-card .profile-pill-avatar,
html .top-user-card .profile-pill-avatar-fallback {
    border-color: rgba(65, 132, 165, 0.18);
    box-shadow: 0 8px 18px rgba(116, 153, 176, 0.16);
}

html .customer-file-cell .file-link-button,
html .customer-file-cell .toggle-summary {
    background: rgba(238, 246, 251, 0.98);
    border-color: #c9ddea;
    color: #284861;
    box-shadow: 0 4px 12px rgba(69, 104, 126, 0.1);
}

html .customer-file-cell .file-link-button-uploaded {
    background: rgba(228, 245, 239, 0.98);
    border-color: #b8dbc9;
    color: #245245;
}

html .muted-inline,
html .panel-head p,
html .profile-pill-text small,
html label span,
html .field-hint,
html .empty-state,
html .day-alert-head span {
    color: var(--muted);
}

html .day-comment-block,
html .history-search-bar,
html .chat-room-top,
html .global-chat-messages,
html .chat-sidebar,
html .chat-main {
    background: linear-gradient(145deg, rgba(244, 249, 252, 0.98), rgba(237, 244, 249, 0.98));
    border-color: #c6dbe8;
}

html .day-comment-block h3,
html .history-search-bar h3,
html .chat-room-members strong,
html .chat-panel-head h2 {
    color: #183b54;
}

html .day-alert-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 253, 0.98));
    border-color: #cfe0ea;
}

html .day-alert-card p,
html .day-alert-card strong {
    color: #183b54;
}

html .day-alert-card p {
    padding: 13px 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(225, 241, 251, 0.98), rgba(240, 248, 253, 0.98));
    border: 1px solid rgba(99, 161, 194, 0.24);
    border-left: 5px solid #2f8fb8;
    box-shadow: 0 8px 18px rgba(87, 135, 162, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

html .day-alert-head span {
    color: #5f7d92;
}

html .chat-bubble-self {
    background: linear-gradient(145deg, rgba(234, 246, 250, 0.98), rgba(223, 240, 247, 0.98));
    border-color: #b7d6e4;
}

html .chat-bubble-other {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 253, 0.98));
    border-color: #d7e5ee;
}

html .chat-bubble strong,
html .chat-bubble p {
    color: #183b54;
}

html .chat-bubble small {
    color: #688396;
}

html .chat-bubble-direct {
    border-color: rgba(239, 161, 58, 0.26);
}

html .chat-bubble-direct-target {
    border-color: rgba(212, 83, 105, 0.26);
    background: linear-gradient(145deg, rgba(255, 244, 247, 0.98), rgba(255, 238, 243, 0.98));
}

html .chat-direct-pill {
    background: rgba(255, 192, 99, 0.16);
    border-color: rgba(239, 161, 58, 0.24);
    color: #9b6212;
}

html .chat-direct-pill-target {
    background: rgba(212, 83, 105, 0.14);
    border-color: rgba(212, 83, 105, 0.22);
    color: #a33b56;
}

html .chat-mention-list {
    background: rgba(255, 255, 255, 0.98);
    border-color: #d8e6ef;
}

html .chat-mention-option {
    background: rgba(43, 142, 180, 0.08);
}

html .chat-mention-option:hover {
    background: rgba(43, 142, 180, 0.14);
}

html .chat-mention-option small {
    color: #688396;
}

html .summary-boat-head {
    background: linear-gradient(145deg, rgba(244, 249, 252, 0.98), rgba(236, 244, 249, 0.98));
    border-color: #c8dbe7;
}

html .summary-boat-count {
    color: #56768c;
}

html .status-online {
    background: rgba(54, 179, 126, 0.16);
    color: #1f815c;
}

html .status-offline {
    background: rgba(115, 138, 154, 0.14);
    color: #4f6879;
}

html .status-suspended {
    background: rgba(248, 215, 138, 0.92);
    color: #8a5a00;
}

html .chat-notice-badge,
html .floating-chat-badge {
    background: rgba(255, 168, 76, 0.2);
    color: #9b5a12;
    border: 1px solid rgba(255, 168, 76, 0.32);
}

html .floating-chat-toggle {
    background: linear-gradient(145deg, rgba(43, 142, 180, 0.92), rgba(53, 160, 197, 0.84));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(114, 152, 176, 0.18);
}

html .floating-chat-panel {
    background: rgba(247, 251, 253, 0.98);
    border-color: #cfe0ea;
    box-shadow: 0 22px 40px rgba(102, 139, 163, 0.16);
}

html .floating-chat-head,
html .floating-chat-head strong,
html .floating-chat-panel p,
html .floating-chat-panel .empty-state {
    color: #31566e;
}

html .floating-chat-close {
    color: #6a8395;
}

html .floating-chat-messages {
    background: linear-gradient(145deg, rgba(242, 248, 251, 0.98), rgba(236, 244, 249, 0.98));
    border: 1px solid #d7e5ee;
    border-radius: 16px;
    padding: 12px;
}

html .floating-chat-form input[type="text"],
html .floating-chat-form input[type="file"] {
    background: rgba(255, 255, 255, 0.98);
    border-color: #c7dbe7;
    color: #17384f;
}

html .month-head span {
    color: #6a8395;
}

html .history-result-head p {
    color: #587489;
}

html .history-owner-pill {
    background: rgba(43, 142, 180, 0.12);
    border-color: rgba(43, 142, 180, 0.2);
    color: #234f69;
}

html .guest-focus-pill {
    background: linear-gradient(145deg, rgba(39, 147, 103, 0.96), rgba(61, 179, 126, 0.96));
    border-color: rgba(35, 132, 92, 0.96);
    color: #ffffff;
}

@media (max-width: 720px) {
    .guest-link-layout {
        grid-template-columns: 1fr;
    }

    .guest-link-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .guest-link-inline > .btn,
    .guest-link-inline > .inline-form,
    .guest-link-inline > .inline-form .icon-action-btn,
    .guest-link-qr-block,
    .guest-link-qr-toggle {
        width: 100%;
    }

    .guest-link-inline > .inline-form {
        display: flex;
    }

    .guest-link-inline > .inline-form .icon-action-btn {
        height: 46px;
        border-radius: 14px;
    }

    .guest-link-qr-block {
        align-items: stretch;
    }

    .guest-link-qr-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .guest-link-qr-image {
        align-self: center;
    }
}

html .history-stat {
    background: rgba(43, 142, 180, 0.14);
    border: 1px solid rgba(43, 142, 180, 0.2);
    color: #315a72;
}

html .date-card-title {
    color: #183b54;
}

html .date-card-meta {
    background: rgba(43, 142, 180, 0.12);
    color: #275770;
}

html .note-badge {
    background: rgba(255, 168, 76, 0.16);
    border-color: rgba(255, 168, 76, 0.3);
    color: #9b5a12;
}

.action-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(83, 212, 167, 0.32);
    background: rgba(8, 58, 46, 0.94);
    color: #ecfff8;
    box-shadow: 0 18px 40px rgba(2, 18, 31, 0.34);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.action-toast.is-error {
    border-color: rgba(255, 120, 120, 0.32);
    background: rgba(87, 22, 35, 0.94);
    color: #fff1f3;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.92rem;
}

.record-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    margin-bottom: 20px;
}

.record-filter label {
    min-width: 220px;
}

.report-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-person-copy {
    min-width: 0;
}

@media (max-width: 768px) {
    .diver-report-page .table-shell td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        width: 232px;
        min-width: 232px;
        max-width: 232px;
        padding-left: 10px;
        padding-right: 10px;
        overflow: visible;
        box-shadow: 10px 0 14px -12px rgba(43, 92, 125, 0.24);
        transition: width 0.18s ease, min-width 0.18s ease, max-width 0.18s ease;
    }

    .diver-report-page .table-shell th:first-child {
        position: static;
        width: auto;
        min-width: 0;
        max-width: none;
        box-shadow: none;
    }

    html .diver-report-page .table-shell th:first-child,
    html .diver-report-page .table-shell td:first-child {
        background: rgba(255, 255, 255, 0.98);
    }

    html .diver-report-page .table-shell th:first-child {
        background: #e9f5fb;
        box-shadow: none;
    }

    .diver-report-page .report-person {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 48px;
    }

    .diver-report-page .report-person-avatar,
    .diver-report-page .report-person-avatar-fallback {
        z-index: 3;
        box-shadow: 0 6px 14px rgba(43, 92, 125, 0.18);
    }

    .diver-report-page .report-person-copy {
        display: block;
    }

    .diver-report-page .table-shell.is-scrolled td:first-child {
        width: 72px;
        min-width: 72px;
        max-width: 72px;
    }

    .diver-report-page .table-shell.is-scrolled .report-person {
        justify-content: center;
    }

    .diver-report-page .table-shell.is-scrolled .report-person-copy {
        display: none;
    }

    html .diver-report-page .report-person-avatar,
    html .diver-report-page .report-person-avatar-fallback {
        background: #fff;
    }
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 340px;
}

.report-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-program-stats {
    margin-bottom: 18px;
}

.summary-boat-head {
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: rgba(11, 31, 46, 0.38);
    border: 1px solid rgba(40, 80, 109, 0.42);
}

.summary-boat-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-boat-copy h3,
.summary-boat-count {
    margin: 0;
}

.summary-boat-count {
    font-weight: 700;
}

.summary-boat-actions {
    margin-left: auto;
    gap: 10px;
}

.summary-boat-actions .btn {
    min-width: 132px;
    justify-content: center;
}

.report-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(11, 31, 46, 0.5);
    border: 1px solid rgba(40, 80, 109, 0.5);
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.approval-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18, 49, 71, 0.96), rgba(14, 39, 58, 0.94));
    border: 1px solid rgba(40, 167, 217, 0.18);
}

.approval-card p {
    margin: 6px 0 0;
    color: var(--muted);
}

.approval-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-form {
    margin: 18px 0 16px;
}

.day-comment-block {
    margin: 8px 0 22px;
    padding: 20px 22px;
    border-radius: 22px;
    background: rgba(11, 31, 46, 0.48);
    border: 1px solid rgba(40, 80, 109, 0.6);
}

.day-alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-alert-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(18, 69, 95, 0.82), rgba(14, 39, 58, 0.94));
    border: 1px solid rgba(40, 167, 217, 0.24);
}

.day-alert-card p {
    margin: 10px 0 0;
    color: #d9f4ff;
    white-space: pre-wrap;
}

.day-alert-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.day-alert-head strong {
    display: block;
    margin-bottom: 8px;
}

.day-alert-head span {
    color: var(--muted);
    font-size: 0.88rem;
}

.muted-inline {
    color: var(--muted);
    font-weight: 700;
}

.day-notes-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.comment-edit-toggle {
    margin: 0;
}

.comment-inline-form {
    margin-top: 12px;
    min-width: min(540px, 100%);
}

.team-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
    overscroll-behavior: contain;
}

.team-members-mobile-toggle {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.team-chip {
    min-width: 0;
    flex: 0 0 auto;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18, 49, 71, 0.88), rgba(14, 39, 58, 0.84));
    border: 1px solid rgba(40, 167, 217, 0.16);
}

.team-list::-webkit-scrollbar {
    width: 10px;
}

.team-list::-webkit-scrollbar-thumb {
    background: rgba(40, 167, 217, 0.35);
    border-radius: 999px;
}

.team-list::-webkit-scrollbar-track {
    background: rgba(8, 24, 37, 0.45);
    border-radius: 999px;
}

.team-chip-online {
    border-color: rgba(73, 211, 156, 0.45);
    box-shadow: 0 0 0 1px rgba(73, 211, 156, 0.14) inset;
}

.team-chip-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.team-chip-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-chip-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
}

.team-chip strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.25;
}

.team-chip span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .team-members-panel-head {
        gap: 12px;
    }

    .team-members-panel-copy {
        width: 100%;
    }

    .team-members-mobile-toggle {
        display: inline-flex;
    }

    .team-members-panel-copy h2,
    .team-members-panel-copy p {
        display: none;
    }

    .team-list {
        max-height: none;
        padding-right: 0;
        overflow: visible;
        overscroll-behavior: auto;
    }

    .team-list[hidden] {
        display: none;
    }
}

.team-member-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    align-items: end;
}

.team-member-edit-form .btn {
    grid-column: 1 / -1;
    justify-self: start;
}

.team-member-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.team-member-actions .inline-form,
.team-member-actions .toggle-panel {
    margin: 0;
}

.team-member-actions .toggle-summary {
    list-style: none;
}

.team-member-actions .toggle-summary::-webkit-details-marker {
    display: none;
}

.team-member-actions > .btn,
.team-member-actions > .inline-form .btn,
.team-member-actions > .toggle-panel > .toggle-summary {
    min-height: 44px;
}

.team-password-toggle[open] {
    width: min(100%, 460px);
}

.team-password-toggle[open] .toggle-summary {
    margin-bottom: 10px;
}

.guest-form-trip-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(220px, 0.9fr);
    gap: 18px;
    align-items: end;
}

.guest-form-trip-fields label {
    margin: 0;
}

.recurring-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 16px;
}

.recurring-chip {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.recurring-chip input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--sea);
}

.recurring-chip div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recurring-chip-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.recurring-chip-person {
    align-items: flex-start;
    gap: 12px;
}

.recurring-chip-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recurring-actions {
    margin-bottom: 12px;
}

.recurring-create-toggle {
    margin-top: 6px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-online {
    background: rgba(73, 211, 156, 0.18);
    color: #8ff0c5;
}

.status-offline {
    background: rgba(152, 183, 202, 0.12);
    color: #b7cada;
}

.status-suspended {
    background: rgba(242, 184, 75, 0.18);
    color: #ffd27b;
}

.status-online-text {
    color: #8ff0c5;
}

.status-offline-text {
    color: #b7cada;
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 18px;
}

.chat-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.chat-live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chat-notice-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(239, 141, 38, 0.18);
    color: #ffd6a6;
    border: 1px solid rgba(239, 141, 38, 0.35);
    font-size: 0.82rem;
    font-weight: 700;
}

.chat-room {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-room-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(11, 31, 46, 0.45);
    border: 1px solid rgba(40, 80, 109, 0.6);
}

.chat-room-members {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.global-chat-messages {
    background: rgba(11, 31, 46, 0.45);
    border: 1px solid rgba(40, 80, 109, 0.6);
    border-radius: 18px;
    padding: 18px;
    max-height: 420px;
}

.chat-sidebar,
.chat-main {
    background: rgba(11, 31, 46, 0.45);
    border: 1px solid rgba(40, 80, 109, 0.6);
    border-radius: 18px;
    padding: 16px;
}

.chat-picker {
    margin-bottom: 16px;
}

.chat-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-user-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    background: rgba(18, 49, 71, 0.72);
    border: 1px solid rgba(40, 167, 217, 0.14);
}

.chat-user-card-active {
    border-color: rgba(40, 167, 217, 0.45);
    background: rgba(18, 69, 95, 0.78);
}

.chat-user-card span,
.chat-user-card small {
    color: var(--muted);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(40, 80, 109, 0.55);
}

.chat-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
}

.chat-bubble {
    max-width: min(78%, 520px);
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(40, 80, 109, 0.55);
}

.chat-bubble p {
    margin: 8px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-direct-pill {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 176, 64, 0.18);
    border: 1px solid rgba(255, 176, 64, 0.34);
    color: #ffd89a;
    font-size: 0.78rem;
    font-weight: 800;
}

.chat-direct-pill-target {
    background: rgba(212, 83, 105, 0.2);
    border-color: rgba(212, 83, 105, 0.38);
    color: #ffd5dd;
}

.chat-bubble small {
    color: var(--muted);
}

.chat-bubble-self {
    align-self: flex-end;
    background: rgba(23, 110, 147, 0.28);
}

.chat-bubble-other {
    align-self: flex-start;
    background: rgba(18, 49, 71, 0.82);
}

.chat-bubble-direct {
    border-color: rgba(255, 176, 64, 0.35);
}

.chat-bubble-direct-target {
    border-color: rgba(212, 83, 105, 0.4);
    box-shadow: 0 0 0 1px rgba(212, 83, 105, 0.16) inset;
}

.chat-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.chat-form .wide {
    flex: 1 1 420px;
    position: relative;
}

.chat-help-text {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.chat-mention-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 30;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(8, 24, 37, 0.96);
    border: 1px solid rgba(40, 80, 109, 0.7);
    box-shadow: 0 18px 32px rgba(2, 18, 31, 0.26);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.chat-mention-list[hidden] {
    display: none !important;
}

.chat-mention-option {
    border: 0;
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(23, 110, 147, 0.16);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font: inherit;
    white-space: nowrap;
    font-weight: 700;
    flex: 0 0 auto;
}

.chat-mention-option strong {
    font-size: 0.92rem;
}

.chat-mention-option small {
    display: none;
}

.chat-mention-option:hover {
    background: rgba(23, 110, 147, 0.26);
}

.chat-alert-card {
    border-color: rgba(212, 83, 105, 0.22);
}

#chat-alerts-panel {
    border-color: rgba(212, 83, 105, 0.24);
    background:
        radial-gradient(circle at top right, rgba(212, 83, 105, 0.14), transparent 30%),
        linear-gradient(145deg, rgba(67, 20, 35, 0.76), rgba(36, 16, 27, 0.78));
}

#chat-alerts-panel .panel-head p {
    color: #f0c7d0;
}

html #chat-alerts-panel {
    border-color: rgba(212, 83, 105, 0.22);
    background:
        radial-gradient(circle at top right, rgba(212, 83, 105, 0.12), transparent 30%),
        linear-gradient(145deg, #fff7fa, #fff1f5);
}

html #chat-alerts-panel .panel-head p {
    color: #8c4253;
}

html .chat-alert-card {
    background:
        linear-gradient(145deg, rgba(255, 248, 251, 0.98), rgba(255, 238, 244, 0.98));
    border: 1px solid rgba(212, 83, 105, 0.2);
    box-shadow: 0 18px 36px rgba(212, 83, 105, 0.1);
}

html .chat-alert-card strong {
    color: #7f2438;
}

html .chat-alert-card p {
    color: #8c4253;
}

html .chat-alert-card .approval-actions .btn {
    min-width: 112px;
    background: linear-gradient(135deg, #d45369, #b43b5e);
    border-color: rgba(180, 59, 94, 0.42);
    color: #fff7fa;
    box-shadow: 0 12px 24px rgba(180, 59, 94, 0.16);
}

#chat-alerts-panel .chat-alert-card {
    background: linear-gradient(145deg, rgba(73, 24, 39, 0.82), rgba(43, 18, 29, 0.84));
    border: 1px solid rgba(212, 83, 105, 0.26);
    box-shadow: 0 18px 36px rgba(18, 7, 11, 0.22);
}

#chat-alerts-panel .chat-alert-card strong {
    color: #fff0f4;
}

#chat-alerts-panel .chat-alert-card p {
    color: #f2c7d1;
}

#chat-alerts-panel .chat-alert-card .approval-actions .btn {
    min-width: 112px;
    background: linear-gradient(135deg, #d45369, #b43b5e);
    border-color: rgba(212, 83, 105, 0.34);
    color: #fff7fa;
    box-shadow: 0 12px 24px rgba(180, 59, 94, 0.16);
}

.month-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.month-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.month-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(10, 108, 116, 0.12);
}

.month-head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.month-head span {
    color: var(--muted);
    font-weight: 600;
}

.date-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 240px;
    flex: 1 1 280px;
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(50, 168, 214, 0.18), transparent 36%),
        linear-gradient(160deg, rgba(18, 55, 79, 0.98), rgba(12, 35, 53, 0.96));
    border: 1px solid rgba(70, 184, 228, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.date-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 20px;
}

.date-card-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1 1 220px;
}

.date-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.date-card-total {
    display: inline-flex;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
}

.date-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
    padding-top: 0;
}

.date-card-actions .inline-form {
    margin: 0;
    width: 100%;
}

.date-card-actions .btn,
.date-card-actions .btn-small {
    width: 100%;
    min-width: 104px;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 0;
    padding: 7px 10px;
    font-size: 0.84rem;
    border-radius: 12px;
}

@media (max-width: 980px) {
    .date-card-top {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .date-card-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
}

.date-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-card-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.date-card-meta {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(240, 250, 255, 0.96);
    font-size: 0.86rem;
    font-weight: 700;
}

.date-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
    gap: 18px;
    align-items: stretch;
}

.note-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(239, 141, 38, 0.18);
    border: 1px solid rgba(239, 141, 38, 0.35);
    color: #ffd6a6;
    font-size: 0.78rem;
    font-weight: 700;
}

.empty-state {
    color: var(--muted);
    margin-top: 16px;
}

body.capture-review-open {
    overflow: hidden;
}

.capture-review-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.capture-review-modal[hidden] {
    display: none !important;
}

.capture-review-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 13, 24, 0.72);
    backdrop-filter: blur(6px);
}

.capture-review-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(10, 31, 47, 0.98), rgba(7, 24, 38, 0.98));
    border: 1px solid rgba(40, 167, 217, 0.24);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.capture-review-dialog h2 {
    margin: 0;
}

.capture-review-copy {
    margin: 8px 0 18px;
    color: var(--muted);
}

.capture-review-frame {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.capture-review-frame img {
    display: block;
    width: 100%;
    max-height: min(65vh, 560px);
    object-fit: contain;
    background: #081520;
}

.capture-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

html .capture-review-dialog {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 252, 0.98));
    border-color: rgba(19, 112, 146, 0.16);
    box-shadow: 0 24px 70px rgba(40, 76, 96, 0.18);
}

html .capture-review-copy {
    color: #648296;
}

html .capture-review-frame {
    background: rgba(22, 87, 116, 0.05);
    border-color: rgba(19, 112, 146, 0.1);
}

@media (max-width: 640px) {
    .capture-review-modal {
        padding: 14px;
    }

    .capture-review-dialog {
        padding: 18px;
        border-radius: 20px;
    }

    .capture-review-actions {
        justify-content: stretch;
    }

    .capture-review-actions .btn {
        flex: 1 1 160px;
    }
}

.site-footer {
    padding: 0 0 24px;
    text-align: center;
    color: var(--muted);
}

.site-footer p {
    margin: 0 0 6px;
}

.site-footer a {
    color: #d9f4ff;
    text-decoration: none;
    font-weight: 700;
}

.site-footer a:hover {
    text-decoration: underline;
}

html .site-footer {
    padding: 6px 0 30px;
    color: #6f8da3;
}

html .site-footer p {
    margin: 0 0 10px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #6f8da3;
}

html .site-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(43, 142, 180, 0.12);
    border: 1px solid rgba(43, 142, 180, 0.16);
    color: #1d4f6e;
    text-decoration: none;
    font-weight: 800;
}

html .site-footer a:hover {
    background: rgba(43, 142, 180, 0.18);
    text-decoration: none;
}

.hint-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(23, 110, 147, 0.15);
    border: 1px solid rgba(40, 167, 217, 0.18);
    color: var(--ink);
}

.signature-block {
    gap: 12px;
}

.signature-pad {
    display: block;
    width: min(760px, calc(100vw - 120px));
    max-width: 100%;
    min-height: 220px;
    height: 220px;
    border: 1px dashed rgba(152, 183, 202, 0.5);
    border-radius: 16px;
    background: rgba(7, 23, 36, 0.7);
    touch-action: none;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 10px;
}

.signature-capture-form {
    width: min(760px, calc(100vw - 120px));
    max-width: 100%;
}

@media (max-width: 720px) {
    .signature-capture-form {
        width: min(100%, calc(100vw - 48px));
    }

    .signature-pad {
        width: min(100%, calc(100vw - 48px));
        min-height: 200px;
        height: 200px;
    }
}

.existing-files {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.floating-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    max-width: calc(100vw - 24px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.floating-chat-toggle {
    max-width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(23, 110, 147, 0.95), rgba(15, 126, 161, 0.82));
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(2, 18, 31, 0.32);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.floating-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(239, 141, 38, 0.95);
    color: #082033;
    font-size: 0.78rem;
    font-weight: 900;
}

.floating-chat-panel {
    width: min(360px, calc(100vw - 24px));
    border-radius: 22px;
    padding: 14px;
    overflow: visible;
    background: rgba(9, 26, 39, 0.96);
    border: 1px solid rgba(40, 167, 217, 0.24);
    box-shadow: 0 22px 46px rgba(2, 18, 31, 0.45);
    backdrop-filter: blur(12px);
}

.floating-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.floating-chat-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.floating-chat-messages {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-chat-form {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    overflow: visible;
}

.floating-chat-form .wide {
    flex: 1 1 100%;
    position: relative;
    overflow: visible;
}

.floating-chat-form .chat-mention-list {
    max-width: 100%;
}

.floating-chat-form input[type="text"],
.floating-chat-form input[type="file"] {
    width: 100%;
}

.floating-chat-form .btn {
    min-width: 110px;
}

@media (max-width: 720px) {
    .layout {
        width: min(100% - 18px, 1180px);
        padding-top: 18px;
    }

    .panel {
        padding: 18px;
        border-radius: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .top-bar {
        flex-wrap: wrap;
    }

    .logout-form {
        margin-left: 0;
    }

    .brand-mark {
        align-items: flex-start;
    }

    .header-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .header-nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    .header-nav-links .btn {
        width: 100%;
        min-height: 58px;
        padding: 12px 14px;
        border-radius: 18px;
        justify-content: center;
        text-align: center;
        line-height: 1.25;
        white-space: normal;
        text-decoration: none;
    }

    .header-nav-meta {
        width: 100%;
        align-items: stretch;
        margin-left: 0;
    }

    .header-nav-meta .profile-pill {
        align-self: flex-end;
    }

    .top-bar-actions {
        width: 100%;
        align-items: stretch;
    }

    .top-user-card,
    .top-bar-actions .logout-form {
        align-self: flex-end;
    }

    .top-user-card {
        width: min(100%, 340px);
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .summary-boat-head {
        align-items: flex-start;
    }

    .summary-boat-actions {
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .summary-boat-actions .btn {
        flex: 0 1 auto;
        width: min(100%, 240px);
        min-width: 0;
        text-align: center;
        justify-content: center;
    }

    .form-grid,
    .form-vertical,
    .date-starter,
    .date-starter-vertical,
    .team-member-edit-form,
    .guest-form-trip-fields,
    .guest-birth-grid {
        grid-template-columns: 1fr;
    }

    .team-member-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .team-member-actions > .btn,
    .team-member-actions > .inline-form,
    .team-member-actions > .inline-form .btn,
    .team-member-actions > .toggle-panel,
    .team-member-actions > .toggle-panel > .toggle-summary {
        width: 100%;
    }

    .recurring-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .recurring-chip {
        align-items: flex-start;
    }

    .recurring-chip > div {
        min-width: 0;
        width: 100%;
    }

    .recurring-chip-person {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: start;
        width: 100%;
    }

    .recurring-chip-copy {
        min-width: 0;
    }

    .recurring-chip-copy strong,
    .recurring-chip-copy span,
    .recurring-chip-select strong,
    .recurring-chip-select span {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .recurring-item-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-top: 8px;
    }

    .recurring-item-actions .btn,
    .recurring-actions .btn {
        width: 100%;
    }

    .form-grid > .wide,
    .form-vertical > .wide {
        grid-column: auto;
    }

    .header-password-body {
        width: min(100vw - 24px, 720px);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .guest-portal-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-bubble {
        max-width: 100%;
    }

    .date-list {
        grid-template-columns: 1fr;
    }

    .history-result-side {
        width: 100%;
        align-items: flex-start;
    }

    .history-result-foot {
        align-items: stretch;
        flex-direction: column;
    }

    .guest-submission-reject-form {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .guest-submission-reject-form .btn {
        width: 100%;
    }

    .history-result-actions-top-right {
        justify-content: flex-start;
    }

    .date-card-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        align-items: stretch;
    }

    .floating-chat {
        right: 12px;
        left: auto;
        bottom: 12px;
        align-items: flex-end;
        max-width: calc(100vw - 24px);
    }

    .floating-chat-toggle {
        width: auto;
        min-width: 0;
        justify-content: center;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .floating-chat-panel {
        width: min(320px, calc(100vw - 24px));
    }
}

@media (max-width: 520px) {
    .header-nav-links {
        grid-template-columns: 1fr;
    }

    .header-nav-links .btn {
        min-height: 54px;
        justify-content: flex-start;
        text-align: left;
        padding-inline: 18px;
    }
}

.browser-notifications-panel {
    border-color: rgba(55, 142, 180, 0.18);
}

.browser-notifications-head {
    align-items: center;
    gap: 14px;
}

.browser-notifications-head .btn {
    flex-shrink: 0;
}

.browser-notifications-status {
    margin: 0;
    font-weight: 700;
    color: var(--muted);
}

.browser-notifications-status.is-success {
    color: #227a52;
}

.browser-notifications-status.is-error {
    color: #b14b62;
}

@media (max-width: 720px) {
    .update-management-grid,
    .app-update-history-list {
        grid-template-columns: 1fr;
    }

    .update-publish-form {
        padding: 16px;
    }

    .update-publish-form button[type="submit"] {
        width: 100%;
        min-height: 52px;
    }

    .app-update-card,
    .app-update-history-card {
        align-items: stretch;
    }

    .app-update-actions .btn,
    .app-update-actions form,
    .app-update-actions .inline-form {
        width: 100%;
    }

    .app-update-actions .btn {
        width: 100%;
    }

    .browser-notifications-head {
        align-items: stretch;
    }

    .browser-notifications-head .btn {
        width: 100%;
    }

    .guest-transfer-toolbar {
        align-items: stretch;
    }

    .guest-transfer-toolbar-field,
    .guest-transfer-toolbar-field select,
    .guest-transfer-toolbar .btn {
        width: 100%;
    }
}

