/* Doctor portal — auth / login */

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

html, body {
    margin: 0;
    height: 100%;
}

.portal-auth-page {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    color: #0f172a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

.portal-auth-shell {
    display: flex;
    min-height: 100dvh;
}

/* ── Brand panel (left) ── */

.portal-auth-brand {
    position: relative;
    display: none;
    width: 44%;
    max-width: 560px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #042f2e 0%, #0f766e 45%, #0d9488 100%);
    color: #ffffff;
}

@media (min-width: 960px) {
    .portal-auth-brand {
        display: flex;
    }
}

.portal-auth-brand-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.portal-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
}

.portal-auth-orb--1 {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -60px;
    background: #5eead4;
}

.portal-auth-orb--2 {
    width: 240px;
    height: 240px;
    bottom: 10%;
    left: -60px;
    background: #14b8a6;
}

.portal-auth-orb--3 {
    width: 180px;
    height: 180px;
    bottom: -40px;
    right: 20%;
    background: #99f6e4;
    opacity: 0.2;
}

.portal-auth-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 3rem 3.5rem;
}

.portal-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 3rem;
}

.portal-auth-logo-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.portal-auth-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.portal-auth-logo-name {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.portal-auth-logo-badge {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #99f6e4;
}

.portal-auth-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #99f6e4;
}

.portal-auth-headline {
    margin: 0 0 1rem;
    font-size: clamp(1.625rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.portal-auth-subline {
    margin: 0 0 2.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    max-width: 22rem;
}

.portal-auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-auth-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.portal-auth-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.portal-auth-feature-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* ── Form panel (right) ── */

.portal-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
}

.portal-auth-main-inner {
    width: 100%;
    max-width: 26rem;
}

.portal-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.portal-auth-back svg {
    width: 1rem;
    height: 1rem;
}

.portal-auth-back:hover {
    color: #0d9488;
}

.portal-auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.portal-auth-mobile-logo small {
    display: block;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0d9488;
    margin-top: 0.1rem;
}

@media (min-width: 960px) {
    .portal-auth-mobile-logo {
        display: none;
    }
}

/* ── Form ── */

.portal-auth-form-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.04),
        0 12px 40px -12px rgba(15, 23, 42, 0.08);
}

.portal-auth-form-header {
    margin-bottom: 1.75rem;
}

.portal-auth-form-title {
    margin: 0 0 0.375rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.portal-auth-form-lead {
    margin: 0;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
}

.portal-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.portal-auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.portal-auth-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.portal-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.portal-auth-input-icon {
    position: absolute;
    left: 0.875rem;
    display: flex;
    color: #94a3b8;
    pointer-events: none;
}

.portal-auth-input-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.portal-auth-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.75rem 0.875rem 0.75rem 2.625rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.portal-auth-input--password {
    padding-right: 2.75rem;
}

.portal-auth-input:focus {
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.portal-auth-input::placeholder {
    color: #94a3b8;
}

.portal-auth-toggle-pw {
    position: absolute;
    right: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.portal-auth-toggle-pw:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.portal-auth-toggle-pw svg {
    width: 1.125rem;
    height: 1.125rem;
}

.portal-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
}

.portal-auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #0d9488;
    cursor: pointer;
}

.portal-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    padding: 0.875rem 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    box-shadow: 0 4px 14px -4px rgba(13, 148, 136, 0.45);
}

.portal-auth-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    transition: transform 0.15s;
}

.portal-auth-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px -4px rgba(13, 148, 136, 0.5);
}

.portal-auth-btn:hover svg {
    transform: translateX(2px);
}

.portal-auth-btn:active {
    transform: translateY(1px);
}

/* ── Alerts ── */

.portal-auth-alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.portal-auth-form-wrap .portal-auth-alert {
    margin-bottom: 1rem;
}

.portal-auth-alert--error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.portal-auth-alert--success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.portal-auth-alert ul {
    margin: 0;
    padding-left: 1.125rem;
}

/* ── Footer links ── */

.portal-auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.portal-auth-links p {
    margin: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 0.25rem;
}

.portal-auth-links a {
    color: #0d9488;
    font-weight: 600;
    text-decoration: none;
}

.portal-auth-links a:hover {
    text-decoration: underline;
}

.portal-auth-link-primary {
    font-weight: 700 !important;
}

.portal-auth-links-sep {
    color: #cbd5e1;
    user-select: none;
}

.portal-auth-demo {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.portal-auth-foot {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.portal-auth-foot a {
    color: #0d9488;
    font-weight: 600;
    text-decoration: none;
}

.portal-auth-foot a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Short viewports */
@media (max-height: 700px) {
    .portal-auth-main {
        align-items: flex-start;
        padding-top: 1.25rem;
        overflow-y: auto;
    }

    .portal-auth-brand-inner {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}
