/* ═══════════════════════════════════════════════════════════════
   AUTH.CSS — стили входа, регистрации и личного кабинета
   ═══════════════════════════════════════════════════════════════ */

/* ── AUTH MODAL ──────────────────────────────────────────────── */
.auth-modal-content {
    max-width: 520px !important;
    padding: 4rem 2.5rem 2.5rem !important;
}

.auth-tabs {
    display: flex;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
    gap: 4px;
}
.auth-tab {
    flex: 1; background: none; border: none;
    color: rgba(0,0,0,0.45);
    padding: 0.6rem 1rem; border-radius: 8px;
    cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: all 0.2s;
}
.auth-tab.active { background: var(--primary); color: #000; }

.auth-status {
    font-size: 0.82rem; padding: 0.5rem 0.8rem;
    border-radius: 8px; display: none; margin-bottom: 0.8rem;
}
.auth-status.error {
    display: block;
    background: rgba(255,60,60,0.15); color: #ff6b6b;
    border: 1px solid rgba(255,60,60,0.3);
}
.auth-status.success {
    display: block;
    background: rgba(0,203,169,0.15); color: var(--primary);
    border: 1px solid rgba(0,203,169,0.3);
}

/* ── CABINET MODAL ───────────────────────────────────────────── */
.cabinet-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.85); z-index: 10003;
    overflow-y: auto; padding: 1rem;
}
.cabinet-modal.active {
    display: flex; align-items: flex-start; justify-content: center;
}
.cabinet-content {
    background: #1a1a1a;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%; max-width: 680px;
    margin: 2rem auto; overflow: hidden;
}

/* Шапка */
.cabinet-header {
    background: linear-gradient(135deg, rgba(0,203,169,0.15), rgba(99,102,241,0.1));
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.cabinet-header-left { display: flex; align-items: center; gap: 1rem; }
.cabinet-avatar {
    width: 52px; height: 52px;
    background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; color: #000; flex-shrink: 0;
}
.cabinet-name  { font-size: 1.1rem; font-weight: 700; color: #fff; }
.cabinet-email { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.cabinet-discount-badge {
    background: linear-gradient(135deg, var(--primary), #00eab8);
    color: #000; padding: 0.3rem 0.8rem; border-radius: 20px;
    font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.cabinet-close {
    background: none; border: none; color: rgba(255,255,255,0.4);
    font-size: 1.4rem; cursor: pointer; padding: 0.3rem;
    line-height: 1; transition: color 0.2s; flex-shrink: 0;
}
.cabinet-close:hover { color: #FF4444; }

/* Навигация */
.cabinet-nav {
    display: flex; border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02); overflow-x: auto;
}
.cabinet-nav-btn {
    background: none; border: none; color: rgba(255,255,255,0.4);
    padding: 1rem 1.4rem; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.cabinet-nav-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.cabinet-body { padding: 1.5rem 2rem; }

/* Заявки */
.orders-list { display: flex; flex-direction: column; gap: 0.8rem; }
.order-card {
    background: #222; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 1rem 1.2rem;
}
.order-card-top {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 0.5rem;
}
.order-id    { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.order-status {
    font-size: 0.72rem; font-weight: 700;
    padding: 0.25rem 0.7rem; border-radius: 20px;
}
.order-status.new      { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.order-status.working  { background: rgba(245,166,35,0.2);  color: #f5a623; }
.order-status.done     { background: rgba(0,203,169,0.2);   color: var(--primary); }
.order-status.rejected { background: rgba(255,60,60,0.15);  color: #ff6b6b; }
.order-problem { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.4; }
.order-date    { font-size: 0.72rem; color: rgba(255,255,255,0.3); margin-top: 0.4rem; }
.orders-empty  { text-align: center; padding: 2rem; color: rgba(255,255,255,0.35); }

/* Профиль */
.profile-form { display: flex; flex-direction: column; gap: 1rem; }
.profile-field label {
    display: block; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4); margin-bottom: 0.4rem;
}
.profile-input {
    width: 100%; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0.75rem 1rem;
    color: #fff; font-size: 0.9rem; outline: none;
    transition: border-color 0.2s;
}
.profile-input:focus { border-color: var(--primary); }
.profile-input:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-save {
    background: var(--primary); color: #000; border: none;
    border-radius: 10px; padding: 0.85rem; font-size: 0.9rem;
    font-weight: 700; cursor: pointer; transition: opacity 0.2s; margin-top: 0.5rem;
}
.btn-save:hover    { opacity: 0.85; }
.btn-save:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-logout {
    background: rgba(255,60,60,0.1); color: #ff6b6b;
    border: 1px solid rgba(255,60,60,0.2);
    border-radius: 10px; padding: 0.75rem; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s; width: 100%;
}
.btn-logout:hover { background: rgba(255,60,60,0.2); }

.profile-status {
    font-size: 0.82rem; padding: 0.5rem 0.8rem;
    border-radius: 8px; display: none; margin-top: 0.4rem;
}
.profile-status.success { display: block; background: rgba(0,203,169,0.15); color: var(--primary); }
.profile-status.error   { display: block; background: rgba(255,60,60,0.15);  color: #ff6b6b; }

/* Кнопка в шапке (залогинен) */
.btn-cabinet-header {
    background: rgba(0,203,169,0.15); color: var(--primary);
    border: 1px solid rgba(0,203,169,0.3);
    border-radius: 8px; padding: 0.4rem 0.9rem;
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.btn-cabinet-header:hover { background: rgba(0,203,169,0.25); }

@media (max-width: 500px) {
    .cabinet-body   { padding: 1rem; }
    .cabinet-header { padding: 1rem; }
}

/* ── ЭКРАН ПОДТВЕРЖДЕНИЯ КОДА ────────────────────────────────── */
.verify-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.verify-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin-bottom: 0.4rem;
}
.verify-hint {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.45);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.verify-hint b { color: #111; }

.verify-code-input {
    text-align: center;
    font-size: 1.5rem !important;
    font-weight: 700;
    letter-spacing: 0.4em;
}
/* ══ AUTH MODAL ТЁМНАЯ ТЕМА ═══════════════════════════════════ */

/* Крестик как у обратной связи */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.08);
    border: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 0;
}
.modal-close-btn:hover { background: rgba(255,50,50,0.15); color: #FF4444; transform: rotate(90deg); }
.modal-close-btn svg { width: 16px; height: 16px; }

/* Вкладки */
.auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}
.auth-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    transition: all 0.25s;
}
.auth-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,203,169,0.35);
}

/* Поля ввода — тёмные */
.login-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.login-input::placeholder { color: rgba(255,255,255,0.3); }
.login-input:focus { border-color: var(--primary); }
.login-input.invalid { border-color: #ff4444 !important; }

/* Кнопка входа */
.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.8rem;
}
.btn-login:hover { background: #00b899; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

/* Ссылки */
.login-links { text-align: center; }
.login-links a { color: var(--primary); font-size: 0.85rem; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

/* Статус */
.auth-status { font-size: 0.85rem; text-align: center; min-height: 1.2rem; margin-bottom: 0.5rem; color: #ff6b6b; }
.auth-status.success { color: var(--primary); }

/* ══ СЛАЙДЕР ══════════════════════════════════════════════════ */
.auth-slider { overflow: hidden; position: relative; }
.auth-slide { display: flex; flex-direction: column; }
.auth-slide.slide-in-right  { animation: slideInRight 0.32s cubic-bezier(0.4,0,0.2,1) forwards; }
.auth-slide.slide-in-left   { animation: slideInLeft  0.32s cubic-bezier(0.4,0,0.2,1) forwards; }
.auth-slide.slide-out-left  { animation: slideOutLeft 0.32s cubic-bezier(0.4,0,0.2,1) forwards; }
.auth-slide.slide-out-right { animation: slideOutRight 0.32s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes slideInRight  { from { transform:translateX(50px);opacity:0 } to { transform:translateX(0);opacity:1 } }
@keyframes slideInLeft   { from { transform:translateX(-50px);opacity:0 } to { transform:translateX(0);opacity:1 } }
@keyframes slideOutLeft  { from { transform:translateX(0);opacity:1 } to { transform:translateX(-50px);opacity:0 } }
@keyframes slideOutRight { from { transform:translateX(0);opacity:1 } to { transform:translateX(50px);opacity:0 } }

/* ══ ТЕЛЕФОН ══════════════════════════════════════════════════ */
.phone-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: visible;
    transition: border-color 0.2s;
    background: rgba(255,255,255,0.06);
    margin-bottom: 0.8rem;
}
.phone-wrap:focus-within { border-color: var(--primary); }
.phone-country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    background: rgba(255,255,255,0.05);
    border-right: 1.5px solid rgba(255,255,255,0.1);
    height: 46px;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ccc;
    cursor: pointer;
    user-select: none;
    border-radius: 8px 0 0 8px;
    transition: background 0.15s;
    min-width: 70px;
}
.phone-country:hover { background: rgba(255,255,255,0.1); }
#phoneFlag { font-size: 1.1rem; }
#phoneCode { font-size: 0.78rem; color: #aaa; }
.phone-arrow { font-size: 0.6rem; color: #777; }
.phone-input {
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    margin-bottom: 0 !important;
    flex: 1;
    height: 46px;
    background: transparent;
    color: #fff;
}
.phone-input::placeholder { color: rgba(255,255,255,0.25); }

/* Дропдаун */
.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 230px;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: hidden;
}
.country-dropdown.open { display: block; }
.country-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 10px 12px;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
    background: #333;
    color: #fff;
}
.country-search::placeholder { color: rgba(255,255,255,0.3); }
.country-list { max-height: 200px; overflow-y: auto; }
.country-list::-webkit-scrollbar { display: none; }
.country-list { -ms-overflow-style: none; scrollbar-width: none; }
.country-item {
    display: grid;
    grid-template-columns: 24px 36px 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.83rem;
    transition: background 0.1s;
    color: #ddd;
}
.country-item:hover { background: rgba(0,203,169,0.12); }
.country-item .c-flag { display:flex; align-items:center; }
.country-item .c-iso  { font-weight: 700; color: #fff; }
.country-item .c-dial { color: #888; font-size: 0.8rem; }

/* ══ ГЛАЗОК ПАРОЛЯ ════════════════════════════════════════════ */
.password-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 0.8rem;
}
.password-wrap .login-input { padding-right: 2.8rem; margin-bottom: 0; }
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.3);
    transition: color 0.2s;
}
.password-toggle:hover { color: rgba(255,255,255,0.7); }
.eye-icon { width: 18px; height: 18px; }

/* Верификация */
.verify-icon { font-size: 3rem; text-align: center; margin-bottom: 0.5rem; }
.verify-title { font-size: 1.3rem; font-weight: 700; text-align: center; color: #fff; margin-bottom: 0.5rem; }
.verify-hint  { text-align: center; color: #aaa; font-size: 0.9rem; margin-bottom: 1rem; }
.verify-hint b { color: #fff; }
.verify-code-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.5rem; font-weight: 700; }
