/* Кабинет конструктора LURI. Светлый стиль как у luri.lol. */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #0c0d10;
  --muted: #5f636e;
  --line: rgba(12, 13, 16, 0.1);
  --line-2: rgba(12, 13, 16, 0.18);
  --accent: #3d4bff;
  --accent-soft: rgba(61, 75, 255, 0.1);
  --ok: #157a4c;
  --warn: #9a5b00;
  --danger: #c4314b;
  --radius: 20px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(12, 13, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.ico {
  display: block;
  flex: none;
}

.wrap {
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--head);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.muted {
  color: var(--muted);
}

/* --- Кнопки и поля --- */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.btn--accent {
  background: var(--accent);
}

.btn--ghost {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
}

.btn--danger {
  background: transparent;
  color: var(--danger);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  background: var(--surface);
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea.input {
  min-height: 120px;
  resize: vertical;
}

.input-suffix {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
}

.input-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.input-suffix .input {
  border: 0;
  box-shadow: none;
}

.input-suffix span {
  display: grid;
  padding: 0 16px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
  place-items: center;
}

.hint {
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
}

.hint.ok {
  color: var(--ok);
}

.hint.bad {
  color: var(--danger);
}

.err {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.chip input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

/* --- Шапка --- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 68px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-family: var(--head);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand small {
  color: var(--muted);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
}

.sp {
  flex: 1;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.lang button {
  min-width: 40px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lang button.on {
  background: var(--ink);
  color: #fff;
}

/* --- Вход --- */
.auth {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  min-height: calc(100svh - 69px);
  padding: 48px 0;
}

.auth-pitch h1 {
  font-size: clamp(38px, 5.6vw, 68px);
}

.auth-pitch h1 em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.auth-pitch p {
  max-width: 52ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
}

.perks {
  display: grid;
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.perks li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
}

.perks .ico {
  color: var(--accent);
}

.card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 26px;
}

.card > p {
  margin: 8px 0 22px;
  color: var(--muted);
}

.or {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google {
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.code-input {
  font-family: var(--head);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
}

.small {
  font-size: 13px;
}

.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* --- Кабинет --- */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding: 32px 0 120px;
}

.dash-main,
.dash-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.hello h1 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.hello p {
  margin: 6px 0 0;
  color: var(--muted);
}

.empty {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: clamp(28px, 4vw, 48px);
}

.empty .ico-wrap {
  display: grid;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  place-items: center;
}

.empty h2 {
  font-size: 28px;
}

.empty p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
}

.site {
  overflow: hidden;
  padding: 0;
}

.site-preview {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-preview iframe {
  width: 250%;
  height: 250%;
  border: 0;
  transform: scale(0.4);
  transform-origin: 0 0;
  pointer-events: none;
}

.site-body {
  display: grid;
  gap: 14px;
  padding: 22px 24px 24px;
}

.site-url {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--head);
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

.badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
}

.badge.warn {
  background: #fff3df;
  color: var(--warn);
}

.badge.ok {
  background: #e3f5ec;
  color: var(--ok);
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keep {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--bg);
}

.keep b {
  font-size: 17px;
}

.keep p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.side-card h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.side-card h3 .ico {
  color: var(--accent);
}

.side-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.big-num {
  font-family: var(--head);
  font-size: 34px;
  font-weight: 700;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row .input {
  min-height: 44px;
  font-size: 14px;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0 0 14px;
  font-size: 14px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 600;
  word-break: break-all;
}

/* Счётчик бесплатного срока слева снизу */
.timer {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
}

.timer b {
  display: block;
  font-size: 15px;
}

.timer .ico {
  color: #9aa4ff;
}

/* --- Окно (мастер создания) --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 16px;
  overflow-y: auto;
  background: rgba(12, 13, 16, 0.45);
  place-items: center;
}

.modal-box {
  width: min(860px, 100%);
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h2 {
  flex: 1;
  font-size: 26px;
}

.icon-btn {
  display: grid;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  place-items: center;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.steps span.on {
  color: var(--ink);
}

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.tpl {
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.tpl:hover {
  transform: translateY(-2px);
}

.tpl.on {
  border-color: var(--accent);
}

.tpl-thumb {
  height: 130px;
  background-size: cover !important;
  background-position: center !important;
  background: linear-gradient(135deg, var(--a, #4f46e5), var(--b, #17152b));
}

.tpl-name {
  padding: 12px 14px;
  font-weight: 700;
}

.tpl.soon {
  opacity: 0.55;
  cursor: default;
}

.tpl.soon:hover {
  transform: none;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.success {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 20px 0;
  text-align: center;
}

.success .ico-wrap {
  display: grid;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e3f5ec;
  color: var(--ok);
  place-items: center;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transform: translateX(-50%);
}

.loading {
  display: grid;
  min-height: 60vh;
  color: var(--muted);
  place-items: center;
}

@media (max-width: 900px) {
  .auth,
  .dash {
    grid-template-columns: 1fr;
  }

  .auth {
    padding-top: 28px;
  }

  .site-preview {
    height: 240px;
  }

  .brand small {
    display: none;
  }
}

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

/* Поле пароля с кнопкой «Pokaż» */
.pass-wrap {
  position: relative;
  display: block;
}

.pass-wrap .input {
  padding-right: 92px;
}

.pass-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}

/* ============ Редактор ============ */
.ed {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100svh;
}

.ed-top {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.ed-url {
  font-family: var(--head);
}

.ed-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ed-top .lang button {
  display: grid;
  place-items: center;
}

.ed-body {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 0;
}

.ed-side {
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.ed-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg);
}

.ed-tabs button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-weight: 700;
  cursor: pointer;
}

.ed-tabs button[aria-selected='true'] {
  background: var(--ink);
  color: #fff;
}

.ed-blocks {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ed-blocks li {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 6px 6px 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ed-blocks li.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ed-blocks li.off .ed-bname {
  opacity: 0.45;
}

.ed-bname {
  display: grid;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  background: none;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ed-bname small {
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-bacts {
  display: flex;
  gap: 2px;
}

.icon-btn.sm {
  width: 32px;
  height: 32px;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.ed-add summary {
  list-style: none;
  cursor: pointer;
}

.ed-add summary::-webkit-details-marker {
  display: none;
}

.ed-add-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ed-side hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.ed-h {
  margin: 0 0 12px;
  font-size: 18px;
}

.ed-item {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ed-item legend {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}

.img-field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.img-field img,
.img-empty {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.img-empty {
  display: grid;
  background: var(--bg);
  color: var(--muted);
  place-items: center;
}

.ed-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.ed-sw {
  display: flex;
  overflow: hidden;
  height: 44px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.ed-sw i {
  flex: 1;
  background: var(--a);
}

.ed-sw i:nth-child(2) {
  background: var(--b);
}

.ed-sw i:nth-child(3) {
  background: var(--c);
}

.ed-sw.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ed-fonts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ed-fonts .on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.ed-stage {
  display: grid;
  overflow: auto;
  padding: 16px;
  background: #e9e7e1;
  place-items: start center;
}

.ed-frame {
  width: 100%;
  height: calc(100svh - 100px);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: width 0.3s;
}

.ed-frame.phone {
  width: 390px;
}

.ed-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .ed-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow-y: auto;
  }

  .ed {
    height: auto;
  }

  .ed-side {
    border-right: 0;
  }

  .ed-frame {
    height: 70svh;
  }

  .ed-url {
    display: none;
  }
}

/* Карточки шаблонов: скриншот всего сайта, при наведении прокручивается сверху вниз */
.tpl {
  display: grid;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: default;
}

.tpl:hover {
  transform: none;
}

.tpl-pick {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.tpl-shot {
  display: block;
  height: 260px;
  background: var(--bg) top center / 100% auto no-repeat;
  transition: background-position 6s ease-in-out;
}

.tpl:hover .tpl-shot,
.tpl-pick:focus-visible .tpl-shot {
  background-position: bottom center;
}

.tpl-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.tpl-name {
  padding: 0;
  font-size: 14px;
}

.tpl-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  max-height: min(62vh, 760px);
  overflow-y: auto;
  padding: 2px;
}

/* Живой предпросмотр шаблона на весь экран */
.look {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #e9e7e1;
}

.look-top {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.look-top .lang button {
  display: grid;
  place-items: center;
}

.look-stage {
  display: grid;
  padding: 12px;
  place-items: stretch center;
}

.look-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: width 0.3s;
}

.look-stage.phone iframe {
  width: 390px;
}

@media (prefers-reduced-motion: reduce) {
  .tpl-shot {
    transition: none;
  }
}
