/* AquaFlow maritime redesign layer. The base login.css remains as a safe rollback. */
:root {
    color-scheme: light;
    --af-navy-950: #021a35;
    --af-navy-900: #052b55;
    --af-blue-600: #076ce5;
    --af-cyan-400: #29d6ef;
    --af-ink: #092348;
    --af-muted: #64799a;
    --af-login-maritime-image: url("../images/aquaflow-maritime-sidebar.webp");
    --af-login-maritime-position: center bottom;
    --af-login-maritime-size: cover;
}

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

body { margin: 0; background: #eaf5fc; }

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(42, 204, 239, .45);
    outline-offset: 2px;
}

.af-login-page {
    padding: clamp(16px, 2.5vw, 34px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 8%, rgba(255,255,255,.95), transparent 34%),
        linear-gradient(135deg, #dff2ff 0%, #f7fbff 48%, #eaf4fb 100%);
}

.af-login-shell {
    width: min(1500px, 100%);
    min-height: min(870px, calc(100dvh - 48px));
    grid-template-columns: minmax(560px, 1.08fr) minmax(490px, .92fr);
    border-color: rgba(139, 187, 222, .5);
    border-radius: 16px;
    background: #fafdff;
    box-shadow: 0 28px 80px rgba(6, 49, 89, .18);
}

.af-brand-panel {
    isolation: isolate;
    padding: clamp(34px, 4vw, 58px) clamp(36px, 5vw, 72px) 34px;
    background-image:
        linear-gradient(130deg, rgba(2,25,52,.94), rgba(4,51,94,.72) 55%, rgba(8,89,151,.34)),
        var(--af-login-maritime-image),
        linear-gradient(130deg, #021934, #075188);
    background-position: center, var(--af-login-maritime-position), center;
    background-size: cover, var(--af-login-maritime-size), cover;
}

.af-brand-panel::before {
    content: "";
    position: absolute;
    inset: auto -15% -24% 18%;
    z-index: -2;
    height: 66%;
    border-radius: 50% 0 0;
    background:
        radial-gradient(ellipse at 62% 32%, rgba(70,196,244,.34), transparent 18%),
        linear-gradient(180deg, rgba(8,102,165,.15), rgba(0,19,40,.86));
    transform: rotate(-4deg);
}

.af-brand-panel::after {
    inset: auto -7% -8% -8%;
    z-index: -1;
    height: 34%;
    opacity: .76;
    background:
        linear-gradient(168deg, transparent 0 45%, rgba(76,191,235,.14) 47% 49%, transparent 51% 100%),
        linear-gradient(176deg, transparent 0 61%, rgba(76,191,235,.1) 63% 65%, transparent 67% 100%),
        linear-gradient(180deg, rgba(10,91,150,.18), rgba(0,20,42,.8));
}

.af-brand-glow {
    position: absolute;
    z-index: -2;
    inset: -15% -20% auto 35%;
    height: 62%;
    background: radial-gradient(circle, rgba(15,137,226,.45), transparent 64%);
    pointer-events: none;
}

.af-brand-waves {
    position: absolute;
    z-index: -1;
    top: 17%;
    right: -7%;
    width: 42%;
    height: 44%;
    opacity: .28;
    transform: rotate(-15deg);
    pointer-events: none;
}

.af-brand-waves span {
    position: absolute;
    inset-inline: 0;
    height: 45%;
    border: 1px solid #4dbff4;
    border-left-color: transparent;
    border-radius: 50%;
}

.af-brand-waves span:nth-child(2) { transform: translateY(17px); }
.af-brand-waves span:nth-child(3) { transform: translateY(34px); }
.af-brand-waves span:nth-child(4) { transform: translateY(51px); }

.af-brand-lockup { grid-template-columns: 58px minmax(0,1fr); gap: 14px; }

.af-logo-mark {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: linear-gradient(145deg, #086daf, #08aac7);
    box-shadow: inset 0 1px rgba(255,255,255,.25), 0 12px 30px rgba(0,12,28,.18);
    font-size: 29px;
}

.af-brand-lockup strong { font-size: 22px; }
.af-brand-lockup span { color: #9eeeff; letter-spacing: .16em; }

.af-brand-story {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0,1fr) 160px;
    gap: 32px;
    align-items: start;
    margin-top: clamp(54px, 8vh, 104px);
}

.af-brand-copy { margin-top: 0; min-width: 0; }

.af-brand-eyebrow,
.af-form-eyebrow { letter-spacing: .34em; }

.af-brand-copy h1 {
    margin-top: 17px;
    font-size: clamp(43px, 4.1vw, 64px);
    letter-spacing: -.045em;
    white-space: nowrap;
}

.af-brand-copy h1 em {
    background: linear-gradient(90deg, #32d8ed, #7eeeff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: normal;
}

.af-brand-copy h2 { color: #d1effc; font-size: clamp(22px, 2.2vw, 31px); }
.af-brand-copy p { margin-top: 21px; color: #e3f0f8; }

.af-brand-manifesto {
    margin: 0;
    color: #b7e6f8;
    font-size: 14px;
    line-height: 2;
    font-weight: 750;
    letter-spacing: .34em;
    text-transform: uppercase;
}

.af-brand-manifesto::after {
    content: "";
    width: 36px;
    height: 2px;
    display: block;
    margin-top: 16px;
    background: #32d8ed;
}

.af-process-list { max-width: 610px; margin-top: 34px; }

.af-process-list > div {
    grid-template-columns: 56px minmax(0,1fr) 24px;
    gap: 15px;
    padding: 13px 0;
}

.af-process-list > div > i:first-child {
    width: 56px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(145deg, #087fb8, #09a8d0);
    box-shadow: inset 0 1px rgba(255,255,255,.2);
    font-size: 23px;
}

.af-process-list > div:nth-child(2) > i:first-child { background: linear-gradient(145deg, #0c8b75, #1dbd83); }
.af-process-list > div:nth-child(3) > i:first-child { background: linear-gradient(145deg, #a66a15, #e2a22b); }
.af-process-list strong { font-size: 15px; }
.af-process-arrow { color: #d8f3ff; font-size: 17px; }

.af-impact-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
    max-width: 590px;
    margin-top: auto;
    padding-top: 28px;
}

.af-impact-list span {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    color: #a8c6da;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 720;
}

.af-impact-list span + span { border-left: 1px solid rgba(177,219,240,.18); padding-left: 18px; }
.af-impact-list i { color: #269fe9; font-size: 25px; }
.af-brand-status { margin-top: 28px; font-size: 10px; }
.af-brand-status span { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(46,210,138,.16), 0 0 18px rgba(46,210,138,.5); }

.af-login-form-container {
    position: relative;
    padding: 110px clamp(36px,5vw,78px) 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 12%, rgba(195,232,252,.52), transparent 23%),
        linear-gradient(145deg, #fafdff 0%, #f6fbff 55%, #edf7fd 100%);
}

.af-login-form-container::before,
.af-login-form-container::after {
    content: "";
    position: absolute;
    width: 62%;
    height: 220px;
    border: 22px solid rgba(98,184,236,.08);
    border-left-color: transparent;
    border-radius: 50%;
    transform: rotate(-28deg);
    pointer-events: none;
}

.af-login-form-container::before { top: 5%; right: -20%; }
.af-login-form-container::after { bottom: 7%; right: -31%; }

.af-data-promise {
    position: absolute;
    top: 45px;
    right: 68px;
    margin: 0;
    color: #496c9a;
    font-size: 10px;
    line-height: 2;
    font-weight: 850;
    letter-spacing: .36em;
    text-transform: uppercase;
}

.af-data-promise::after {
    content: "";
    width: 42px;
    height: 2px;
    display: block;
    margin-top: 12px;
    background: #1aa4e4;
}

.af-login-form {
    position: relative;
    z-index: 1;
    width: min(500px,100%);
    gap: 17px;
    border-color: #c5dced;
    border-radius: 16px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 22px 60px rgba(17,70,114,.13);
    padding: clamp(28px,3.5vw,40px);
}

.af-form-head { grid-template-columns: 62px minmax(0,1fr); gap: 17px; }

.af-lock-badge {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0962d0, #0b83ed);
    box-shadow: 0 12px 30px rgba(11,102,212,.24);
    font-size: 27px;
}

.af-form-eyebrow { color: #0c8b88; font-size: 10px; letter-spacing: .18em; }
.af-form-head h2 { font-size: 34px; letter-spacing: -.02em; }
.af-input-group { min-height: 56px; border-radius: 9px; padding: 0 14px; }
.af-input-group:focus-within { box-shadow: 0 0 0 4px rgba(19,136,244,.13); }
.af-input-group input { height: 54px; }

/* One focus indicator around the complete field, including its icons. */
.af-input-group input:focus,
.af-input-group input:focus-visible {
    outline: none;
    box-shadow: none;
    border: 0;
}

.af-password-help {
    justify-self: end;
    border: 0;
    background: transparent;
    color: #0968d6;
    padding: 0;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.af-password-help-text {
    margin: 0;
    border-left: 3px solid #28a9db;
    background: #eff8ff;
    color: #405d7d;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
}

.af-login-message { border-radius: 8px; }

.af-button-connect,
.af-button-quit { border-radius: 9px; }

.af-button-connect {
    min-height: 56px;
    background: linear-gradient(90deg, #0864d4, #0b84ee);
    box-shadow: 0 12px 26px rgba(11,102,212,.22);
}

.af-button-connect:hover:not(:disabled) { background: linear-gradient(90deg, #0759be, #0877d7); }

.af-login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    color: #7186a5;
    font-size: 11px;
    font-weight: 800;
}

.af-login-divider::before,
.af-login-divider::after { content: ""; height: 1px; background: #dce8f2; }

.af-button-quit {
    min-height: 48px;
    border-color: #b9d0e6;
    background: #fff;
    color: #526b92;
    font-size: 13px;
}

.af-secure-note { grid-template-columns: 28px minmax(0,1fr); gap: 11px; }
.af-secure-note i { font-size: 22px; }

.af-login-footer { position: relative; z-index: 1; width: min(500px,100%); align-items: center; }

.af-pwa-install {
    border: 1px solid #b9d0e6;
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    color: #145fae;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

@media (max-width: 1180px) {
    .af-login-shell { grid-template-columns: minmax(470px,.95fr) minmax(450px,1.05fr); }
    .af-brand-panel { padding-inline: 42px; }
    .af-brand-story { grid-template-columns: 1fr; }
    .af-brand-manifesto, .af-impact-list { display: none; }
    .af-brand-copy h1 { white-space: normal; }
}

@media (max-width: 860px) {
    .af-login-page { display: block; padding: 0; overflow: auto; }
    .af-login-shell { min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); border: 0; border-radius: 0; box-shadow: none; }
    .af-brand-panel { min-height: 210px; padding: 24px; }
    .af-brand-lockup { grid-template-columns: 46px minmax(0,1fr); }
    .af-logo-mark { width: 46px; height: 46px; font-size: 23px; }
    .af-brand-story { margin-top: 28px; }
    .af-brand-copy h1 { margin-top: 9px; font-size: 34px; }
    .af-brand-copy h2 { margin-top: 7px; font-size: 18px; }
    .af-brand-copy p, .af-process-list, .af-brand-status, .af-brand-waves { display: none; }
    .af-login-form-container { padding: 34px 22px 18px; }
    .af-data-promise { display: none; }
    .af-login-form, .af-login-footer { width: min(520px,100%); }
}

@media (max-width: 480px) {
    .af-brand-panel { min-height: 166px; padding: 18px; }
    .af-brand-lockup strong { font-size: 17px; }
    .af-brand-lockup span { font-size: 8px; }
    .af-brand-story { margin-top: 19px; }
    .af-brand-eyebrow { font-size: 8px; letter-spacing: .2em; }
    .af-brand-copy h1 { font-size: 28px; }
    .af-brand-copy h2 { font-size: 15px; }
    .af-login-form-container { padding: 18px 12px 12px; }
    .af-login-form { gap: 13px; padding: 22px 16px; border-radius: 12px; }
    .af-form-head { grid-template-columns: 48px minmax(0,1fr); gap: 12px; }
    .af-lock-badge { width: 48px; height: 48px; border-radius: 11px; font-size: 22px; }
    .af-form-head h2 { font-size: 28px; }
    .af-input-group, .af-button-connect { min-height: 52px; }
    .af-input-group input { height: 50px; font-size: 16px; }
    .af-login-footer { flex-wrap: wrap; justify-content: center; margin-top: 15px; }
}

@media (max-height: 760px) and (min-width: 861px) {
    .af-login-page { padding: 12px; }
    .af-login-shell { min-height: calc(100dvh - 24px); }
    .af-brand-panel { padding-block: 30px 22px; }
    .af-brand-story { margin-top: 40px; }
    .af-brand-copy h1 { font-size: 45px; }
    .af-brand-copy p { margin-top: 13px; }
    .af-process-list { margin-top: 20px; }
    .af-process-list > div { padding-block: 8px; }
    .af-login-form-container { padding-top: 76px; }
    .af-data-promise { top: 24px; }
    .af-login-form { gap: 11px; padding: 24px 30px; }
}

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