@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/Inter-ExtraBold.woff2') format('woff2');
}

/* ——— оболочка auth: только внутри .site-auth ——— */

.site-auth {
    --sa-bg: #070b12;
    --sa-elevated: #0f1623;
    --sa-card: rgba(255, 255, 255, 0.04);
    --sa-text: #f1f5f9;
    --sa-muted: #94a3b8;
    --sa-accent: #3b82f6;
    --sa-accent-2: #2563eb;
    --sa-gold: #facc15;
    --sa-border: rgba(255, 255, 255, 0.09);
    --sa-danger: #f87171;
    --sa-success: #34d399;
    --sa-radius: 18px;
    --sa-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);

    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(520px 520px at 90% -10%, rgba(37, 99, 235, 0.22), transparent 60%),
        radial-gradient(380px 380px at -5% 90%, rgba(45, 212, 191, 0.12), transparent 55%),
        var(--sa-bg);
    color: var(--sa-text);
    line-height: 1.6;
}

.site-auth a {
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.2s;
}

.site-auth a:hover {
    color: #fff;
}

.site-auth__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
    padding: 22px 0;
}

.site-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--sa-text);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.site-auth__brand span {
    color: var(--sa-gold);
}

.site-auth__brand:hover {
    color: var(--sa-text);
}

.site-auth__back {
    color: var(--sa-muted);
    font-size: 0.95rem;
}

.site-auth__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 56px;
}

.site-auth__flash {
    width: min(100% - 32px, 480px);
    margin: 0 auto 16px;
}

.site-auth .alert {
    border-radius: 14px;
    border: 1px solid var(--sa-border);
    background: var(--sa-card);
    color: var(--sa-text);
    backdrop-filter: blur(12px);
}

.site-auth .alert-success {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.12);
    color: #d1fae5;
}

.site-auth .alert-danger,
.site-auth .alert-error {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.site-auth .alert-warning {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
}

.site-auth .close,
.site-auth .alert .close {
    color: inherit;
    text-shadow: none;
    opacity: 0.7;
}

/* карточка формы */

.site-auth .auth-card,
.site-auth .card {
    width: min(100%, 440px);
    margin: 0 auto;
    border-radius: var(--sa-radius);
    border: 1px solid var(--sa-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    box-shadow: var(--sa-shadow);
    color: var(--sa-text);
}

.site-auth .card.shadow-sm {
    box-shadow: var(--sa-shadow);
}

.site-auth .card-body,
.site-auth .auth-card__body {
    padding: 32px !important;
}

.site-auth h1,
.site-auth .h4,
.site-auth .card-body > h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--sa-text);
    margin-bottom: 10px;
}

.site-auth .text-muted,
.site-auth p.text-muted,
.site-auth .help-block,
.site-auth .form-text {
    color: var(--sa-muted) !important;
}

.site-auth .card-body > p {
    color: var(--sa-muted);
    margin-bottom: 1.5rem;
}

/* поля */

.site-auth .form-group,
.site-auth .form-group.field-requestloginlinkform-email,
.site-auth .mb-3 {
    margin-bottom: 1.1rem;
}

.site-auth label,
.site-auth .control-label,
.site-auth .col-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--sa-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.site-auth .form-control,
.site-auth input[type="email"],
.site-auth input[type="text"],
.site-auth input[type="password"],
.site-auth .auth-pin-input {
    width: 100%;
    height: auto;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 11, 18, 0.55);
    color: #fff;
    font: inherit;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.site-auth .form-control:focus,
.site-auth input:focus {
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(7, 11, 18, 0.75);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

.site-auth .form-control::placeholder,
.site-auth input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.site-auth .form-control-lg,
.site-auth .auth-pin-input {
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    font-weight: 700;
}

.site-auth .is-invalid,
.site-auth .has-error .form-control,
.site-auth .form-control.is-invalid {
    border-color: rgba(248, 113, 113, 0.65);
}

.site-auth .invalid-feedback,
.site-auth .help-block-error,
.site-auth .has-error .help-block {
    color: var(--sa-danger);
    font-size: 0.88rem;
    margin-top: 6px;
}

/* кнопки */

.site-auth .btn,
.site-auth .btn-primary,
.site-auth .btn-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    background: linear-gradient(135deg, var(--sa-accent), var(--sa-accent-2));
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.site-auth .btn:hover,
.site-auth .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.45);
    color: #fff;
    background: linear-gradient(135deg, var(--sa-accent), var(--sa-accent-2));
}

.site-auth .btn:focus,
.site-auth .btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    color: #fff;
}

.site-auth .btn-ghost,
.site-auth .btn-secondary,
.site-auth .btn-outline-secondary {
    background: transparent;
    border-color: var(--sa-border);
    color: var(--sa-text);
    box-shadow: none;
}

.site-auth .btn-ghost:hover,
.site-auth .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.site-auth .container,
.site-auth .row,
.site-auth .col-md-6,
.site-auth .col-md-5 {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.site-auth .row.justify-content-center {
    display: block;
}

.site-auth .py-5 {
    padding: 0 !important;
}

/* debug Yii на auth */
.site-auth ~ #yii-debug-toolbar,
#yii-debug-toolbar,
.yii-debug-toolbar {
    display: none !important;
}
