/* Оформление domenstore: тёмно-синий и янтарный, мягкие углы, крупные заголовки. Цвета — только переменными. */
:root {
  --bg: #f4f6fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #14213d;
  --muted: #5a6478;
  --border: #dfe4ef;
  --border-strong: #14213d;
  --link: #2b59c3;
  --brand: #ffb703;
  --brand-soft: #fff3d1;
  --btn-bg: #14213d;
  --btn-text: #ffffff;
  --btn-hover: #24345c;
  --hero-bg: linear-gradient(135deg, #14213d 0%, #1f3a6e 100%);
  --hero-text: #ffffff;
  --hero-muted: #c3cce0;
  --hero-card: rgba(255, 255, 255, .08);
  --foot-bg: #14213d;
  --foot-text: #c3cce0;
  --ok: #18794e;
  --ok-soft: #ddf3e6;
  --warn: #8a5a00;
  --warn-soft: #fff3d1;
  --err: #c0362c;
  --err-soft: #fde8e6;
  --tip-bg: #14213d;
  --tip-text: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(20, 33, 61, .07);
  --shadow-hover: 0 10px 28px rgba(20, 33, 61, .14);
  --focus: 0 0 0 3px rgba(255, 183, 3, .5);
}
[data-theme="dark"] {
  --bg: #0d1324;
  --bg-soft: #111a30;
  --surface: #151d33;
  --surface-2: #1d2742;
  --text: #eef1f8;
  --muted: #9aa5bd;
  --border: #27324f;
  --border-strong: #eef1f8;
  --link: #7ea6ff;
  --brand: #ffb703;
  --brand-soft: #3a2f10;
  --btn-bg: #ffb703;
  --btn-text: #14213d;
  --btn-hover: #ffc533;
  --hero-bg: linear-gradient(135deg, #0a1020 0%, #18284d 100%);
  --hero-text: #ffffff;
  --hero-muted: #9aa5bd;
  --hero-card: rgba(255, 255, 255, .06);
  --foot-bg: #080d1a;
  --foot-text: #9aa5bd;
  --ok: #4cc98a;
  --ok-soft: #12321f;
  --warn: #ffc94d;
  --warn-soft: #3a2f10;
  --err: #ff8a80;
  --err-soft: #3d1a17;
  --tip-bg: #eef1f8;
  --tip-text: #14213d;
  --shadow: none;
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 2.25rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.4rem; margin: 2rem 0 1rem; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 2rem; padding-bottom: 3rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* Шапка */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-word span { color: var(--link); }
.logo-foot { color: #ffffff; margin-bottom: .5rem; --bg: var(--foot-bg); }
.logo-foot .logo-word span { color: var(--brand); }
.nav { display: flex; gap: 1.5rem; align-items: center; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.nav a:hover { text-decoration: underline; }
.nav a.btn { color: var(--btn-text); }
.tools { display: flex; gap: .75rem; align-items: center; }
.tools form { margin: 0; }
.tools > a { color: var(--text); font-weight: 600; text-decoration: none; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 999px; }
.lang button { background: none; border: 0; color: var(--muted); padding: 4px 10px; cursor: pointer; font: inherit; font-size: .85rem; border-radius: 999px; }
.lang button.on { color: var(--text); background: var(--brand); font-weight: 700; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 999px; color: var(--text); cursor: pointer; width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font: inherit; font-weight: 600; }
button.link:hover { text-decoration: underline; }

/* Подвал */
.foot { background: var(--foot-bg); color: var(--foot-text); font-size: .9rem; }
.foot .wrap { padding-top: 2rem; padding-bottom: 2rem; display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; }

/* Главный блок на главной */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .75rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { color: var(--hero-muted); font-size: 1.1rem; margin: 0 0 1.75rem; }
.hero-search { display: flex; background: #ffffff; border-radius: 999px; padding: 6px 6px 6px 10px; gap: 6px; }
.hero-search input[type=search] { border: 0; background: transparent; color: #14213d; font-size: 1.05rem; padding: 10px 12px; border-radius: 999px; }
.hero-search input[type=search]:focus { box-shadow: none; }
.hero-search .btn { background: var(--brand); color: #14213d; white-space: nowrap; }
.hero-search .btn:hover { background: #ffc533; }
.how { background: var(--hero-card); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 24px; }
.how h2 { margin: 0 0 1rem; font-size: 1.1rem; color: var(--hero-text); }
.how ol { list-style: none; margin: 0; padding: 0; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; color: var(--hero-muted); }
.how li:last-child { margin-bottom: 0; }
.how li::before { content: counter(how); width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #14213d; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.how b { display: block; color: var(--hero-text); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Кнопки и формы */
.btn, button.btn {
  display: inline-block; background: var(--btn-bg); color: var(--btn-text); border: 2px solid transparent; border-radius: 999px;
  padding: 11px 24px; font: inherit; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn-small { padding: 7px 14px; font-size: .9rem; }
.btn.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.btn-ghost:hover { background: var(--surface-2); }
.btn.btn-danger { background: var(--err); color: #ffffff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.field { margin-bottom: 1.25rem; }
.field .help { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--err); font-size: .9rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }

/* Блоки */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.lots .card + .card { margin-top: 0; }
.narrow { max-width: 600px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.empty { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 220px; color: var(--muted); padding: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }
.step { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--text); background: var(--brand-soft); border-radius: 999px; padding: 3px 12px; margin: 0 0 .75rem; }

.messages { margin-bottom: 1.25rem; }
.msg { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: .5rem; background: var(--surface-2); }
.msg-success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.msg-warning { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.msg-error { background: var(--err-soft); color: var(--err); border-color: var(--err); }
.note { background: var(--warn-soft); color: var(--text); border-radius: var(--radius-sm); padding: 12px 16px; margin: 1rem 0; }

.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* Список лотов */
.lots { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.lot { display: flex; flex-direction: column; color: var(--text); text-decoration: none; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.lot::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--brand); }
.lot:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.lot-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; word-break: break-all; margin-bottom: .25rem; }
.lot-price { font-size: 1.5rem; font-weight: 800; margin: .75rem 0 .25rem; }
.lot-price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.lot-foot { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: .5rem; font-size: .95rem; padding: 3px 0; }
.kv span:first-child { color: var(--muted); }

.price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
tr.mine td { background: var(--brand-soft); }
.table td:first-child { white-space: nowrap; }

.code-row { display: flex; gap: .5rem; align-items: center; background: var(--surface-2); border-radius: var(--radius); padding: 8px 10px; margin: .25rem 0 .75rem; }
.code-row code { flex: 1; word-break: break-all; font-size: .95rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .75rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.actions form { margin: 0; }

/* Подсказки data-tip */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  background: var(--tip-bg); color: var(--tip-text); font-size: .8rem; font-weight: 400; line-height: 1.3;
  padding: 6px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
}

/* Страницы входа allauth */
.auth { max-width: 460px; margin: 0 auto; }
.auth p { margin: 0 0 1rem; }
.auth button[type=submit], .auth form button { background: var(--btn-bg); color: var(--btn-text); border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; width: 100%; }
.auth ul { padding-left: 1.2rem; }
.auth .socialaccount_providers, .auth ul.providers { list-style: none; padding: 0; }
.auth input[type=checkbox] { width: auto; }
.auth h1 { text-align: center; font-size: 2rem; }
.auth hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  .top-row { gap: .5rem 1rem; }
  .logo { font-size: 1.1rem; gap: 6px; }
  .logo-mark { width: 26px; height: 26px; }
  .tools { margin-left: auto; gap: .5rem; }
  .lang button { padding: 3px 7px; }
  .nav { order: 3; flex-basis: 100%; }
  .price { font-size: 1.6rem; }
  .hero { padding: 40px 0 48px; }
  .hero-search { flex-direction: column; border-radius: var(--radius); padding: 6px; }
  .hero-search .btn { width: 100%; }
}
