:root {
  color-scheme: light;
  --ink: #1f2523;
  --muted: #69746f;
  --line: #ded8cc;
  --paper: #f8f4ed;
  --panel: #fffaf2;
  --leaf: #2f594c;
  --leaf-2: #183c34;
  --sky: #d8ebf2;
  --coral: #de6f4f;
  --gold: #e6bf5f;
  --shadow: 0 20px 60px rgb(31 37 35 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  min-height: 100dvh;
}

.public-page {
  background:
    radial-gradient(circle at 10% 0%, rgb(37 99 235 / 16%), transparent 28%),
    radial-gradient(circle at 88% 8%, rgb(18 183 106 / 14%), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

.public-screen {
  width: min(100%, 442px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: clip;
  background: #f8fafc;
}

.client-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #e4e7ec;
  padding: 18px 18px 14px;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(18px);
}

.client-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.client-logo {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #175cd3;
  font-weight: 950;
}

.client-logo span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  box-shadow: 0 8px 18px rgb(37 99 235 / 28%);
}

.open-pill {
  border: 1px solid #abefc6;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 900;
}

.client-place h1 {
  margin: 0 0 6px;
  color: #101828;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.client-place p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.35;
}

.public-content {
  padding: 14px 14px 26px;
}

.arrival-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 18px;
  background: linear-gradient(135deg, #101828, #1d2939);
  color: white;
  box-shadow: 0 12px 36px rgb(16 24 40 / 10%);
}

.arrival-card::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -48px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgb(37 99 235 / 50%);
  filter: blur(4px);
}

.arrival-cover {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: .2;
}

.arrival-card small,
.arrival-card h2,
.arrival-card p,
.arrival-card .map-actions {
  position: relative;
  z-index: 1;
}

.arrival-card small {
  display: block;
  color: rgb(255 255 255 / 72%);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.arrival-card h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.arrival-card p {
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 14px;
  line-height: 1.4;
}

.map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.btn,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 16px;
  padding: 12px 10px;
  background: #eef4ff;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  grid-column: span 2;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 12px 24px rgb(37 99 235 / 28%);
}

.btn.green {
  background: #dcfae6;
  color: #067647;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 4px 10px;
}

.section-title h2 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: 0;
}

.section-title span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scenario {
  min-height: 74px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  padding: 12px 8px;
  background: white;
  color: #101828;
  text-align: center;
  box-shadow: 0 8px 20px rgb(16 24 40 / 4%);
}

.scenario.active {
  border-color: #b2ccff;
  background: #eff6ff;
}

.scenario i {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
  font-style: normal;
}

.scenario b {
  display: block;
  font-size: 11px;
  line-height: 1.1;
}

.mapstrip {
  position: relative;
  overflow: hidden;
  height: 104px;
  border: 1px solid #d6e4ff;
  border-radius: 24px;
  background: #eaf1ff;
  box-shadow: 0 10px 24px rgb(16 24 40 / 5%);
}

.mapstrip svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 8px 10px;
  background: white;
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgb(16 24 40 / 11%);
}

.step-card {
  position: relative;
  overflow: hidden;
  margin: 11px 0;
  border: 1px solid #e4e7ec;
  border-radius: 26px;
  background: white;
  box-shadow: 0 10px 30px rgb(16 24 40 / 6%);
}

.place-media {
  position: relative;
  height: 156px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe 45%, #d1fae5);
}

.place-media picture,
.place-media img,
.place-media svg {
  display: block;
  width: 100%;
  height: 100%;
}

.place-media img {
  object-fit: cover;
}

.place-media svg {
  opacity: .94;
}

.video-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 11px;
  background: rgb(255 255 255 / 92%);
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgb(16 24 40 / 10%);
}

.play {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  padding-left: 1px;
  background: #2563eb;
  color: white;
  font-size: 10px;
}

.step-body {
  padding: 15px;
}

.step-title {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
  color: #101828;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: 0;
}

.step-num {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: #eff6ff;
  color: #175cd3;
  font-size: 13px;
  font-weight: 950;
}

.step-body p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.42;
}

.landmark {
  margin-top: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  padding: 11px 12px;
  background: #f9fafb;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.landmark b {
  color: #101828;
}

.next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border-radius: 17px;
  padding: 12px 13px;
  background: #f2f4f7;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}

.help-card {
  margin-top: 14px;
  border: 1px solid #fedf89;
  border-radius: 28px;
  padding: 17px;
  background: #fff7ed;
  color: #101828;
}

.help-card h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: 0;
}

.help-card p {
  margin: 0 0 13px;
  color: #7a4b00;
  font-size: 14px;
  line-height: 1.35;
}

.help-options {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.help-options a,
.help-actions .btn {
  border: 1px solid #fedf89;
  border-radius: 16px;
  background: #fff;
  color: #101828;
}

.help-options a {
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
}

.help-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.client-fab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  padding: 10px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 12px 36px rgb(16 24 40 / 14%);
  backdrop-filter: blur(18px);
}

.btn.ghost {
  background: #f2f4f7;
  color: #344054;
}

.client-fab .btn.primary {
  grid-column: auto;
}

.bottom-safe {
  height: 20px;
}

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

@media (min-width: 560px) {
  .public-page {
    padding: 32px 18px 64px;
  }

  .public-screen {
    border-radius: 34px;
    box-shadow: 0 24px 80px rgb(16 24 40 / 14%);
  }
}

.admin-page {
  background:
    radial-gradient(circle at 8% 0%, rgb(255 255 255 / 90%) 0 12%, transparent 30%),
    linear-gradient(135deg, #f4efe8 0%, #eef3ef 50%, #e9ddd2 100%);
}

.landing-page {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgb(248 250 252 / 78%), rgb(239 246 255 / 90%)),
    url("/images/fallbacks/generated-schemes/webp/arch_straight.webp") center / cover fixed;
}

.landing-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 22px 0 56px;
}

.landing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-top img {
  display: block;
  height: auto;
}

.landing-hero {
  display: grid;
  min-height: calc(100dvh - 120px);
  align-items: center;
}

.landing-hero > div {
  max-width: 680px;
}

.landing-hero span {
  display: inline-flex;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgb(236 253 245 / 92%);
  color: #047857;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 18px 0 12px;
  color: #0f172a;
  font-size: clamp(56px, 10vw, 112px);
  line-height: .88;
  font-weight: 950;
  letter-spacing: 0;
}

.landing-hero p {
  max-width: 620px;
  margin: 0;
  color: #334155;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.32;
  font-weight: 750;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.admin-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-title {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-eyebrow {
  margin: 0 0 8px;
  color: #7a6d64;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-alert {
  border: 1px solid rgb(222 111 79 / 30%);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgb(222 111 79 / 12%);
  color: #8e3f2b;
  font-weight: 800;
}

.admin-alert--success {
  border-color: rgb(47 89 76 / 24%);
  background: rgb(47 89 76 / 12%);
  color: #25493f;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  border: 1px solid rgb(60 42 31 / 10%);
  border-radius: 8px;
  padding: 14px;
  background: rgb(255 255 255 / 70%);
  box-shadow: 0 10px 30px rgb(64 42 28 / 7%);
}

.stat-card span {
  display: block;
  color: #7a6d64;
  font-size: 12px;
  font-weight: 850;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: #2d2521;
  font-size: 28px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 16px;
  align-items: start;
}

.place-list,
.editor-stack {
  display: grid;
  gap: 18px;
}

.place-list {
  position: sticky;
  top: 16px;
}

.client-card {
  padding: 14px;
}

.client-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  margin-bottom: 12px;
  overflow: auto;
}

.client-row {
  border: 1px solid rgb(60 42 31 / 10%);
  border-radius: 8px;
  padding: 10px;
  background: rgb(255 255 255 / 58%);
}

.client-row small,
.media-preview small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.count-chip {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2d2521;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.place-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid rgb(60 42 31 / 10%);
  border-radius: 8px;
  padding: 13px;
  background: rgb(255 255 255 / 68%);
  color: #2d2521;
  text-align: left;
  box-shadow: 0 8px 24px rgb(64 42 28 / 6%);
  cursor: pointer;
}

.place-row.active {
  border-color: #2d2521;
  background: #2d2521;
  color: white;
}

.place-row small {
  display: block;
  margin-top: 4px;
  opacity: .72;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgb(255 250 245 / 82%);
  box-shadow: 0 12px 34px rgb(31 37 35 / 7%);
  backdrop-filter: blur(14px);
}

.section-card {
  padding: 22px;
}

.analytics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.analytics-strip span {
  display: grid;
  gap: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.analytics-strip b {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.admin-card h2,
.admin-card h3 {
  margin: 0 0 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.field.wide {
  grid-column: 1 / -1;
}

.phone-field {
  display: grid;
  grid-template-columns: minmax(118px, .48fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.telegram-bind-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 12px;
  background: #eff6ff;
}

.telegram-bind-card span,
.telegram-bind-card b,
.telegram-bind-card small {
  display: block;
}

.telegram-bind-card span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.telegram-bind-card b {
  margin-top: 4px;
  color: #0f172a;
  font-size: 14px;
}

.telegram-bind-card small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

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

.button {
  background: var(--leaf);
  color: white;
}

.button--light {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.upload-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgb(60 42 31 / 22%);
  border-radius: 8px;
  padding: 12px;
  background: rgb(255 255 255 / 66%);
  color: #2d2521;
  font-weight: 850;
  cursor: pointer;
}

.upload-button input {
  display: none;
}

.upload-button.loading {
  opacity: .68;
  pointer-events: none;
}

.upload-button--small {
  min-height: 38px;
  margin-top: 10px;
  padding: 9px 10px;
  font-size: 12px;
}

.media-preview {
  display: grid;
  grid-template-columns: minmax(180px, 340px) 1fr;
  gap: 14px;
  align-items: center;
}

.admin-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.next-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--leaf);
  font-weight: 900;
}

.error-grid {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #8e3f2b;
  font-size: 13px;
  font-weight: 800;
}

.route-editor {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.route-editor h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.route-editor small {
  color: var(--muted);
  font-size: 12px;
}

.step-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 8px;
  background: rgb(255 255 255 / 58%);
}

.step-mini + .step-mini {
  margin-top: 6px;
}

.step-mini img {
  width: 54px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.step-mini small {
  display: block;
  color: var(--muted);
}

.help-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.help-mini span {
  border-radius: 999px;
  padding: 8px 10px;
  background: #f1e6db;
  color: #2d2521;
  font-size: 13px;
  font-weight: 850;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
}

/* Admin console */
.admin-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 5% -10%, rgb(37 99 235 / 18%), transparent 30%),
    radial-gradient(circle at 95% 3%, rgb(16 185 129 / 12%), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f3f6fb 100%);
}

.admin-shell {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

.admin-console {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100dvh;
}

.admin-console--client {
  grid-template-columns: minmax(0, 1fr);
}

.admin-console--client .admin-sidebar {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100dvh;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid rgb(226 232 240 / 90%);
  padding: 18px 12px;
  overflow: auto;
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(22px);
}

.admin-brand {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf2f7;
  padding: 0 6px 14px;
}

.admin-brand img {
  display: block;
  width: 132px;
  height: auto;
}

.workspace-switch,
.sidebar-note {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 12px;
  background: #f8fafc;
}

.workspace-switch small,
.nav-title {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workspace-switch b {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 15px;
}

.workspace-switch p {
  display: none;
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.38;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 5px;
  background: #fff;
}

.mode-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.mode-toggle button.active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 16%);
}

.admin-nav {
  display: grid;
  gap: 7px;
}

.admin-nav button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 9px 11px;
  background: #fff;
  color: #334155;
  font-weight: 950;
  cursor: pointer;
}

.admin-nav button.active {
  border-color: rgb(37 99 235 / 30%);
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-nav small {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
}

.admin-nav button.active small {
  background: #fff;
  color: #1d4ed8;
}

.nav-title {
  padding: 5px 10px 0;
}

.client-filter {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  align-items: center;
  border: 0;
  border-radius: 16px;
  padding: 8px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.client-filter:hover {
  background: #f8fafc;
}

.client-filter.active {
  background: #eef5ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgb(37 99 235 / 8%);
}

.client-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #2563eb;
  font-weight: 950;
  text-transform: uppercase;
}

.client-filter.active .client-avatar {
  background: #fff;
}

.client-filter b,
.client-filter small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-filter b {
  font-size: 13px;
}

.client-filter small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.sidebar-note {
  margin-top: auto;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.sidebar-note--client {
  border-color: #dbeafe;
  background: linear-gradient(135deg, #eff6ff, #fff);
  color: #0f172a;
}

.sidebar-note b {
  display: block;
  font-size: 14px;
}

.sidebar-note p {
  margin: 7px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.38;
}

.sidebar-note--client p {
  color: #64748b;
}

.admin-main {
  min-width: 0;
  padding: 0 28px 54px;
}

.admin-commandbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgb(226 232 240 / 78%);
  margin: 0 -30px 26px;
  padding: 0 30px;
  background: rgb(246 248 251 / 82%);
  backdrop-filter: blur(24px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.breadcrumbs span:last-child {
  color: #0f172a;
}

.admin-commandbar h1 {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.user-chip {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 17px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 8px 22px rgb(15 23 42 / 4%);
}

.summary-card.strong {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.summary-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.summary-card b {
  display: block;
  max-width: 100%;
  margin-top: 9px;
  color: #0f172a;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.summary-card .summary-value--text {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.summary-card span {
  display: block;
  margin-top: 8px;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.users-workspace {
  display: grid;
  gap: 16px;
}

.users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 20px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 12px 32px rgb(15 23 42 / 6%);
}

.users-head h2,
.users-head p,
.user-card h3,
.user-card p {
  margin: 0;
}

.users-head h2 {
  color: #0f172a;
  font-size: 22px;
}

.users-head p {
  max-width: 680px;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.42;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.user-card {
  display: grid;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 18px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 32px rgb(15 23 42 / 6%);
}

.user-card-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.user-card h3 {
  color: #0f172a;
  font-size: 17px;
}

.user-card p {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.status-pill--active {
  background: #dcfce7;
  color: #047857;
}

.status-pill--trial {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-pill--past_due {
  background: #fff7ed;
  color: #c2410c;
}

.status-pill--paused,
.status-pill--cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.quota-meter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  padding: 13px;
  background: #f8fafc;
}

.quota-meter b,
.quota-meter span,
.quota-meter small {
  display: block;
}

.quota-meter b {
  color: #0f172a;
  font-size: 18px;
}

.quota-meter span,
.quota-meter small {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.quota-meter small {
  color: #1d4ed8;
}

.quota-bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
}

.quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.quota-bar.unlimited span {
  background: linear-gradient(90deg, #10b981, #84cc16);
}

.place-list,
.editor-stack {
  display: grid;
  gap: 12px;
}

.place-list {
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 13px 15px;
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 8px 22px rgb(15 23 42 / 4%);
}

.panel-head h2,
.panel-head p {
  margin: 0;
}

.panel-head h2 {
  color: #0f172a;
  font-size: 18px;
}

.panel-head p {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.count-chip {
  display: inline-flex;
  min-width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.place-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 12px;
  width: clamp(320px, 34vw, 440px);
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 10px;
  background: rgb(255 255 255 / 88%);
  color: #0f172a;
  text-align: left;
  box-shadow: 0 8px 22px rgb(15 23 42 / 4%);
}

.place-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgb(37 99 235 / 8%);
}

.place-row.active {
  border-color: rgb(37 99 235 / 58%);
  background:
    linear-gradient(90deg, rgb(37 99 235 / 10%), transparent 30%),
    #fff;
  color: #0f172a;
  box-shadow:
    inset 4px 0 0 #2563eb,
    0 18px 38px rgb(37 99 235 / 14%);
}

.place-ico {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: #ecfdf5;
  color: #10b981;
  font-size: 18px;
}

.place-row--draft .place-ico {
  background: #fef3c7;
  color: #d97706;
}

.place-row--published .place-ico {
  background: #dcfce7;
  color: #10b981;
}

.place-status-toggle {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.place-status-toggle--draft {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.place-status-toggle--published {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.icon-link {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: #fff;
  color: #2563eb;
}

.icon-link:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.place-row b,
.place-row small,
.place-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-row b {
  font-size: 15px;
}

.place-row small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.place-row em {
  margin-top: 5px;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.place-strip {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.place-strip .place-row {
  scroll-snap-align: start;
}

.place-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #dbeafe;
  border-radius: 26px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 14px 34px rgb(15 23 42 / 6%);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.place-detail-head h2 {
  margin: 10px 0 6px;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 32px);
  line-height: 1;
  letter-spacing: 0;
}

.place-detail-head p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
}

.status-dot--published {
  background: #10b981;
}

.place-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.place-metrics-row span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.place-metrics-row b {
  color: #0f172a;
}

.place-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.place-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 6px;
  background: rgb(255 255 255 / 86%);
}

.place-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 13px;
  padding: 10px 14px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.place-tabs button.active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 14%);
}

.empty-state,
.loading-card {
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  padding: 18px;
  background: rgb(255 255 255 / 70%);
  color: #64748b;
  font-weight: 800;
}

.admin-card {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 20px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 12px 32px rgb(15 23 42 / 7%);
  backdrop-filter: blur(14px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-head h2,
.card-head p {
  margin: 0;
}

.card-head h2 {
  color: #0f172a;
  font-size: 19px;
  letter-spacing: 0;
}

.card-head p {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.38;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.form-grid.compact .step-title-field {
  min-width: min(100%, 260px);
}

.form-grid.compact .input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.profile-layout {
  display: grid;
  gap: 18px;
}

.profile-block {
  display: grid;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
}

.profile-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.profile-block-head {
  display: grid;
  gap: 4px;
}

.profile-block-head b {
  color: #0f172a;
  font-size: 16px;
  letter-spacing: 0;
}

.profile-block-head span {
  max-width: 760px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.42;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.publication-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 13px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.publication-grid b {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-save-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  margin-top: 16px;
  padding: 13px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.card-save-footer b,
.card-save-footer span {
  display: block;
}

.card-save-footer b {
  color: #0f172a;
  font-size: 13px;
}

.card-save-footer span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.card-save-footer .button {
  flex: 0 0 auto;
}

.field.wide {
  grid-column: 1 / -1;
}

.location-picker {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  padding: 15px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.location-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.location-picker-head span {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.location-picker-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.38;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.map-picker-shell {
  display: grid;
  gap: 9px;
}

.map-start-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 9px 10px 9px 12px;
  background: rgb(255 255 255 / 82%);
}

.map-start-row span {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.map-start-row .button {
  min-height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
}

.map-picker-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #dbeafe;
}

.map-picker-frame.selected {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 14%);
}

.map-picker {
  min-height: 360px;
  overflow: hidden;
  background: #dbeafe;
}

.map-center-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 24px;
  height: 24px;
  border: 4px solid #2563eb;
  border-radius: 999px 999px 999px 0;
  background: #fff;
  box-shadow: 0 10px 22px rgb(15 23 42 / 24%);
  pointer-events: none;
  transform: translate(-50%, -100%) rotate(-45deg);
}

.map-center-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #2563eb;
}

.map-pick-center {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  min-height: 40px;
  border-radius: 14px;
  padding: 9px 14px;
  box-shadow: 0 8px 18px rgb(15 23 42 / 12%);
  transform: translateX(-50%);
}

.map-feedback {
  display: grid;
  gap: 5px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1d4ed8;
}

.map-feedback.selected {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.map-feedback span,
.map-feedback b {
  font-size: 12px;
  line-height: 1.3;
}

.map-feedback span {
  font-weight: 900;
}

.map-feedback b {
  color: #0f172a;
  font-weight: 850;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 13px 14px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 10%);
}

.input:disabled {
  background: #f8fafc;
  color: #64748b;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 0;
  border-radius: 15px;
  padding: 10px 15px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgb(37 99 235 / 20%);
}

.button svg,
.mini-action svg,
.upload-button svg,
.back-link svg,
.link-upload svg,
.next-link svg {
  flex: 0 0 auto;
}

.spin {
  animation: icon-spin .8s linear infinite;
}

@keyframes icon-spin {
  to {
    transform: rotate(360deg);
  }
}

.button:hover {
  background: #1d4ed8;
}

.button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.button--light {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  box-shadow: none;
}

.button--light:hover {
  background: #f8fafc;
}

.button.danger,
.button--light.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
  box-shadow: none;
}

.button.danger:hover,
.button--light.danger:hover {
  background: #ffe4e6;
}

.button--full {
  width: 100%;
}

.upload-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #93c5fd;
  border-radius: 15px;
  padding: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

.upload-button input {
  display: none;
}

.upload-button.loading {
  opacity: .68;
  pointer-events: none;
}

.media-preview {
  display: grid;
  grid-template-columns: minmax(180px, 340px) 1fr;
  gap: 16px;
  align-items: center;
}

.crop-editor {
  display: grid;
  grid-template-columns: minmax(260px, 460px) minmax(220px, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 14px;
  background: #f8fbff;
}

.crop-stage,
.step-preview-media {
  position: relative;
}

.crop-stage {
  overflow: hidden;
  border-radius: 18px;
  background: #e2e8f0;
}

.crop-stage img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.crop-stage::after {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 36%);
  content: "";
  pointer-events: none;
}

.crop-frame {
  position: absolute;
  z-index: 2;
  border: 2px solid #fff;
  border-radius: 14px;
  box-shadow:
    0 0 0 999px rgb(15 23 42 / 34%),
    0 10px 28px rgb(15 23 42 / 20%);
  pointer-events: none;
}

.crop-controls,
.inline-crop-controls {
  display: grid;
  gap: 11px;
}

.crop-controls {
  align-content: center;
}

.crop-controls b {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.crop-controls label,
.inline-crop-controls label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.crop-controls input,
.inline-crop-controls input {
  width: 100%;
  accent-color: #2563eb;
}

.admin-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  object-fit: cover;
}

.media-preview small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  overflow-wrap: anywhere;
}

.next-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #1d4ed8;
  font-weight: 900;
}

.error-grid {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #b42318;
  font-size: 13px;
  font-weight: 850;
}

.toast-stack {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 60;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  padding: 13px 14px;
  background: rgb(255 255 255 / 96%);
  color: #0f172a;
  text-align: left;
  box-shadow: 0 18px 48px rgb(15 23 42 / 16%);
  backdrop-filter: blur(18px);
  cursor: pointer;
  pointer-events: auto;
}

.toast-icon {
  margin-top: 1px;
}

.toast-close {
  margin-top: 2px;
  opacity: .5;
}

.toast-copy {
  min-width: 0;
}

.toast b,
.toast span {
  display: block;
}

.toast b {
  font-size: 13px;
}

.toast span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.toast--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.toast--success b {
  color: #047857;
}

.toast--success .toast-icon {
  color: #059669;
}

.toast--info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.toast--info b {
  color: #1d4ed8;
}

.toast--info .toast-icon {
  color: #2563eb;
}

.toast--error {
  border-color: #fecaca;
  background: #fff1f2;
}

.toast--error b {
  color: #be123c;
}

.toast--error .toast-icon {
  color: #e11d48;
}

.route-composer {
  display: grid;
  gap: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  padding: 15px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.route-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.route-list-item {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  padding: 12px 14px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.route-list-item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.route-list-item.active {
  border-color: rgb(37 99 235 / 45%);
  background: #eff6ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.route-list-item span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

.route-list-item b {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-list-item em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.route-composer-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.route-composer-head span {
  width: fit-content;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.route-composer-head b {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.route-composer-head small {
  margin-left: auto;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.route-composer-form {
  display: grid;
  gap: 14px;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #dbeafe;
  padding-top: 12px;
}

.composer-actions span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.composer-actions .button {
  flex: 0 0 auto;
}

.route-editor {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  background: #f8fafc;
}

.route-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.route-editor h3,
.route-editor p {
  margin: 0;
}

.route-editor h3 {
  color: #0f172a;
  font-size: 18px;
  letter-spacing: 0;
}

.route-editor p {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.38;
}

.route-editor-head > span {
  flex: 0 0 auto;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.route-edit-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 12px;
  background: #fff;
}

.editor-actions,
.step-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.compact-field {
  gap: 5px;
  margin-top: 8px;
}

.compact-field span {
  font-size: 11px;
}

.compact-field .textarea {
  min-height: 74px;
}

.step-preview-grid,
.step-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.step-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.step-preview-card,
.step-draft-preview {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgb(15 23 42 / 5%);
}

.step-list .step-preview-card {
  display: grid;
  grid-template-columns: minmax(240px, 34%) minmax(0, 1fr);
  align-items: stretch;
}

.step-preview-media {
  position: relative;
  display: grid;
  min-height: 160px;
  height: 100%;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe 52%, #d1fae5);
  color: #1d4ed8;
  font-size: 24px;
  font-weight: 950;
}

.step-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-preview-media .crop-frame {
  border-radius: 10px;
}

.step-preview-media.empty span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: rgb(255 255 255 / 78%);
}

.step-preview-body {
  padding: 12px;
}

.step-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-order-actions {
  display: inline-flex;
  gap: 6px;
}

.step-order-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #fff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.step-order-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.step-preview-body small,
.step-preview-body b,
.step-preview-body p,
.step-preview-body em {
  display: block;
}

.step-preview-body small {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.step-preview-body b {
  margin-top: 5px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.step-preview-body p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.step-preview-body em {
  color: #059669;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.step-edit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.step-edit-meta em {
  min-width: 0;
  border-radius: 999px;
  padding: 5px 8px;
  overflow: hidden;
  background: #ecfdf5;
  color: #047857;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-upload {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.link-upload input {
  display: none;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.template-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.template-match-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 7px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.template-match-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.template-match-card.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.template-match-card img {
  width: 62px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.template-match-card b,
.template-match-card small,
.template-match-card i {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-match-card b {
  font-size: 12px;
}

.template-match-card small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.template-match-card i {
  margin-top: 5px;
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.step-composer {
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.add-step-toggle {
  width: fit-content;
  margin-top: 6px;
}

.inline-crop-controls {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dbeafe;
  padding-top: 12px;
}

.inline-crop-controls.compact-crop {
  grid-template-columns: 1fr;
  margin-top: 10px;
  border-top: 0;
  padding-top: 0;
}

.step-card-actions {
  margin-top: 10px;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.mini-action:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.mini-action--primary {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mini-action--danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: #be123c;
}

.step-draft-preview {
  align-self: start;
}

.video-route-preview {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 8%), rgb(16 185 129 / 8%)),
    #fff;
}

.video-route-preview b {
  color: #0f172a;
  font-size: 16px;
}

.video-route-preview p {
  overflow-wrap: anywhere;
}

.video-route-preview .button {
  width: fit-content;
}

.help-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.help-mini span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 8px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

/* Auth */
.auth-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 0%, rgb(37 99 235 / 18%), transparent 30%),
    radial-gradient(circle at 90% 12%, rgb(16 185 129 / 14%), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, #eef3f9 100%);
}

.auth-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 28px 16px;
}

.auth-card {
  width: min(100%, 440px);
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 26px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 24px 70px rgb(15 23 42 / 12%);
  backdrop-filter: blur(20px);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
}

.auth-logo img {
  display: block;
  width: 142px;
  height: auto;
}

.auth-heading {
  margin-top: 28px;
}

.auth-heading span {
  display: block;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}

.auth-heading h1 {
  margin: 14px 0 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.auth-heading p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.auth-form input,
.auth-form select {
  width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 10%);
}

.auth-form-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.auth-form label.invalid input,
.auth-form label.invalid select {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgb(239 68 68 / 10%);
}

.auth-form small {
  color: #b42318;
  font-size: 12px;
  font-weight: 850;
}

.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: #2563eb;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 28px rgb(37 99 235 / 22%);
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.auth-links a {
  color: #2563eb;
  font-weight: 950;
}

.auth-alert {
  margin-top: 16px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 12px 13px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  font-weight: 850;
}

.auth-alert--soft {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e2e8f0;
}

.oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.oauth-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px;
  background: #fff;
  color: #0f172a;
}

.oauth-button span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 950;
}

.oauth-button b {
  font-size: 13px;
}

.oauth-button small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}

.oauth-button.disabled {
  opacity: .72;
  cursor: not-allowed;
  pointer-events: none;
}

.admin-alert {
  border: 1px solid #fecaca;
  border-radius: 18px;
  padding: 13px 15px;
  background: #fef2f2;
  color: #b42318;
  font-weight: 850;
}

.admin-alert--success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 46%);
  backdrop-filter: blur(12px);
}

.client-modal {
  position: relative;
  width: min(100%, 480px);
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgb(239 246 255 / 74%), rgb(255 255 255 / 96%) 42%),
    #fff;
  box-shadow: 0 30px 90px rgb(15 23 42 / 28%);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  color: #334155;
  font-size: 24px;
  line-height: 1;
}

.modal-kicker {
  display: inline-flex;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.client-modal h2 {
  margin: 14px 44px 8px 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.client-modal p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.modal-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.client-access-card {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 16px;
  background: #eff6ff;
}

.client-access-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.client-access-card b,
.client-access-card code {
  display: block;
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.client-access-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
}

.modal-error {
  border: 1px solid #fecaca;
  border-radius: 15px;
  padding: 11px 12px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  font-weight: 850;
}

.field.invalid .input {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgb(239 68 68 / 10%);
}

.field small {
  color: #b42318;
  font-size: 12px;
  font-weight: 850;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-action-hint {
  margin-right: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 1120px) {
  .admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .admin-console {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-main {
    padding: 0 16px 42px;
  }

  .admin-commandbar {
    align-items: stretch;
    flex-direction: column;
    margin: 0 -16px 18px;
    padding: 16px;
  }

  .admin-summary,
  .form-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
  }

  .location-picker-head,
  .coordinate-grid,
  .map-start-row,
  .phone-field {
    display: grid;
    grid-template-columns: 1fr;
  }

  .map-picker {
    min-height: 300px;
  }

  .admin-hero,
  .admin-topbar,
  .card-head,
  .telegram-bind-card {
    align-items: stretch;
    flex-direction: column;
  }

  .media-preview {
    grid-template-columns: 1fr;
  }

  .crop-editor,
  .inline-crop-controls {
    grid-template-columns: 1fr;
  }

  .place-detail-head {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .place-head-actions {
    justify-content: stretch;
  }

  .place-head-actions .button {
    flex: 1 1 auto;
  }

  .route-list-item {
    grid-template-columns: 1fr;
  }

  .route-list-item em {
    white-space: normal;
  }

  .step-list .step-preview-card {
    grid-template-columns: 1fr;
  }

  .step-preview-media {
    min-height: 210px;
  }

  .step-composer {
    grid-template-columns: 1fr;
  }

  .route-composer {
    grid-template-columns: 1fr;
  }

  .route-composer-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-composer-head small {
    margin-left: 0;
    white-space: normal;
  }

  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toast-stack {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .place-list {
    position: static;
  }
}
