/* BizHub — Auth pages (login / register) */
:root {
    --auth-indigo: #4f46e5;
    --auth-violet: #7c3aed;
    --auth-cyan: #06b6d4;
    --auth-gradient: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 45%, #7c3aed 100%);
    --auth-gradient-soft: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
    --auth-border: rgba(15, 23, 42, 0.08);
    --auth-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --auth-radius: 20px;
    --auth-radius-sm: 12px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
}

@media (max-width: 991px) {
    .auth-page { grid-template-columns: 1fr; }
}

/* Brand panel */
.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 42%, #312e81 100%);
    overflow: hidden;
}

@media (max-width: 991px) {
    .auth-brand { display: none; }
}

.auth-brand__mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(6, 182, 212, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(124, 58, 237, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.auth-brand__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
    pointer-events: none;
}

.auth-brand__inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
    color: #fff;
    animation: auth-fade-up .6s var(--auth-ease) both;
}

.auth-brand__logo {
    height: 48px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

.auth-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    margin-bottom: 1.25rem;
}

.auth-brand__title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 1rem;
}

.auth-brand__text {
    font-size: 1rem;
    line-height: 1.75;
    opacity: .88;
    margin: 0 0 2rem;
}

.auth-brand__features {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.auth-brand__feature {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: var(--auth-radius-sm);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    font-size: .88rem;
    font-weight: 600;
    transition: background .25s;
}

.auth-brand__feature i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}

/* Main panel */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: 0 8px 40px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.03);
    padding: 2rem 2rem 1.75rem;
    animation: auth-fade-up .55s var(--auth-ease) .1s both;
}

.auth-card--wide { max-width: 480px; }

.auth-card__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card__logo {
    height: 44px;
    margin-bottom: 1.25rem;
}

.auth-card__logo--tenant {
    height: 52px;
    max-width: 180px;
    object-fit: contain;
}

.auth-card__title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .35rem;
}

.auth-card__sub {
    font-size: .88rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.auth-card__tenant {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: .75rem;
    padding: .35rem .75rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--auth-indigo);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.auth-card__tenant i { font-size: .85rem; }

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .85rem 1rem;
    border-radius: var(--auth-radius-sm);
    font-size: .84rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.auth-alert i { flex-shrink: 0; margin-top: .1rem; }

.auth-alert--error {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #be123c;
}

.auth-alert--success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.auth-field__label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .45rem;
}

.auth-field__wrap {
    position: relative;
}

.auth-field__icon {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.auth-field__input {
    width: 100%;
    height: 50px;
    padding: 0 2.75rem 0 1rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.auth-field__input::placeholder { color: #cbd5e1; }

.auth-field__input:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.auth-field__input[dir="ltr"] { text-align: left; }

.auth-field__toggle {
    position: absolute;
    left: .65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
}

.auth-field__toggle:hover {
    color: var(--auth-indigo);
    background: rgba(79, 70, 229, 0.06);
}

.auth-field__textarea {
    width: 100%;
    min-height: 100px;
    padding: .85rem 1rem .85rem 2.75rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font-size: .9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
}

.auth-field__textarea:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.auth-field__wrap--textarea .auth-field__icon {
    top: 1rem;
    transform: none;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: -.25rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    margin: 0;
}

.auth-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--auth-indigo);
    cursor: pointer;
}

.auth-check span {
    font-size: .8rem;
    color: #64748b;
    font-weight: 600;
}

.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    color: #94a3b8;
    font-weight: 600;
}

.auth-secure i { color: #10b981; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 52px;
    margin-top: .25rem;
    border: none;
    border-radius: var(--auth-radius-sm);
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--auth-gradient);
    cursor: pointer;
    transition: transform .2s var(--auth-ease), box-shadow .25s;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.35);
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.4);
}

.auth-submit:active { transform: translateY(0); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .25rem 0;
    font-size: .75rem;
    color: #94a3b8;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    font-size: .88rem;
    color: #64748b;
}

.auth-footer a {
    color: var(--auth-indigo);
    font-weight: 700;
    text-decoration: none;
    transition: color .2s;
}

.auth-footer a:hover { color: var(--auth-violet); }

.auth-legal {
    margin-top: 1.5rem;
    font-size: .72rem;
    color: #94a3b8;
    text-align: center;
}

/* Register extras */
.auth-info-badge {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-gradient-soft);
    border: 1px solid rgba(79, 70, 229, 0.12);
    margin-bottom: 1.25rem;
}

.auth-info-badge i {
    font-size: 1.25rem;
    color: var(--auth-indigo);
    flex-shrink: 0;
    margin-top: .1rem;
}

.auth-info-badge strong {
    display: block;
    font-size: .84rem;
    color: #0f172a;
    margin-bottom: .15rem;
}

.auth-info-badge span {
    font-size: .75rem;
    color: #64748b;
    line-height: 1.45;
}

.auth-platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.auth-platform-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .85rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    transition: all .2s;
    margin: 0;
}

.auth-platform-check:has(input:checked) {
    border-color: var(--auth-indigo);
    background: rgba(79, 70, 229, 0.06);
    color: var(--auth-indigo);
}

.auth-platform-check input {
    accent-color: var(--auth-indigo);
    flex-shrink: 0;
}

/* Locale switcher on auth pages */
.auth-locale {
    position: fixed;
    top: 1rem;
    inset-inline-start: 1rem;
    z-index: 30;
}

.auth-locale .btn {
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--auth-border);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

@keyframes auth-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575px) {
    .auth-card { padding: 1.5rem 1.25rem; }
    .auth-platform-grid { grid-template-columns: 1fr; }
}
