/* auth.css — mobile-first, минимум стилей для логина / регистрации / личного кабинета */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

.auth-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 16px;
    text-align: center;
}
.auth-logo {
    color: #007bff;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
}

.auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.auth-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 16px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-form label {
    font-size: 14px;
    color: #444;
    display: block;
    margin-bottom: 4px;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"] {
    width: 100%;
    font-size: 16px;
    padding: 12px 14px;
    border: 1px solid #cfd4dc;
    border-radius: 8px;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.auth-form input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

.auth-btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    border: 0;
    background: #007bff;
    color: #fff;
    cursor: pointer;
}
.auth-btn:active { background: #0066d6; }
.auth-btn[disabled] { opacity: 0.6; }

.auth-btn-secondary {
    background: #fff;
    color: #007bff;
    border: 1px solid #007bff;
}

.auth-err {
    background: #fdecec;
    color: #b00020;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 12px;
}
.auth-ok {
    background: #e7f6ec;
    color: #0a7a32;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 12px;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}
.auth-links a { color: #007bff; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-sep {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

/* --- Личный кабинет --- */

.cab-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.cab-card h2 {
    font-size: 16px;
    margin: 0 0 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cab-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    font-size: 15px;
}
.cab-row strong { color: #222; }
.cab-row span   { color: #555; text-align: right; word-break: break-word; }

.cab-orders {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cab-orders details {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
}
.cab-orders summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.cab-orders summary::-webkit-details-marker { display: none; }
.cab-orders .ord-date { color: #888; font-size: 13px; margin-left: auto; }
.cab-orders .ord-title { font-weight: 600; }
.cab-orders .ord-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.cab-orders .ord-status--new { background: #fff3cd; color: #8a6d00; }
.cab-orders .ord-status--ok  { background: #d4edda; color: #1e7e34; }
.cab-orders .ord-items {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #444;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.cab-orders .ord-items li { padding: 2px 0; }
.cab-orders .ord-meta { margin-top: 8px; font-size: 13px; color: #666; }

.cab-empty {
    background: #fff;
    border: 1px dashed #cfd4dc;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.cab-actions { display: flex; gap: 8px; margin-top: 8px; }
.cab-actions .auth-btn { flex: 1; }

/* Лёгкая шапка-навигация в кабинете */
.cab-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 14px;
    flex-wrap: wrap;
}
.cab-nav a { color: #007bff; text-decoration: none; }
.cab-nav .cab-hello { color: #555; margin-right: auto; }
.cab-nav .cab-nav__order { font-weight: 600; }

/* Модалки кабинета */
.cab-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px;
    overflow-y: auto;
}
.cab-modal.is-open { display: flex; }
.cab-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 25, 35, 0.55);
}
.cab-modal__box {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 12px;
    padding: 20px 18px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    margin: auto 0;
}
.cab-modal__box h2 {
    font-size: 16px;
    margin: 0 0 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-right: 28px;
}
.cab-modal__close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.cab-modal__close:hover { color: #222; }

/* Маленькая кнопка-ссылка для logout/смены пароля */
.auth-link-btn {
    display: inline-block;
    background: none;
    border: 0;
    padding: 0;
    color: #b00020;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}
