/**
 * GizStok login page — scoped to .auth-login-page only.
 */

.auth-login-page *,
.auth-login-page *::before,
.auth-login-page *::after {
    box-sizing: border-box;
}

.auth-login-page {
    --auth-navy: #0f172a;
    --auth-indigo: #1e1b4b;
    --auth-purple: #4338ca;
    --auth-purple-deep: #312e81;
    --auth-card: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-indigo-soft: #eef2ff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.22), transparent 55%),
        linear-gradient(155deg, var(--auth-navy) 0%, var(--auth-indigo) 42%, var(--auth-purple-deep) 100%);
}

.auth-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--auth-card);
    border-radius: 14px;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    padding: 2rem 1.75rem 1.5rem;
}

.auth-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.85rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, #2563eb 0%, #6366f1 48%, #7c3aed 100%);
    box-shadow:
        0 10px 24px rgba(67, 56, 202, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-login-title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-login-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--auth-muted);
    line-height: 1.4;
}

.auth-login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.auth-login-form {
    width: 100%;
    max-width: 100%;
}

.auth-login-field {
    margin-bottom: 1rem;
}

.auth-login-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-login-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    font-size: 0.9375rem;
    color: var(--auth-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

.auth-login-input:focus {
    outline: none;
    border-color: var(--auth-purple);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.14);
}

.auth-login-password-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.auth-login-password-wrap .auth-login-input {
    padding-right: 3rem;
    display: block;
}

/* Hide native Edge/legacy password reveal — safe on desktop browsers. */
.auth-login-password-wrap .auth-login-input::-ms-reveal,
.auth-login-password-wrap .auth-login-input::-ms-clear {
    display: none;
}

/*
 * Do NOT hide the WebKit textfield decoration wrapper (breaks iOS Safari typing).
 * Custom toggle handles visibility; native WebKit decorations may show on some browsers.
 */

.auth-login-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-login-password-toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.auth-login-password-toggle:focus-visible {
    outline: 2px solid var(--auth-purple);
    outline-offset: 2px;
}

.auth-login-password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

.auth-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.auth-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-login-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-purple);
}

.auth-login-forgot {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-purple);
    cursor: pointer;
    text-decoration: none;
}

.auth-login-forgot:hover {
    text-decoration: underline;
}

.auth-login-forgot:focus-visible {
    outline: 2px solid var(--auth-purple);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-login-submit {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 9px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(67, 56, 202, 0.32);
}

.auth-login-submit:active {
    transform: translateY(0);
}

.auth-login-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--auth-muted);
}

.auth-login-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: min(420px, calc(100vw - 2rem));
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}

.auth-login-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.auth-login-dialog__panel {
    padding: 1.25rem 1.35rem 1.1rem;
}

.auth-login-dialog__title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-login-dialog__body {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
}

.auth-login-dialog__close {
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-login-dialog__close:hover {
    background: #f8fafc;
}

@media (max-height: 720px) {
    .auth-login-card {
        padding: 1.5rem 1.35rem 1.25rem;
    }

    .auth-login-brand {
        margin-bottom: 1.15rem;
    }

    .auth-login-logo {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
}
