/* Auth — premium SaaS-style login (369B App gold + deep charcoal) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

.auth-layout-theme {
    /* Match landing-ingezny .ing-* utilities on auth pages */
    --ing-gold: #ffc805;
    --ing-black: #0f0f0f;
    --auth-gold: #ffc805;
    --auth-gold-dim: #e6b400;
    --auth-black: #0a0a0a;
    --auth-surface: #fafafa;
    --auth-border: rgba(15, 15, 15, 0.08);
    --auth-text-muted: rgba(15, 15, 15, 0.55);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-black);
    /* Same family as landing-gradient-hero + soft gold blobs */
    background-color: #fafafa !important;
    background-image:
        radial-gradient(1200px 600px at 50% -20%, rgba(255, 200, 5, 0.14), transparent 55%),
        radial-gradient(800px 400px at 100% 100%, rgba(15, 15, 15, 0.05), transparent 50%),
        radial-gradient(640px 480px at 0% 100%, rgba(255, 200, 5, 0.08), transparent 50%),
        linear-gradient(165deg, #ffffff 0%, #f4f4f5 45%, #fff9e6 100%) !important;
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir='rtl'] .auth-layout-theme {
    font-family: 'Cairo', 'Inter', system-ui, sans-serif;
}

.auth-layout-theme h1,
.auth-layout-theme .h1 {
    color: inherit;
}

.auth-layout-theme.pace-done {
    background-color: #fafafa !important;
    background-image:
        radial-gradient(1200px 600px at 50% -20%, rgba(255, 200, 5, 0.14), transparent 55%),
        radial-gradient(800px 400px at 100% 100%, rgba(15, 15, 15, 0.05), transparent 50%),
        radial-gradient(640px 480px at 0% 100%, rgba(255, 200, 5, 0.08), transparent 50%),
        linear-gradient(165deg, #ffffff 0%, #f4f4f5 45%, #fff9e6 100%) !important;
    background-attachment: fixed;
}

.auth-top-actions a {
    color: var(--auth-black) !important;
}

.auth-top-actions a:hover {
    opacity: 0.75;
}

/* ——— Shell — full viewport width ——— */
.container-login100 {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    padding: 0 0 2rem;
}

.wrap-login100 {
    width: 100%;
    max-width: none;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    padding: 0;
    box-shadow: none;
    border-top: 1px solid var(--auth-border);
    border-bottom: 1px solid var(--auth-border);
    min-height: calc(100vh - 8rem);
}

@media (min-width: 992px) {
    .wrap-login100 {
        min-height: calc(100vh - 7rem);
    }
}

/* ——— Two columns + gutter (logical: start/end follow RTL) ——— */
.login-split-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin: 0;
    align-items: stretch;
}

@media (min-width: 992px) {
    .login-split-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: clamp(1.75rem, 4.5vw, 3.5rem);
    }
}

/* ——— Top bar inside card ——— */
.login-toolbar {
    width: 100%;
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--auth-border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
    .login-toolbar {
        padding: 1rem clamp(1.25rem, 4vw, 3rem);
    }
}

/* ——— Brand column (dark, enterprise) ——— */
.login-showcase.login-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 280px;
    padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
    background: linear-gradient(155deg, #070707 0%, #121212 42%, #18140a 100%);
    border-radius: 0.75rem;
}

@media (min-width: 992px) {
    .login-showcase.login-brand-panel {
        min-height: min(560px, calc(100vh - 10rem));
        padding: 3rem clamp(1.5rem, 4vw, 4rem);
    }
}

.login-showcase.login-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 85% 15%, rgba(255, 200, 5, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 10% 90%, rgba(255, 200, 5, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 35%);
    pointer-events: none;
}

.login-showcase-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 992px) {
    .login-showcase-inner {
        max-width: 26rem;
    }
}

.login-logo-medical {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}

.login-logo-app-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0.65rem 1.25rem;
    flex-wrap: wrap;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.login-logo-369 {
    height: 2.25rem;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.login-brand-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fafafa;
}

.login-brand-tagline {
    margin-top: 1.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
}

/* ——— Form column ——— */
.login-form-col {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border-radius: 0.75rem;
}

@media (min-width: 992px) {
    .login-form-col {
        padding: 3rem clamp(1.5rem, 5vw, 4rem) 3.25rem;
    }
}

.login-form-card {
    width: 100%;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
}

.login-form-header {
    margin-bottom: 1.75rem;
    text-align: center;
}

.login-form-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--auth-black);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .login-form-title {
        font-size: 1.5rem;
    }
}

.login-form-subtitle {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    line-height: 1.45;
}

/* ——— Fields ——— */
.login-field-group {
    margin-bottom: 1.25rem;
}

.login-field-group:last-of-type {
    margin-bottom: 0;
}

.login-field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--auth-black);
    margin-bottom: 0.5rem;
}

.login-field-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.login-input {
    display: block;
    width: 100%;
    height: 2.875rem;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--auth-black);
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.1);
    border-radius: 0.625rem;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.login-input::placeholder {
    color: rgba(15, 15, 15, 0.38);
    font-weight: 450;
}

.login-input:hover {
    border-color: rgba(15, 15, 15, 0.16);
}

.login-input:focus {
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 3px rgba(255, 200, 5, 0.22);
}

.login-field-wrap {
    position: relative;
}

.login-field-wrap .login-input--password {
    padding-inline-end: 3rem;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-end: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(15, 15, 15, 0.55);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.login-password-toggle:hover {
    background: rgba(15, 15, 15, 0.05);
    color: var(--auth-black);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-black);
    cursor: pointer;
    user-select: none;
}

.login-remember input[type='checkbox'] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-gold);
    border-radius: 0.25rem;
}

/* ——— Primary button (Tailwind preflight sets button/input[type=submit] background to transparent) ——— */
.auth-layout-theme button.btn-auth-gold,
.auth-layout-theme input[type='submit'].btn-auth-gold,
.auth-layout-theme .btn-auth-gold,
button.btn-auth-gold,
input[type='submit'].btn-auth-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.875rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--auth-black) !important;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(180deg, #ffd633 0%, var(--auth-gold) 45%, var(--auth-gold-dim) 100%) !important;
    border: none !important;
    border-radius: 0.625rem !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 1px 2px rgba(15, 15, 15, 0.12);
    cursor: pointer;
    transition:
        filter 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.15s ease;
}

.btn-auth-gold:hover {
    filter: brightness(1.03);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 4px 16px rgba(255, 200, 5, 0.35);
}

.btn-auth-gold:active {
    transform: scale(0.992);
}

.btn-auth-gold:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px var(--auth-gold);
}

.link-auth-gold {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(15, 15, 15, 0.65) !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.link-auth-gold:hover {
    color: var(--auth-black) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-register-hint {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-muted);
}

.login-register-hint .link-auth-gold {
    font-size: inherit;
}

/* ——— Errors ——— */
.auth-layout-theme .form-group.has-error .login-input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.auth-layout-theme .help-block {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
    .login-input,
    .btn-auth-gold,
    .login-password-toggle {
        transition: none;
    }
    .btn-auth-gold:active {
        transform: none;
    }
}
