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

/* ═════════════════════ Токены ═════════════════════ */
:root {
  --bg: #F5F2EC; --bg-2: #ECE7DD; --card: #FFFFFF; --ink: #16130F; --ink-2: #3A352E; --muted: #7A7368;
  --panel: #16130F; --on-ink: #fff;
  --line: #E4DED3; --line-2: #D6CFC2;
  --accent: #FF5B1F; --accent-2: #FF7A45; --accent-soft: #FFE8DD; --lime: #D4F55A;
  --blue: #3B6CFF; --blue-soft: #E3EAFF; --green: #15924A; --green-soft: #DDF4E6;
  --yellow: #E8A400; --yellow-soft: #FFF2CC; --red: #E5484D; --red-soft: #FDE4E4; --violet: #8B5CF6; --violet-soft: #EEE7FF;
  --r: 22px; --r-sm: 14px; --r-xs: 10px;
  --shadow-sm: 0 1px 2px rgba(22,19,15,.05);
  --shadow: 0 1px 2px rgba(22,19,15,.04), 0 10px 30px -12px rgba(22,19,15,.14);
  --shadow-lg: 0 40px 90px -30px rgba(22,19,15,.35);
  --ease: cubic-bezier(.22,1,.36,1); --ease-io: cubic-bezier(.77,0,.18,1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Manrope', sans-serif;
  --sidebar: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; }
.ic { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ═════════════════════ Занавес между страницами / поддоменами ═════════════════════ */
html::after {
  content: 'МАСТЕРОК'; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  display: grid; place-items: center; background: var(--panel); color: #F5F2EC;
  font: 700 clamp(22px, 4vw, 40px)/1 var(--display); letter-spacing: .3em;
  transform: translateY(-101%); transition: transform .62s var(--ease-io);
}
html.is-loading::after { transform: none; transition: none; animation: curtainSafety .6s var(--ease-io) 4s forwards; }
html.is-revealing::after { transform: translateY(101%); }
html.is-leaving::after { transform: none; pointer-events: all; }
html.no-tr::after { transition: none !important; }
@keyframes curtainSafety { to { transform: translateY(101%); } }

/* View Transitions — смена экранов внутри кабинетов и переходы между страницами лендинга */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .28s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .45s var(--ease) both; }
::view-transition-old(view), ::view-transition-new(view) { height: 100%; }
::view-transition-old(view) { animation: vtOut .25s var(--ease) both; }
::view-transition-new(view) { animation: vtIn .5s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px) scale(.995); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

/* ═════════════════════ Кнопки ═════════════════════ */
.btn {
  --b: var(--ink); --c: var(--on-ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px; background: var(--b); color: var(--c);
  font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s, opacity .2s;
  will-change: transform;
}
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.28), transparent 60%); opacity: 0; transition: opacity .3s; }
.btn:hover::before { opacity: 1; }
.btn:hover { box-shadow: 0 12px 28px -12px var(--b); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-loading { opacity: .55; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-primary { --b: var(--accent); --c: #fff; }
.btn-dark { --b: var(--ink); }
.btn-light { --b: #fff; --c: var(--ink); box-shadow: var(--shadow-sm); }
.btn-lime { --b: var(--lime); --c: var(--ink); }
.btn-ghost { --b: transparent; --c: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { --b: var(--ink); --c: var(--on-ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-danger { --b: var(--red-soft); --c: var(--red); }
.btn-danger:hover { --b: var(--red); --c: #fff; }
.btn-soft { --b: var(--bg-2); --c: var(--ink); }
.btn-soft:hover { --b: var(--line-2); box-shadow: none; }
.btn-lg { height: 58px; padding: 0 30px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: ripple .6s var(--ease); pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--accent); font-weight: 700; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.link:hover { background-size: 100% 2px; }

/* ═════════════════════ Карточки, бейджи, чипы ═════════════════════ */
.card { background: var(--card); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card-flat { background: var(--bg-2); border-radius: var(--r); padding: 24px; }
.card-dark { background: var(--panel); color: #F5F2EC; border-radius: var(--r); padding: 24px; }
.card-hover { transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: #C2410C; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-yellow { background: var(--yellow-soft); color: #9A6B00; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-dark { background: var(--ink); color: var(--on-ink); }
.badge-lime { background: var(--lime); color: var(--ink); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge .dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; transition: all .25s var(--ease); cursor: pointer; user-select: none; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip.is-on.chip-accent { background: var(--accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chips-scroll::-webkit-scrollbar { display: none; }

.avatar { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: calc(var(--s) * .36); background: var(--c, var(--accent)); position: relative; }
.avatar-lg { --s: 72px; }
.avatar-xl { --s: 104px; }
.avatar-sm { --s: 32px; }
.avatar .verified { position: absolute; right: -2px; bottom: -2px; width: 40%; height: 40%; min-width: 16px; min-height: 16px; border-radius: 50%; background: var(--blue); border: 2px solid var(--card); display: grid; place-items: center; }
.avatar .verified svg { width: 70%; height: 70%; color: #fff; stroke-width: 3; }

.stars { display: inline-flex; gap: 2px; color: #F5B700; font-size: 14px; letter-spacing: 1px; }
.rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.rating::before { content: '★'; color: #F5B700; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.xs { font-size: 12.5px; }
.bold { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.hr { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═════════════════════ Формы ═════════════════════ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 52px; padding: 0 18px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: var(--card); outline: none; transition: border-color .2s, box-shadow .25s var(--ease); font-size: 15.5px;
}
/* дата/час на iOS і Android: прибираємо системну ширину, через яку поле вилазило за рамку */
.input[type=date], .input[type=time] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 49px; text-align: left; }
.input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; }
.grid > .field, .grid > * { min-width: 0; }
.textarea { height: auto; min-height: 120px; padding: 14px 18px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2316130F' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; cursor: pointer; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(22,19,15,.08); }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); animation: shake .4s; }
.field .err { color: var(--red); font-size: 13px; font-weight: 600; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.input-group { position: relative; }
.input-group .input { padding-left: 48px; }
.input-group > .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-suffix { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: transform .35s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(255,91,31,.25); }

/* ═════════════════════ Тосты, модалки, меню ═════════════════════ */
.toasts { position: fixed; z-index: 1000; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 16px; background: var(--panel); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: toastIn .5s var(--ease) both; pointer-events: auto; max-width: min(92vw, 480px); }
.toast__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }
.toast--err .toast__dot { background: var(--red); }
.toast--info .toast__dot { background: var(--blue); }
.toast__dot svg { width: 13px; color: #fff; stroke-width: 3; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(22,19,15,.45); backdrop-filter: blur(6px); animation: fadeIn .3s both; }
.modal__panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 28px; padding: 32px; box-shadow: var(--shadow-lg); animation: modalIn .5s var(--ease) both; }
.modal__panel--wide { width: min(780px, 100%); }
.modal__title { font-size: 22px; margin: 0 0 18px 0; }
.modal__body::after { content: ''; display: block; clear: both; }
/* хрестик «обтікається» текстом і не налазить на заголовок / ім’я; при прокрутці лишається видимим */
.modal__x { float: right; position: sticky; top: 0; z-index: 3; margin: -14px -14px 10px 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); transition: transform .3s var(--ease), background .2s; }
.modal__x:hover { transform: rotate(90deg); background: var(--line-2); }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.modal__actions:empty { display: none; }
.modal.out .modal__backdrop { animation: fadeOut .25s forwards; }
.modal.out .modal__panel { animation: modalOut .25s var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }

.dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 260px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 8px; z-index: 300; transform-origin: top right; animation: dropIn .35s var(--ease) both; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 14.5px; text-align: left; transition: background .2s; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }
.dropdown .sep { height: 1px; background: var(--line); margin: 6px 4px; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } }

/* ═════════════════════ Анимации появления ═════════════════════ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-30px); }
.reveal-scale { transform: scale(.94); }
.stagger > * { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.pop { animation: popIn .5s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } }

.skeleton { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--r-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line-2); border-radius: var(--r); }
.empty__icon { font-size: 44px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; display: inline-block; }
.empty h3 { font-size: 19px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 20px; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ═════════════════════ Каркас кабинетов (app / master / admin) ═════════════════════ */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); background: var(--bg); z-index: 50; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.sidebar__brand small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 14px; font-weight: 600; font-size: 15px; color: var(--ink-2); transition: background .25s, color .25s; }
.nav-link:hover { background: var(--bg-2); color: var(--ink); }
.nav-link.is-active { background: var(--ink); color: var(--on-ink); }
.nav-link .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.nav-link .lock { margin-left: auto; opacity: .5; }
.sidebar__section { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 18px 14px 6px; }
.sidebar__bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sidebar__promo { padding: 18px; border-radius: 20px; background: var(--panel); color: #fff; position: relative; overflow: hidden; }
.sidebar__promo::before { content: ''; position: absolute; width: 140px; height: 140px; right: -40px; top: -40px; border-radius: 50%; background: var(--accent); filter: blur(30px); opacity: .7; }
.sidebar__promo > * { position: relative; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: 76px; padding: 0 36px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .3s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar__title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .topbar__title { font-size: 16px; } }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.view { padding: 12px 36px 64px; view-transition-name: view; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 8px 0 28px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3vw, 36px); }
.page-head p { color: var(--muted); margin-top: 8px; }

.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); transition: transform .3s var(--ease), background .2s; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); animation: popIn .4s var(--ease); }
.user-chip { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: box-shadow .3s; }
.user-chip:hover { box-shadow: var(--shadow); }
.user-chip .name { font-weight: 700; font-size: 14px; line-height: 1.15; }
.user-chip .role { font-size: 12px; color: var(--muted); }
.notif-list { max-height: 420px; overflow: auto; width: min(380px, 92vw); }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.notif:hover { background: var(--bg); }
.notif.unread { background: var(--accent-soft); }
.notif .when { font-size: 12px; color: var(--muted); margin-top: 2px; }

.mobile-nav { display: none; }

/* ═════════════════════ Статистика, таблицы, статусы ═════════════════════ */
.stat { padding: 22px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat__label { font-size: 13.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat__value { font-family: var(--display); font-weight: 700; font-size: 32px; margin-top: 10px; letter-spacing: -.03em; }
.stat__hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat--accent { background: var(--accent); color: #fff; border-color: transparent; }
.stat--accent .stat__label, .stat--accent .stat__hint { color: rgba(255,255,255,.8); }
.stat--dark { background: var(--panel); color: #fff; border-color: transparent; }
.stat--dark .stat__label, .stat--dark .stat__hint { color: rgba(255,255,255,.6); }
.stat--lime { background: var(--lime); border-color: transparent; }

.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; padding: 14px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: var(--bg); }

.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--bg-2); border-radius: 999px; position: relative; }
.tab { position: relative; z-index: 1; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: color .3s; white-space: nowrap; }
.tab.is-on { color: var(--on-ink); }
.tabs__ink { position: absolute; z-index: 0; top: 5px; height: 40px; border-radius: 999px; background: var(--ink); transition: left .45s var(--ease), width .45s var(--ease); }
.tab .n { opacity: .6; margin-left: 4px; }

.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 8px; }
.stepper__item { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.stepper__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); font-weight: 800; font-size: 13px; flex: none; transition: all .5s var(--ease); }
.stepper__label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.stepper__line { flex: 1; height: 3px; border-radius: 3px; background: var(--bg-2); margin: 0 10px; position: relative; overflow: hidden; }
.stepper__line::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.stepper__item.done .stepper__dot { background: var(--ink); color: var(--on-ink); }
.stepper__item.done .stepper__label, .stepper__item.current .stepper__label { color: var(--ink); }
.stepper__item.done .stepper__line::after { transform: scaleX(1); }
.stepper__item.current .stepper__dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 6px var(--accent-soft); }
.stepper__item:last-child { flex: none; }

/* карточка заказа */
.order-card { display: block; padding: 22px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; position: relative; overflow: hidden; }
.order-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.order-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.order-card__title { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 8px; }
.order-card__desc { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; }
.order-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.order-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.order-card__meta .ic { color: var(--muted); }
.order-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); gap: 12px; }
.order-card__price { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.order-card.urgent::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.cat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--cc, var(--bg-2)); flex: none; }

/* ═════════════════════ Чат ═════════════════════ */
.chat { display: flex; flex-direction: column; height: 460px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.chat__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat__list { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(var(--bg) 0 0) padding-box; scroll-behavior: smooth; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--card); box-shadow: var(--shadow-sm); border: 1px solid var(--line); font-size: 14.5px; animation: msgIn .4s var(--ease) both; word-wrap: break-word; }
.msg.mine { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-color: var(--ink); border-radius: 18px 18px 6px 18px; }
.msg time { display: block; font-size: 11px; opacity: .55; margin-top: 4px; text-align: right; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.chat__form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat__form .input { height: 46px; border-radius: 999px; }
.chat__empty { margin: auto; text-align: center; color: var(--muted); font-size: 14px; }

/* ═════════════════════ Лок-экран доски ═════════════════════ */
.locked { position: relative; border-radius: 28px; overflow: hidden; min-height: 560px; }
.locked__fake { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 4px; }
.locked__overlay { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 55%, transparent)); }
.locked__box { text-align: center; max-width: 460px; padding: 24px; }
.locked__icon { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--panel); color: #fff; animation: float 3s ease-in-out infinite; box-shadow: var(--shadow-lg); }

/* ═════════════════════ Тарифы ═════════════════════ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 28px; background: var(--card); border: 1.5px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan--popular { background: var(--panel); color: #fff; border-color: var(--panel); }
.plan--popular .muted { color: rgba(255,255,255,.6); }
.plan__name { font-family: var(--display); font-weight: 700; font-size: 22px; }
.plan__price { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -.04em; margin: 22px 0 4px; line-height: 1; }
.plan__price small { white-space: nowrap; font-size: 16px; font-weight: 600; letter-spacing: 0; opacity: .6; }
.plan__list { list-style: none; padding: 0; margin: 24px 0 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan__list .ic { color: var(--green); margin-top: 2px; }
.plan--popular .plan__list .ic { color: var(--lime); }
.plan__ribbon { position: absolute; top: -14px; left: 30px; }
.plan.is-current { box-shadow: 0 0 0 3px var(--accent); }

/* ═════════════════════ Утилиты анимаций ═════════════════════ */
.check-anim { width: 96px; height: 96px; margin: 0 auto; }
.check-anim circle { stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw .7s var(--ease) forwards; }
.check-anim path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1100; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }

.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: grow 1.2s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.ring { --p: 50; --sz: 120px; width: var(--sz); height: var(--sz); border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); display: grid; place-items: center; animation: ringIn 1.2s var(--ease) both; }
.ring::before { content: ''; grid-area: 1/1; width: calc(100% - 18px); height: calc(100% - 18px); border-radius: 50%; background: var(--panel); }
.ring > * { grid-area: 1/1; position: relative; text-align: center; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes ringIn { from { --p: 0; } }

/* ═════════════════════ Адаптив ═════════════════════ */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 18px; height: 66px; }
  .view { padding: 8px 18px 110px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .mobile-nav { display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; height: 66px; padding: 6px; border-radius: 22px; background: rgba(22,19,15,.94); backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 16px; color: rgba(255,255,255,.6); font-size: 11px; font-weight: 700; transition: background .25s, color .25s; }
  .mobile-nav a.is-active { background: rgba(255,255,255,.12); color: #fff; }
  .user-chip .name, .user-chip .role { display: none; }
  .user-chip { padding: 4px; }
  .locked__fake { grid-template-columns: 1fr; }
  .stepper__label { display: none; }
  .modal__panel { padding: 26px 22px; border-radius: 24px; }
}
@media (max-width: 560px) {
  /* выпадающие окна (сповіщення, меню профілю) — на всю ширину екрана, щоб не виходили за краї */
  .dropdown { position: fixed; top: 74px; left: 12px; right: 12px; width: auto; min-width: 0; max-height: calc(100vh - 170px); overflow: auto; transform-origin: top center; }
  .notif-list { width: auto; max-height: calc(100vh - 170px); }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat__value { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ═════════════════════ Фото, портфоліо, відгуки ═════════════════════ */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mcard { padding: 22px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); cursor: pointer; text-align: left; width: 100%; min-width: 0; }
.mcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.mcard__about { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.mcard__stats { display: flex; gap: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; }
.mcard__stats b { display: block; font-size: 15px; }
.review { padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.review p { margin: 12px 0 0; font-size: 15px; }
.review__photos { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.review__photos button { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--bg-2); transition: transform .3s var(--ease); }
.review__photos button:hover { transform: scale(1.04); }
.review__photos img { width: 100%; height: 100%; object-fit: cover; }

.mp__head { display: flex; gap: 20px; align-items: center; padding-right: 30px; }
.mp__name { font-size: 26px; overflow-wrap: anywhere; }
.mp__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mp__meta span { display: inline-flex; align-items: center; gap: 6px; }
.mp__meta .ic { color: var(--muted); }
.mp__about { margin-top: 18px; white-space: pre-line; }
.mp__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.mp__stats > div { padding: 14px; border-radius: 16px; background: var(--bg-2); }
.mp__stats b { display: block; font-family: var(--display); font-size: 18px; letter-spacing: -.02em; }
.mp__stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); font-size: 14px; }
.skill em { font-style: normal; color: var(--accent); font-weight: 800; font-size: 13px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.social { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink); transition: transform .3s var(--ease), background .2s, color .2s; }
.social:hover { transform: translateY(-3px); color: #fff; }
.social--telegram:hover { background: #229ED9; } .social--viber:hover { background: #7360F2; } .social--instagram:hover { background: #E1306C; }
.social--facebook:hover { background: #1877F2; } .social--tiktok:hover { background: #111; } .social--youtube:hover { background: #FF0000; } .social--website:hover { background: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery__item { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(10,9,7,.92); display: grid; place-items: center; padding: 60px 16px; animation: fadeIn .25s both; }
.lightbox.out { animation: fadeOut .25s forwards; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 14px; object-fit: contain; animation: popIn .35s var(--ease); }
.lightbox figcaption { color: #fff; font-weight: 600; text-align: center; }
.lightbox__n { color: rgba(255,255,255,.6); font-size: 13px; }
.lightbox__x, .lightbox__nav { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; transition: background .2s; }
.lightbox__x:hover, .lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__x { top: 14px; right: 14px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); } .lightbox__nav.prev { left: 14px; } .lightbox__nav.next { right: 14px; }

/* ═════════════════════ Оплата, статуси, нотатки ═════════════════════ */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--blue-soft); }
.note > .ic { color: var(--blue); margin-top: 1px; }
.escrow { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.escrow__ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.pay-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--card); text-align: left; transition: border-color .25s, box-shadow .3s; }
.pay-opt b { font-size: 16px; }
.pay-opt span:last-child { font-size: 13px; color: var(--muted); line-height: 1.4; }
.pay-opt__ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); margin-bottom: 4px; transition: background .25s, color .25s; }
.pay-opt.is-on { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.pay-opt.is-on .pay-opt__ic { background: var(--accent); color: #fff; }
.order-card__hide { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--bg-2); margin-left: auto; transition: background .2s, color .2s, transform .3s var(--ease); flex: none; }
.order-card__hide:hover { background: var(--ink); color: var(--on-ink); transform: scale(1.08); }
.order-card__top .badge + .order-card__hide, .order-card__top .grow + .order-card__hide { margin-left: 0; }
.order-card.is-gone { animation: gone .32s var(--ease) forwards; }
@keyframes gone { to { opacity: 0; transform: scale(.94); } }
.chip-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.status-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: background .2s, color .2s; }
.status-toggle__dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.status-toggle.is-off { background: var(--red-soft); color: var(--red); }
.pause-banner { margin-top: 18px; margin-bottom: 18px; background: var(--red-soft); border-color: transparent; }
.pause-banner > .row > .ic { color: var(--red); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; flex: none; }
.count[hidden] { display: none; }
.nav-link .count { margin-left: auto; }

/* ═════════════════════ Чати ═════════════════════ */
.chats { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; height: calc(100vh - 230px); min-height: 460px; }
.chats__list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; transition: background .2s; }
.chat-item:hover { background: var(--bg); }
.chat-item.is-on { background: var(--bg-2); }
.chats__pane { min-width: 0; display: flex; flex-direction: column; }
.chats__placeholder { flex: 1; display: grid; place-content: center; text-align: center; border: 2px dashed var(--line-2); border-radius: var(--r); }
.chat--full { height: 100%; }
.chats__back { display: none; width: 38px; height: 38px; }
.chat__day { align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); margin: 6px 0; }

/* ═════════════════════ Налаштування й портфоліо ═════════════════════ */
.settings { display: grid; gap: 18px; max-width: 860px; }
.set-card { padding: 26px; }
.set-card > h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 8px; }
.set-card > h3 .ic { color: var(--accent); }
.set-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 15px; }
.set-row .xs { display: block; margin-top: 2px; }
.avatar-edit { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.theme-opt { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); text-align: left; transition: border-color .2s, box-shadow .3s; }
.theme-opt.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-opt__pv { height: 74px; border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 22px 1fr; grid-template-rows: 1fr 1fr; gap: 6px; }
.theme-opt__pv i { border-radius: 6px; }
.theme-opt__pv i:first-child { grid-row: span 2; }
.theme-opt__pv--light { background: #F5F2EC; } .theme-opt__pv--light i { background: #fff; border: 1px solid #E4DED3; } .theme-opt__pv--light i:first-child { background: #16130F; }
.theme-opt__pv--dark { background: #13110E; } .theme-opt__pv--dark i { background: #1F1C18; } .theme-opt__pv--dark i:first-child { background: #F2EEE6; }
.theme-opt__pv--system { background: linear-gradient(135deg, #F5F2EC 50%, #13110E 50%); } .theme-opt__pv--system i { background: rgba(127,127,127,.35); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.pf-item { position: relative; display: flex; flex-direction: column; gap: 8px; }
.pf-item__img { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.pf-item__img img { width: 100%; height: 100%; object-fit: cover; }
.pf-item .input { height: 40px; font-size: 13.5px; padding: 0 12px; border-radius: 12px; }
.pf-item__del { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; transition: background .2s; }
.pf-item__del:hover { background: var(--red); }
.pf-add { aspect-ratio: 1; border-radius: 16px; border: 2px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); transition: border-color .2s, color .2s; text-align: center; padding: 10px; }
.pf-add b { color: var(--ink); font-size: 14px; }
.pf-add:hover { border-color: var(--accent); color: var(--accent); }
.pf-add.is-loading { pointer-events: none; opacity: .7; }
.skill-rows { display: grid; gap: 8px; margin-top: 14px; }
.skill-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--bg); }
.skill-row .input { height: 42px; }
.save-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; justify-content: flex-end; }
.save-bar .btn { box-shadow: var(--shadow-lg); }
.chk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); flex: none; }
.chk.ok { background: var(--green); color: #fff; }
.chk svg { stroke-width: 3; }
.rv-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-photo { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; }
.rv-photo button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; }
.rv-add { width: 76px; height: 76px; border-radius: 14px; border: 2px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); }
.rv-add:hover { border-color: var(--accent); color: var(--accent); }
.rv-add.is-loading { opacity: .5; pointer-events: none; }
.rv-summary { display: flex; gap: 28px; align-items: center; }
.rv-big { font-family: var(--display); font-weight: 800; font-size: 54px; letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; }
.balance-big { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 54px); letter-spacing: -.04em; line-height: 1.1; margin-top: 6px; }
.balance-card { align-items: flex-end; flex-wrap: wrap; }
.tabs-scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.board-bar .select { width: auto; min-width: 150px; flex: 0 1 auto; }

@media (max-width: 900px) {
  .chats { grid-template-columns: 1fr; height: calc(100vh - 250px); }
  .chats.has-open .chats__list { display: none; }
  .chats:not(.has-open) .chats__pane { display: none; }
  .chats.has-open ~ * { display: none; }
  .chats__back { display: grid; }
  .mobile-nav a { position: relative; }
  .mobile-nav .count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .mobile-nav .lock { display: none; }
  .status-toggle__t { display: none; }
  .status-toggle { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 700px) {
  .mp__head { flex-direction: column; align-items: flex-start; gap: 14px; padding-right: 0; }
  .mp__stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .pay-pick, .theme-pick { grid-template-columns: 1fr; }
  .theme-opt { flex-direction: row; align-items: center; }
  .theme-opt__pv { width: 88px; height: 56px; flex: none; }
  .avatar-edit { gap: 14px; }
  .avatar-edit .avatar-xl { --s: 84px; }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .set-card { padding: 20px; }
  .rv-summary { flex-direction: column; align-items: stretch; gap: 16px; }
  .board-bar .select { flex: 1 1 40%; min-width: 0; }
  .chats-head { margin-bottom: 14px; }
  .chats-head p { display: none; }
  .chats { height: calc(100vh - 220px); min-height: 380px; }
  .lightbox { padding: 60px 6px; }
  .lightbox__nav { top: auto; bottom: 14px; transform: none; }
  .save-bar { bottom: 90px; }
  .save-bar .btn { width: 100%; }
}

/* ═════════════════════ Темна тема (кабінети) ═════════════════════ */
html[data-theme=dark] {
  color-scheme: dark;
  --bg: #13110E; --bg-2: #1F1C18; --card: #1A1814; --ink: #F2EEE6; --ink-2: #D3CCC1; --muted: #9C9488;
  --line: #2C2823; --line-2: #3A352E; --panel: #25211C; --on-ink: #16130F;
  --accent-soft: #3B2216; --blue: #7C9BFF; --blue-soft: #1B2442; --green: #3DD07D; --green-soft: #11301F;
  --yellow-soft: #3A2E0E; --red: #FF6B6F; --red-soft: #3B1A1B; --violet: #A98BFA; --violet-soft: #2A2044;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
}
html[data-theme=dark] .badge-accent { color: #FF9A6B; }
html[data-theme=dark] .badge-yellow { color: #F5C542; }
html[data-theme=dark] .badge-lime, html[data-theme=dark] .btn-lime, html[data-theme=dark] .btn-light { color: #16130F; --c: #16130F; }
html[data-theme=dark] .stat--lime { color: #16130F; }
html[data-theme=dark] .stat--lime .stat__label, html[data-theme=dark] .stat--lime .stat__hint { color: rgba(22,19,15,.65); }
html[data-theme=dark] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23F2EEE6' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
html[data-theme=dark] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); }
html[data-theme=dark] .input:focus, html[data-theme=dark] .select:focus, html[data-theme=dark] .textarea:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.07); }
html[data-theme=dark] .input:disabled { opacity: .6; }
html[data-theme=dark] .modal__backdrop { background: rgba(0,0,0,.6); }
html[data-theme=dark] .msg { background: var(--bg-2); border-color: var(--line); }
html[data-theme=dark] .msg.mine { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
html[data-theme=dark] .cat-pick button.is-on { box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
html[data-theme=dark] .input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); }
html[data-theme=dark] .social:hover { color: #fff; }
