@font-face {
  font-family:DM Sans;
  src:url('/assets/dm-sans.woff2') format('woff2');
  font-weight:100 1000;
  font-display:swap;
}

:root {
  font-family:"DM Sans",system-ui,sans-serif;
  color:#261d36;
  background:#f7f6fa;
  --sidebar:244px;
  --purple:#6d36bf;
  --plum:#251a3d;
  --muted:#665e76;
  --line:#e8e2ee;
  --soft:#f2eafb;
  --white:#fff;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  min-width:300px;
}

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

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}

button {
  cursor:pointer;
}

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

svg {
  width:19px;
  height:19px;
  vertical-align:middle;
  flex-shrink:0;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #ab83e9;
  outline-offset:3px;
}

[hidden] {
  display:none!important;
}

h1,h2,h3,p {
  margin:0;
}

.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar);
  background:var(--plum);
  color:#fff;
  display:flex;
  flex-direction:column;
  padding:28px 15px 16px;
  z-index:10;
}

.brand {
  display:flex;
  gap:12px;
  align-items:center;
  padding:0 8px 31px;
  line-height:1.02;
  font-size:29px;
  font-weight:850;
  letter-spacing:-1.4px;
  white-space:nowrap;
}

.brand img {
  width:43px;
  height:43px;
}

.brand-accent {
  color:#ff8b60;
}

.brand small {
  display:block;
  font-size:11px;
  color:#c4b8d7;
  letter-spacing:0;
  font-weight:520;
  margin-top:5px;
}

.nav-group {
  margin:0 0 26px;
}

.nav-heading {
  color:#beb0d2;
  font-size:10px;
  font-weight:800;
  letter-spacing:1.25px;
  padding:0 13px;
  margin:0 0 10px;
}

.nav-link {
  min-height:43px;
  padding:0 13px;
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:3px;
  border-radius:9px;
  font-size:14px;
  font-weight:620;
  color:#e0d6ed;
  white-space:nowrap;
}

.nav-link:hover {
  background:#35264d;
  color:white;
}

.nav-link.active {
  background:#523477;
  color:white;
  box-shadow:inset 3px 0 #b38ae9;
}

.nav-link.active svg {
  color:#ebd7ff;
}

.workspace {
  margin-top:auto;
  border:1px solid #47385c;
  background:#302348;
  color:#fff;
  text-align:left;
  border-radius:11px;
  padding:10px;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  width:100%;
}

.workspace-icon,.avatar {
  width:34px;
  height:34px;
  border-radius:9px;
  display:grid;
  place-items:center;
  font-weight:850;
  background:#e9dbfa;
  color:#5829a2;
  flex-shrink:0;
}

.workspace>span:nth-child(2) {
  min-width:0;
  flex:1;
}

.workspace strong,.workspace small {
  display:block;
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap;
}

.workspace strong {
  font-size:13px;
}

.workspace small {
  font-size:10px;
  color:#cbbfdb;
  margin-top:2px;
}

.workspace-chevron {
  color:#c7b9d7;
}

.shell {
  margin-left:var(--sidebar);
  min-height:100dvh;
}

.topbar {
  height:67px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 32px;
  position:sticky;
  top:0;
  z-index:5;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.icon-button {
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:#655a76;
  display:inline-grid;
  place-items:center;
  padding:0;
  flex-shrink:0;
}

.icon-button:hover {
  color:var(--purple);
  background:#f7f1fe;
}

.icon-button svg {
  width:17px;
  height:17px;
}

.breadcrumb {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:13px;
  color:var(--muted);
}

.breadcrumb-chevron svg,.workspace-chevron svg {
  width:14px;
  height:14px;
}

.breadcrumb strong {
  color:#352745;
}

.top-date {
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
  text-transform:capitalize;
}

.avatar {
  border:0;
  border-radius:50%;
  width:35px;
  height:35px;
}

main {
  max-width:1580px;
  margin:0 auto;
  padding:31px 32px 36px;
}

.page-head {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  margin-bottom:22px;
}

.page-head h1 {
  font-size:32px;
  letter-spacing:-1.15px;
  line-height:1.16;
  font-weight:850;
}

.page-head p {
  color:var(--muted);
  font-size:14px;
  margin-top:7px;
}

.button {
  min-height:39px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  color:#463456;
  display:inline-flex;
  gap:7px;
  align-items:center;
  justify-content:center;
  padding:8px 13px;
  font-size:13px;
  font-weight:760;
  white-space:nowrap;
}

.button:hover {
  background:#f5eefc;
  color:#5d2e9d;
}

.button svg {
  width:16px;
  height:16px;
}

.button.primary {
  background:var(--purple);
  border-color:var(--purple);
  color:white;
  box-shadow:0 3px 7px #47237822;
}

.button.primary:hover {
  background:#58259d;
}

.button.danger {
  background:#a52b44;
  color:#fff;
  border-color:#a52b44;
}

.button:disabled {
  opacity:.55;
  cursor:wait;
}

.metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:22px;
}

.metric,.panel {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:13px;
  box-shadow:0 2px 4px #2c184204;
}

.metric {
  padding:15px;
  min-width:0;
  display:block;
}

.metric:hover {
  border-color:#c9acec;
}

.metric-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  color:#665a75;
  font-size:12px;
  font-weight:720;
}

.metric-icon,.row-icon {
  width:34px;
  height:34px;
  display:inline-grid;
  place-items:center;
  border-radius:9px;
  background:#efe6fa;
  color:#713bc4;
  flex-shrink:0;
}

.metric-icon svg,.row-icon svg {
  width:17px;
  height:17px;
}

.metric-icon.green,.row-icon.green {
  background:#e2f5eb;
  color:#197350;
}

.metric-icon.orange,.row-icon.orange {
  background:#ffefe4;
  color:#a95123;
}

.metric-icon.blue,.row-icon.blue {
  background:#e8efff;
  color:#3958ac;
}

.metric strong {
  font-size:30px;
  line-height:1;
  display:block;
  margin:9px 0 7px;
  letter-spacing:-.9px;
}

.metric small {
  color:var(--muted);
  font-size:11px;
}

.dash-grid {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(285px,1fr);
  gap:17px;
  margin-bottom:20px;
}

.panel {
  min-width:0;
}

.panel-head {
  padding:17px 17px 13px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.panel-head h2 {
  font-size:17px;
  font-weight:830;
  letter-spacing:-.25px;
}

.panel-head p {
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
}

.panel-link {
  font-size:12px;
  font-weight:800;
  color:#6333a7;
  white-space:nowrap;
  padding:3px 0;
}

.panel-link:hover {
  text-decoration:underline;
}

.panel-link svg {
  width:14px;
  height:14px;
}

.demo-strip {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:19px;
  padding:12px 15px;
  background:#f2eafa;
  border:1px solid #e8d7f7;
  border-radius:10px;
  color:#4c3371;
  font-size:13px;
}

.demo-strip p {
  display:flex;
  align-items:center;
  gap:8px;
}

.stack {
  padding:0 17px 10px;
}

.stack-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:61px;
  border-top:1px solid #eeeaf1;
  padding:8px 0;
}

.stack-row:first-child {
  border-top:0;
}

.stack-row .row-text {
  min-width:0;
  flex:1;
}

.row-text strong,.row-text small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.row-text strong {
  font-size:13px;
}

.row-text small {
  color:var(--muted);
  font-size:11px;
  margin-top:3px;
}

.pill {
  display:inline-flex;
  gap:5px;
  align-items:center;
  background:#f1edf6;
  color:#5e526c;
  border-radius:99px;
  padding:4px 8px;
  font-size:11px;
  font-weight:740;
  white-space:nowrap;
}

.pill.green {
  background:#e1f5e9;
  color:#1c6549;
}

.pill.orange {
  background:#fff0df;
  color:#854a1d;
}

.pill.purple {
  background:#f0e5fc;
  color:#642ba9;
}

.pill.dot::before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}

.empty {
  padding:25px 15px 31px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

.empty .row-icon {
  margin-bottom:9px;
}

.empty strong {
  display:block;
  color:#3d2e51;
  margin-bottom:5px;
  font-size:14px;
}

.loading {
  padding:30px;
  color:var(--muted);
}

.toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap;
}

.search {
  position:relative;
  min-width:180px;
  width:min(300px,100%);
}

.search svg {
  position:absolute;
  top:11px;
  left:11px;
  color:#776989;
  width:16px;
  height:16px;
  pointer-events:none;
}

input,select,textarea {
  width:100%;
  border:1px solid #dcd4e5;
  background:#fff;
  border-radius:8px;
  padding:9px 11px;
  color:#2f2440;
  min-height:39px;
}

.search input {
  padding-left:34px;
}

.toolbar select {
  width:auto;
}

.table-scroll {
  overflow:auto;
}

table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  white-space:nowrap;
  font-size:13px;
}

th {
  background:#faf8fc;
  font-size:11px;
  color:#655a74;
  font-weight:820;
  padding:10px 15px;
}

td {
  border-top:1px solid #efeaf2;
  padding:9px 15px;
  vertical-align:middle;
}

td strong {
  font-size:13px;
}

.table-name {
  display:flex;
  gap:9px;
  align-items:center;
}

td small {
  display:block;
  color:var(--muted);
  font-size:11px;
}

.row-actions {
  display:flex;
  gap:5px;
  justify-content:flex-end;
}

.row-actions .icon-button {
  width:32px;
  height:32px;
}

.table-foot {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  color:var(--muted);
  font-size:12px;
  border-top:1px solid var(--line);
}

.pagination {
  display:flex;
  align-items:center;
  gap:8px;
}

.pagination .button {
  min-height:32px;
  padding:5px 9px;
}

dialog {
  border:1px solid var(--line);
  padding:0;
  border-radius:15px;
  width:min(540px,calc(100vw - 28px));
  max-height:calc(100dvh - 34px);
  color:#261d36;
  box-shadow:0 24px 100px #29123f52;
}

dialog[open] {
  display:flex;
  flex-direction:column;
}

dialog::backdrop {
  background:#23183284;
}

body:has(dialog[open]) {
  overflow:hidden;
}

.dialog-head,.dialog-foot {
  padding:15px 19px;
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:1px solid var(--line);
}

.dialog-head {
  justify-content:space-between;
}

.dialog-head h2 {
  font-size:19px;
  letter-spacing:-.35px;
}

.dialog-foot {
  justify-content:flex-end;
  border-top:1px solid var(--line);
  border-bottom:0;
}

.dialog-body {
  padding:18px 19px;
  overflow:auto;
}

.field {
  display:block;
  margin:0 0 13px;
  font-size:13px;
  font-weight:740;
}

.field input,.field textarea,.field select {
  display:block;
  margin-top:4px;
  font-weight:500;
}

.field small {
  display:block;
  color:var(--muted);
  font-weight:500;
  margin-top:3px;
}

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

textarea {
  resize:vertical;
  min-height:72px;
}

.form-note,.dialog-body>p {
  font-size:13px;
  color:var(--muted);
  margin-bottom:11px;
}

.form-error {
  font-size:13px;
  color:#a4263f;
  background:#fff0f2;
  padding:8px;
  border-radius:7px;
  margin-top:10px;
}

[aria-invalid="true"] {
  border-color:#bd3651;
}

.media-select {
  padding:0;
  border:0;
  margin:0;
}

.media-select legend {
  font-weight:750;
  font-size:13px;
  margin-bottom:5px;
}

.media-choice {
  display:flex;
  gap:7px;
  align-items:center;
  font-size:13px;
  padding:4px 0;
}

.media-choice input {
  margin:0;
  min-height:0;
  width:15px;
  height:15px;
  accent-color:var(--purple);
}

.sequence {
  margin:8px 0 4px;
  padding:0;
  list-style:none;
}

.sequence li {
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 0;
  border-top:1px solid var(--line);
  font-size:12px;
}

.sequence li span {
  margin-right:auto;
}

.sequence .icon-button {
  width:28px;
  height:28px;
}

.toast {
  position:fixed;
  right:23px;
  bottom:22px;
  z-index:15;
  padding:12px 15px;
  background:#2f2146;
  color:white;
  border-radius:9px;
  font-size:13px;
  box-shadow:0 6px 22px #251d4440;
  max-width:min(400px,calc(100vw - 40px));
}

.shade {
  position:fixed;
  inset:0;
  background:#23173377;
  border:0;
  z-index:9;
}

.sidebar-collapsed {
  --sidebar:67px;
}

.sidebar-collapsed .sidebar {
  padding-inline:10px;
}

.sidebar-collapsed .brand {
  padding-left:2px;
}

.sidebar-collapsed .brand span,.sidebar-collapsed .nav-link span,.sidebar-collapsed .nav-heading,.sidebar-collapsed .workspace>span:not(:first-child) {
  display:none;
}

.sidebar-collapsed .nav-link,.sidebar-collapsed .workspace {
  justify-content:center;
  padding-inline:0;
}

.player {
  height:100dvh;
  display:grid;
  place-items:center;
  background:#201633;
  color:white;
  overflow:hidden;
}

.player-stage {
  width:100%;
  height:100%;
  max-width:none;
  padding:0;
  position:relative;
  display:grid;
  place-items:center;
  text-align:center;
}

.player-stage[data-orientation="vertical"] {
  max-width:56.25dvh;
  margin:auto;
  background:#241841;
}

.player-stage img,.player-stage video {
  width:100%;
  height:100%;
  max-height:100dvh;
  object-fit:contain;
}

.player-card {
  width:100%;
  height:100%;
  display:grid;
  place-content:center;
  padding:9%;
  background:radial-gradient(ellipse at top right,#7d4bc4,#241843 65%);
  font-size:clamp(24px,6vmin,90px);
  font-weight:820;
  overflow-wrap:anywhere;
}

.player-message {
  padding:20px;
  font-size:clamp(15px,3vmin,32px);
  color:#eadbf7;
}

.media-preview {
  display:grid;
  place-items:center;
  min-height:180px;
  background:#271a3c;
  border-radius:10px;
  color:#fff;
  overflow:hidden;
}

.media-preview img,.media-preview video {
  max-width:100%;
  max-height:54dvh;
}

.media-preview .player-card {
  min-height:180px;
  font-size:25px;
  text-align:center;
}

@media(max-width:1120px) {
  main {
    padding-inline:23px;
  }
  .topbar {
    padding-inline:23px;
  }
  .metrics {
    gap:10px;
  }
  .metric {
    padding:12px;
  }
}

@media(max-width:950px) {
  :root {
    --sidebar:200px;
  }
  .brand {
    font-size:25px;
  }
  .brand img {
    width:38px;
    height:38px;
  }
  .metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .dash-grid {
    grid-template-columns:1fr;
  }
}

@media(max-width:700px) {
  .sidebar,.sidebar-collapsed .sidebar {
    width:min(272px,86vw);
    padding-inline:15px;
    transform:translateX(-100%);
    transition:transform .18s ease;
  }
  .mobile-open .sidebar {
    transform:none;
  }
  .shell {
    margin-left:0;
  }
  .topbar {
    height:58px;
    padding:0 14px;
    gap:10px;
  }
  .top-date {
    visibility:hidden;
    width:0;
  }
  .breadcrumb {
    font-size:12px;
  }
  main {
    padding:20px 13px;
  }
  .page-head {
    align-items:flex-start;
    margin-bottom:16px;
    gap:9px;
  }
  .page-head h1 {
    font-size:26px;
  }
  .page-head p {
    font-size:12px;
  }
  .page-head .button {
    padding-inline:9px;
    font-size:11px;
  }
  .metrics {
    gap:8px;
    margin-bottom:13px;
  }
  .metric {
    padding:10px;
  }
  .metric strong {
    font-size:25px;
  }
  .metric-top {
    font-size:11px;
  }
  .metric small {
    font-size:10px;
  }
  .metric-icon {
    width:28px;
    height:28px;
  }
  .demo-strip {
    padding:9px;
    gap:8px;
    font-size:11px;
  }
  .demo-strip svg {
    display:none;
  }
  .demo-strip .button {
    font-size:11px;
    padding:6px 8px;
    min-height:31px;
  }
  .dash-grid {
    gap:12px;
  }
  .field-row {
    grid-template-columns:1fr;
  }
}
