@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --c-primary:   #1d4ed8;
  --c-primary-h: #1e40af;
  --c-accent:    #3b82f6;
  --c-text:      #1e293b;
  --c-muted:     #64748b;
  --c-bg:        #ffffff;
  --c-bg-alt:    #f8fafc;
  --c-border:    #e2e8f0;
  --c-success:   #16a34a;
  --c-warning:   #d97706;
  --c-error:     #dc2626;

  --ff:    'Inter', system-ui, -apple-system, sans-serif;
  --r:      8px;
  --r-lg:  16px;
  --sh:     0 1px 3px rgba(0,0,0,.08);
  --sh-md:  0 4px 16px rgba(0,0,0,.08);
  --sh-lg:  0 8px 32px rgba(0,0,0,.12);

  --hdr-h: 64px;
  --w:     1400px;
  --pad:   clamp(1rem, 3vw, 2rem);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select, button { font: inherit; }
h1, h2, h3, h4 { line-height: 1.25; }

/* ─── Typography ─────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem);   font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem);  font-weight: 600; }
p  { max-width: 72ch; }
.text-full p { max-width: none; }

.text-cols {
  columns: 2;
  column-gap: 3rem;
}
.text-cols p {
  max-width: none;
  break-inside: avoid;
  margin-bottom: 1rem;
}
.text-cols p:last-child { margin-bottom: 0; }
.text-muted   { color: var(--c-muted); }
.text-center  { text-align: center; }
.text-center p { margin-inline: auto; }

/* ─── Layout ─────────────────────────────────────────────── */
.wrap { width: min(var(--w), 100% - var(--pad) * 2); margin-inline: auto; }

.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.section--alt { background: var(--c-bg-alt); }

.section__head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.section__head h2 { margin-bottom: .5rem; }
.section__head p  { color: var(--c-muted); font-size: 1.05rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--pad); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pad); }

/* ─── Header ─────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 100;
  height: var(--hdr-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow .2s;
}
.hdr.scrolled { box-shadow: var(--sh-md); }
.hdr__inner { height: 100%; display: flex; align-items: center; gap: 1.25rem; }

.hdr__logo {
  font-size: 1.25rem; font-weight: 700; color: var(--c-primary);
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
}
.hdr__logo svg { width: 28px; height: 28px; }

.hdr__nav { flex: 1; overflow: hidden; }
.hdr__menu { display: flex; align-items: center; gap: .1rem; }
.hdr__menu a {
  padding: .4rem .65rem;
  border-radius: var(--r);
  font-size: .875rem; font-weight: 500;
  color: var(--c-muted);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.hdr__menu a:hover { color: var(--c-primary); background: #eff6ff; }
.hdr__menu a.active { color: var(--c-primary); background: #dbeafe; }

.hdr__actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; flex-shrink: 0; }
.hdr__lk {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  font-size: .875rem; font-weight: 500;
  transition: border-color .15s, color .15s;
}
.hdr__lk:hover { border-color: var(--c-primary); color: var(--c-primary); }
.hdr__lk svg { width: 15px; height: 15px; }

.hdr__burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px; border-radius: var(--r);
}
.hdr__burger span { display: block; height: 2px; background: var(--c-text); transition: transform .25s, opacity .25s; }
.hdr__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr__burger.open span:nth-child(2) { opacity: 0; }
.hdr__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hdr__drawer {
  display: none; position: fixed; inset: var(--hdr-h) 0 0 0;
  background: var(--c-bg); padding: 1.5rem var(--pad); overflow-y: auto; z-index: 99;
}
.hdr__drawer.open { display: block; }
.hdr__drawer .hdr__menu { flex-direction: column; align-items: stretch; gap: .25rem; }
.hdr__drawer .hdr__menu a { font-size: 1rem; padding: .75rem 1rem; }
.hdr__drawer .hdr__lk { justify-content: center; padding: .75rem; margin-top: 1.25rem; }

/* ─── Footer ─────────────────────────────────────────────── */
.ftr { background: #0f172a; color: #94a3b8; padding-block: 3rem 2rem; }
.ftr__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid #1e293b;
}
.ftr__logo { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: .75rem; }
.ftr__desc { font-size: .875rem; line-height: 1.75; }
.ftr__title { font-size: .78rem; font-weight: 600; color: #cbd5e1; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.ftr__links { display: flex; flex-direction: column; gap: .55rem; }
.ftr__links a { font-size: .875rem; transition: color .15s; }
.ftr__links a:hover { color: #fff; }
.ftr__contacts { display: flex; flex-direction: column; gap: .65rem; }
.ftr__contact { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.ftr__contact svg { width: 15px; height: 15px; flex-shrink: 0; color: #3b82f6; }
.ftr__contact a:hover { color: #fff; }
.ftr__bottom {
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.75rem; font-size: .8rem;
}
.ftr__reqs { display: flex; flex-direction: column; gap: .2rem; line-height: 1.6; }
.ftr__docs { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }
.ftr__docs a:hover { color: #fff; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.5rem; border-radius: var(--r);
  font-size: .95rem; font-weight: 600;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap; cursor: pointer; border: 2px solid transparent;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(29,78,216,.3); }
.btn--primary:hover { background: var(--c-primary-h); box-shadow: 0 4px 14px rgba(29,78,216,.4); }
.btn--outline { border-color: var(--c-primary); color: var(--c-primary); }
.btn--outline:hover { background: #eff6ff; }
.btn--outline-w { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--outline-w:hover { background: rgba(255,255,255,.1); }
.btn--ghost { color: var(--c-primary); }
.btn--ghost:hover { background: #eff6ff; }
.btn--lg { padding: .8rem 2rem; font-size: 1.05rem; }
.btn--sm { padding: .35rem .9rem; font-size: .82rem; }
.btn--full { width: 100%; justify-content: center; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1.5rem;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.card__icon {
  width: 48px; height: 48px; border-radius: var(--r);
  background: #eff6ff; color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .4rem; }
.card p  { color: var(--c-muted); font-size: .9rem; }

/* ─── Steps ──────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: var(--c-bg-alt); padding: 2rem 1.5rem; text-align: center; border: 1px solid var(--c-border); margin: -1px 0 0 -1px; }
.step__num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; margin: 0 auto 1rem;
}
.step h3 { margin-bottom: .4rem; }
.step p  { color: var(--c-muted); font-size: .875rem; margin-inline: auto; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding-block: clamp(4rem, 10vw, 7rem);
  background: linear-gradient(135deg, #0f172a 0%, #1a3a6b 100%);
  color: #fff;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__badge {
  display: inline-block;
  background: rgba(59,130,246,.18); color: #93c5fd;
  border: 1px solid rgba(59,130,246,.3);
  padding: .3rem .85rem; border-radius: 100px;
  font-size: .78rem; font-weight: 600; letter-spacing: .05em;
  margin-bottom: 1.25rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero__sub { color: #94a3b8; font-size: 1.05rem; margin-bottom: 2rem; max-width: 52ch; }
.hero__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__price { margin-top: 1.25rem; color: #64748b; font-size: .9rem; }
.hero__price strong { color: #fff; font-size: 1.5rem; }

.hero__visual {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg); padding: 1.75rem;
}
.hero__table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.hero__table th { color: #64748b; font-weight: 500; padding: .4rem .6rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.hero__table td { color: #e2e8f0; padding: .45rem .6rem; border-bottom: 1px solid rgba(255,255,255,.05); font-family: 'Courier New', monospace; }
.hero__table tr:last-child td { border-bottom: none; }

/* ─── Requirement table ──────────────────────────────────── */
.req-table { width: 100%; border-collapse: collapse; }
.req-table th,
.req-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); font-size: .9rem; }
.req-table th { font-weight: 600; background: var(--c-bg-alt); width: 35%; }
.req-table tr:last-child th,
.req-table tr:last-child td { border-bottom: none; }

/* ─── Order form ─────────────────────────────────────────── */
.order-box {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 580px; margin-inline: auto;
  box-shadow: var(--sh-md);
}
.order-box h3 { margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-group label { font-size: .875rem; font-weight: 500; }
.form-group label .req { color: var(--c-error); }
.form-control {
  padding: .65rem .9rem; border: 1.5px solid var(--c-border);
  border-radius: var(--r); font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
  width: 100%; background: var(--c-bg);
}
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.form-control::placeholder { color: #94a3b8; }
.form-hint { font-size: .8rem; color: var(--c-muted); }
.form-checks { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.25rem; }
.form-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; color: var(--c-muted); cursor: pointer; }
.form-check input { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; accent-color: var(--c-primary); }
.form-check a { color: var(--c-primary); text-decoration: underline; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .6rem; border-radius: 100px;
  font-size: .77rem; font-weight: 600;
}
.badge--new      { background: #dbeafe; color: #1d4ed8; }
.badge--clarify  { background: #fef9c3; color: #a16207; }
.badge--ready    { background: #fce7f3; color: #be185d; }
.badge--progress { background: #e0f2fe; color: #0369a1; }
.badge--done     { background: #d1fae5; color: #065f46; }
.badge--paid     { background: #dcfce7; color: #15803d; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert { padding: .9rem 1.1rem; border-radius: var(--r); font-size: .9rem; margin-bottom: 1rem; }
.alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert--warn    { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data thead th { text-align: left; padding: .75rem 1rem; font-size: .78rem; color: var(--c-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--c-border); }
table.data tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--c-bg-alt); }

/* ─── Dashboard / ЛК ────────────────────────────────────── */
.lk-page {
  background: #f1f5f9;
  min-height: calc(100dvh - var(--hdr-h));
}

/* Верхняя панель с пользователем */
.lk-userbar {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  padding: 1.375rem 0;
}
.lk-userbar__inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.lk-userbar__left { display: flex; align-items: center; gap: .875rem; }
.lk-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #fff; font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.lk-userbar__name  { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.lk-userbar__email { font-size: .8rem; color: var(--c-muted); margin-top: .1rem; }

/* Статистика */
.lk-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .875rem;
  padding-top: 1.5rem;
}
.stat-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1.125rem 1.375rem;
}
.stat-card__label {
  font-size: .72rem; font-weight: 600; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .45rem;
}
.stat-card__value { font-size: 1.65rem; font-weight: 700; line-height: 1; color: var(--c-text); }
.stat-card__sub   { font-size: .78rem; color: var(--c-muted); margin-top: .3rem; }

/* Секция */
.lk-section { padding-top: 1.625rem; padding-bottom: 3rem; }
.lk-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem;
}
.lk-section__title { font-size: .95rem; font-weight: 600; }

/* Список заказов */
.order-list { display: flex; flex-direction: column; gap: .5rem; }
.order-row {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 3px solid #e2e8f0;
  border-radius: var(--r-lg);
  padding: .9rem 1.25rem;
  display: grid;
  grid-template-columns: 3.25rem 1fr auto 7.5rem 1.25rem;
  align-items: center; gap: 1rem;
  transition: box-shadow .15s, border-left-color .15s;
}
.order-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.07); }

.order-row[data-status="new"]            { border-left-color: #93c5fd; }
.order-row[data-status="clarification"]  { border-left-color: #fbbf24; }
.order-row[data-status="ready_to_start"] { border-left-color: #c084fc; }
.order-row[data-status="in_progress"]    { border-left-color: #38bdf8; }
.order-row[data-status="done"]           { border-left-color: #34d399; }
.order-row[data-status="paid"]           { border-left-color: #4ade80; }
.order-row[data-status="reviewed"]       { border-left-color: #a3e635; }

.order-row__num  { font-size: .75rem; color: var(--c-muted); font-weight: 600; }
.order-row__info h3 { font-size: .9rem; font-weight: 600; margin-bottom: .15rem; line-height: 1.3; }
.order-row__info p  { font-size: .78rem; color: var(--c-muted); }
.order-row__price { font-weight: 700; font-size: .9rem; white-space: nowrap; text-align: right; }
.order-row__price--empty { color: var(--c-muted); font-weight: 400; font-size: .78rem; }
.order-row__arrow { color: #cbd5e1; line-height: 1; transition: color .15s; }
.order-row:hover .order-row__arrow { color: var(--c-primary); }

/* Страница заказа */
.lk-page .card { transition: box-shadow .2s; }
.lk-page .card:hover { box-shadow: var(--sh); transform: none; }

.order-detail { display: grid; grid-template-columns: 1fr 340px; gap: 1.75rem; align-items: start; }
.order-section { margin-bottom: 1.75rem; }
.order-section h3 {
  font-size: .72rem; font-weight: 600; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: .875rem;
}

/* Чат */
.chat { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.chat-msg { max-width: 78%; }
.chat-msg--admin  { align-self: flex-start; }
.chat-msg--client { align-self: flex-end; }
.chat-msg__body {
  padding: .75rem 1rem; font-size: .875rem; line-height: 1.55;
  word-break: break-word;
}
.chat-msg--admin  .chat-msg__body { background: #f8fafc; border: 1px solid var(--c-border); border-radius: 12px 12px 12px 4px; }
.chat-msg--client .chat-msg__body { background: var(--c-primary); color: #fff; border-radius: 12px 12px 4px 12px; }
.chat-msg__meta { font-size: .72rem; color: var(--c-muted); margin-top: .3rem; padding-inline: .25rem; }
.chat-msg--client .chat-msg__meta { text-align: right; }

/* Боковая панель */
.order-sidebar { display: flex; flex-direction: column; gap: .875rem; position: sticky; top: calc(var(--hdr-h) + 1rem); }
.order-sidebar .card { padding: 1.25rem; }
.sidebar-status { text-align: center; padding: .25rem 0 .5rem; }
.sidebar-status .badge { font-size: .85rem; padding: .4rem 1rem; }

@media (max-width: 1100px) {
  .lk-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .order-detail { grid-template-columns: 1fr; }
  .order-sidebar { position: static; }
  .order-row { grid-template-columns: 1fr auto auto; }
  .order-row__num   { display: none; }
  .order-row__arrow { display: none; }
}
@media (max-width: 600px) {
  .lk-stats { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row__price { display: none; }
}

/* ─── Auth ───────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100dvh - var(--hdr-h));
  display: flex; align-items: center; justify-content: center;
  padding: 2rem var(--pad);
  background: var(--c-bg-alt);
}
.auth-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  width: 100%; max-width: 440px;
  box-shadow: var(--sh-md);
}
.auth-card__logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.15rem; font-weight: 700; color: var(--c-primary);
  margin-bottom: 1.75rem;
}
.auth-card__logo svg { width: 26px; height: 26px; }
.auth-card__title { font-size: 1.4rem; font-weight: 700; margin-bottom: .3rem; }
.auth-card__sub   { color: var(--c-muted); font-size: .9rem; margin-bottom: 1.75rem; }
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin-block: 1.25rem; color: var(--c-muted); font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--c-muted); }
.auth-footer a { color: var(--c-primary); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.input-password { position: relative; }
.input-password .form-control { padding-right: 2.75rem; }
.input-password__toggle {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--c-muted); cursor: pointer; line-height: 1;
}
.input-password__toggle svg { width: 18px; height: 18px; }

/* ─── Order Wizard ───────────────────────────────────────── */
.wizard { max-width: 700px; margin-inline: auto; }

.wizard__progress {
  display: flex; align-items: center;
  margin-bottom: 2.5rem;
}
.wizard__step-dot {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  flex: 1;
  position: relative;
}
.wizard__step-dot:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 2px;
  background: var(--c-border);
  transition: background .3s;
}
.wizard__step-dot.done::after { background: var(--c-primary); }
.wizard__step-dot .dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--c-border);
  background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: var(--c-muted);
  transition: all .25s; z-index: 1;
}
.wizard__step-dot.active .dot { border-color: var(--c-primary); color: var(--c-primary); background: #eff6ff; }
.wizard__step-dot.done   .dot { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.wizard__step-dot .label { font-size: .78rem; color: var(--c-muted); white-space: nowrap; }
.wizard__step-dot.active .label { color: var(--c-primary); font-weight: 600; }

.wizard__panel { display: none; }
.wizard__panel.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wizard__nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

/* Карточки выбора типа */
.type-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.type-card { position: relative; }
.type-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.type-card label {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 1.5rem 1rem; text-align: center;
  border: 2px solid var(--c-border); border-radius: var(--r-lg);
  cursor: pointer; transition: border-color .15s, background .15s;
  height: 100%;
}
.type-card label:hover { border-color: var(--c-accent); background: #f8fbff; }
.type-card input:checked + label {
  border-color: var(--c-primary); background: #eff6ff;
}
.type-card__icon {
  width: 52px; height: 52px; border-radius: var(--r);
  background: #f1f5f9; color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
}
.type-card__icon svg { width: 26px; height: 26px; }
.type-card__title { font-weight: 600; font-size: .95rem; }
.type-card__desc  { font-size: .8rem; color: var(--c-muted); line-height: 1.5; }

/* Зона загрузки файлов */
.file-drop {
  border: 2px dashed var(--c-border); border-radius: var(--r-lg);
  padding: 2rem; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
  position: relative;
}
.file-drop:hover,
.file-drop.drag-over { border-color: var(--c-primary); background: #f0f7ff; }
.file-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-drop__icon { color: var(--c-muted); margin: 0 auto .75rem; }
.file-drop__icon svg { width: 36px; height: 36px; }
.file-drop__text { font-weight: 500; margin-bottom: .25rem; }
.file-drop__hint { font-size: .82rem; color: var(--c-muted); }

.file-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.file-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem;
  background: var(--c-bg-alt); border: 1px solid var(--c-border);
  border-radius: var(--r); font-size: .85rem;
}
.file-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item__size { color: var(--c-muted); flex-shrink: 0; }
.file-item__del  { color: var(--c-error); cursor: pointer; flex-shrink: 0; line-height: 1; font-size: 1.1rem; }
.file-size-bar {
  display: flex; align-items: center; gap: .75rem; margin-top: .5rem; font-size: .82rem; color: var(--c-muted);
}
.file-size-bar__track {
  flex: 1; height: 4px; background: var(--c-border); border-radius: 2px; overflow: hidden;
}
.file-size-bar__fill { height: 100%; background: var(--c-primary); border-radius: 2px; transition: width .2s; }
.file-size-bar__fill.warn { background: var(--c-warning); }

/* ─── Responsive ─────────────────────────────────────────── */

/* Планшет в ландшафте / маленький ноутбук */
@media (max-width: 1100px) {
  .hdr__menu a { font-size: .85rem; padding: .38rem .55rem; }
}

/* Планшет в портрете и меньше → мобильный режим */
@media (max-width: 900px) {
  .hdr__nav    { display: none; }
  .hdr__lk     { display: none; }
  .hdr__burger { display: flex; }

  .hero__inner  { grid-template-columns: 1fr; }
  .hero__visual { display: none; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .ftr__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Телефон */
@media (max-width: 600px) {
  .text-cols  { columns: 1; }
  .type-cards { grid-template-columns: 1fr; }
  .grid-3      { grid-template-columns: 1fr; }
  .grid-4      { grid-template-columns: 1fr; }
  .ftr__grid   { grid-template-columns: 1fr; }
  .hero__btns  { flex-direction: column; }
  .btn--lg     { width: 100%; justify-content: center; }
  .steps       { grid-template-columns: 1fr; }
  .ftr__bottom { flex-direction: column; }
}

/* ─── Order Progress Tracker ────────────────────────────────── */
.order-progress {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .15rem; padding: .75rem 1.25rem;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-lg); margin-bottom: 1.5rem;
  font-size: .875rem;
}
.order-progress__item {
  color: var(--c-muted); font-weight: 500; white-space: nowrap; padding: .1rem 0;
}
.order-progress__item.done   { color: #16a34a; font-weight: 600; }
.order-progress__item.active { color: var(--c-primary); font-weight: 700; }
.order-progress__sep { color: #cbd5e1; font-size: .8rem; flex-shrink: 0; padding: 0 .3rem; user-select: none; }
.order-progress__sep.done { color: #86efac; }

/* ─── Order Status Banner ────────────────────────────────────── */
.order-banner {
  padding: .9rem 1.125rem; border-radius: var(--r-lg);
  border-left: 3px solid transparent; margin-bottom: 1.5rem;
  line-height: 1.6;
}
.order-banner__title {
  display: flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: .9rem; margin-bottom: .3rem;
}
.order-banner__title svg { width: 18px; height: 18px; flex-shrink: 0; }
.order-banner p { max-width: none; margin: 0; font-size: .875rem; }
.order-banner--info    { background: #eff6ff; border-left-color: var(--c-primary); color: #1e3a8a; }
.order-banner--warn    { background: #fffbeb; border-left-color: #d97706; color: #78350f; }
.order-banner--success { background: #f0fdf4; border-left-color: #16a34a; color: #14532d; }
.order-banner--action  { background: #fdf4ff; border-left-color: #9333ea; color: #581c87; }

/* ─── Dashboard Action Chips ─────────────────────────────────── */
.order-row__meta {
  display: flex; align-items: center; gap: .4rem;
  flex-wrap: wrap; margin-top: .2rem;
}
.action-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .14rem .48rem; border-radius: 100px;
  font-size: .67rem; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.action-chip--confirm { background: #fae8ff; color: #86198f; }
.action-chip--pay     { background: #dcfce7; color: #15803d; }
.action-chip--reply   { background: #fef9c3; color: #a16207; }

@media (max-width: 600px) {
  .order-progress { padding: .625rem 1rem; font-size: .8rem; }
}

/* ─── Rendered Markdown body ─────────────────────────────────── */
.md-body p { max-width: none; margin: 0 0 .5rem; }
.md-body p:last-child { margin-bottom: 0; }
.md-body strong { font-weight: 700; }
.md-body em { font-style: italic; }
.md-body ul, .md-body ol { padding-left: 1.3rem; margin-bottom: .5rem; }
.md-body ul:last-child, .md-body ol:last-child { margin-bottom: 0; }
.md-body li { margin-bottom: .2rem; }
.md-body code {
  font-family: 'Courier New', monospace; font-size: .85em;
  background: rgba(0,0,0,.07); padding: .1em .35em; border-radius: 3px;
}
.md-body pre {
  background: rgba(0,0,0,.07); border-radius: 4px;
  padding: .6rem .75rem; overflow-x: auto; margin-bottom: .5rem;
}
.md-body pre code { background: none; padding: 0; font-size: .875em; }
.md-body blockquote {
  border-left: 3px solid currentColor; opacity: .75;
  padding-left: .75rem; margin: .5rem 0; font-style: italic;
}
.md-body a { text-decoration: underline; }
.md-body h1, .md-body h2, .md-body h3 { font-weight: 600; margin-bottom: .375rem; }
.md-body h1 { font-size: 1.1em; } .md-body h2 { font-size: 1.05em; }
.md-body hr { border: none; border-top: 1px solid currentColor; opacity: .25; margin: .5rem 0; }

/* EasyMDE tweaks */
.EasyMDEContainer { margin: 0; }
.EasyMDEContainer .CodeMirror { border-radius: 0 0 var(--r-md) var(--r-md); font-family: inherit; font-size: .9rem; }
.EasyMDEContainer .editor-toolbar { border-radius: var(--r-md) var(--r-md) 0 0; }
.editor-preview, .editor-preview-side { font-size: .9rem; line-height: 1.65; }

/* ─── Мобильная адаптация ЛК (Фаза 3) ───────────────────────── */

/* Класс для сеток системной информации (VBA / Python) */
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .5rem; }

/* Планшет (900px) — type-cards: 2 колонки вместо 3 */
@media (max-width: 900px) {
  .type-cards { grid-template-columns: repeat(2, 1fr); }
  .chat-msg   { max-width: 88%; }
}

/* Телефон (600px) */
@media (max-width: 600px) {
  .type-cards  { grid-template-columns: 1fr; }
  .sys-grid    { grid-template-columns: 1fr; }
  .chat-msg    { max-width: 94%; }
  .order-row   { padding-inline: .875rem; }
  .stat-card   { padding: .875rem 1rem; }

  /* EasyMDE toolbar — перенос кнопок на новую строку */
  .editor-toolbar { flex-wrap: wrap; height: auto; }
  .editor-toolbar a, .editor-toolbar i { padding: 4px 6px; }
}

/* ═══════════════════════════════════════════════════════════
   Cookie Consent — баннер согласия (152-ФЗ)
   ═══════════════════════════════════════════════════════════ */

/* Кнопка submit заблокирована, пока нет согласия на обработку ПД */
.btn:disabled,
.btn.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; pointer-events: none; }

/* Нижний баннер */
.cc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  background: var(--c-bg); border-top: 1px solid var(--c-border);
  box-shadow: 0 -6px 24px rgba(0,0,0,.10);
  padding: 1rem var(--pad);
  transform: translateY(110%); transition: transform .35s ease;
}
.cc-banner.cc--visible { transform: translateY(0); }
.cc-banner__body {
  max-width: var(--w); margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.cc-banner__text { flex: 1 1 320px; font-size: .875rem; color: var(--c-muted); line-height: 1.5; }
.cc-banner__text strong { display: block; color: var(--c-text); font-size: .95rem; margin-bottom: .2rem; }
.cc-banner__text a { color: var(--c-primary); text-decoration: underline; }
.cc-banner__actions { display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }

/* Окно детальных настроек */
.cc-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.cc-modal.cc--visible { display: block; }
.cc-modal__overlay { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.cc-modal__box {
  position: relative; z-index: 1;
  width: calc(100% - 2rem); max-width: 560px;
  margin: 6vh auto 0; max-height: 88vh; overflow-y: auto;
  background: var(--c-bg); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  animation: cc-pop .25s ease;
}
@keyframes cc-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cc-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--c-border);
}
.cc-modal__head h2 { font-size: 1.15rem; }
.cc-modal__close {
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  color: var(--c-muted); cursor: pointer;
}
.cc-modal__content { padding: 1.25rem 1.5rem; }
.cc-modal__lead { font-size: .875rem; color: var(--c-muted); line-height: 1.6; margin-bottom: 1.25rem; }
.cc-modal__lead a { color: var(--c-primary); text-decoration: underline; }
.cc-modal__foot {
  display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap;
  padding: 1rem 1.5rem; border-top: 1px solid var(--c-border);
  background: var(--c-bg-alt); border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Категория cookie */
.cc-cat { padding: 1rem 0; border-top: 1px solid var(--c-border); }
.cc-cat:first-of-type { border-top: none; padding-top: 0; }
.cc-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.cc-cat__name { font-weight: 600; font-size: .95rem; color: var(--c-text); }
.cc-cat__desc { font-size: .82rem; color: var(--c-muted); line-height: 1.55; }
.cc-cat__always { font-size: .78rem; font-weight: 600; color: var(--c-success); white-space: nowrap; }

/* Переключатель */
.cc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-switch__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #cbd5e1; border-radius: 999px; transition: background .2s;
}
.cc-switch__slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.cc-switch input:checked + .cc-switch__slider { background: var(--c-primary); }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(18px); }
.cc-switch input:focus-visible + .cc-switch__slider { box-shadow: 0 0 0 3px rgba(29,78,216,.25); }

@media (max-width: 640px) {
  .cc-banner__actions { width: 100%; }
  .cc-banner__actions .btn { flex: 1 1 auto; }
}
