:root {
  --logo-tag-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg transform='rotate(-30 60 60)'%3E%3Cpath d='M40 34H88a6 6 0 0 1 6 6V80a6 6 0 0 1-6 6H40L22 60Z' fill='%23fff'/%3E%3Ccircle cx='38' cy='60' r='5' fill='%233457D5'/%3E%3Cg transform='translate(50 40) scale(.36)' fill='%233457D5'%3E%3Cpath d='M40 18C43.2 48.4 49.6 54.8 80 58 49.6 61.2 43.2 67.6 40 98 36.8 67.6 30.4 61.2 0 58 30.4 54.8 36.8 48.4 40 18Z'/%3E%3Cpath d='M80 2C81.28 14.16 83.84 16.72 96 18 83.84 19.28 81.28 21.84 80 34 78.72 21.84 76.16 19.28 64 18 76.16 16.72 78.72 14.16 80 2Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --logo-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg transform='rotate(-30 60 60)'%3E%3Cpath d='M40 34H88a6 6 0 0 1 6 6V80a6 6 0 0 1-6 6H40L22 60Z' fill='%233457D5'/%3E%3Ccircle cx='38' cy='60' r='5' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E");
  --ink: #16181D;
  --muted: #5A5F6B;
  --line: #D3D5CE;
  --paper: #EEEFEA;
  --card: #ffffff;
  --accent: #3457d5;
  --accent-ink: #ffffff;
  --glow: #f4c430;
  --danger: #B42318;
  --ok: #1d7a4a;
  --radius: 14px;
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 5vw, 3.2rem);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Golos Text", Inter, system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 400; line-height: 1.1; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-1); }
a { color: var(--accent); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Логотип: ценник Shyba */
.logo { display: inline-flex; align-items: flex-start; gap: 0; padding-top: .45em; font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 500; color: var(--ink); text-decoration: none; font-size: 1.6rem; line-height: 1; }
.logo-mark { order: 2; width: 1.3em; height: 1.3em; margin: -.5em 0 0 -.06em; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg transform='rotate(-30 60 60)'%3E%3Cpath d='M40 34H88a6 6 0 0 1 6 6V80a6 6 0 0 1-6 6H40L22 60Z' fill='%233457D5'/%3E%3Ccircle cx='38' cy='60' r='5' fill='%23F7F7F5'/%3E%3Cg transform='translate(50 40) scale(.36)' fill='%23fff'%3E%3Cpath d='M40 18C43.2 48.4 49.6 54.8 80 58 49.6 61.2 43.2 67.6 40 98 36.8 67.6 30.4 61.2 0 58 30.4 54.8 36.8 48.4 40 18Z'/%3E%3Cpath d='M80 2C81.28 14.16 83.84 16.72 96 18 83.84 19.28 81.28 21.84 80 34 78.72 21.84 76.16 19.28 64 18 76.16 16.72 78.72 14.16 80 2Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; flex: none; }

/* Формы */
label { display: block; font-weight: 600; font-size: var(--step--1); margin: 0 0 .3rem; }
.field { margin-bottom: 1rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent);
}
.hint { color: var(--muted); font-size: var(--step--1); margin-top: .3rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  min-height: 48px; padding: .8rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.wide { width: 100%; }
.google-btn { background: #fff; color: var(--ink); border-color: var(--line); }
.google-btn svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: var(--step--1); margin: 1.2rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.msg { padding: .75rem .9rem; border-radius: 10px; margin-bottom: 1rem; font-size: var(--step--1); }
.msg.error { background: #fbe9e7; color: #8e231b; }
.msg.ok { background: #e5f4ec; color: #165c38; }
.msg:empty { display: none; }

/* Сторінки входу: світла форма ліворуч, темна панель праворуч; на телефоні — лише форма */
.auth-page { background: var(--paper); min-height: 100vh; touch-action: manipulation; }
.auth-shell { min-height: 100vh; display: flex; }
.auth-main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; padding: 28px 48px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-top .logo { padding-top: 12px; font-size: 28px; }
.auth-top .logo svg { margin: -14px 0 0 -2px; flex: none; }
.auth-top .back { color: var(--ink); font-size: 15px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.back-m { display: none; }
.auth-card { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 0; display: flex; flex-direction: column; justify-content: center; }
.auth-card h1 { font-family: "Unbounded", system-ui, sans-serif; font-weight: 800; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .35em; text-wrap: balance; }
.auth-card .lede { color: #4D525D; margin-bottom: 1.5rem; font-size: 17px; }
.auth-card a { color: var(--accent); font-weight: 500; }
.auth-card a:hover { color: #2643B0; }
.auth-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.auth-foot span { min-height: 44px; display: inline-flex; align-items: center; }
.auth-tabs, .auth-strip { display: none; }

.auth-card label { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.auth-card .field { margin-bottom: 18px; }
.auth-card input { height: 54px; padding: 0 16px; border-radius: 14px; font-size: 17px; background: #fff; border: 1.5px solid #CFD1CA; transition: border-color .15s, box-shadow .15s; }
.auth-card input::placeholder { color: #8C9099; }
.auth-card input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(52, 87, 213, .16); }
.auth-card input[aria-invalid="true"] { border-color: var(--danger); background: #FFF7F6; }
.auth-card input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 4px rgba(180, 35, 24, .14); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-row a { font-size: 15px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 54px; }
.eye { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eye:hover { color: var(--ink); background: #F1F2EE; }
.eye .eye-off { display: none; }
.eye[aria-pressed="true"] .eye-on { display: none; }
.eye[aria-pressed="true"] .eye-off { display: block; }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.pw-rules li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.pw-rules li::before { content: ""; width: 18px; height: 18px; border-radius: 999px; border: 2px solid #9A9EA8; box-sizing: border-box; flex: none; }
.pw-rules li.ok { color: var(--ink); }
.pw-rules li.ok::before { border: 0; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.field-err, .pw-match { margin: 10px 0 0; display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; }
.field-err svg, .pw-match svg { flex: none; margin-top: 1px; }
.field-err, .pw-match.bad { color: var(--danger); }
.pw-match.ok { color: var(--ink); }
.pw-match.ok svg { color: var(--accent); }

.btn-primary { width: 100%; min-height: 56px; font-size: 17px; background: var(--accent); border-color: var(--accent); color: #fff; transition: background-color .15s; }
.btn-primary:hover { background: #2643B0; border-color: #2643B0; filter: none; }
.btn-primary:focus-visible { outline: 3px solid rgba(52, 87, 213, .45); outline-offset: 3px; }
.google-btn { width: 100%; min-height: 54px; border-radius: 14px; background: #fff; color: var(--ink); border: 1.5px solid #CFD1CA; font-size: 16px; }
.google-btn:hover { border-color: var(--ink); filter: none; }
.google-btn svg { width: 20px; height: 20px; }
.divider { margin: 18px 0; }
.divider::before, .divider::after { background: #CFD1CA; }
.submit-bar { margin-top: 6px; }
.terms { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.terms a { font-weight: 400; }
.center { text-align: center; margin-top: 1.2rem; }
.center a { min-height: 44px; display: inline-flex; align-items: center; }
.msg { border-radius: 12px; }
.msg.error { background: #FDECEA; color: #8E1F15; }
.msg.ok { background: #E8EDFC; color: #1E3796; }

/* код із листа */
.code-step[hidden], .step-main[hidden] { display: none; }
.code-step h1:focus { outline: none; }
.code-step .lede b { color: var(--ink); overflow-wrap: anywhere; }
.code-badge { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; margin-bottom: 20px; background: #fff; color: var(--accent); }
.auth-card .code-input { height: 72px; text-align: center; font-family: "Unbounded", system-ui, sans-serif; font-size: 30px; font-weight: 700; letter-spacing: .3em; padding: 0 0 0 .3em; color: var(--ink); font-variant-numeric: tabular-nums; }
.auth-card .code-input::placeholder { color: #C9CBC3; }
.code-form .hint { margin: 10px 0 16px; }
.code-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 16px; }
.linkish { background: none; border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; font: inherit; font-size: 15px; font-weight: 500; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: #2643B0; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.code-tip { margin-top: 8px; }

/* темна панель */
.auth-side { flex: 1 1 480px; min-width: 0; background: var(--ink); color: #F4F5F0; display: flex; align-items: center; padding: 64px 56px; }
.side-in { max-width: 520px; display: flex; flex-direction: column; gap: 32px; }
.auth-side h2 { font-family: "Unbounded", system-ui, sans-serif; font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.14; margin: 0; text-wrap: balance; }
.side-steps { list-style: none; margin: 0; padding: 0; }
.side-steps li { display: flex; gap: 22px; padding: 20px 0; border-top: 1px solid #2E3139; }
.side-steps span { font-family: "Unbounded", system-ui, sans-serif; font-weight: 800; font-size: 26px; width: 30px; flex: none; line-height: 1.1; }
.side-steps b { font-size: 19px; }
.side-steps p, .side-text { margin: 4px 0 0; color: #B9BCC4; }
.side-note { margin: 0; color: #B9BCC4; font-size: 15px; }
.side-head { display: flex; flex-direction: column; gap: 10px; }
.tickets { position: relative; height: 380px; }
.tk { position: absolute; width: 300px; background: #fff; color: var(--ink); border-radius: 14px; padding: 18px 20px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 6px; }
.tk-meta { font-size: 13px; color: var(--muted); }
.tk b { font-size: 17px; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #C9CBC3; padding-top: 10px; margin-top: 4px; }
.tk-tag { background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tk1 { left: 0; top: 0; transform: rotate(-3deg); }
.tk2 { left: 120px; top: 120px; transform: rotate(2deg); }
.tk3 { left: 30px; top: 240px; transform: rotate(-1.5deg); }

/* телефон */
@media (max-width: 900px) {
  .auth-side { display: none; }
  .auth-main { padding: 0 20px; }
  .auth-top { height: 56px; margin: 0 -12px; display: grid; grid-template-columns: 44px 1fr 44px; }
  .auth-top .back { display: none; }
  .back-m { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); border-radius: 12px; }
  .auth-top .logo { font-size: 24px; padding-top: 10px; justify-self: center; }
  .auth-top .logo svg { width: 28px; height: 28px; }
  .auth-card { justify-content: flex-start; padding: 8px 0 0; max-width: 520px; }
  .auth-tabs { display: flex; padding: 4px; background: #E1E2DC; border-radius: 999px; margin-bottom: 18px; }
  .auth-tabs a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); }
  .auth-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
  .auth-strip { display: flex; flex-direction: column; gap: 2px; background: var(--ink); color: #F4F5F0; border-radius: 18px; padding: 16px 18px; margin: 0 0 20px; }
  .auth-strip b { font-size: 16px; }
  .auth-strip span { font-size: 14px; color: #B9BCC4; }
  .auth-card h1 { font-size: 28px; }
  .auth-card .lede { font-size: 16px; margin-bottom: 1.2rem; }
  .submit-bar { position: sticky; bottom: 0; z-index: 2; margin: 8px -20px 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(238, 239, 234, .96); border-top: 1px solid #D9DAD4; }
  .terms { text-align: center; }
  .auth-foot { padding: 20px 0 24px; }
  .code-actions { flex-direction: column; gap: 0; }
}


/* Кабинет */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px clamp(16px, 4vw, 40px); background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .who { display: flex; align-items: center; gap: .8rem; font-size: var(--step--1); }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; max-width: 1100px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 80px; }
.side nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.side nav a { padding: .55rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.side nav a[aria-current="true"] { background: var(--card); box-shadow: inset 3px 0 0 var(--accent); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin-bottom: 24px; }
.panel h2 { margin-bottom: .3em; }
.panel > .muted { margin-bottom: 1.2rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sites { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.sites li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.sites li:first-child { border-top: 1px solid var(--line); }
.sites .name { font-weight: 700; }
.sites a.url { font-size: var(--step--1); word-break: break-all; }
.sites .actions { display: flex; gap: .5rem; flex-shrink: 0; }
.sites .actions .btn { padding: .5rem .8rem; font-size: var(--step--1); }
.empty { padding: 1.2rem; border: 1.5px dashed var(--line); border-radius: 10px; color: var(--muted); margin-bottom: 1.2rem; }
.slug-field { display: flex; align-items: stretch; }
.slug-field span { display: flex; align-items: center; padding: 0 .7rem; border: 1.5px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--paper); color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.slug-field input { border-radius: 0 10px 10px 0; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
  .side nav { position: static; flex-direction: row; overflow-x: auto; margin-bottom: 16px; }
  .side nav a { white-space: nowrap; }
  .grid2 { grid-template-columns: 1fr; }
  .sites li { flex-direction: column; align-items: flex-start; }
  .topbar .who .email { display: none; }
  .slug-field span { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

[hidden] { display: none !important; }
.side, main { min-width: 0; }
input:disabled { background: var(--paper); color: var(--muted); }

/* Юридические страницы */
.legal-page { background: var(--paper, #f7f7f5); color: var(--ink); }
.legal-top { max-width: 1080px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal { max-width: 720px; margin: 0 auto; padding: 24px 24px 64px; font-size: 17px; line-height: 1.7; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: .4em 0 .3em; }
.legal .lede { font-size: 1.15rem; color: #4a505c; margin: 0 0 .6rem; }
.legal .updated { font-size: 14px; color: #8a909b; margin: 0 0 2rem; }
.legal-toc { background: #fff; border: 1px solid #e4e4e1; border-radius: 16px; padding: 18px 24px; margin-bottom: 2.4rem; }
.legal-toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; font-size: 15px; line-height: 1.9; }
.legal-toc a { color: var(--accent); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal section { scroll-margin-top: 20px; }
.legal h2 { font-size: 1.55rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: #2f3440; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .45rem; }
.legal a { color: var(--accent); }
.legal-foot { max-width: 720px; margin: 0 auto; padding: 24px 24px 40px; border-top: 1px solid #e4e4e1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: #8a909b; }
.legal-foot a { color: inherit; }
@media (max-width: 560px) { .legal { font-size: 16px; } .legal-toc ol { columns: 1; } .legal-top .btn { padding: 0 14px; } }

