/* =====================================================================
   ЛИЧНЫЙ КАБИНЕТ КЛИЕНТА — в премиум-стиле сайта (тёмный + золото)
   ===================================================================== */
:root {
  --bg: #0b0a09; --bg-soft: #100e0c; --bg-card: #16130f;
  --cream: #f3ede2; --cream-dim: #cfc7b8; --muted: #a89e8e;
  --gold: #c9a86a; --gold-soft: #dcc08a;
  --line: rgba(201,168,106,.22); --line-soft: rgba(243,237,226,.10);
  --red: #d98a8a; --green: #8ac9a0;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans); background: radial-gradient(120% 80% at 50% -10%, #15120e 0%, var(--bg) 55%);
  color: var(--cream); min-height: 100vh; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1 { font-family: var(--serif); font-weight: 600; font-size: 32px; margin: 0; letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0 0 16px; }

.acc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--line-soft); max-width: 1180px; margin: 0 auto;
}
.acc-logo { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: .12em; color: var(--cream); text-decoration: none; }
.acc-logo span { color: var(--gold); }
.acc-back { color: var(--muted); text-decoration: none; font-size: 14px; }
.acc-back:hover { color: var(--gold); }

.acc-main { max-width: 1180px; margin: 0 auto; padding: 40px 28px 80px; }

/* ---------- ОБЩИЕ ПОЛЯ / КНОПКИ ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.fld > span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.fld input {
  background: var(--bg); border: 1px solid var(--line); color: var(--cream);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fld input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,106,.14); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 26px; font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s, background .15s, border-color .15s; letter-spacing: .02em;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1206; border: none; width: 100%; }
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.auth-err, .prof-saved { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.auth-err { background: rgba(217,138,138,.12); color: var(--red); border: 1px solid rgba(217,138,138,.3); }
.auth-err.ok { background: rgba(138,201,160,.12); color: var(--green); border-color: rgba(138,201,160,.3); }

/* ---------- ВХОД / РЕГИСТРАЦИЯ ---------- */
.auth-wrap { display: grid; place-items: center; padding-top: 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; padding: 12px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 14px; padding: 5px; margin-bottom: 22px; }
.auth-tab { flex: 1; background: none; border: none; color: var(--muted); padding: 11px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; }
.auth-tab.is-active { background: var(--bg-card); color: var(--gold); box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.auth-form { padding: 0 18px 22px; }
.auth-form h1 { font-size: 26px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* ---------- КАБИНЕТ ---------- */
.cab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.cab-email { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.cab-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 28px; flex-wrap: wrap; }
.cab-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 4px; margin-bottom: -1px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600; }
.cab-tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.cab-empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* Заказы */
.orders-box { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.order-id { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.order-date { color: var(--muted); font-size: 13px; }
.o-status { font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.os-new { background: rgba(201,168,106,.16); color: var(--gold); }
.os-confirmed, .os-shipped { background: rgba(138,201,160,.14); color: var(--green); }
.os-done { background: rgba(138,201,160,.2); color: var(--green); }
.os-cancelled { background: rgba(217,138,138,.14); color: var(--red); }
.order-items { display: flex; flex-direction: column; gap: 8px; }
.oi { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.oi:last-child { border-bottom: none; }
.oi-name { color: var(--cream-dim); }
.order-total { text-align: right; font-weight: 700; font-size: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Избранное */
.favs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.fav-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fav-flacon { height: 90px; border-radius: 10px; }
.fav-brand { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.fav-name { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; }
.fav-price { color: var(--gold); font-weight: 700; }
.fav-rm { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 7px; cursor: pointer; font-family: inherit; font-size: 13px; }
.fav-rm:hover { color: var(--red); border-color: rgba(217,138,138,.4); }

/* Профиль */
.prof-form { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 480px; margin-bottom: 18px; }
.prof-actions { display: flex; align-items: center; gap: 14px; }
.prof-actions .btn { width: auto; }
.prof-saved { color: var(--green); background: none; border: none; padding: 0; margin: 0; }

/* Тосты */
.acc-toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.acc-toast { background: var(--bg-card); border: 1px solid var(--line); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: tin .25s ease; }
.acc-toast.err { border-color: rgba(217,138,138,.4); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

@media (max-width: 600px) {
  .acc-main { padding: 28px 18px 60px; }
  h1 { font-size: 26px; }
  .cab-head { flex-direction: column; }
}
