@font-face { font-family: "Gotham"; src: url("../fonts/gotham-400.3ae97c80fba3.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham-500.4f59161ebcd0.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham-700.107632a9e6c9.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gotham Black"; src: url("../fonts/gotham-black.1604f56333f1.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
    --cc-teal: #247088;
    --cc-teal-dark: #18576b;
    --cc-coral: #f2643e;
    /* Ops portal only: a distinct green identifies "this is the back-office
       side" at a glance, separate from the patient portal's coral. */
    --cc-ops-green: #0e9f6a;
    --cc-ops-green-dark: #0a7a51;
    --ink: #17272c;
    --muted: #5d6b70;
    --canvas: #fbfcfc;
    --error: #b42318;
    --error-bg: #fff4f2;
    --warning: #8a4b08;
    --warning-bg: #fff8e7;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: var(--canvas) !important;
    color: var(--ink);
    font-family: "Gotham", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body > .navbar, body > footer { display: none !important; }
main.container {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(560px, 1fr);
    background: var(--canvas);
}

.login-panel {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    padding: 26px 46px 24px;
    background: var(--canvas);
}

.brand-home {
    display: flex;
    align-items: center;
    width: 272px;
    margin: 0 auto 42px;
    padding: 0;
}
.brand-home img { display: block; width: 100%; height: auto; }

.login-panel-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-content { width: min(100%, 460px); }
.login-heading { margin-bottom: 28px; }

.login-kicker, .brand-kicker {
    margin: 0 0 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.login-kicker { color: var(--cc-teal); }
.login-heading h1 {
    margin: 0;
    font-family: "Gotham", sans-serif;
    font-size: clamp(32px, 2.6vw, 40px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.025em;
}
.heading-accent {
    display: block;
    width: 52px;
    height: 4px;
    margin-top: 18px;
    background: var(--cc-coral);
    border-radius: 2px;
}
.login-heading > p:last-child {
    max-width: 410px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.login-form { display: grid; gap: 19px; }
.form-group { min-width: 0; }
.form-group > label, .field-label-row label {
    display: inline-block;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}
.forgot-password-link, .signup-prompt a, .inline-action {
    color: var(--cc-teal-dark);
    font-size: 12px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.form-input-container {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    background: #fff;
    border: 1px solid #b9c5c8;
    border-radius: 7px;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.form-input-container:hover { border-color: #7f949a; }
.form-input-container:focus-within {
    border-color: var(--cc-teal);
    box-shadow: 0 0 0 3px rgba(36, 112, 136, .16);
}
.input-icon {
    position: absolute;
    left: 17px;
    color: #687b81;
    font-size: 15px;
    pointer-events: none;
}
.form-input {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 48px 0 46px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    outline: 0;
    color: var(--ink);
    font: 500 14px/1 "Gotham", sans-serif;
}
.form-input::placeholder { color: #87969a; font-weight: 400; }
.password-toggle {
    position: absolute;
    right: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #60747a;
    cursor: pointer;
}
.password-toggle:hover { background: #eef3f4; color: var(--cc-teal-dark); }
.password-toggle:focus-visible, .submit-btn:focus-visible, .brand-panel a:focus-visible,
.brand-home:focus-visible, .login-footer a:focus-visible {
    outline: 3px solid rgba(36, 112, 136, .3);
    outline-offset: 3px;
}

.field-error {
    display: none;
    margin-top: 7px;
    color: var(--error);
    font-size: 12px;
    line-height: 1.45;
}
.field-error.is-visible { display: block; }
.form-input-container.field-invalid { border-color: var(--error); background: var(--error-bg); }

.login-alert {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 11px;
    margin: 0 0 20px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}
.login-alert i { margin-top: 2px; }
.login-alert strong, .login-alert span { display: block; }
.login-alert strong { margin-bottom: 2px; font-size: 12px; }
.login-alert-error { background: var(--error-bg); border-color: #ffc8bd; color: var(--error); }
.login-alert-warning { background: var(--warning-bg); border-color: #f0d593; color: var(--warning); }
.resend-form { margin-top: 8px; }
.inline-action { padding: 0; background: transparent; border: 0; cursor: pointer; }

.remember-me-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: #44565b;
    font-size: 12px;
    cursor: pointer;
}
.remember-me-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--cc-teal); }

.login-assist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 54px;
    margin-top: 1px;
    padding: 0 19px;
    background: var(--cc-teal);
    border: 1px solid var(--cc-teal);
    border-radius: 7px;
    color: #fff;
    font: 500 15px/1 "Gotham", sans-serif;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.submit-btn:hover { background: var(--cc-teal-dark); border-color: var(--cc-teal-dark); }
.submit-btn .btn-icon { transition: transform .16s ease; }
.submit-btn:hover .btn-icon { transform: translateX(3px); }
.submit-btn.loading { justify-content: center; gap: 10px; cursor: wait; opacity: .8; }
.spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin: 22px 0;
    color: #7f8c90;
    font-size: 12px;
}
.login-divider::before, .login-divider::after {
    content: "";
    height: 1px;
    background: #d7dee0;
}
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    min-height: 54px;
    background: #fff;
    border: 1px solid #b9c5c8;
    border-radius: 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease;
}
.google-signin-btn:hover { background: #f6f8f8; border-color: #87999e; color: var(--ink); }
.google-signin-btn:focus-visible { outline: 3px solid rgba(36, 112, 136, .3); outline-offset: 3px; }
.google-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.signup-prompt { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 34px 0 0;
    color: #7b898e;
    font-size: 11px;
}
.security-note i { color: var(--cc-teal); font-size: 15px; }
.security-note strong { color: var(--cc-teal-dark); font-weight: 500; }
.login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #718085;
    font-size: 10px;
}
.login-footer nav { display: flex; gap: 18px; }
.login-footer a { color: inherit; text-decoration: none; }
.login-footer a:hover { color: var(--cc-teal-dark); text-decoration: underline; }

.brand-panel {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--cc-coral);
    color: #fff;
}
/* ops.carecenter.clinic: green instead of the patient portal's coral, so
   staff can tell which side they're on before they even read anything. */
.brand-panel.is-ops {
    background: linear-gradient(135deg, var(--cc-ops-green) 0%, var(--cc-ops-green-dark) 100%);
}
.brand-panel-top {
    position: absolute;
    inset: 34px 38px auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.brand-panel-top > span { opacity: .72; }
.brand-panel-top a {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 7px;
    color: var(--ink);
    font-family: "Gotham", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}
.brand-panel-top a:hover { background: #fff3ef; }
.brand-visual { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dot-field {
    position: absolute;
    width: min(70vw, 790px);
    aspect-ratio: 1;
    top: 5%;
    right: -24%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .65) 1.5px, transparent 1.8px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 41%, transparent 68%);
    mask-image: radial-gradient(circle at 50% 50%, #000 0 41%, transparent 68%);
    opacity: .72;
}
.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; }
.orbit-one {
    width: 55vw; height: 55vw; max-width: 720px; max-height: 720px; top: 15%; right: -24%;
}
.orbit-two {
    width: 33vw; height: 33vw; max-width: 440px; max-height: 440px; top: 28%; right: -6%;
}
.brand-story {
    position: absolute;
    z-index: 2;
    left: clamp(48px, 7vw, 112px);
    bottom: clamp(60px, 10vh, 118px);
    width: min(72%, 620px);
}
.brand-kicker { color: rgba(255, 255, 255, .76); }
.brand-story h2 {
    margin: 0;
    font-family: "Gotham Black", "Gotham", sans-serif;
    font-size: clamp(48px, 4.2vw, 68px);
    line-height: .98;
    letter-spacing: -.055em;
}
.brand-story > p:not(.brand-kicker) {
    max-width: 510px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: 14px;
    line-height: 1.65;
}
.brand-proof {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 15px;
    align-items: center;
    width: min(100%, 430px);
    margin-top: 34px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .45);
}
.brand-proof span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: .1em;
}
.brand-proof p { margin: 0; font-size: 11px; font-weight: 500; }

.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 39, 44, .7);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.success-overlay.active { opacity: 1; visibility: visible; }
.success-content {
    width: min(100%, 340px);
    padding: 30px;
    background: #fff;
    border-top: 5px solid var(--cc-coral);
    border-radius: 7px;
    text-align: center;
}
.success-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    place-items: center;
    background: var(--cc-teal);
    border-radius: 50%;
    color: #fff;
}
.success-content h3 { margin: 0 0 7px; font-size: 20px; }
.success-content p { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
    .login-page { grid-template-columns: minmax(500px, 1.08fr) minmax(420px, .92fr); }
    .brand-story { left: 48px; width: 78%; }
    .brand-story h2 { font-size: clamp(44px, 5.5vw, 62px); }
    .brand-panel-top > span { display: none; }
    .brand-panel-top { justify-content: flex-end; }
}

@media (max-width: 860px) {
    .login-page { display: block; }
    .login-panel, .brand-panel { min-height: auto; }
    .login-panel { padding: 25px 28px 22px; }
    .login-panel-body { padding: 44px 12px 64px; }
    .brand-panel { min-height: 360px; }
    .brand-panel-top { display: none; }
    .brand-story { left: 40px; bottom: 40px; width: min(78%, 540px); }
    .brand-story h2 { font-size: clamp(42px, 9vw, 64px); }
    .brand-story > p:not(.brand-kicker), .brand-proof { display: none; }
    .dot-field { top: -48%; right: -14%; width: 650px; }
    .orbit-one { width: 500px; height: 500px; top: -50%; }
    .orbit-two { display: none; }
}

@media (max-width: 520px) {
    .login-panel { padding: 21px 20px 20px; }
    .brand-home { width: 230px; margin-bottom: 36px; }
    .login-panel-body { padding: 40px 0 56px; }
    .login-heading { margin-bottom: 26px; }
    .login-heading h1 { font-size: 34px; }
    .login-heading > p:last-child { font-size: 13px; }
    .form-input-container { min-height: 54px; }
    .login-assist-row { align-items: center; }
    .security-note { margin-top: 28px; }
    .login-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
    .brand-panel { min-height: 280px; }
    .brand-story { left: 24px; bottom: 28px; width: calc(100% - 48px); }
    .brand-story h2 { font-size: 42px; }
}

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