/* Auth pages + personal cabinet.
   Source of truth: Yulia's clickable prototype (docs/design/prototype/prototype.html,
   04.10.2026) — tokens, sizes and spacing below are copied from its stylesheet.
   Everything is scoped under .hs-acc so the shop theme stays untouched. */

.hs-acc {
  --forest-2: #222a22;
  --sage: #8a9a78;
  --sage-dark: #748264;
  --beige: #eee6da;
  --page: #f4f1ea;
  --band: #dfe4d4;
  --ink: #1c1c1c;
  --muted: #8a8a8a;
  --line: #ece7de;
  --error: #c45c4a;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
.hs-acc *, .hs-acc *::before, .hs-acc *::after { box-sizing: border-box; }
/* The shop template forces Spectral on every element with !important. */
.hs-acc :is(h1, h2, h3, h4, h5, h6, p, a, span, div, li, td, th, label, input, textarea, button, select, b, small, strong, nav) {
  font-family: Manrope, system-ui, sans-serif !important;
}
.hs-acc .hs-titlebar h1, .hs-acc .ci-name, .hs-acc .hs-modal-h h3 {
  font-family: "Cormorant Garamond", Georgia, serif !important;
}
.hs-acc p, .hs-acc h1, .hs-acc h3 { margin: 0; }

/* ---- title bar + page band ------------------------------------------- */
.hs-titlebar { height: 88px; background: var(--sage); display: flex; align-items: center; }
.hs-titlebar h1 { font-size: 40px; font-weight: 600; color: #fff; line-height: 1.1; }
.hs-titlebar.compact h1 { font-size: 30px; }
.hs-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.hs-page { background: linear-gradient(var(--band) 0 88px, var(--page) 88px); padding: 28px 0 60px; min-height: 560px; }

/* ---- cards ------------------------------------------------------------ */
.hs-card { background: #fff; border-radius: 10px; padding: 28px 32px 32px; max-width: 520px; margin: 0 auto; }
.hs-card.cabinet { max-width: none; display: grid; grid-template-columns: 240px 1fr; padding: 8px 0; min-height: 560px; }
.cabinet-main { padding: 24px 32px 32px 12px; min-width: 0; }

/* ---- type ------------------------------------------------------------- */
.hs-acc .lead { font-size: 14px; color: #5c5c5c; margin: 0 0 18px; line-height: 1.5; }
.hs-acc .lead b { color: var(--ink); }
.hs-acc .links { margin-top: 14px; text-align: center; font-size: 13px; color: #5c5c5c; }
.hs-acc .links a, .hs-acc a.link { color: var(--sage-dark); text-decoration: none; font-weight: 600; cursor: pointer; }
.hs-acc .links a:hover, .hs-acc a.link:hover { color: var(--forest-2); }
.hs-acc .links.right { text-align: right; margin: 10px 0 0; }
.hs-acc .hint { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 6px; }
.hs-acc .hint b { color: var(--ink); }
.hs-acc .err { color: var(--error); font-size: 12px; margin-top: 6px; line-height: 1.35; }
.hs-acc .err:empty { display: none; }

/* ---- fields ----------------------------------------------------------- */
.fields { display: grid; gap: 10px; }
.fields.two { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.span-2 { grid-column: 1 / -1; }
.field { position: relative; }
.hs-acc .input {
  display: block; width: 100%; height: 40px; border: 0; background: var(--beige); border-radius: 12px;
  padding: 0 14px; font: 400 14px/1.2 Manrope, sans-serif; color: var(--ink); outline: none; margin: 0;
}
.hs-acc .input::placeholder { color: var(--muted); opacity: 1; }
.hs-acc .input:focus { box-shadow: inset 0 0 0 1.5px var(--sage); }
.hs-acc .input.error { box-shadow: inset 0 0 0 1.5px var(--error); }
.hs-acc .input.has-icon { padding-right: 44px; }
.hs-acc .input[readonly] { cursor: pointer; }
.hs-acc .eye {
  position: absolute; right: 8px; top: 4px; width: 32px; height: 32px; border: 0; background: none;
  color: #9a9a9a; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.hs-acc .eye:hover { color: var(--ink); }
.eye .hs-eye-off { display: none; }
.eye.is-on .hs-eye { display: none; }
.eye.is-on .hs-eye-off { display: block; }
.phone { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.cc { height: 40px; background: var(--beige); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #444; }
.hs-acc .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #4a4a4a; margin: 12px 0 4px; cursor: pointer; font-weight: 400; }
.check input { margin-top: 3px; accent-color: var(--sage); }

/* ---- buttons ---------------------------------------------------------- */
.hs-acc .btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; border: 0; border-radius: 12px; background: var(--sage); color: #fff;
  font: 600 13px/1 Manrope, sans-serif; padding: 0 16px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.hs-acc .btn:hover { background: var(--sage-dark); color: #fff; }
.hs-acc .btn.wide { min-width: 140px; }
.hs-acc .btn.full { width: 100%; }
.hs-acc .btn.ghost { background: transparent; color: var(--sage-dark); height: auto; padding: 0; }
.hs-acc .btn.ghost:hover { color: var(--forest-2); }
.hs-acc .btn-out { background: var(--error); }
.hs-acc .btn-out:hover { background: #a34738; }
.hs-acc .btn-light { background: #f4f2ed; color: #2c3338; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hs-acc .btn-light:hover { background: #e8e4dc; color: #2c3338; }
.actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.block-act { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; }
.hs-acc .or { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hs-acc .btn-social {
  width: 100%; height: 40px; margin-top: 8px; border: 1px solid #d8d2c6; background: #fff; color: var(--ink);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 13px/1 Manrope, sans-serif; cursor: pointer; text-decoration: none;
}
.hs-acc .btn-social:hover { background: var(--beige); color: var(--ink); }
.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }
.hs-acc .btn-plus {
  width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--sage); color: #fff;
  font: 600 22px/1 Manrope, sans-serif; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.hs-acc .btn-plus:hover { background: var(--sage-dark); }

/* ---- toast (sticky above the card, as in the prototype) --------------- */
.hs-acc .hs-toast {
  position: sticky; top: 12px; z-index: 5; margin: 0 auto 12px; max-width: 360px;
  background: var(--forest-2); color: #fff; text-align: center; padding: 10px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; transition: opacity .25s;
}
.hs-acc .hs-toast.is-hiding { opacity: 0; }
.hs-acc .alert { max-width: 520px; margin: 0 auto 12px; padding: 10px 16px; border-radius: 12px; font-size: 13px; line-height: 1.45; border: 0; }
.hs-acc .alert--error { background: #f6e3de; color: #8f3626; }
.hs-acc .alert--info { background: #e9eddf; color: #4b5a3c; }
.hs-acc .alert.wide { max-width: none; }

/* ---- cabinet navigation ---------------------------------------------
   The prototype draws these as bare text lines; here they get a hit area,
   hover state and a clear active pill (desktop) / segmented tabs (mobile). */
.side { display: flex; flex-direction: column; padding: 24px 16px 20px 20px; border-right: 1px solid var(--line); }
.side-tabs { display: flex; flex-direction: column; gap: 4px; }
.hs-acc .side-tabs a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: #3a3a3a; text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.25;
  transition: background .15s, color .15s;
}
.hs-acc .side-tabs a svg { flex: none; color: #9aa38f; transition: color .15s; }
.hs-acc .side-tabs a:hover { background: var(--page); color: var(--ink); }
.hs-acc .side-tabs a:hover svg { color: var(--sage-dark); }
.hs-acc .side-tabs a.active { background: var(--beige); color: var(--ink); font-weight: 700; }
.hs-acc .side-tabs a.active svg { color: var(--sage-dark); }
.hs-acc .side .out {
  margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none;
  color: var(--error); font-size: 14px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer;
}
.hs-acc .side .out:hover { color: #a34738; }
.hs-acc .side .out svg { flex: none; }
.hs-acc .out--bottom { display: none; }

/* ---- blocks ------------------------------------------------------------ */
.block { padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.block + .block { padding-top: 28px; }
.block:last-child, .block:has(+ .out--bottom), .block:has(+ .block[hidden] + .out--bottom) { border-bottom: 0; padding-bottom: 0; }
.hs-acc .block h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--ink); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hs-acc .block-head h3 { margin: 0; }

/* contacts */
.contact { margin-bottom: 14px; }
.contact:last-of-type { margin-bottom: 0; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.contact-v { font-size: 15px; color: var(--ink); word-break: break-all; }
.contact-edit { margin-top: 10px; }
.contact-edit > .input { margin-top: 8px; }
.contact-edit[hidden] { display: none; }
.phone-line { display: flex; align-items: center; gap: 10px; }
.phone-box { display: flex; align-items: center; flex: 1; max-width: 320px; height: 40px; background: var(--beige); border-radius: 12px; }
.phone-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--sage); }
.phone-box.error { box-shadow: inset 0 0 0 1.5px var(--error); }
.phone-box .cc { height: 40px; background: none; padding: 0 2px 0 14px; color: #6b6b6b; font-size: 14px; }
.hs-acc .phone-box .input { height: 40px; background: none; margin: 0; padding: 0 14px 0 4px; box-shadow: none; }

/* OTP */
.otp { display: flex; gap: 8px; margin: 10px 0 4px; }
.hs-acc .otp-cell {
  width: 40px; height: 44px; border: 0; background: var(--beige); border-radius: 12px; text-align: center;
  font: 600 18px/1 Manrope, sans-serif; color: var(--ink); outline: none; padding: 0;
}
.hs-acc .otp-cell:focus { box-shadow: inset 0 0 0 1.5px var(--sage); }
.hs-acc .otp-cell.error { box-shadow: inset 0 0 0 1.5px var(--error); }

/* date of birth calendar */
.dob-field { position: relative; }
.cal { position: absolute; top: calc(100% + 8px); right: 0; z-index: 12; width: 276px; background: #fff; border-radius: 14px; box-shadow: 0 14px 36px rgba(27, 34, 27, .16); padding: 12px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hs-acc .cal-h b { font-size: 14px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.hs-acc .cal-h b:hover { background: var(--beige); }
.hs-acc .cal-nav { width: 28px; height: 28px; border: 0; background: var(--beige); border-radius: 8px; cursor: pointer; color: #444; padding: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; }
.hs-acc .cal-day { height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: 500 13px/1 Manrope, sans-serif; color: var(--ink); padding: 0; }
.hs-acc .cal-day:hover { background: var(--beige); }
.hs-acc .cal-day.on { background: var(--sage); color: #fff; }
.hs-acc .cal-day.out { color: #c5c5c5; }
.hs-acc .cal-day.out:hover { background: none; }
.cal-years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 232px; overflow-y: auto; }
.hs-acc .cal-years button { height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: 500 13px/1 Manrope, sans-serif; color: var(--ink); }
.hs-acc .cal-years button:hover, .hs-acc .cal-years button.on { background: var(--beige); }

/* order history */
.order { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; cursor: pointer; }
.order:not(.head) { position: relative; padding-right: 28px; }
.order:not(.head)::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.6px solid #a0a49b; border-bottom: 1.6px solid #a0a49b; transform: rotate(45deg); transition: transform .15s;
}
.order.open::after { transform: rotate(-135deg); margin-top: -2px; }
.order:not(.head):hover { background: #faf8f4; }
.order.head { padding-right: 28px; }
.order.head { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 0; cursor: default; }
.order.open { border-bottom: 0; }
.order:not(.head):focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.order-detail { padding: 4px 0 22px; border-bottom: 1px solid var(--line); }
.order-detail[hidden] { display: none; }
.st { font-weight: 600; }
.st.ok { color: var(--sage-dark); }
.st.wait { color: #b0893a; }
.st.bad { color: var(--error); }
.oi { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center; background: #fff; border: 1px solid #e8e4dc; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ci-img { width: 64px; height: 64px; border-radius: 8px; background: linear-gradient(160deg, #c5cbb4, #8a9a78); overflow: hidden; display: block; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-acc .ci-name { display: block; font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.hs-acc a.ci-name:hover { color: var(--sage-dark); }
.ci-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.oi-qty { font-size: 13px; color: #555; white-space: nowrap; }
.ci-price { color: var(--sage-dark); font-weight: 700; font-size: 14px; min-width: 72px; text-align: right; white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.sum-row.muted { color: var(--muted); }
.sum-row.total { font-weight: 700; font-size: 16px; padding-top: 8px; }
.sum-row.total b { color: var(--sage-dark); }

/* addresses */
.addr { background: var(--beige); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-size: 14px; }
.addr .top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.addr .city { font-size: 13px; color: var(--muted); margin-top: 4px; }
.addr .bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.addr-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.addr-mini:last-child { border-bottom: 0; }
.addr-mini .meta { color: var(--muted); margin-top: 2px; font-size: 12px; }
.addr-acts { display: flex; align-items: center; gap: 12px; flex: none; }
.addr-acts form { margin: 0; }
.hs-acc .addr-del { border: 0; background: none; color: #b0b0b0; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.hs-acc .addr-del:hover { color: var(--error); }
.hs-acc .btn-chip {
  height: 28px; padding: 0 12px; border: 1px solid #d8d2c6; border-radius: 99px; background: #fff;
  color: var(--sage-dark); font: 600 12px/1 Manrope, sans-serif; cursor: pointer; white-space: nowrap;
}
.hs-acc .btn-chip:hover { background: var(--beige); border-color: transparent; color: var(--ink); }
.tag { font-size: 11px; font-weight: 700; color: var(--sage-dark); background: #fff; border-radius: 99px; padding: 3px 8px; align-self: flex-start; white-space: nowrap; }
.np-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.np-tabs label { flex: 1; margin: 0; }
.np-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.hs-acc .np-tab { height: 36px; border: 1px solid #e8e4dc; background: #fff; border-radius: 12px; font: 600 13px/1 Manrope, sans-serif; color: #444; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hs-acc .np-tabs input:checked + .np-tab { background: var(--beige); border-color: transparent; color: var(--ink); }
.np-add { display: grid; gap: 10px; }
.hs-acc .sel {
  padding-right: 36px;
  background: var(--beige) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.hs-acc .sel:disabled { color: var(--muted); cursor: not-allowed; }
.np-field { position: relative; }
.np-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 12px; box-shadow: 0 14px 36px rgba(27, 34, 27, .16); max-height: 260px; overflow-y: auto; display: none; }
.np-list.is-open { display: block; }
.np-list div { padding: 9px 14px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f2efe8; }
.np-list div:hover { background: #f7f4ee; }
.np-list small { display: block; color: var(--muted); font-size: 12px; }

/* ---- modal (logout confirm; same look as the cart modal) --------------- */
.hs-dim { position: fixed; inset: 0; background: rgba(20, 24, 18, .45); display: grid; place-items: center; z-index: 1100; padding: 24px 16px; }
.hs-dim[hidden] { display: none; }
.hs-modal { width: 420px; max-width: 100%; background: #fff; border-radius: 10px; box-shadow: 0 18px 48px rgba(0,0,0,.2); }
.hs-modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid #ece8e0; }
.hs-acc .hs-modal-h h3 { font-size: 24px; font-weight: 600; color: #2c3338; margin: 0; }
.hs-acc .x { width: 28px; height: 28px; border: 0; background: none; color: #9a9a9a; font-size: 20px; cursor: pointer; line-height: 1; padding: 0; }
.hs-modal-ask { padding: 16px 22px 8px; color: #3a4148; line-height: 1.5; font-size: 15px; }
.hs-modal-acts { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid #ece8e0; margin-top: 8px; }
.hs-modal-acts form { margin: 0; }

/* ---- tablet & mobile: segmented tabs on top, logout at the bottom ----- */
@media (max-width: 991.98px) {
  .hs-card.cabinet { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .side { min-width: 0; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-tabs {
    flex-direction: row; gap: 4px; padding: 4px; background: var(--page); border-radius: 12px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .side-tabs::-webkit-scrollbar { display: none; }
  .hs-acc .side-tabs a { flex: 1 0 auto; justify-content: center; padding: 9px 14px; white-space: nowrap; font-size: 13px; }
  .hs-acc .side-tabs a:hover { background: rgba(255,255,255,.6); }
  .hs-acc .side-tabs a.active { background: var(--sage); color: #fff; box-shadow: 0 1px 2px rgba(27,34,27,.12); }
  .hs-acc .side-tabs a.active svg { color: #fff; }
  .hs-acc .side .out { display: none; }
  .hs-acc .out--bottom {
    display: block; width: 100%; margin-top: 24px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line);
    background: none; color: var(--error); font-size: 14px; font-weight: 600; text-align: center; cursor: pointer;
  }
  .cabinet-main { padding: 20px 24px 24px; }
}

/* ---- mobile (prototype «Mobile», 390px) -------------------------------- */
@media (max-width: 767.98px) {
  .hs-wrap { padding: 0 12px; }
  .hs-titlebar { height: 64px; }
  .hs-titlebar .hs-wrap { padding: 0 16px; }
  .hs-titlebar h1, .hs-titlebar.compact h1 { font-size: 26px; }
  .hs-page { padding: 16px 0 40px; background: linear-gradient(var(--band) 0 56px, var(--page) 56px); }
  .hs-card { padding: 22px 16px 24px; max-width: none; }
  .fields.two { grid-template-columns: 1fr; }
  .hs-acc .btn.wide { min-width: 0; width: 100%; }
  .cabinet-main { padding: 16px; }
  .side { padding: 12px; }
  .side-tabs { overflow: visible; }
  .hs-acc .side-tabs a {
    flex: 1 1 0; min-width: 0; padding: 8px 4px; white-space: normal; text-align: center;
    font-size: 12px; line-height: 1.2; min-height: 44px;
  }
  .hs-acc .side-tabs a svg { display: none; }
  .contact-row { align-items: flex-start; }
  .block-act { flex-wrap: wrap; }
  .hs-acc .block-act .btn:not(.ghost) { width: 100%; }
  .otp { justify-content: space-between; }
  .hs-acc .otp-cell { width: 36px; height: 42px; }
  .phone-line { flex-wrap: wrap; }
  .phone-box { max-width: none; flex-basis: 100%; }
  .order { grid-template-columns: 1fr 1fr; gap: 4px 10px; }
  .order.head { display: none; }
  .oi { grid-template-columns: 56px 1fr; }
  .oi .ci-img { width: 56px; height: 56px; }
  .oi-qty, .oi .ci-price { grid-column: 2; justify-self: start; text-align: left; }
  .hs-modal-acts { flex-direction: column; }
  .hs-acc .hs-modal-acts .btn { width: 100%; }
  .hs-modal-acts form { width: 100%; }
  .cal { right: auto; left: 0; }
}
