/* HospMS — Authentication pages */

body.auth-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

:root {
    --auth-primary: #0b5cad;
    --auth-primary-dark: #084a8f;
    --auth-accent: #14b8a6;
    --auth-surface: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-radius: 14px;
    --auth-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
}

.auth-brand {
    flex: 1;
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0b5cad 0%, #0e7490 45%, #14b8a6 100%);
    color: #fff;
    padding: 3rem;
}

@media (min-width: 992px) {
    .auth-brand {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.auth-brand__inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-brand__logo {
    margin-bottom: 2.5rem;
    display: inline-block;
    width: 200px;
    max-width: 100%;
    border-radius: 28px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    isolation: isolate;
}

.auth-brand__logo-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 200px;
    border-radius: 28px;
    -webkit-clip-path: inset(0 round 28px);
    clip-path: inset(0 round 28px);
}

.auth-brand__logo-img--sm {
    max-width: 48px;
    width: 48px;
    border-radius: 14px;
    -webkit-clip-path: inset(0 round 14px);
    clip-path: inset(0 round 14px);
}

.auth-card__mobile-logo .auth-brand__logo-img {
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.auth-card__mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.home-brand-logo {
    display: inline-block;
    height: auto;
    max-width: 120px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

@media (min-width: 992px) {
    .auth-card__mobile-logo {
        display: none;
    }
}

.auth-brand h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.auth-brand__lead {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.92;
    margin-bottom: 2rem;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features--compact {
    margin-top: 1.5rem;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    opacity: 0.95;
}

.auth-features li i {
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.auth-brand__footer {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    opacity: 0.75;
}

.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-surface);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    padding: 2.25rem 2rem;
}

@media (min-width: 576px) {
    .auth-card {
        padding: 2.5rem 2.25rem;
    }
}

.auth-card__mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--auth-primary);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
    .auth-card__mobile-logo {
        display: none;
    }
}

.auth-card__header {
    margin-bottom: 1.75rem;
}

.auth-card__header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-card__header p {
    color: var(--auth-muted);
    font-size: 0.95rem;
    margin: 0;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.auth-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 1.05rem;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-wrap .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.15);
}

.auth-toggle-pw {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--auth-muted);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    line-height: 1;
}

.auth-toggle-pw:hover {
    color: var(--auth-primary);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary);
}

.auth-forgot {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.btn-auth-submit {
    width: 100%;
    height: 48px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: #fff;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(11, 92, 173, 0.35);
}

.btn-auth-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 92, 173, 0.4);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--auth-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-demo {
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    overflow: hidden;
}

.auth-demo__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-demo__toggle:hover {
    color: var(--auth-text);
    background: #f1f5f9;
}

.auth-demo__body {
    padding: 0 1rem 1rem;
    display: none;
}

.auth-demo.is-open .auth-demo__body {
    display: block;
}

.auth-demo.is-open .auth-demo__toggle i.chevron {
    transform: rotate(180deg);
}

.auth-demo__toggle i.chevron {
    transition: transform 0.2s;
}

.auth-demo-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.auth-demo-account:last-child {
    margin-bottom: 0;
}

.auth-demo-account__info strong {
    display: block;
    color: var(--auth-text);
    font-size: 0.8rem;
}

.auth-demo-account__info span {
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.btn-demo-fill {
    flex-shrink: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--auth-primary);
    background: #fff;
    color: var(--auth-primary);
    cursor: pointer;
}

.btn-demo-fill:hover {
    background: var(--auth-primary);
    color: #fff;
}

.auth-card__footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-card__footer a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-card__footer a:hover {
    text-decoration: underline;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}
