/* =========================================================
   BIBLIOTEKA.KG AUTH PAGES
   Login / Signup
   ========================================================= */

.auth-page {
    position: relative;
    padding: 28px 0 60px;
    color: var(--text);
}

.auth-card,
.auth-landing-section,
.auth-final-cta {
    position: relative;
    overflow: hidden;
    color: var(--text);
    background: rgba(var(--surface-rgb), var(--glass-alpha));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
}

.auth-card::before,
.auth-landing-section::before,
.auth-final-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 360px at 0% -14%, rgba(103, 232, 249, .22), transparent 62%),
        radial-gradient(760px 320px at 110% 110%, rgba(var(--tint-rgb), .20), transparent 64%),
        rgba(var(--surface-rgb), .12);
    pointer-events: none;
}

.auth-card-inner,
.auth-section-head,
.auth-landing-grid,
.auth-steps-list,
.auth-faq-grid,
.auth-final-cta-inner {
    position: relative;
    z-index: 2;
}

.auth-card-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    min-height: 620px;
}

/* =========================================================
   COMMON
   ========================================================= */

.auth-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    color: var(--bg);
    background: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.auth-primary-btn,
.auth-outline-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.auth-primary-btn {
    color: var(--bg) !important;
    background: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 10px 24px rgba(103, 232, 249, .22);
}

.auth-primary-btn:hover,
.auth-primary-btn:focus {
    color: var(--accent) !important;
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 0 22px rgba(103, 232, 249, .42);
    transform: translateY(-1px);
}

.auth-outline-btn {
    color: var(--text) !important;
    background: rgba(var(--surface-rgb), .62);
    border: 1px solid var(--border);
}

.auth-outline-btn:hover,
.auth-outline-btn:focus {
    color: var(--bg) !important;
    background: var(--text);
    border-color: var(--text);
    transform: translateY(-1px);
}

/* =========================================================
   LEFT INFO PANEL
   ========================================================= */

.auth-info-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px;
    border-right: 1px solid rgba(255, 255, 255, .14);
}

.auth-info-panel::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -120px;
    top: -120px;
    background: radial-gradient(circle, rgba(103, 232, 249, .20), transparent 67%);
    pointer-events: none;
}

.auth-info-panel > * {
    position: relative;
    z-index: 2;
}

.auth-info-panel h1 {
    max-width: 760px;
    margin: 0 0 20px;
    color: var(--text);
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 950;
    line-height: .96;
    letter-spacing: -.05em;
}

.auth-info-panel > p {
    max-width: 760px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.auth-benefits-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.auth-benefit-item {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(var(--surface-rgb), .44)),
        rgba(var(--surface-rgb), .46);
    border: 1px solid rgba(255, 255, 255, .15);
}

.auth-benefit-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(300px 140px at 0% 0%, rgba(103, 232, 249, .12), transparent 65%);
    pointer-events: none;
}

.auth-benefit-item > * {
    position: relative;
    z-index: 2;
}

.auth-benefit-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(103, 232, 249, .12);
    border: 1px solid rgba(103, 232, 249, .30);
    font-size: 22px;
}

.auth-benefit-item h3 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 17px;
    font-weight: 950;
    line-height: 1.16;
}

.auth-benefit-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
}

.auth-info-note {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(103, 232, 249, .16), rgba(var(--surface-rgb), .46)),
        rgba(var(--surface-rgb), .50);
    border: 1px solid rgba(103, 232, 249, .28);
}

.auth-info-note i {
    color: var(--accent);
    font-size: 22px;
}

.auth-info-note span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.55;
}

/* =========================================================
   SIGNUP BADGES
   ========================================================= */

.auth-signup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-signup-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: var(--text);
    background: rgba(var(--surface-rgb), .58);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 850;
}

.auth-signup-badges i {
    color: var(--accent);
}

.auth-email-note {
    align-items: start;
}

/* =========================================================
   RIGHT FORM PANEL
   ========================================================= */

.auth-form-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    background:
        linear-gradient(180deg, rgba(103, 232, 249, .10), rgba(var(--surface-rgb), .48)),
        rgba(var(--surface-rgb), .40);
}

.auth-form-head {
    margin-bottom: 24px;
}

.auth-form-head h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 950;
    line-height: 1.02;
    letter-spacing: -.03em;
}

.auth-form-head p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.auth-form {
    position: relative;
    z-index: 2;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-label {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.auth-input {
    min-height: 52px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(var(--surface-rgb), .62);
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
}

.auth-input:focus {
    color: var(--text);
    background: rgba(var(--surface-rgb), .72);
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(103, 232, 249, .18);
}

.auth-input::placeholder {
    color: var(--muted);
    opacity: .78;
}

.auth-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.auth-checkbox-field {
    margin: 0;
}

.auth-checkbox-field .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 0;
}

.auth-checkbox-field .form-check-input {
    margin-top: 0;
}

.auth-checkbox-field .form-check-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.auth-small-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.auth-small-link:hover,
.auth-small-link:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

.auth-submit-wrap {
    margin-bottom: 18px;
}

.auth-links-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
    padding: 16px;
    background: rgba(var(--surface-rgb), .46);
    border: 1px solid var(--border);
}

.auth-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.auth-link-row a {
    color: var(--accent);
    font-weight: 950;
    text-decoration: none;
}

.auth-link-row a:hover,
.auth-link-row a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

.auth-secondary-actions {
    margin-top: auto;
}

.auth-form-alert {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 15px;
    background: rgba(var(--surface-rgb), .46);
    border: 1px solid rgba(103, 232, 249, .28);
}

.auth-form-alert-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    background: var(--accent);
    font-size: 21px;
}

.auth-form-alert strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 15px;
    font-weight: 950;
}

.auth-form-alert p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

/* =========================================================
   YII FORM VALIDATION
   ========================================================= */

.auth-page .help-block,
.auth-page .invalid-feedback {
    margin-top: 7px;
    color: #ff8a8a;
    font-size: 13px;
    font-weight: 750;
}

.auth-page .has-error .auth-input,
.auth-page .is-invalid {
    border-color: #ff8a8a;
}

.auth-page .has-success .auth-input,
.auth-page .is-valid {
    border-color: rgba(103, 232, 249, .45);
}

/* =========================================================
   SIGNUP LANDING SECTIONS
   ========================================================= */

.auth-landing-section {
    padding: 34px;
}

.auth-section-head {
    max-width: 920px;
    margin-bottom: 26px;
}

.auth-section-head h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(30px, 3.5vw, 52px);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -.03em;
}

.auth-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.auth-landing-grid {
    display: grid;
    gap: 16px;
}

.auth-landing-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auth-landing-card,
.auth-faq-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(var(--surface-rgb), .44)),
        rgba(var(--surface-rgb), .46);
    border: 1px solid rgba(255, 255, 255, .15);
}

.auth-landing-card::before,
.auth-faq-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(340px 150px at 0% 0%, rgba(103, 232, 249, .12), transparent 65%);
    pointer-events: none;
}

.auth-landing-card > *,
.auth-faq-card > * {
    position: relative;
    z-index: 2;
}

.auth-landing-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--bg);
    background: var(--accent);
    font-size: 24px;
}

.auth-landing-card h3,
.auth-faq-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 21px;
    font-weight: 950;
    line-height: 1.14;
}

.auth-landing-card p,
.auth-faq-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   STEPS
   ========================================================= */

.auth-steps-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(var(--surface-rgb), .34);
}

.auth-step-item {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 112px;
    padding: 20px 22px;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background:
        linear-gradient(90deg, rgba(103, 232, 249, .09), transparent 52%),
        rgba(var(--surface-rgb), .38);
}

.auth-step-item:last-child {
    border-bottom: 0;
}

.auth-step-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(420px 160px at 0% 0%, rgba(103, 232, 249, .12), transparent 62%),
        radial-gradient(360px 140px at 110% 110%, rgba(var(--tint-rgb), .10), transparent 62%);
    opacity: .85;
    pointer-events: none;
}

.auth-step-item > * {
    position: relative;
    z-index: 2;
}

.auth-step-number {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    background: var(--accent);
    font-size: 27px;
    font-weight: 950;
    box-shadow: 0 16px 30px rgba(103, 232, 249, .16);
}

.auth-step-content h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 24px;
    font-weight: 950;
    line-height: 1.08;
}

.auth-step-content p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.6;
}

/* =========================================================
   FAQ
   ========================================================= */

.auth-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* =========================================================
   FINAL CTA
   ========================================================= */

.auth-final-cta {
    padding: 34px;
}

.auth-final-cta-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: center;
}

.auth-final-cta h2 {
    max-width: 780px;
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(30px, 3.5vw, 52px);
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -.03em;
}

.auth-final-cta p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.auth-final-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* =========================================================
   DARK MODE
   ========================================================= */

html.theme-dark .auth-benefit-item,
body.theme-dark .auth-benefit-item,
html.theme-dark .auth-info-note,
body.theme-dark .auth-info-note,
html.theme-dark .auth-form-panel,
body.theme-dark .auth-form-panel,
html.theme-dark .auth-input,
body.theme-dark .auth-input,
html.theme-dark .auth-links-box,
body.theme-dark .auth-links-box,
html.theme-dark .auth-form-alert,
body.theme-dark .auth-form-alert,
html.theme-dark .auth-signup-badges span,
body.theme-dark .auth-signup-badges span,
html.theme-dark .auth-landing-card,
body.theme-dark .auth-landing-card,
html.theme-dark .auth-faq-card,
body.theme-dark .auth-faq-card,
html.theme-dark .auth-steps-list,
body.theme-dark .auth-steps-list,
html.theme-dark .auth-step-item,
body.theme-dark .auth-step-item {
    background: rgba(255, 255, 255, .045);
}

/* =========================================================
   NO RADIUS
   ========================================================= */

.auth-card,
.auth-landing-section,
.auth-final-cta,
.auth-kicker,
.auth-benefit-item,
.auth-benefit-icon,
.auth-info-note,
.auth-signup-badges span,
.auth-input,
.auth-primary-btn,
.auth-outline-btn,
.auth-links-box,
.auth-form-alert,
.auth-form-alert-icon,
.auth-landing-card,
.auth-landing-icon,
.auth-steps-list,
.auth-step-item,
.auth-step-number,
.auth-faq-card {
    border-radius: 0 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {
    .auth-card-inner {
        grid-template-columns: minmax(0, 1fr) 430px;
    }

    .auth-benefits-list,
    .auth-signup-benefits-list {
        grid-template-columns: 1fr;
    }

    .auth-landing-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .auth-card-inner,
    .auth-signup-card-inner {
        grid-template-columns: 1fr;
    }

    .auth-info-panel {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .14);
    }

    .auth-form-panel {
        justify-content: flex-start;
    }

    .auth-final-cta-inner {
        grid-template-columns: 1fr;
    }

    .auth-final-actions {
        max-width: 420px;
    }
}

@media (max-width: 767.98px) {
    .auth-page {
        padding-top: 20px;
    }

    .auth-info-panel,
    .auth-form-panel,
    .auth-landing-section,
    .auth-final-cta {
        padding: 30px 22px;
    }

    .auth-info-panel h1 {
        font-size: 38px;
    }

    .auth-form-head h2 {
        font-size: 32px;
    }

    .auth-benefit-item,
    .auth-form-alert,
    .auth-step-item {
        grid-template-columns: 1fr;
    }

    .auth-form-row,
    .auth-link-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-landing-grid-4,
    .auth-faq-grid {
        grid-template-columns: 1fr;
    }

    .auth-final-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .auth-info-panel h1 {
        font-size: 34px;
    }

    .auth-form-head h2,
    .auth-section-head h2,
    .auth-final-cta h2 {
        font-size: 29px;
    }

    .auth-step-content h3 {
        font-size: 21px;
    }
}

/* =========================================================
   AUTH RESULT MESSAGE
   Сообщения на auth-страницах
   ========================================================= */

.auth-result-message {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 18px;
    padding: 15px;
    background: rgba(var(--surface-rgb), .46);
    border: 1px solid var(--border);
}

.auth-result-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    background: var(--accent);
    font-size: 21px;
}

.auth-result-message strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 15px;
    font-weight: 950;
}

.auth-result-message p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.auth-result-success {
    border-color: rgba(103, 232, 249, .35);
}

.auth-result-warning {
    border-color: rgba(255, 193, 7, .45);
}

.auth-result-warning .auth-result-icon {
    background: #ffc107;
    color: #111827;
}

.auth-result-danger {
    border-color: rgba(255, 138, 138, .55);
}

.auth-result-danger .auth-result-icon {
    background: #ff8a8a;
    color: #111827;
}

html.theme-dark .auth-result-message,
body.theme-dark .auth-result-message {
    background: rgba(255, 255, 255, .045);
}

.auth-result-message,
.auth-result-icon {
    border-radius: 0 !important;
}

@media (max-width: 575.98px) {
    .auth-result-message {
        grid-template-columns: 1fr;
    }
}