:root {
    --navy-950: #071b2b;
    --navy-900: #0a2940;
    --navy-800: #103d5c;
    --blue-700: #0877b9;
    --blue-600: #0d8ed2;
    --blue-500: #19a6e2;
    --cyan-400: #34c6df;
    --aqua-400: #2ed6c2;
    --green-500: #20b874;
    --red-500: #ed5353;
    --amber-500: #f0a522;
    --ink: #102f45;
    --muted: #6b8190;
    --line: #dce9ef;
    --surface: #ffffff;
    --surface-soft: #f4f9fb;
    --shadow-sm: 0 7px 24px rgba(16, 61, 92, .08);
    --shadow-lg: 0 24px 70px rgba(7, 37, 59, .22);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --header-height: 78px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #edf6f9;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 5% 5%, rgba(52, 198, 223, .14), transparent 28rem),
        linear-gradient(180deg, #f8fcfd 0%, #eef7fa 58%, #f7fbfc 100%);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.45;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

button, input {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(8, 119, 185, .94), rgba(7, 46, 74, .98)),
        url("bg.jpg") center / cover no-repeat;
    transition: opacity .5s ease, visibility .5s ease;
}

.splash-screen::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -6%;
    left: -10%;
    height: 28%;
    border-radius: 50% 50% 0 0;
    background: rgba(255, 255, 255, .08);
    transform: rotate(-3deg);
}

.splash-screen.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.splash-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.splash-brand img {
    width: 84px;
    height: 84px;
    margin-bottom: 15px;
    border-radius: 26px;
    box-shadow: 0 18px 40px rgba(0, 28, 49, .3);
}

.splash-brand div {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 300;
    letter-spacing: -.06em;
}

.splash-brand div strong {
    font-weight: 800;
}

.splash-brand > span:not(.loader) {
    margin-top: 5px;
    color: rgba(255, 255, 255, .8);
    font-size: .88rem;
}

.loader {
    width: 28px;
    height: 28px;
    margin-top: 30px;
    border: 3px solid rgba(255, 255, 255, .28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 500;
    height: calc(var(--header-height) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid rgba(210, 228, 236, .9);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 5px 24px rgba(15, 62, 91, .04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    height: var(--header-height);
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand > img {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(13, 142, 210, .2);
}

.brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.brand-copy > span {
    color: var(--navy-900);
    font-size: 1.34rem;
    font-weight: 350;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.brand-copy strong {
    color: var(--blue-700);
    font-weight: 800;
}

.brand-copy small {
    max-width: 230px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    color: #237450;
    border: 1px solid #d7eee2;
    border-radius: 999px;
    background: #f0fbf5;
    font-size: .76rem;
}

.connection-state > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(32, 184, 116, .12);
}

.connection-state.is-offline {
    color: #a34747;
    border-color: #f2d8d8;
    background: #fff4f4;
}

.connection-state.is-offline > span {
    background: var(--red-500);
    box-shadow: 0 0 0 4px rgba(237, 83, 83, .12);
}

.icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--blue-700);
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.icon-button:hover {
    background: #f0f9fc;
    transform: translateY(-1px);
}

.icon-button.is-loading i {
    animation: spin .7s linear infinite;
}

.logout-button {
    color: #a34d4d;
    background: #fff7f7;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 5px 10px 5px 5px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.profile-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
}

.profile-chip > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.profile-chip small {
    color: var(--muted);
    font-size: .61rem;
    line-height: 1.2;
}

.profile-chip b {
    max-width: 120px;
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 190px);
    margin: 0 auto;
    padding: 26px 0 34px;
}

.hero-card {
    position: relative;
    min-height: 265px;
    overflow: hidden;
    color: #fff;
    border-radius: var(--radius-lg);
    background: linear-gradient(118deg, #0b3552 0%, #0877b9 53%, #15a9d3 100%);
    box-shadow: 0 20px 48px rgba(8, 87, 133, .22);
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-card::before {
    top: -150px;
    right: -70px;
    width: 410px;
    height: 410px;
    border: 60px solid rgba(255, 255, 255, .055);
}

.hero-card::after {
    right: 18%;
    bottom: -130px;
    width: 330px;
    height: 230px;
    background: rgba(46, 214, 194, .14);
    filter: blur(2px);
}

.hero-water {
    position: absolute;
    inset: 0 0 0 55%;
    opacity: .18;
    background: url("bg.jpg") center / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%);
    mask-image: linear-gradient(90deg, transparent, #000 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 220px;
    padding: 34px 42px 48px;
    gap: 35px;
}

.facility-brand {
    display: flex;
    align-items: center;
    gap: 21px;
    min-width: 0;
}

.facility-logo {
    display: grid;
    width: 112px;
    height: 94px;
    flex: 0 0 auto;
    padding: 12px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 15px 35px rgba(1, 35, 57, .2);
}

.facility-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.facility-logo.image-error::after {
    content: "AP";
    color: var(--blue-700);
    font-size: 2rem;
    font-weight: 800;
}

.facility-logo.image-error img {
    display: none;
}

.facility-brand p {
    margin: 0 0 7px;
    color: rgba(255, 255, 255, .72);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.facility-brand h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3.35rem);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.hero-status-wrap {
    display: flex;
    width: min(100%, 330px);
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: 10px;
    min-height: 43px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(7, 29, 45, .34);
    font-size: .92rem;
    font-weight: 750;
    box-shadow: 0 8px 25px rgba(0, 33, 53, .12);
    backdrop-filter: blur(12px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dce8ee;
    box-shadow: 0 0 0 5px rgba(220, 232, 238, .14);
}

.status-badge.is-open .status-dot {
    background: #55e8a5;
    box-shadow: 0 0 0 5px rgba(85, 232, 165, .16);
}

.status-badge.is-closed .status-dot,
.status-badge.is-offline .status-dot {
    background: #ff8a8a;
    box-shadow: 0 0 0 5px rgba(255, 138, 138, .16);
}

.status-badge.is-loading .status-dot {
    animation: pulse 1.3s ease infinite;
}

@keyframes pulse {
    50% { opacity: .45; transform: scale(.85); }
}

.opening-block {
    display: flex;
    padding: 17px 18px;
    flex-direction: column;
    align-items: flex-end;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
}

.opening-block > span {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .72);
    font-size: .7rem;
}

.opening-block > span i {
    margin-right: 5px;
}

.opening-block strong {
    font-size: 1.21rem;
    letter-spacing: -.02em;
}

.opening-block small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .72);
    font-size: .66rem;
}

.opening-block.is-special {
    border-color: rgba(255, 221, 119, .42);
    background: rgba(240, 165, 34, .16);
}

.hero-meta {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 42px;
    color: rgba(255, 255, 255, .72);
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: rgba(4, 35, 56, .18);
    font-size: .69rem;
}

.hero-meta i {
    margin-right: 6px;
    color: #6debd1;
}

.announcement-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    margin-top: 17px;
    padding: 16px 20px;
    border: 1px solid #f3dfad;
    border-radius: var(--radius-md);
    background: linear-gradient(110deg, #fffdf5, #fff8df);
    box-shadow: 0 7px 22px rgba(140, 98, 20, .07);
}

.announcement-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ad6e08;
    border-radius: 13px;
    background: #ffedb9;
}

.announcement-card > div {
    min-width: 0;
}

.announcement-card small {
    display: block;
    margin-bottom: 2px;
    color: #9a6a14;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.announcement-card p {
    margin: 0;
    color: #6d511c;
    font-size: .88rem;
    font-weight: 600;
    white-space: pre-line;
    transition: opacity .25s ease, transform .25s ease;
}

.announcement-card p.is-changing {
    opacity: 0;
    transform: translateY(4px);
}

.announcement-count {
    color: #ac7c21;
    font-size: .7rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.metric-card {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 125px;
    padding: 20px;
    gap: 16px;
    overflow: hidden;
    border: 1px solid rgba(217, 232, 239, .9);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    content: "";
    position: absolute;
    top: -32px;
    right: -34px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--card-halo, rgba(25, 166, 226, .07));
}

.metric-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 49px;
    height: 49px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--card-accent, var(--blue-700));
    border-radius: 15px;
    background: var(--card-soft, #eaf7fd);
    font-size: 1.2rem;
}

.water-metric { --card-accent: #0877b9; --card-soft: #e8f6fd; --card-halo: rgba(25, 166, 226, .09); }
.air-metric { --card-accent: #e87d2a; --card-soft: #fff2e8; --card-halo: rgba(232, 125, 42, .08); }
.weather-metric { --card-accent: #8667cc; --card-soft: #f2edff; --card-halo: rgba(134, 103, 204, .08); }
.visitors-metric { --card-accent: #18a574; --card-soft: #e8f9f3; --card-halo: rgba(24, 165, 116, .08); }

.weather-symbol img {
    width: 41px;
    height: 41px;
    object-fit: contain;
}

.metric-card > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.metric-card small {
    color: var(--muted);
    font-size: .67rem;
    font-weight: 650;
}

.metric-card strong {
    margin: 2px 0 1px;
    overflow: hidden;
    color: var(--navy-900);
    font-size: clamp(1.24rem, 2.1vw, 1.72rem);
    line-height: 1.2;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-metric strong {
    font-size: clamp(1rem, 1.5vw, 1.28rem);
}

.metric-card > div > span {
    color: #91a1aa;
    font-size: .62rem;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: 16px;
    margin-top: 16px;
}

.service-card,
.school-card {
    padding: 23px;
    border: 1px solid rgba(217, 232, 239, .95);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-sm);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.heading-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--blue-700);
    border-radius: 12px;
    background: #ebf7fc;
}

.card-heading > div {
    min-width: 0;
}

.card-heading small {
    display: block;
    color: var(--muted);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.card-heading h2 {
    margin: 1px 0 0;
    color: var(--navy-900);
    font-size: 1rem;
}

.lifeguard-row {
    display: flex;
    align-items: center;
    min-height: 92px;
    margin-top: 17px;
    padding: 15px 16px;
    gap: 14px;
    border-radius: 17px;
    background: linear-gradient(110deg, #f1f9fc, #f8fcfd);
}

.lifeguard-avatar {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-700));
    font-size: 1.35rem;
}

.lifeguard-avatar > span {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 14px;
    height: 14px;
    border: 3px solid #f2fafc;
    border-radius: 50%;
    background: var(--green-500);
}

.lifeguard-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.lifeguard-copy strong,
.lifeguard-copy a {
    overflow: hidden;
    color: var(--navy-900);
    font-size: 1.09rem;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lifeguard-copy a:hover {
    color: var(--blue-700);
}

.lifeguard-copy > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .7rem;
}

.call-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 15px;
    color: #fff;
    border-radius: 13px;
    background: var(--green-500);
    font-size: .76rem;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(32, 184, 116, .2);
}

.phone-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    margin-top: 13px;
    padding: 0 3px;
    color: var(--muted);
    font-size: .7rem;
}

.phone-line i {
    color: var(--blue-600);
}

.phone-line a {
    color: var(--blue-700);
    font-weight: 750;
    text-decoration: none;
}

.quick-actions {
    display: flex;
    margin-top: 14px;
    flex-direction: column;
}

.quick-actions > button,
.quick-actions > a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 1px;
    gap: 11px;
    border: 0;
    border-bottom: 1px solid #e9f0f3;
    background: transparent;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.quick-actions > :last-child {
    border-bottom: 0;
}

.quick-actions > button:hover,
.quick-actions > a:hover {
    color: var(--blue-700);
}

.quick-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
}

.quick-icon.price { color: #d78a0f; background: #fff5db; }
.quick-icon.event { color: #8b65c4; background: #f3edff; }
.quick-icon.chat { color: #168f77; background: #e9faf6; }
.quick-icon.login { color: var(--blue-700); background: #eaf7fd; }

.quick-actions > * > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quick-actions b {
    color: var(--ink);
    font-size: .78rem;
}

.quick-actions small {
    color: var(--muted);
    font-size: .64rem;
}

.quick-actions > * > i:last-child {
    color: #9babb4;
    font-size: .65rem;
}

.school-card {
    margin-top: 16px;
}

.school-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 17px;
}

.school-stats > div {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 14px;
    column-gap: 12px;
    border-radius: 15px;
    background: #f4f9fb;
}

.school-stats span {
    display: grid;
    grid-row: 1 / 3;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--blue-700);
    border-radius: 12px;
    background: #e5f5fb;
}

.school-stats strong {
    font-size: 1.15rem;
    line-height: 1.1;
}

.school-stats small {
    color: var(--muted);
    font-size: .65rem;
}

.app-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 92px;
    padding: 18px max(30px, calc((100vw - 1180px) / 2));
    gap: 20px;
    color: #718995;
    border-top: 1px solid #dbe9ee;
    background: rgba(255, 255, 255, .72);
}

.app-footer > div:first-child {
    display: flex;
    flex-direction: column;
}

.app-footer > div:first-child > span {
    color: var(--navy-800);
    font-size: 1rem;
    letter-spacing: -.04em;
}

.app-footer > div:first-child strong {
    color: var(--blue-700);
}

.app-footer small,
.app-footer .version,
.footer-powered span {
    font-size: .6rem;
}

.footer-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-powered img {
    width: 82px;
    height: 24px;
    object-fit: contain;
}

.app-footer .version {
    justify-self: end;
}

.mobile-nav {
    display: none;
}

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    padding: 22px;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 27, 43, .62);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    animation: backdropIn .2s ease both;
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: min(88vh, 780px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 25px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    animation: panelIn .25s ease both;
}

@keyframes backdropIn {
    from { opacity: 0; }
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
}

.modal-close {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    border: 0;
    border-radius: 12px;
    background: #f0f6f8;
    cursor: pointer;
}

.login-panel {
    padding: 31px;
}

.login-panel > .modal-close {
    position: absolute;
    top: 17px;
    right: 17px;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 27px;
    color: var(--navy-900);
    font-size: 1.15rem;
    letter-spacing: -.04em;
}

.login-brand img {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.login-brand strong {
    color: var(--blue-700);
}

.eyebrow {
    display: block;
    color: var(--blue-700);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-panel h2 {
    margin: 3px 0 7px;
    color: var(--navy-900);
    font-size: 1.65rem;
    letter-spacing: -.04em;
}

.login-panel > p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: .78rem;
}

.login-panel label {
    display: block;
    margin: 14px 0 6px;
    color: var(--navy-800);
    font-size: .7rem;
    font-weight: 700;
}

.input-shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 50px;
    padding: 0 14px;
    color: #86a0ae;
    border: 1px solid #d9e7ed;
    border-radius: 14px;
    background: #f8fbfc;
    transition: border .2s ease, box-shadow .2s ease;
}

.input-shell:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(25, 166, 226, .11);
}

.input-shell input {
    width: 100%;
    height: 48px;
    min-width: 0;
    padding: 0 11px;
    color: var(--ink);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .86rem;
}

.password-toggle {
    padding: 8px;
    color: #78909d;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 51px;
    margin-top: 22px;
    gap: 10px;
    color: #fff;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(100deg, var(--blue-700), var(--blue-500));
    box-shadow: 0 12px 25px rgba(8, 119, 185, .22);
    font-size: .83rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-button.is-loading {
    opacity: .78;
    pointer-events: none;
}

.primary-button.is-loading i {
    animation: spin .7s linear infinite;
}

.login-security {
    display: block;
    margin-top: 15px;
    color: #8397a2;
    font-size: .63rem;
    text-align: center;
}

.login-security i {
    margin-right: 4px;
    color: var(--green-500);
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 15px;
    padding: 11px 12px;
    color: #9f3e3e;
    border: 1px solid #f0d1d1;
    border-radius: 12px;
    background: #fff3f3;
    font-size: .72rem;
}

.form-alert.info {
    color: #376b87;
    border-color: #cfe6f0;
    background: #f0f9fd;
}

.modal-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 88px;
    padding: 18px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.modal-head-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    font-size: 1.08rem;
}

.modal-head-icon.price { color: #d88c10; background: #fff4d4; }
.modal-head-icon.event { color: #8460c0; background: #f1eaff; }

.modal-head small {
    color: var(--muted);
    font-size: .63rem;
}

.modal-head h2 {
    margin: 1px 0 0;
    color: var(--navy-900);
    font-size: 1.18rem;
}

.modal-scroll {
    max-height: calc(min(88vh, 780px) - 88px);
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.price-group {
    margin-bottom: 23px;
}

.price-group h3 {
    margin: 0 0 6px;
    color: var(--blue-700);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 43px;
    padding: 7px 0;
    gap: 18px;
    color: #476171;
    border-bottom: 1px solid #eaf0f3;
    font-size: .77rem;
}

.price-row strong {
    flex: 0 0 auto;
    color: var(--navy-900);
    font-size: .8rem;
}

.modal-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 14px;
    color: #537182;
    border-radius: 13px;
    background: #eef8fc;
    font-size: .69rem;
}

.modal-note i {
    margin-top: 2px;
    color: var(--blue-600);
}

.compact-modal {
    width: min(100%, 460px);
}

.empty-state {
    padding: 44px 30px 50px;
    text-align: center;
}

.empty-state > span {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 17px;
    place-items: center;
    color: #8360bd;
    border-radius: 21px;
    background: #f1ebfc;
    font-size: 1.65rem;
}

.empty-state h3 {
    margin: 0 0 7px;
    color: var(--navy-900);
    font-size: 1.08rem;
}

.empty-state p {
    max-width: 330px;
    margin: 0 auto;
    color: var(--muted);
    font-size: .75rem;
}

.toast-container {
    position: fixed;
    z-index: 5000;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 9px;
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 12px 15px;
    color: #fff;
    border-radius: 13px;
    background: rgba(7, 35, 54, .94);
    box-shadow: 0 12px 28px rgba(4, 29, 47, .24);
    font-size: .74rem;
    animation: toastIn .25s ease both;
}

.app-toast.success i { color: #63e6ab; }
.app-toast.error i { color: #ff9898; }
.app-toast.is-leaving { animation: toastOut .25s ease both; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 980px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-right: 30px;
        padding-left: 30px;
    }

    .hero-meta {
        padding-right: 30px;
        padding-left: 30px;
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 66px;
    }

    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }

    .header-inner,
    .app-main {
        width: min(100% - 24px, 650px);
    }

    .brand > img {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .brand-copy > span {
        font-size: 1.12rem;
    }

    .brand-copy small {
        max-width: 130px;
        font-size: .59rem;
    }

    .connection-state,
    .profile-chip > span:last-child {
        display: none;
    }

    .profile-chip {
        padding: 4px;
        border-radius: 12px;
    }

    .profile-avatar {
        width: 34px;
        height: 34px;
    }

    .app-main {
        padding-top: 14px;
        padding-bottom: 22px;
    }

    .hero-card {
        min-height: 316px;
        border-radius: 23px;
    }

    .hero-water {
        inset: 44% 0 0;
        opacity: .16;
        -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%);
        mask-image: linear-gradient(180deg, transparent, #000 35%);
    }

    .hero-content {
        min-height: 270px;
        padding: 25px 21px 60px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 22px;
    }

    .facility-logo {
        width: 78px;
        height: 68px;
        padding: 8px;
        border-radius: 16px;
    }

    .facility-brand {
        gap: 14px;
    }

    .facility-brand p {
        margin-bottom: 4px;
        font-size: .6rem;
    }

    .facility-brand h1 {
        font-size: clamp(1.5rem, 7vw, 2.25rem);
    }

    .hero-status-wrap {
        width: 100%;
        max-width: none;
        flex-direction: row;
        align-items: stretch;
        gap: 9px;
    }

    .status-badge {
        min-width: 0;
        flex: 1;
        align-self: stretch;
        justify-content: center;
        padding: 0 12px;
        border-radius: 15px;
        font-size: .78rem;
    }

    .opening-block {
        min-width: 0;
        flex: 1.25;
        padding: 12px;
        align-items: flex-start;
        border-radius: 15px;
    }

    .opening-block > span {
        font-size: .6rem;
    }

    .opening-block strong {
        font-size: .93rem;
    }

    .opening-block small {
        font-size: .55rem;
    }

    .hero-meta {
        min-height: 45px;
        padding: 0 21px;
        font-size: .59rem;
    }

    .announcement-card {
        margin-top: 12px;
        padding: 13px 14px;
        gap: 11px;
        border-radius: 17px;
    }

    .announcement-icon {
        width: 37px;
        height: 37px;
        border-radius: 11px;
    }

    .announcement-card p {
        font-size: .77rem;
    }

    .metric-grid {
        gap: 10px;
        margin-top: 12px;
    }

    .metric-card {
        min-height: 116px;
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        border-radius: 17px;
    }

    .metric-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .weather-symbol img {
        width: 34px;
        height: 34px;
    }

    .metric-card small {
        font-size: .59rem;
    }

    .metric-card strong,
    .weather-metric strong {
        max-width: 100%;
        font-size: 1.16rem;
    }

    .metric-card > div > span {
        display: none;
    }

    .content-grid {
        gap: 10px;
        margin-top: 10px;
    }

    .service-card,
    .school-card {
        padding: 17px;
        border-radius: 18px;
    }

    .lifeguard-row {
        padding: 12px;
        gap: 11px;
    }

    .lifeguard-avatar {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .lifeguard-copy strong,
    .lifeguard-copy a {
        font-size: .93rem;
    }

    .lifeguard-copy > span {
        font-size: .61rem;
    }

    .call-button {
        width: 42px;
        height: 42px;
        padding: 0;
    }

    .call-button span {
        display: none;
    }

    .phone-line {
        font-size: .63rem;
    }

    .school-stats {
        gap: 7px;
    }

    .school-stats > div {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        padding: 11px 6px;
        text-align: center;
        row-gap: 2px;
    }

    .school-stats span {
        grid-row: auto;
        width: 35px;
        height: 35px;
        margin-bottom: 4px;
    }

    .app-footer {
        display: flex;
        min-height: 78px;
        padding: 16px 20px;
        justify-content: space-between;
    }

    .app-footer > div:first-child,
    .app-footer .version {
        display: none;
    }

    .footer-powered {
        width: 100%;
    }

    .mobile-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 700;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        min-height: calc(66px + env(safe-area-inset-bottom));
        padding: 4px 8px env(safe-area-inset-bottom);
        border-top: 1px solid rgba(207, 224, 232, .95);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -8px 25px rgba(10, 49, 74, .08);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .mobile-nav a,
    .mobile-nav button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 2px;
        gap: 3px;
        color: #758b97;
        border: 0;
        background: transparent;
        flex-direction: column;
        font-size: .62rem;
        text-decoration: none;
    }

    .mobile-nav i {
        font-size: 1.05rem;
    }

    .mobile-nav .active {
        color: var(--blue-700);
        font-weight: 750;
    }

    .modal-layer {
        padding: 12px;
        place-items: end center;
    }

    .modal-panel {
        max-height: calc(92vh - env(safe-area-inset-top));
        border-radius: 24px 24px 18px 18px;
    }

    .login-panel {
        padding: 25px 20px calc(22px + env(safe-area-inset-bottom));
    }

    .modal-scroll {
        max-height: calc(92vh - 100px - env(safe-area-inset-top));
        padding: 18px;
    }

    .toast-container {
        right: 12px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        left: 12px;
        align-items: stretch;
    }

    .app-toast {
        max-width: none;
    }
}

@media (max-width: 390px) {
    .header-inner,
    .app-main {
        width: calc(100% - 18px);
    }

    .brand-copy small {
        max-width: 102px;
    }

    .header-actions {
        gap: 6px;
    }

    .facility-logo {
        width: 68px;
        height: 60px;
    }

    .status-badge {
        font-size: .7rem;
    }

    .opening-block strong {
        font-size: .84rem;
    }

    .phone-line span {
        display: none;
    }

    .phone-line {
        grid-template-columns: auto 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
