/* ============================================================
   DeltaZero — Auth screens (login, register, setup)
   ============================================================ */

.dz-auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--ink);
}

.dz-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Hero (lado direito — visual/marketing) --- */
.dz-auth-hero {
    background:
        radial-gradient(circle at 20% 10%, rgba(3,132,165,.32), transparent 55%),
        radial-gradient(circle at 80% 90%, rgba(172,201,15,.18), transparent 55%),
        linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
}

.dz-auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.dz-auth-hero-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin-top: 8px;
}

.dz-auth-logo-block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px;
}

.dz-auth-logo {
    height: 100px;
    width: auto;
    display: block;
}

.dz-auth-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--lime);
    margin-bottom: 18px;
}

.dz-auth-title {
    font-size: 44px;
    line-height: 1.08;
    font-weight: 800;
    margin: 0 0 22px;
    letter-spacing: -.02em;
}

.dz-auth-title-accent {
    background: linear-gradient(90deg, var(--teal) 0%, var(--lime) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dz-auth-subtitle {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255,255,255,.78);
    margin: 0 0 48px;
    max-width: 420px;
}

.dz-auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255,255,255,.88);
}

.dz-auth-feature-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    font-size: 24px;
    color: var(--lime);
    flex-shrink: 0;
}

.dz-auth-hero-foot-sep {
    color: var(--ink-faint);
}

/* --- Main (lado esquerdo — onde está o form) --- */
.dz-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 32px;
    background: var(--bg);
}

.dz-auth-main-inner {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
}

.dz-auth-card {
    width: 100%;
    background: var(--surface);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-soft);
}

.dz-auth-main-foot {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--ink-faint);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.dz-auth-card-head {
    margin-bottom: 14px;
}

.dz-auth-kicker {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal-deep);
    margin-bottom: 10px;
}

.dz-auth-card-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 8px;
    letter-spacing: -.01em;
}

.dz-auth-card-subtitle {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.5;
}

/* --- Alerts --- */
.dz-auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 20px;
}

.dz-auth-alert-error {
    background: #fef2ee;
    color: var(--critical);
    border: 1px solid #fad6cc;
}

.dz-auth-alert-icon {
    font-size: 15px;
    line-height: 1.2;
    flex-shrink: 0;
}

/* --- Form --- */
.dz-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dz-auth-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .01em;
}

.dz-auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dz-auth-input {
    appearance: none;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.dz-auth-input::placeholder {
    color: var(--ink-faint);
}

.dz-auth-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(3,132,165,.14);
}

.dz-auth-input.input-error {
    border-color: var(--critical);
}

.dz-auth-hint {
    font-size: 11.5px;
    color: var(--ink-faint);
    margin-top: 2px;
}

.dz-auth-error {
    font-size: 11.5px;
    color: var(--critical);
    font-weight: 600;
    margin-top: 2px;
    display: block;
    min-height: 0;
}

.dz-auth-error:empty {
    display: none;
}

.dz-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.dz-auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--teal);
    cursor: pointer;
}

/* --- Buttons --- */
.dz-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
    text-decoration: none;
    text-align: center;
}

.dz-auth-btn-primary {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(3,132,165,.22);
}

.dz-auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(3,132,165,.30);
}

.dz-auth-btn-primary:active {
    transform: translateY(0);
}

.dz-auth-btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1.5px solid var(--border);
}

.dz-auth-btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal-deep);
}

.dz-auth-btn-arrow {
    font-size: 16px;
    transition: transform .15s;
}

.dz-auth-btn:hover .dz-auth-btn-arrow {
    transform: translateX(2px);
}

.dz-auth-link-mini {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--teal-deep);
    text-decoration: none;
}

.dz-auth-link-mini:hover {
    text-decoration: underline;
}

/* --- Divider --- */
.dz-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--ink-faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

.dz-auth-divider::before,
.dz-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- Foot --- */
.dz-auth-foot {
    margin-top: 22px;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.dz-auth-terms {
    font-size: 11.5px;
    color: var(--ink-faint);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* ============================================================
   Setup screen (no-tenant state)
   ============================================================ */

.dz-setup-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(3,132,165,.08), transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(172,201,15,.06), transparent 50%),
        var(--bg);
    display: flex;
    flex-direction: column;
}

.dz-setup-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}

.dz-setup-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dz-setup-topbar-logo {
    height: 32px;
    width: auto;
}

.dz-setup-topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--ink-soft);
}

.dz-setup-topbar-logout {
    color: var(--teal-deep);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.dz-setup-topbar-logout:hover { text-decoration: underline; }

.dz-setup-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.dz-setup-wrap {
    width: 100%;
    max-width: 720px;
}

.dz-setup-hello {
    text-align: center;
    margin-bottom: 36px;
}

.dz-setup-hello-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal-deep);
    margin-bottom: 10px;
}

.dz-setup-hello-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 12px;
    letter-spacing: -.01em;
}

.dz-setup-hello-subtitle {
    font-size: 15.5px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0;
    max-width: 560px;
    margin-inline: auto;
}

.dz-setup-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 16px;
}

.dz-setup-options {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.dz-setup-option {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .12s;
    text-align: left;
    width: 100%;
}

.dz-setup-option:hover {
    border-color: var(--teal);
    background: var(--surface-soft);
}

.dz-setup-option.selected {
    border-color: var(--teal);
    background: linear-gradient(135deg, rgba(3,132,165,.05) 0%, rgba(172,201,15,.04) 100%);
    box-shadow: inset 3px 0 0 var(--teal);
}

.dz-setup-option-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
}

.dz-setup-option-body {
    flex: 1;
    min-width: 0;
}

.dz-setup-option-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px;
}

.dz-setup-option-desc {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
}

.dz-setup-form {
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.dz-setup-form-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 14px;
    letter-spacing: .01em;
}

.dz-setup-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: #f1f7d6;
    border: 1px solid rgba(172,201,15,.45);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink);
}

.dz-setup-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .dz-auth-shell {
        grid-template-columns: 1fr;
    }

    /* Mobile: form-first. Hero (marketing) some — não vale a rolagem. */
    .dz-auth-hero {
        display: none;
    }

    .dz-auth-logo-block {
        margin-bottom: 0px;
    }

    .dz-auth-logo {
        height: 100px;
    }

    .dz-auth-main {
        padding: 32px 20px;
        min-height: 100vh;
    }

    .dz-auth-card {
        padding: 28px 24px;
        box-shadow: none;
        border: 1px solid var(--border);
    }

    .dz-auth-main-foot {
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .dz-setup-topbar { padding: 14px 18px; }
    .dz-setup-main { padding: 28px 18px; }
    .dz-setup-card { padding: 22px 20px; }
    .dz-setup-hello-title { font-size: 24px; }
    .dz-setup-option { padding: 14px; gap: 12px; }
    .dz-setup-option-icon { width: 38px; height: 38px; font-size: 17px; }
}
