/*
 * Playora admin panel styles.
 * Same fonts and brand colours as the site (assets/css/site.css).
 */

@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/baloo2-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --side: #17112e;
  --side-2: #221a45;
  --side-line: rgba(255, 255, 255, .07);
  --side-text: #b7aed9;
  --bg: #f4f2fb;
  --card: #ffffff;
  --card-2: #f7f5fd;
  --line: #e7e2f4;
  --line-2: #d8d1ec;
  --text: #1b1436;
  --text-2: #4d466c;
  --muted: #6f6990;
  --brand: #7c4dff;
  --brand-2: #ff4fa0;
  --brand-soft: #efe9ff;
  --grad: linear-gradient(135deg, #8b5cff 0%, #ff4fa0 100%);
  --green: #16a36a;
  --green-soft: #e3f7ee;
  --blue: #2f6bff;
  --blue-soft: #e6eeff;
  --gold: #c98400;
  --gold-soft: #fff4dc;
  --orange: #e8670f;
  --orange-soft: #ffeedd;
  --red: #e2384d;
  --red-soft: #ffe8eb;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(27, 20, 54, .06);
  --shadow: 0 1px 2px rgba(27, 20, 54, .05), 0 12px 28px -18px rgba(27, 20, 54, .35);
  color-scheme: light;
}

[data-theme="dark"] {
  --side: #0c0920;
  --side-2: #19133a;
  --bg: #100c26;
  --card: #18122f;
  --card-2: #1f1840;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f1eeff;
  --text-2: #c6bfe6;
  --muted: #8f87b5;
  --brand: #9b6bff;
  --brand-soft: rgba(155, 107, 255, .16);
  --green-soft: rgba(22, 163, 106, .16);
  --blue-soft: rgba(47, 107, 255, .16);
  --gold-soft: rgba(201, 132, 0, .18);
  --orange-soft: rgba(232, 103, 15, .16);
  --red-soft: rgba(226, 56, 77, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 600 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0 0 10px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.icon {
  width: 19px;
  height: 19px;
  flex: none;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

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

.strong {
  font-weight: 800;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- layout */
.admin {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(400px 300px at 0% 0%, rgba(139, 92, 255, .28), transparent 60%),
    var(--side);
  color: var(--side-text);
  padding: 16px 12px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  color: #fff;
}

.side-brand svg,
.side-brand img {
  width: 40px;
  height: 40px;
  flex: none;
}

.side-brand strong {
  display: block;
  font: 800 20px/1.1 var(--font-head);
}

.side-brand small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--side-text);
}

.side a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  color: var(--side-text);
  transition: background .15s, color .15s;
}

.side a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.side a.is-active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(255, 79, 160, .8);
}

.side-group {
  margin-top: 16px;
}

.side-group > span {
  display: block;
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(183, 174, 217, .55);
}

.count {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--brand-2);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

.count.gold {
  background: #ffb020;
  color: #3a2500;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 66px;
  padding: 0 26px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar .search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.topbar .search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
}

.topbar .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-btn {
  display: none !important;
}

.content {
  padding: 26px;
  max-width: 1500px;
}

.demo-note {
  background: #ffb020;
  color: #3a2500;
  text-align: center;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 13.5px;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head > div:first-child {
  flex: 1;
  min-width: 240px;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-head .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crumbs {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.crumbs a:hover {
  color: var(--brand);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  font: 800 14px var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--grad);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(124, 77, 255, .8);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--card-2);
}

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

.btn-success {
  background: var(--green-soft);
  border-color: transparent;
  color: var(--green);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-xs {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-icon {
  width: 40px;
  padding: 0;
}

.btn[disabled] {
  opacity: .55;
  pointer-events: none;
}

/* ---------------------------------------------------------------- cards and grids */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
  font-size: 17px;
}

.card-head .actions,
.card-head > a,
.card-head > form {
  margin-left: auto;
}

.card-body {
  padding: 18px;
}

.card-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 0 0 18px 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

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

.kpi {
  position: relative;
  padding: 16px 18px;
  overflow: hidden;
}

.kpi .ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 10px;
}

.kpi .ic.green {
  background: var(--green-soft);
  color: var(--green);
}

.kpi .ic.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.kpi .ic.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.kpi .ic.purple {
  background: var(--brand-soft);
  color: var(--brand);
}

.kpi strong {
  display: block;
  font: 800 28px/1.1 var(--font-head);
}

.kpi small {
  color: var(--muted);
  font-size: 13px;
}

.kpi .sub {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 800;
  margin-left: 6px;
}

.kpi .sub.up {
  color: var(--green);
}

.kpi .sub.down {
  color: var(--red);
}

/* ---------------------------------------------------------------- tables */
.table-wrap {
  overflow-x: auto;
}

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

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--card-2);
}

.table .actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 30px 14px !important;
}

.cell-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.thumb {
  width: 72px;
  height: 45px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  background: var(--card-2);
}

.thumb-sm {
  width: 52px;
  height: 33px;
  border-radius: 7px;
  object-fit: cover;
  flex: none;
}

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  background: var(--card-2);
  color: var(--text-2);
  white-space: nowrap;
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-red {
  background: var(--red-soft);
  color: var(--red);
}

.badge-orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge-gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-purple {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge-dark {
  background: var(--text);
  color: var(--card);
}

/* ---------------------------------------------------------------- forms */
.form-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section > h3 {
  margin-bottom: 4px;
}

.card-body .form-section {
  padding: 18px 0 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.card-body .form-section > h3 {
  margin-bottom: 12px;
}

input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}

input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 700;
  margin-right: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--text);
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  border-color: var(--brand);
}

.form-section > p {
  color: var(--muted);
  margin-bottom: 14px;
}

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

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  min-width: 0;
}

.field > label {
  font-weight: 800;
  font-size: 13.5px;
}

.input,
.select,
.textarea,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="url"],
.field input[type="datetime-local"],
.field input[type="date"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  font: 600 14px var(--font);
  transition: border-color .15s, box-shadow .15s;
}

.textarea,
.field textarea {
  height: auto;
  min-height: 110px;
  padding: 10px 13px;
  line-height: 1.5;
  resize: vertical;
}

.select,
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237c4dff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") right 13px center no-repeat;
}

.input:focus,
.select:focus,
.textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.is-invalid {
  border-color: var(--red) !important;
}

.error {
  color: var(--red);
  font-size: 12.5px;
  font-weight: 800;
}

.help {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.input-group {
  display: flex;
}

.input-group .input {
  border-radius: 11px 0 0 11px;
}

.input-group .addon {
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-left: 0;
  border-radius: 0 11px 11px 0;
  background: var(--card-2);
  color: var(--muted);
  font-weight: 800;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch .track {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: var(--line-2);
  flex: none;
  transition: background .2s;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}

.switch input:checked + .track {
  background: var(--green);
}

.switch input:checked + .track::after {
  transform: translateX(17px);
}

.switch input:focus-visible + .track {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

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

.color-field input[type="color"] {
  width: 46px;
  height: 42px;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--card);
}

.image-field {
  display: flex;
  align-items: center;
  gap: 14px;
}

.image-field .preview {
  width: 120px;
  height: 75px;
  border-radius: 12px;
  background: var(--card-2) center / cover no-repeat;
  border: 1px dashed var(--line-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
  overflow: hidden;
}

.image-field .preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}

.icon-picker label {
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 12px;
  border: 2px solid var(--line);
  cursor: pointer;
}

.icon-picker input {
  position: absolute;
  opacity: 0;
}

.icon-picker input:checked + img {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
  border-radius: 8px;
}

.icon-picker img {
  width: 40px;
  height: 40px;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 26px;
  border-radius: 16px;
  border: 2px dashed var(--line-2);
  background: var(--card-2);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.dropzone.is-over,
.dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dropzone input {
  display: none;
}

.dropzone strong {
  color: var(--text);
}

.progress {
  height: 8px;
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width .2s;
}

/* ---------------------------------------------------------------- tabs and filters */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  width: fit-content;
  max-width: 100%;
}

.tabs a {
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--text);
}

.tabs a.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.filters .input,
.filters .select {
  height: 36px;
  width: auto;
  min-width: 160px;
  font-size: 13.5px;
}

.filters .grow {
  flex: 1;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

/* ---------------------------------------------------------------- alerts, lists, misc */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 13px;
  margin-bottom: 16px;
  font-weight: 700;
  background: var(--card-2);
  border: 1px solid var(--line);
}

.alert-success {
  background: var(--green-soft);
  border-color: transparent;
  color: var(--green);
}

.alert-error {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
}

.alert-warn {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--gold);
}

.alert-info {
  background: var(--blue-soft);
  border-color: transparent;
  color: var(--blue);
}

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

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-plain li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.list-plain li:last-child {
  border-bottom: 0;
}

.dl {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
  font-size: 14px;
}

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

.dl dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--side);
  color: #e6defd;
  padding: 12px 14px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre;
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font: 800 14px var(--font-head);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
  display: none;
}

.dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 0;
  background: none;
  font: 700 14px var(--font);
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--card-2);
}

.dropdown-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px 0;
}

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  background: var(--side);
  color: #fff;
  border-radius: 12px;
  padding: 11px 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
  font-weight: 700;
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 10, 36, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.modal-card h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

.modal-card p {
  color: var(--text-2);
  margin: 0 0 16px;
}

.modal-card .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* charts (inline SVG drawn on the server) */
.chart {
  width: 100%;
  height: 230px;
}

.chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .line-a {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
}

.chart .area-a {
  fill: url(#chart-fill);
}

.chart .line-b {
  fill: none;
  stroke: var(--brand-2);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.chart text {
  fill: var(--muted);
  font: 700 11px var(--font);
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  background: var(--brand);
}

.legend .dot.b {
  background: var(--brand-2);
}

.bars-list {
  display: grid;
  gap: 10px;
}

.bars-list .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  font-size: 13.5px;
}

.bars-list .bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 8px;
  background: var(--card-2);
  overflow: hidden;
}

.bars-list .bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--grad);
}

/* sortable lists (home layout, collections, categories) */
.sortable {
  display: grid;
  gap: 8px;
}

.sortable .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
}

.sortable .item.is-dragging {
  opacity: .5;
}

.sortable .handle {
  cursor: grab;
  color: var(--muted);
}

/* rich text editor */
.editor {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.editor-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}

.editor-bar button {
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 800 13px var(--font);
  cursor: pointer;
}

.editor-bar button:hover {
  background: var(--card);
}

.editor-area {
  min-height: 220px;
  padding: 12px 14px;
  outline: 0;
  line-height: 1.6;
}

.editor-area:focus-visible {
  box-shadow: inset 0 0 0 2px var(--brand);
  border-radius: 0 0 12px 12px;
}

/* sign-in screens */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(700px 400px at 15% 0%, rgba(139, 92, 255, .45), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, rgba(255, 79, 160, .3), transparent 60%),
    var(--side);
}

.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--card);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}

.auth-card .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-card .brand svg,
.auth-card .brand img {
  width: 42px;
  height: 42px;
}

.auth-card .brand strong {
  font: 800 22px var(--font-head);
}

.auth-card .brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-card h1 {
  font-size: 25px;
  margin-bottom: 4px;
}

.auth-card > p {
  color: var(--text-2);
  margin: 0 0 18px;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .side {
    position: fixed;
    z-index: 60;
    left: 0;
    top: 0;
    bottom: 0;
    width: 270px;
    transform: translateX(-100%);
    transition: transform .25s;
  }

  body.side-open .side {
    transform: none;
    box-shadow: 0 0 60px rgba(0, 0, 0, .45);
  }

  .menu-btn {
    display: inline-flex !important;
  }

  .grid-2,
  .grid-3,
  .form-row,
  .form-row.three,
  .form-row.four {
    grid-template-columns: minmax(0, 1fr);
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 0 14px;
  }

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