:root {
  --bg: #f5f5f3;
  --surface: #fff;
  --ink: #171717;
  --muted: #777875;
  --line: #e8e8e4;
  --coral: #f9776e;
  --coral-soft: #fff0ee;
  --yellow: #eab95d;
  --purple: #9685d4;
  --blue: #76a9dd;
  --green: #3f9b73;
  --font: "DM Sans", sans-serif;
  --brand: "Space Grotesk", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #131313;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-screen.hidden {
  display: none;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 24px 80px #0008;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 25px var(--brand);
  letter-spacing: -1.5px;
  margin-bottom: 48px;
}
.auth-card h1 {
  font: 700 30px var(--brand);
  letter-spacing: -1.2px;
  margin: 0;
}
.auth-form label {
  display: block;
  color: #747570;
  font-size: 11px;
  font-weight: 600;
}
.auth-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dedfda;
  border-radius: 8px;
  padding: 12px 11px;
  font: 14px var(--font);
  color: var(--ink);
  background: #fff;
  outline: none;
}
.auth-form input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px #fff0ee;
}
.auth-form .button {
  width: 100%;
  margin-top: 16px;
  position: relative;
  text-align: center;
}
.auth-form .button span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
}
.hidden {
  display: none !important;
}
.otp-sent {
  font-size: 12px;
  color: #888984;
  margin: -1px 0 20px;
  line-height: 1.4;
}
.otp-sent strong {
  color: var(--ink);
}
.dev-code {
  color: #b46b55;
  background: #fff5f0;
  border-radius: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  font: 600 12px var(--brand);
  text-align: center;
}
.link-button {
  border: 0;
  background: none;
  color: #999;
  font: 600 11px var(--font);
  display: block;
  margin: 14px auto 0;
  cursor: pointer;
}
.auth-error {
  color: #c74f48;
  font-size: 11px;
  min-height: 18px;
  margin-top: 15px;
}
.auth-note {
  display: block;
  color: #b0b1ad;
  font-size: 10px;
  text-align: center;
  margin-top: 22px;
  line-height: 1.5;
}
.sidebar {
  width: 248px;
  background: #131313;
  color: #b0b0ae;
  padding: 26px 16px 20px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand {
  color: #f7f4ef;
  font: 700 25px var(--brand);
  letter-spacing: -1.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 32px;
}
.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--coral);
  color: #131313;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 10px;
  border: 1px solid #292929;
  border-radius: 12px;
  color: #f0efeb;
  margin-bottom: 30px;
}
.workspace strong,
.workspace small {
  display: block;
}
.workspace strong {
  font-size: 12px;
  font-weight: 600;
}
.workspace small {
  color: #777;
  font-size: 10px;
  margin-top: 3px;
}
.avatar,
.top-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e7b56e;
  color: #372719;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 10px;
}
.chevron {
  margin-left: auto;
  color: #737373;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  border: 0;
  background: none;
  color: #92928f;
  text-align: left;
  border-radius: 10px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 13px var(--font);
  cursor: pointer;
  width: 100%;
  transition: 0.15s;
}
.nav-item:hover {
  background: #222;
  color: #eee;
}
.nav-item.active {
  background: #292929;
  color: #fff;
}
.nav-item b {
  font-size: 10px;
  font-weight: 500;
  margin-left: auto;
  color: #777;
}
.nav-item.active b {
  color: var(--coral);
}
.icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #858582;
  line-height: 1;
  flex: 0 0 18px;
}
.icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.active .icon {
  color: var(--coral);
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid #2a2a2a;
  padding-top: 16px;
}
.sidebar-footer {
  font: 600 10px var(--brand);
  color: #555;
  margin: 20px 12px 0;
}
.sidebar-footer span {
  float: right;
  font-family: var(--font);
  font-weight: 400;
}
.main-content {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  color: #989994;
  font-size: 12px;
}
.breadcrumbs strong {
  color: #41413e;
  font-weight: 600;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 22px;
  color: #777;
  position: relative;
  cursor: pointer;
}
.icon-button i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  position: absolute;
  right: 0;
  top: 3px;
}
.top-avatar {
  background: #efc6bc;
  color: #74453e;
  width: 33px;
  height: 33px;
}
.view {
  padding: 38px 42px 60px;
  max-width: 1440px;
  margin: auto;
}
.view:not(.active-view) {
  display: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 29px;
}
.eyebrow {
  color: #9a9b97;
  letter-spacing: 1.6px;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 8px;
}
.page-heading h1 {
  font: 700 31px var(--brand);
  letter-spacing: -1.4px;
  margin: 0;
}
.page-heading h1 span {
  font-size: 18px;
  color: var(--coral);
  vertical-align: top;
  margin-left: 5px;
}
.subtitle {
  margin: 7px 0 0;
  color: #888984;
  font-size: 13px;
}
.button {
  border: 0;
  border-radius: 9px;
  padding: 0 18px;
  height: 42px;
  font: 600 13px var(--font);
  cursor: pointer;
  transition: 0.15s;
}
.button:hover {
  transform: translateY(-1px);
}
.button-primary {
  background: var(--ink);
  color: #fff;
}
.button-primary span {
  font-size: 18px;
  vertical-align: -1px;
  margin-right: 6px;
}
.button-ghost {
  background: #f1f1ee;
  color: #666;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat-card {
  padding: 19px 20px 18px;
}
.stat-top {
  color: #888984;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card > strong {
  display: block;
  font: 700 29px var(--brand);
  letter-spacing: -1px;
  margin: 17px 0 9px;
}
.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.coral {
  color: var(--coral);
  background: #fff0ed;
}
.yellow {
  color: #ca9638;
  background: #fff8e8;
}
.purple {
  color: var(--purple);
  background: #f0edff;
}
.blue {
  color: var(--blue);
  background: #ebf4fd;
}
.stat-meta {
  font-size: 11px;
  color: #999;
}
.stat-meta span {
  color: #aaa;
  margin-left: 4px;
}
.positive {
  color: var(--green);
}
.neutral {
  color: #aaa;
}
.content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.panel {
  padding: 23px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.panel-heading h2 {
  font: 700 17px var(--brand);
  letter-spacing: -0.5px;
  margin: 0;
}
.panel-heading p {
  color: #a1a29e;
  font-size: 11px;
  margin: 5px 0 0;
}
.text-button,
.more-button {
  border: 0;
  background: none;
  color: var(--coral);
  font: 600 11px var(--font);
  cursor: pointer;
}
.text-button span {
  font-size: 16px;
  margin-left: 4px;
}
.more-button {
  color: #999;
  font-size: 15px;
  letter-spacing: 2px;
}
.recent-list {
  margin-top: 20px;
}
.recent-item {
  display: flex;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f0f0ed;
  gap: 12px;
}
.recent-item:last-child {
  border: 0;
}
.thumb {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 700 15px var(--brand);
  color: #fff;
  background: linear-gradient(145deg, #ae665d, #382c2c);
}
.thumb.t2 {
  background: linear-gradient(145deg, #7563a7, #2a2836);
}
.thumb.t3 {
  background: linear-gradient(145deg, #7f9b8a, #283630);
}
.thumb.t4 {
  background: linear-gradient(145deg, #b6845b, #40312a);
}
.recent-info {
  flex: 1;
  min-width: 0;
}
.recent-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-info small {
  display: block;
  color: #aaa;
  font-size: 11px;
  margin-top: 4px;
}
.recent-duration {
  color: #aaa;
  font-size: 11px;
}
.badge {
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}
.badge.popular {
  color: #c98e30;
  background: #fff7e7;
}
.badge.published {
  color: var(--green);
  background: #eaf6ef;
}
.activity-chart {
  display: flex;
  margin-top: 24px;
  height: 198px;
}
.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #b0b1ad;
  font-size: 9px;
  padding: 0 9px 22px 0;
}
.chart-main {
  flex: 1;
  position: relative;
}
.grid-lines {
  position: absolute;
  inset: 0 0 26px;
  background: repeating-linear-gradient(to bottom, #efefec 0, #efefec 1px, transparent 1px, transparent 25%);
}
.chart-main svg {
  position: absolute;
  inset: 0 0 25px;
  width: 100%;
  height: 165px;
  overflow: visible;
}
.chart-x {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  color: #aaa;
  font-size: 9px;
}
.chart-legend {
  border-top: 1px solid #f0f0ed;
  padding-top: 15px;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #999;
}
.chart-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  margin-right: 6px;
}
.chart-legend strong {
  font: 700 15px var(--brand);
  color: #343432;
}
.chart-legend small {
  font: 600 10px var(--font);
  color: var(--green);
  margin-left: 5px;
}
.table-panel {
  padding: 0;
}
.table-toolbar {
  display: flex;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.search {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  flex: 1;
  max-width: 350px;
  color: #aaa;
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font: 12px var(--font);
  color: var(--ink);
  background: none;
}
.table-toolbar select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0 28px 0 11px;
  color: #666;
  font: 12px var(--font);
  height: 36px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
th {
  text-align: left;
  color: #aaa;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0ed;
  font-size: 12px;
  color: #777;
}
td:first-child {
  color: var(--ink);
  font-weight: 600;
}
.story-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}
.story-cell .thumb {
  width: 36px;
  height: 36px;
  font-size: 12px;
  border-radius: 8px;
}
.story-meta small {
  display: block;
  color: #aaa;
  font-weight: 400;
  margin-top: 3px;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}
.row-actions button {
  border: 0;
  background: none;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
}
.row-actions button:hover {
  color: var(--coral);
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  color: #aaa;
  font-size: 11px;
}
.pagination {
  display: flex;
  gap: 4px;
}
.pagination button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  color: #aaa;
}
.pagination .current {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  padding: 22px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-card h3 {
  font: 700 19px var(--brand);
  margin: 18px 0 0;
}
.category-card p {
  color: #989994;
  font-size: 12px;
  margin: 6px 0 0;
}
.category-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
}
.category-card:nth-child(4n + 1) .category-dot {
  background: #df8c82;
}
.category-card:nth-child(4n + 2) .category-dot {
  background: #8d7ac8;
}
.category-card:nth-child(4n + 3) .category-dot {
  background: #e4b261;
}
.category-card:nth-child(4n) .category-dot {
  background: #73a8d7;
}
.empty-analytics {
  text-align: center;
  padding: 80px 30px;
  max-width: 620px;
  margin: 25px auto;
}
.empty-orb {
  margin: auto;
  width: 55px;
  height: 55px;
  border-radius: 18px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 32px;
  display: grid;
  place-items: center;
}
.empty-analytics h2 {
  font: 700 19px var(--brand);
  margin: 18px 0 7px;
}
.empty-analytics p {
  color: #999;
  line-height: 1.6;
  max-width: 420px;
  margin: auto;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
}
.modal.hidden {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.38);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: min(650px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.modal-head h2 {
  font: 700 24px var(--brand);
  margin: 0;
}
.close-button {
  border: 0;
  background: #f2f2ef;
  border-radius: 8px;
  font-size: 22px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: #777;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid label {
  font-size: 11px;
  color: #747570;
  font-weight: 600;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dedfda;
  border-radius: 8px;
  padding: 10px 11px;
  font: 13px var(--font);
  color: var(--ink);
  background: #fff;
  outline: none;
}
.form-grid textarea {
  resize: vertical;
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px #fff0ee;
}
.wide {
  grid-column: 1/-1;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}
.check-label input {
  width: 16px;
  margin: 0;
  accent-color: var(--coral);
}
.form-actions {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 25px;
  background: #1a1a1a;
  color: #fff;
  padding: 13px 17px;
  border-radius: 9px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 1000px) {
  .sidebar {
    width: 205px;
  }
  .view {
    padding-left: 25px;
    padding-right: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .sidebar {
    width: 62px;
    padding: 18px 8px;
  }
  .brand {
    padding: 0 8px 28px;
  }
  .brand > span:last-child,
  .workspace span:not(.avatar),
  .sidebar .nav-item:not(.active) b,
  .nav-item {
    font-size: 0;
  }
  .workspace {
    padding: 7px;
    border: 0;
    margin-bottom: 18px;
  }
  .workspace .avatar {
    width: 30px;
  }
  .nav-item {
    padding: 12px 10px;
    justify-content: center;
  }
  .nav-item.active {
    font-size: 0;
  }
  .icon {
    font-size: 18px;
  }
  .sidebar-bottom {
    margin-top: auto;
  }
  .sidebar-footer {
    display: none;
  }
  .topbar {
    height: 62px;
    padding: 0 16px;
  }
  .view {
    padding: 25px 16px 40px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 15px;
  }
  .stat-card > strong {
    font-size: 24px;
  }
  .stat-meta span {
    display: none;
  }
  .table-toolbar {
    flex-wrap: wrap;
  }
  .search {
    max-width: none;
    flex-basis: 100%;
  }
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .category-card {
    min-height: 135px;
    padding: 15px;
  }
  .category-card h3 {
    font-size: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .check-label {
    padding-top: 0;
  }
  .modal-card {
    padding: 21px;
  }
  .breadcrumbs {
    font-size: 11px;
  }
}
.audio-box {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf8;
}
.audio-box h3 {
  font: 700 14px var(--brand);
  margin: 0 0 12px;
}
.audio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.audio-grid label {
  font-size: 11px;
  color: #747570;
  font-weight: 600;
}
.audio-grid input,
.audio-grid select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dedfda;
  border-radius: 8px;
  padding: 10px 11px;
  font: 13px var(--font);
  background: #fff;
}
.audio-state {
  color: #888;
  font-size: 11px;
  margin: 12px 0;
}
.audio-box audio {
  display: block;
  width: 100%;
  margin-bottom: 12px;
}
.audio-box .button {
  height: 36px;
}
.activity-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 198px;
  padding: 20px 4px 0;
}
.activity-bars.large {
  height: 280px;
  margin-top: 20px;
}
.activity-bar {
  height: 100%;
  flex: 1;
  min-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.activity-bar strong {
  font: 600 11px var(--font);
  color: #777;
}
.activity-bar span {
  display: block;
  width: 100%;
  max-width: 42px;
  min-height: 8px;
  background: linear-gradient(180deg, var(--coral), #f8b0a9);
  border-radius: 7px 7px 2px 2px;
}
.activity-bar small {
  color: #aaa;
  font-size: 10px;
  white-space: nowrap;
}
.analytics-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.analytics-stats .stat-card > span {
  color: #888984;
  font-size: 12px;
}
.analytics-stats .stat-card > strong {
  margin-top: 12px;
  margin-bottom: 0;
}
.analytics-panel {
  padding: 23px;
}
@media (max-width: 800px) {
  .analytics-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.payment-payer strong,
.payment-payer small {
  display: block;
}
.payment-payer small {
  color: #aaa;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.payment-amount {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.user-modal-card form > label {
  display: block;
  margin-bottom: 15px;
  color: #747570;
  font-size: 11px;
  font-weight: 600;
}
.user-modal-card form > label input {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dedfda;
  border-radius: 8px;
  padding: 10px 11px;
  font: 13px var(--font);
  color: var(--ink);
  outline: none;
}
.category-cover {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
}
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.category-actions button {
  padding: 0;
  text-align: left;
}
.category-image-preview {
  display: block;
  max-width: 100%;
  height: 180px;
  object-fit: contain;
  margin: 16px 0;
  border-radius: 8px;
}
.category-card h3 {
  overflow-wrap: anywhere;
}

.story-cover-thumb {
  object-fit: cover;
  flex-shrink: 0;
}

/* Analytics */
.analytics-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.analytics-controls label,
.chart-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #60615c;
  font-size: 12px;
}
.analytics-controls select,
.chart-select select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  font: 13px var(--font);
  color: var(--ink);
}
.analytics-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.analytics-stats .stat-card > span {
  color: #60615c;
}
.analytics-stats .stat-card > strong {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.analytics-stats .stat-card > small {
  display: block;
  color: #666761;
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.5;
}
.report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.report-section {
  margin-top: 24px;
}
.report-note,
.report-definitions p {
  color: #60615c;
  font-size: 13px;
  line-height: 1.65;
}
.conversion-row {
  margin-top: 20px;
}
.conversion-row > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.conversion-row strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.conversion-row strong small {
  color: #666761;
  margin-left: 8px;
  font-weight: 400;
}
.conversion-row meter {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border: 0;
  background: #f1efed;
  border-radius: 4px;
  overflow: hidden;
}
.conversion-row meter::-webkit-meter-bar {
  background: #f1efed;
  border: 0;
}
.conversion-row meter::-webkit-meter-optimum-value {
  background: var(--coral);
}
.conversion-row meter::-moz-meter-bar {
  background: var(--coral);
}
.conversion-rates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.conversion-rates .stat-card {
  border: 0;
  padding: 0;
}
.conversion-rates .stat-card > span {
  font-size: 12px;
  color: #60615c;
}
.conversion-rates .stat-card > strong {
  font-size: 23px;
  margin: 10px 0;
}
.conversion-rates small {
  color: #60615c;
  font-size: 12px;
}
.revenue-block h3 {
  font-size: 13px;
  margin: 24px 0 12px;
}
.revenue-block dl {
  margin: 0;
}
.revenue-block dl > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.revenue-block dt {
  color: #60615c;
}
.revenue-block dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.report-empty {
  color: #60615c;
  padding: 28px 0;
  font-size: 13px;
}
.report-chart {
  margin-top: 28px;
}
.daily-bars {
  display: flex;
  height: 220px;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}
.daily-column {
  flex: 1;
  min-width: 0;
  position: relative;
  outline-offset: 3px;
}
.daily-track {
  height: 190px;
  display: flex;
  align-items: flex-end;
  background: repeating-linear-gradient(to top, transparent 0, transparent 46px, var(--line) 47px, transparent 48px);
}
.daily-track > span {
  display: block;
  width: 100%;
  background: var(--coral);
  border-radius: 3px 3px 0 0;
}
.daily-column > small {
  display: block;
  color: #60615c;
  font-size: 10px;
  white-space: nowrap;
  padding-top: 8px;
}
.daily-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1;
}
.daily-column:first-child .daily-tooltip {
  left: 0;
  transform: none;
}
.daily-column:last-child .daily-tooltip {
  left: auto;
  right: 0;
  transform: none;
}
.daily-column:hover .daily-tooltip,
.daily-column:focus .daily-tooltip {
  display: block;
}
.daily-data {
  margin-top: 20px;
  font-size: 13px;
  color: #60615c;
}
.daily-data summary,
.report-definitions summary {
  cursor: pointer;
  width: fit-content;
}
.report-table {
  min-width: 0;
}
.report-table th {
  letter-spacing: 0;
  font-size: 12px;
  color: #60615c;
  text-transform: none;
}
.report-table td {
  color: #41413e;
  font-variant-numeric: tabular-nums;
}
.report-table td small {
  display: block;
  color: #60615c;
  font-weight: 400;
  margin-top: 5px;
}
.report-table td:not(:first-child),
.report-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}
.report-table-heading {
  padding: 23px 23px 10px;
}
.report-table-heading h2,
.report-heading {
  font: 700 17px var(--brand);
  margin: 0 0 8px;
}
.report-table-heading p {
  color: #60615c;
  font-size: 12px;
  margin: 0;
}
.report-heading {
  margin-bottom: 16px;
}
.report-definitions {
  margin-top: 24px;
  font-size: 13px;
  color: #41413e;
}
.report-error {
  background: #fff0ee;
  color: #a33830;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.6;
}
#analytics-report[aria-busy="true"] {
  opacity: 0.5;
  pointer-events: none;
}
#analytics-view :focus-visible {
  outline: 2px solid #b84037;
  outline-offset: 3px;
}
#analytics-view button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
@media (max-width: 1100px) {
  .report-columns {
    grid-template-columns: 1fr;
  }
  .analytics-controls {
    width: 100%;
  }
  #analytics-view .page-heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-controls .button {
    padding: 0 10px;
    font-size: 12px;
  }
  .report-columns .panel {
    padding: 18px;
  }
  .report-columns .table-panel {
    padding: 0;
  }
  .conversion-rates {
    grid-template-columns: 1fr;
  }
  .conversion-rates .stat-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .conversion-rates .stat-card > strong {
    margin: 0;
  }
  .report-table td,
  .report-table th {
    padding: 12px 10px;
  }
  .daily-column > small {
    font-size: 9px;
  }
  .chart-select {
    max-width: 160px;
  }
  .daily-tooltip {
    white-space: normal;
    min-width: 110px;
  }
  .report-definitions {
    padding: 18px;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.script-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.script-toolbar span {
  color: #888;
  font-size: 11px;
}
.script-editor {
  margin-top: 14px;
}
.speaker-voices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.speaker-voices label,
.script-segment label {
  display: grid;
  gap: 6px;
  color: #747570;
  font-size: 11px;
  font-weight: 600;
}
.speaker-voices input,
.speaker-voices select,
.script-segment input,
.script-segment textarea {
  width: 100%;
  border: 1px solid #dedfda;
  border-radius: 7px;
  padding: 9px 10px;
  font: 12px var(--font);
  color: var(--ink);
  background: #fff;
}
.script-segments {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.script-segment {
  display: grid;
  grid-template-columns: 150px 1fr 28px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.script-segment textarea {
  resize: vertical;
}
.script-remove {
  border: 0;
  background: #f1f1ee;
  color: #888;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.script-remove:hover {
  color: var(--coral);
}
.settings-groups {
  display: grid;
  gap: 14px;
}
.settings-group {
  padding: 22px 24px;
  border-radius: 8px;
}
.settings-group h2 {
  font: 600 16px var(--brand);
  margin: 0 0 18px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.settings-grid label {
  display: grid;
  gap: 7px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}
.settings-grid input,
.settings-grid select {
  width: 100%;
  min-width: 0;
  border: 1px solid #dedfda;
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: 13px var(--font);
}
.settings-grid input:focus,
.settings-grid select:focus {
  outline: 2px solid #f9776e55;
  border-color: var(--coral);
}
.settings-grid small,
.settings-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.settings-note {
  margin: 14px 2px;
}
@media (max-width: 680px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-group {
    padding: 18px;
  }
}

#audio-voice-control {
  display: block;
  min-width: 0;
}
.audio-grid > label,
.speaker-voices > label {
  min-width: 0;
}
.speaker-voices select {
  max-width: 100%;
}

/* Доступность и состояния */
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}
.sidebar :focus-visible {
  outline-offset: -2px;
}
h1:focus,
h1:focus-visible {
  outline: none;
}
.table-footer .button {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
}
.load-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 12px;
  color: #c74f48;
  font-size: 13px;
}
.load-error .button {
  height: 34px;
  padding: 0 14px;
  flex-shrink: 0;
}
.button-danger {
  background: #c74f48;
  color: #fff;
}
.confirm-text {
  margin: 0 0 24px;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.confirm-text strong {
  color: var(--ink);
}
.ticket-message {
  white-space: pre-wrap;
  max-width: 420px;
}
.ticket-reply-text {
  white-space: pre-wrap;
}
.support-reply {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.support-reply textarea {
  flex: 1;
  font: inherit;
  padding: 8px;
}
