/* ========================================
   InviteBuilder — Auth Page Styles
   Clean Slate — Minimal B/W + Blue Accent
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Body стили только для auth-страниц (login.html) */
body.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #111111;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== ФОНОВЫЙ ПАТТЕРН ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    background: #ffffff;
}

.auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Мягкие серые круги вместо ярких цветных */
.auth-bg__circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.auth-bg__circle--1 {
    width: 500px; height: 500px;
    background: #2563eb;
    top: -150px; right: -100px;
    animation: bgFloat1 24s ease-in-out infinite;
}

.auth-bg__circle--2 {
    width: 400px; height: 400px;
    background: #000000;
    bottom: -100px; left: -80px;
    animation: bgFloat2 28s ease-in-out infinite;
}

.auth-bg__circle--3 {
    width: 300px; height: 300px;
    background: #2563eb;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    animation: bgFloat3 20s ease-in-out infinite;
}

@keyframes bgFloat1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-50px, 80px); }
    66% { transform: translate(40px, -30px); }
}

@keyframes bgFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(60px, -60px); }
}

@keyframes bgFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* ========== КОНТЕЙНЕР ========== */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* ========== ЛОГОТИП ========== */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo__icon {
    font-size: 24px;
    color: #2563eb;
}

.auth-logo__text {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.5px;
}

.auth-logo__text .accent {
    color: #2563eb;
}

/* ========== КАРТОЧКА ========== */
.auth-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.auth-card--appear {
    opacity: 1;
    transform: translateY(0);
}

.auth-card__title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    color: #000000;
}

.auth-card__subtitle {
    font-size: 14px;
    color: #6b6b6b;
    text-align: center;
    margin-bottom: 26px;
}

/* ========== ПОЛЯ ========== */
.auth-field {
    margin-bottom: 16px;
}

.auth-field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b6b6b;
    margin-bottom: 6px;
}

.auth-field__label i {
    width: 16px;
    text-align: center;
    margin-right: 4px;
    font-size: 12px;
    color: #2563eb;
}

.auth-field__input {
    width: 100%;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 12px 16px;
    color: #111111;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.auth-field__input::placeholder {
    color: #b0b0b0;
}

.auth-field__input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.auth-field__password-wrap {
    position: relative;
}

.auth-field__password-wrap .auth-field__input {
    padding-right: 48px;
}

.auth-field__toggle-pass {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-field__toggle-pass:hover {
    color: #111111;
}

/* ========== ОШИБКИ / УСПЕХ ========== */
.auth-error {
    color: #dc2626;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-success {
    color: #16a34a;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
    margin-bottom: 8px;
    font-weight: 500;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px;
}

/* ========== КНОПКА ========== */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover:not(:disabled) {
    background: #222222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-btn:active:not(:disabled) {
    background: #000000;
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== ССЫЛКИ ========== */
.auth-links {
    text-align: center;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-link {
    background: none;
    border: none;
    color: #999999;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.auth-link:hover {
    color: #111111;
}

.auth-link strong {
    color: #2563eb;
    font-weight: 600;
}

.auth-link:hover strong {
    color: #1d4ed8;
}

/* ========== FOOTER ========== */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #cccccc;
}

/* ========== ПРОФИЛЬ МОДАЛЬНОЕ ========== */
.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-overlay.active {
    display: flex;
}

.profile-modal {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 32px 28px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.08) transparent;
}

.profile-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    color: #999999;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profile-modal__close:hover {
    background: #eeeeee;
    color: #111111;
}

.profile-modal__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 14px;
    background: #111111;
}

.profile-modal__name {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #000000;
}

.profile-modal__email {
    text-align: center;
    font-size: 13px;
    color: #999999;
    margin-bottom: 22px;
}

.profile-section {
    margin-bottom: 18px;
}

.profile-section__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999999;
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-field {
    margin-bottom: 10px;
}

.profile-field__label {
    font-size: 12px;
    color: #6b6b6b;
    margin-bottom: 4px;
    font-weight: 500;
}

.profile-field__input {
    width: 100%;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px 14px;
    color: #111111;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.profile-field__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.profile-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.profile-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-btn--primary {
    background: #000000;
    color: #ffffff;
}

.profile-btn--primary:hover {
    background: #222222;
}

.profile-btn--danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.profile-btn--danger:hover {
    background: #fee2e2;
}

.profile-btn--secondary {
    background: #f5f5f5;
    color: #6b6b6b;
}

.profile-btn--secondary:hover {
    background: #eeeeee;
    color: #111111;
}

/* ========== ТЕМА РЕДАКТОРА (ПРОФИЛЬ) ========== */
.editor-theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.editor-theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-theme-card:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}

.editor-theme-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.editor-theme-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
}

.editor-theme-card:hover .editor-theme-swatch {
    transform: scale(1.08);
}

.editor-theme-label {
    font-size: 10px;
    font-weight: 500;
    color: #999999;
    text-align: center;
    line-height: 1.2;
    transition: color 0.2s;
}

.editor-theme-card.active .editor-theme-label {
    color: #2563eb;
    font-weight: 600;
}

.editor-theme-card.active .editor-theme-swatch {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 0 2px #2563eb;
}

/* Превью mini-panel */
.editor-theme-preview {
    width: 100%;
    height: 22px;
    border-radius: 5px;
    display: flex;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.editor-theme-preview__bg {
    flex: 3;
}

.editor-theme-preview__header {
    flex: 1;
}

@media (max-width: 480px) {
    .editor-theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== АДАПТИВ ========== */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .auth-card__title {
        font-size: 20px;
    }

    .auth-logo__text {
        font-size: 22px;
    }

    .auth-logo__icon {
        font-size: 22px;
    }
}
