/* ==========================================================================
   Dr. Aquello Roberto Bacal — Authentication pages
   Requires style.css for the design tokens in :root
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    background: var(--canvas);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Left brand panel
   -------------------------------------------------------------------------- */

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 56px;
    overflow: hidden;
    color: rgba(255, 255, 255, .78);
    background:
        radial-gradient(760px 420px at 78% 4%, rgba(255, 255, 255, .16), transparent 60%),
        linear-gradient(158deg, var(--teal-600) 0%, var(--teal-800) 46%, var(--teal-900) 100%);
}

.auth-aside::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -180px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}

.auth-aside .brand-name,
.auth-aside .brand-sub {
    color: #fff;
}

.auth-aside .brand-sub {
    color: rgba(255, 255, 255, .68);
}

.auth-aside .brand-mark {
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.auth-aside-body {
    position: relative;
    z-index: 1;
    max-width: 30rem;
}

.auth-aside-body h2 {
    color: #fff;
    font-size: 32px;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.auth-aside-body p {
    margin: 14px 0 30px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .76);
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.auth-points li {
    position: relative;
    padding-left: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, .86);
}

.auth-points li svg {
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, .95);
}

.auth-aside-foot {
    position: relative;
    z-index: 1;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------------------
   Right form panel
   -------------------------------------------------------------------------- */

.auth-main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 32px;
    background: var(--canvas);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: auto 0;
}

.auth-card--wide {
    max-width: 560px;
}

.auth-card-brand {
    display: none;
    margin-bottom: 26px;
}

.auth-head {
    margin-bottom: 26px;
}

.auth-head h1 {
    font-size: 26px;
    line-height: 1.2;
}

.auth-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.field {
    margin-bottom: 18px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.field > label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.login-form-field,
.auth-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.login-form-field::placeholder,
.auth-input::placeholder {
    color: #9BAEB2;
}

.login-form-field:focus,
.auth-input:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(42, 158, 167, .18);
}

.login-form-field.has-error,
.auth-input.has-error {
    border-color: #E58A8A;
}

.field-error {
    display: block;
    margin-top: 7px;
    color: #C22B2B;
    font-size: 12.5px;
    font-weight: 500;
}

.auth-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #F0C9C9;
    border-left: 3px solid var(--red-500);
    border-radius: var(--radius-sm);
    background: var(--red-050);
    color: #9B1414;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.auth-alert.is-success {
    border-color: var(--teal-200);
    border-left-color: var(--teal-600);
    background: var(--teal-050);
    color: var(--teal-900);
}

/* Row with remember-me + forgot link */

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--body);
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal-600);
    cursor: pointer;
}

.text-link {
    color: var(--teal-700);
    font-size: 13.5px;
    font-weight: 600;
}

.text-link:hover {
    color: var(--teal-800);
    text-decoration: underline;
}

/* Submit button */

.login-button,
.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--teal-600);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 26px -14px rgba(31, 139, 148, 1);
    transition: background-color .16s ease, transform .12s ease;
}

.login-button:hover,
.auth-button:hover {
    background: var(--teal-700);
    transform: translateY(-1px);
}

.login-button:active,
.auth-button:active {
    transform: translateY(0);
}

.login-button svg,
.auth-button svg {
    width: 16px;
    height: 16px;
}

/* Footer of the card */

.auth-foot {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}

.auth-foot a {
    font-weight: 600;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.auth-back:hover {
    color: var(--teal-700);
}

.auth-main .auth-back {
    display: flex;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media screen and (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .auth-aside {
        display: none;
    }

    .auth-card-brand {
        display: flex;
        justify-content: center;
    }

    .auth-main {
        padding: 36px 20px 48px;
    }
}

@media screen and (max-width: 560px) {
    .field-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .auth-form {
        padding: 22px 18px;
    }

    .auth-head h1 {
        font-size: 23px;
    }

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

/* --------------------------------------------------------------------------
   Short viewports (laptops at 768px tall and below)

   The registration card is the tallest of the auth screens. Tighten the
   vertical rhythm so the submit button stays above the fold instead of
   forcing the patient to scroll.
   -------------------------------------------------------------------------- */

@media screen and (min-width: 981px) and (max-height: 820px) {
    .auth-aside {
        padding: 32px 44px;
        gap: 28px;
    }

    .auth-aside-body h2 { font-size: 27px; }
    .auth-aside-body p  { margin: 12px 0 22px; font-size: 14px; }
    .auth-points        { gap: 11px; }

    .auth-main { padding: 26px 28px; }

    .auth-head { margin-bottom: 18px; }
    .auth-head h1 { font-size: 23px; }
    .auth-head p { font-size: 13.5px; }

    .auth-form { padding: 22px 24px; }

    .field { margin-bottom: 12px; }
    .field > label { margin-bottom: 5px; font-size: 12.5px; }

    .login-form-field,
    .auth-input {
        padding: 9px 12px;
        font-size: 14px;
    }

    .field-row { margin-bottom: 16px; }

    .login-button,
    .auth-button { min-height: 42px; padding: 10px 20px; }

    .auth-foot { margin-top: 16px; padding-top: 14px; }
    .auth-back { margin-top: 14px; }

    .auth-alert { margin-bottom: 14px; padding: 10px 12px; }
}
