:root {
  --ink: #172137;
  --muted: #7a8497;
  --line: #e8ebf2;
  --primary: #5955db;
  --bg: #f7f8fc;
  --sidebar: 232px;
}
* {
  box-sizing: border-box;
}
body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #aaa7ff;
  outline-offset: 2px;
}
.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 17px;
  border-radius: 8px;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: #4541bc;
}
.btn-light {
  background: white;
  border: 1px solid var(--line);
  color: #596176;
}
.btn-sm {
  padding: 7px 11px;
  font-size: 12px;
}
.btn-danger {
  background: #d94859;
  border-color: #d94859;
}
.form-control,
.form-select {
  font-size: 13px;
  border-color: #dfe3ed;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 17px;
  color: #4b566d;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
input[type="color"] {
  height: 42px;
  padding: 4px;
}
textarea {
  min-height: 95px;
}
h1,
h2,
h3,
h4 {
  letter-spacing: -0.035em;
  font-weight: 650;
}
h1 {
  font-size: 29px;
}
h2 {
  font-size: 23px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--primary);
}
.brand {
  position: relative;
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding-left: 43px;
  line-height: 18px;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 2.3px;
  color: var(--muted);
  font-weight: 500;
}
.brand-icon {
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 33px;
  height: 35px;
  border-radius: 10px;
  background: #5955db;
  color: white;
  font-size: 27px;
}
.app-shell {
  display: flex;
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: white;
  border-right: 1px solid var(--line);
  padding: 32px 18px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  margin: 0 8px 44px;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #9aa2b1;
  font-weight: 700;
  margin: 0 13px 13px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  margin: 3px 0;
  border-radius: 8px;
  color: #737d90;
  font-size: 12px;
  font-weight: 550;
}
.nav-item span {
  font-size: 19px;
  width: 20px;
  line-height: 20px;
}
.nav-item:hover {
  background: #f8f8fd;
}
.nav-item.active {
  color: var(--primary);
  background: #eeedff;
}
.sidebar-bottom {
  margin-top: auto;
}
.help-card {
  margin: 22px 5px;
  padding: 18px 13px;
  background: #f8f8fd;
  border: 1px solid #eeedf7;
  border-radius: 10px;
}
.help-card > span {
  font-size: 24px;
  color: var(--primary);
}
.help-card strong,
.help-card small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
}
.help-card small {
  color: var(--muted);
  font-size: 9px;
}
.user-card {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding: 20px 8px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #efedfd;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.avatar.small {
  width: 29px;
  height: 29px;
}
.user-card strong {
  display: block;
  font-size: 11px;
}
.user-card small {
  font-size: 9px;
  color: var(--muted);
}
.main-shell {
  margin-left: var(--sidebar);
  width: calc(100% - var(--sidebar));
}
.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 35px;
}
.crumb {
  font-size: 11px;
  color: #99a0af;
}
.crumb span {
  margin: 0 12px;
  color: #c6cad4;
}
.crumb strong {
  color: #667086;
  font-weight: 500;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #929bad;
}
.topbar-right .avatar {
  margin-left: 15px;
}
.secure-dot {
  width: 6px;
  height: 6px;
  background: #38b896;
  border-radius: 50%;
}
#main {
  padding: 32px 35px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 29px;
  gap: 12px;
}
.page-heading h1 {
  margin: 5px 0 5px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.heading-actions {
  display: flex;
  gap: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px;
  position: relative;
}
.stat .stat-icon {
  float: right;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: #eeedfe;
  color: #6e67dd;
  border-radius: 9px;
  font-size: 19px;
}
.stat small {
  color: #7a8397;
  font-size: 11px;
  display: block;
}
.stat strong {
  display: block;
  font-size: 29px;
  margin: 10px 0 8px;
  letter-spacing: -1px;
}
.stat p {
  font-size: 10px;
  margin: 0;
  color: #9ba3b1;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-header {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.panel-header h3 {
  margin: 0;
}
.panel-header p {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}
.panel-body {
  padding: 24px;
}
.table {
  font-size: 12px;
  margin: 0;
  --bs-table-color: #59647a;
}
.table th {
  background: #fcfcfe;
  color: #98a0b1;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 18px 22px;
  border-color: #f0f1f6;
  vertical-align: middle;
}
.table td strong {
  color: #2c374f;
  font-size: 12px;
}
.table td small {
  font-size: 10px;
}
.business-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.business-icon {
  width: 34px;
  height: 35px;
  border: 1px solid #eae8fc;
  border-radius: 9px;
  background: #f3f2fe;
  color: #7e76d7;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eefaf4;
  border: 1px solid #d8f1e5;
  color: #3b9b73;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 9px;
  text-transform: capitalize;
}
.badge-status:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge-status.suspended,
.badge-status.expired {
  background: #fff7eb;
  border-color: #ffebd0;
  color: #bb8840;
}
.badge-status.archived,
.badge-status.pending {
  background: #f2f3f7;
  border-color: #e4e7ee;
  color: #8b93a4;
}
.filters {
  display: flex;
  gap: 10px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
}
.filters input {
  max-width: 300px;
}
.filters select {
  max-width: 160px;
}
.empty {
  padding: 52px 25px;
  text-align: center;
  color: #8c95a7;
}
.empty h3 {
  color: #58637c;
}
.empty .empty-icon {
  font-size: 38px;
  color: #9993e9;
  margin-bottom: 12px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.welcome-banner {
  background: #eeedfb;
  border: 1px solid #dfddf8;
  border-radius: 13px;
  padding: 29px;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.welcome-banner h2 {
  font-size: 21px;
}
.welcome-banner p {
  font-size: 12px;
  color: #828098;
  margin: 0;
}
.welcome-banner .banner-art {
  font-size: 70px;
  color: #a7a2e7;
  line-height: 1;
}
.quick-card {
  display: block;
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 10px;
  color: var(--ink);
}
.quick-card:hover {
  border-color: #c5c1f4;
}
.quick-card > span {
  display: block;
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 18px;
}
.quick-card p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.loading {
  padding: 65px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  padding: 14px 22px;
  background: #24334b;
  color: #fff;
  border-radius: 9px;
  z-index: 1000;
  max-width: 440px;
  box-shadow: 0 8px 40px #18203522;
  display: none;
}
#toast.error {
  background: #a53748;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  max-width: 730px;
  width: 92%;
  max-height: 90dvh;
  padding: 0;
  box-shadow: 0 25px 100px #15214333;
  color: var(--ink);
}
dialog::backdrop {
  background: #17213766;
  backdrop-filter: blur(3px);
}
.modal-heading {
  padding: 23px 27px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-heading h2 {
  margin: 0;
  font-size: 21px;
}
.modal-body {
  padding: 25px 27px;
}
.modal-footer {
  padding: 18px 27px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.close-btn {
  background: none;
  border: 0;
  color: #929aad;
  font-size: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.field-note {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.section-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #9aa1b2;
  margin: 16px 0;
  text-transform: uppercase;
}
.pagination-bar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.media-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.media-thumb {
  height: 120px;
  display: grid;
  place-items: center;
  background: #f3f3fb;
  font-size: 35px;
  color: #aaa5db;
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-meta {
  padding: 12px;
  font-size: 11px;
}
.media-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-meta small {
  color: var(--muted);
}
.media-meta button {
  float: right;
}
.auth-page {
  display: flex;
  min-height: 100dvh;
  background: #fff;
}
.auth-story {
  width: 48%;
  background: #f0effc;
  padding: 50px 8%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
}
.auth-story .brand {
  margin-bottom: 70px;
}
.auth-story h1 {
  font-size: 58px;
  letter-spacing: -3px;
  margin: 18px 0;
  color: #35325e;
}
.auth-story p {
  color: #8b86a4;
  font-size: 13px;
}
.auth-story > small {
  color: #aaa4c0;
  font-size: 10px;
  margin-top: 50px;
}
.auth-art {
  margin: 45px 0 30px;
  text-align: center;
}
.art-node {
  border: 1px solid #c9c4ed;
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 25px #7971a011;
  color: #6258b6;
  font-size: 13px;
  display: inline-block;
}
.art-branches {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #c2bce6;
  margin-top: 26px;
  padding-top: 23px;
}
.art-branches span {
  padding: 12px 13px;
  border: 1px solid #d9d5ef;
  background: #f8f7ff;
  border-radius: 8px;
  color: #958db9;
  font-size: 10px;
}
.auth-main {
  width: 52%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
}
.auth-box {
  width: 350px;
}
.auth-box h2 {
  font-size: 29px;
  margin: 14px 0 8px;
}
.auth-box > p {
  font-size: 12px;
  margin-bottom: 33px;
}
.auth-box label {
  margin-bottom: 22px;
}
.auth-box .btn {
  margin-top: 8px;
  padding: 13px;
}
.auth-link {
  display: block;
  text-align: center;
  font-size: 11px;
  margin-top: 20px;
}
.auth-box .auth-note {
  font-size: 10px;
  color: #b0b5c2;
  text-align: center;
  margin-top: 55px;
}
.error-card {
  max-width: 540px;
  background: #fff;
  margin: 12vh auto;
  padding: 45px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.builder-heading {
  margin-bottom: 18px;
}
.builder-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}
.builder-toolbar .toolbar-divider {
  height: 23px;
  width: 1px;
  background: var(--line);
  margin: 0 5px;
}
.builder-workspace {
  display: grid;
  grid-template-columns: 205px minmax(200px, 1fr) 285px;
  height: calc(100dvh - 268px);
  min-height: 450px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: white;
}
.tree-panel {
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  overflow: auto;
}
.tree-panel input {
  font-size: 11px;
  padding: 8px;
}
.tree-panel .section-label {
  padding-left: 5px;
}
.tree-item {
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 32px;
  white-space: nowrap;
}
.tree-item button {
  border: 0;
  background: none;
  font-size: 11px;
  padding: 6px 4px;
  color: #778097;
  text-align: left;
}
.tree-item .node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.tree-item.selected {
  background: #eeedfc;
  border-radius: 5px;
}
.tree-item.selected button {
  color: var(--primary);
}
.canvas-wrap {
  position: relative;
  min-width: 0;
  background-color: #fafbfe;
  background-image: radial-gradient(#dfe3ee 1px, transparent 1px);
  background-size: 19px 19px;
}
.canvas {
  position: absolute;
  inset: 0;
}
.canvas-controls {
  position: absolute;
  bottom: 17px;
  left: 17px;
  display: flex;
  gap: 5px;
  z-index: 3;
}
.canvas-hint {
  position: absolute;
  top: 12px;
  left: 15px;
  font-size: 9px;
  color: #a6adbd;
  pointer-events: none;
}
.properties {
  border-left: 1px solid var(--line);
  overflow: auto;
}
.properties-title {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 12px;
}
.properties-body {
  padding: 17px;
}
.properties label {
  font-size: 10px;
  margin-bottom: 14px;
}
.properties input,
.properties select,
.properties textarea {
  font-size: 11px;
  padding: 8px;
}
.properties .form-grid {
  gap: 0 10px;
}
.properties .btn {
  font-size: 10px;
}
.ancestor {
  font-size: 9px;
  color: #a0a6b6;
  margin-bottom: 17px;
  line-height: 1.8;
}
.content-block {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  margin: 12px 0;
  background: #fcfcff;
}
.content-block .form-control {
  margin-top: 5px;
}
.content-block strong {
  font-size: 10px;
}
.content-block textarea {
  min-height: 100px;
}
.save-state {
  font-size: 10px;
  color: #8d95a6;
  margin-right: 10px;
}
.toolbar-spacer {
  flex: 1;
}
.policy-table td,
.policy-table th {
  font-size: 10px;
  padding: 9px;
}
.inline-note {
  padding: 13px;
  background: #f6f5fe;
  border-radius: 8px;
  font-size: 11px;
  color: #8a85a6;
  margin: 15px 0;
}
.danger-note {
  color: #bc6570;
}
.mobile-note {
  display: none;
}
@media (min-width: 1600px) {
  .builder-workspace {
    grid-template-columns: 230px minmax(200px, 1fr) 330px;
  }
}
@media (max-width: 1100px) {
  :root {
    --sidebar: 190px;
  }
  #main {
    padding: 24px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .builder-workspace {
    grid-template-columns: 155px minmax(180px, 1fr) 250px;
  }
  .builder-toolbar {
    gap: 3px;
  }
  .btn-sm {
    padding: 7px;
  }
  .help-card {
    display: none;
  }
}
@media (max-width: 800px) {
  :root {
    --sidebar: 65px;
  }
  .sidebar {
    padding: 23px 7px;
  }
  .sidebar .brand {
    font-size: 0;
    margin: 0 7px 35px;
    padding: 0;
    height: 37px;
  }
  .brand-sub,
  .workspace-label,
  .sidebar .help-card,
  .user-card > div {
    display: none;
  }
  .nav-item {
    font-size: 0;
    justify-content: center;
    padding: 12px;
  }
  .nav-item span {
    font-size: 21px;
  }
  .user-card {
    padding: 15px 4px;
  }
  .topbar-right {
    font-size: 0;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .builder-workspace {
    grid-template-columns: 1fr 240px;
  }
  .tree-panel {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .auth-story {
    display: none;
  }
  .auth-main {
    width: 100%;
    padding: 35px;
  }
  .auth-box {
    max-width: 100%;
  }
  .table td,
  .table th {
    padding: 12px;
  }
  .topbar {
    height: 60px;
  }
  .builder-workspace {
    height: calc(100dvh - 300px);
  }
  .builder-heading h1 {
    font-size: 23px;
  }
}
@media (max-width: 550px) {
  .builder-workspace {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .canvas-wrap {
    height: 400px;
    min-height: 400px;
  }
  .properties {
    max-height: 500px;
    border-top: 1px solid var(--line);
  }
  .stats .stat strong {
    font-size: 24px;
  }
  .stat .stat-icon {
    display: none;
  }
  .filters {
    flex-wrap: wrap;
  }
  .welcome-banner .banner-art {
    display: none;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .form-grid {
    display: block;
  }
}
