/* ============================================
   AUTH — страницы входа, регистрации, ЛК
   ============================================ */

/* -------- ОБЩЕЕ -------- */
.auth-page {
    min-height: 100vh;
    padding: 120px 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.auth-box {
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    text-decoration: none;
}

.auth-logo .logo-mark {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.auth-logo .logo-mark svg {
    width: 40px;
    height: 40px;
}

.auth-logo .logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.auth-logo .logo-text em {
    font-style: normal;
    color: var(--accent);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

/* -------- ФОРМА -------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-field input {
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.auth-field input:focus {
    border-color: var(--accent);
    background: var(--card);
}

.auth-field input.input-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.auth-field-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 0;
}

/* -------- СООБЩЕНИЯ -------- */
.auth-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: none;
}

.auth-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-message.success {
    display: block;
    background: rgba(200, 255, 0, 0.1);
    border: 1px solid rgba(200, 255, 0, 0.3);
    color: var(--accent);
}

/* -------- КНОПКА -------- */
.auth-submit {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.auth-submit:hover:not(:disabled) {
    background: var(--accent-2);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(200, 255, 0, 0.3);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* -------- ССЫЛКИ -------- */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-switch a:hover {
    opacity: 0.8;
}

/* ============================================
   ЛИЧНЫЙ КАБИНЕТ
   ============================================ */
.account-page {
    padding: 120px 0 80px;
    min-height: 80vh;
    background: var(--bg);
}

.account-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.account-greeting {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.account-email {
    color: var(--text-muted);
    font-size: 14px;
}

.account-logout {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.account-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.account-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.account-section {
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.account-section h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* -------- ИСТОРИЯ ЗАКАЗОВ -------- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    padding: 16px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.order-item:hover {
    border-color: var(--border-hover);
}

.order-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.order-item-number {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.order-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

.order-item-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.order-item-status.status-new {
    background: rgba(200, 255, 0, 0.15);
    color: var(--accent);
    border: 1px solid rgba(200, 255, 0, 0.3);
}

.order-item-total {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.order-item-total::after {
    content: ' ₽';
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.order-item-items {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* -------- ПРОФИЛЬ -------- */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -------- ПУСТОЕ СОСТОЯНИЕ -------- */
.account-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.account-empty svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 16px;
}

.account-empty p {
    margin-bottom: 20px;
}

/* -------- ЗАГРУЗКА -------- */
.auth-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* -------- АДАПТИВ -------- */
@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-box {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 24px;
    }

    .account-page {
        padding: 100px 0 60px;
    }

    .account-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-section {
        padding: 20px;
    }
}
/* -------- КНОПКА АВТОРИЗАЦИИ В ШАПКЕ -------- */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.auth-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(200, 255, 0, 0.05);
}

.auth-btn svg {
    flex-shrink: 0;
}

.auth-btn.auth-logged {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 768px) {
    .auth-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .auth-btn span {
        display: none;   /* на мобилке только иконка */
    }
}
/* ============================================
   ФИКС КНОПКИ «ВОЙТИ» В ШАПКЕ
   ============================================ */

.auth-btn,
.auth-btn:visited,
.auth-btn:link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 14px !important;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
}

.auth-btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: rgba(200, 255, 0, 0.05) !important;
}

.auth-btn svg {
    flex-shrink: 0 !important;
    color: currentColor !important;
    stroke: currentColor !important;
}

.auth-btn span {
    color: inherit !important;
}

.auth-btn.auth-logged {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

@media (max-width: 768px) {
    .auth-btn {
        padding: 8px 10px !important;
    }
    .auth-btn span {
        display: none !important;
    }
}
