:root {
  --ink: #172126;
  --muted: #64727a;
  --line: #d8e1e5;
  --paper: #f7faf9;
  --panel: #ffffff;
  --green: #0d7c66;
  --green-dark: #075d4d;
  --coral: #f36b4f;
  --gold: #f5bd4f;
  --blue: #2f6df6;
  --shadow: 0 20px 50px rgba(23, 33, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

main,
section,
header,
form,
aside,
article,
div {
  max-width: 100%;
}

img,
video,
iframe,
audio {
  max-width: 100%;
}

button,
textarea,
select,
input {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(247, 250, 249, 0.9);
  border-bottom: 1px solid rgba(216, 225, 229, 0.8);
  backdrop-filter: blur(16px);
}

.topbar > * {
  min-width: 0;
}

.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  min-width: 0;
  flex: 0 1 220px;
}

.brand-logo {
  display: block;
  width: min(220px, 48vw);
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-size: 14px;
}

.brand-mark.large {
  width: 68px;
  height: 68px;
  font-size: 22px;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.is-hidden {
  display: none !important;
}

.user-badge {
  min-width: 0;
  max-width: 240px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghost-button,
.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 36px;
  min-height: calc(100vh - 71px);
  align-items: center;
  padding: 46px clamp(18px, 5vw, 64px);
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 189, 79, 0.28), transparent 26%),
    linear-gradient(135deg, #102729 0%, #164e48 52%, #f7faf9 52%, #eef5f2 100%);
}

.auth-hero {
  max-width: 660px;
  color: white;
}

.auth-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.auth-hero p:last-child {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.6;
}

.auth-card {
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.auth-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  font-weight: 800;
}

.auth-tab.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 33, 38, 0.08);
}

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

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-message,
.admin-message {
  margin: 14px 0 0;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.app-shell.is-locked {
  display: none;
}

.auth-screen.is-hidden {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 42px;
  min-height: 520px;
  align-items: center;
  padding: 58px clamp(18px, 5vw, 64px) 34px;
  color: white;
  background:
    radial-gradient(circle at 82% 15%, rgba(245, 189, 79, 0.5), transparent 25%),
    linear-gradient(135deg, #102729 0%, #164e48 48%, #19252f 100%);
}

.hero-copy {
  max-width: 760px;
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.6;
}

.studio-visual {
  position: relative;
  min-height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mic {
  position: absolute;
  left: 50%;
  top: 35px;
  width: 104px;
  height: 150px;
  transform: translateX(-50%);
  border-radius: 52px;
  background: #f7faf9;
  border: 12px solid #172126;
}

.mic span {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 22px;
  bottom: 22px;
  border-radius: 24px;
  background: repeating-linear-gradient(
    to bottom,
    #172126,
    #172126 8px,
    #f7faf9 8px,
    #f7faf9 16px
  );
}

.meter {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 92px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 10px;
  height: 98px;
}

.meter i {
  display: block;
  height: 42px;
  border-radius: 8px 8px 0 0;
  background: white;
  animation: pulse 1.4s ease-in-out infinite;
}

.meter i:nth-child(2) { height: 70px; animation-delay: 0.12s; background: var(--gold); }
.meter i:nth-child(3) { height: 50px; animation-delay: 0.22s; background: var(--coral); }
.meter i:nth-child(4) { height: 98px; animation-delay: 0.32s; background: #ffffff; }
.meter i:nth-child(5) { height: 62px; animation-delay: 0.42s; background: var(--blue); }
.meter i:nth-child(6) { height: 88px; animation-delay: 0.52s; background: var(--gold); }
.meter i:nth-child(7) { height: 45px; animation-delay: 0.62s; background: #ffffff; }
.meter i:nth-child(8) { height: 76px; animation-delay: 0.72s; background: var(--coral); }

.knobs {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
}

.knobs span {
  width: 44px;
  height: 44px;
  border: 8px solid #172126;
  border-radius: 50%;
  background: #f7faf9;
}

@keyframes pulse {
  0%, 100% { transform: scaleY(0.72); opacity: 0.76; }
  50% { transform: scaleY(1); opacity: 1; }
}

.workspace,
.history-section,
.tutorials-section {
  padding: 54px clamp(18px, 5vw, 64px);
}

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

.workspace > *,
.credits-section > *,
.history-section > *,
.tutorials-section > *,
.admin-section > * {
  min-width: 0;
}

.credits-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 0 clamp(18px, 5vw, 64px) 54px;
}

.credits-copy h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.credits-copy p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.credits-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid #b9e2cd;
  border-radius: 8px;
  background: #effaf4;
}

.credit-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(13, 124, 102, 0.16);
  border-radius: 8px;
  background: white;
}

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

.credit-stat strong {
  color: var(--green-dark);
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.credit-bar {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #dbe8e5;
}

.credit-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.25s ease, background 0.25s ease;
}

.credits-section.is-low .credits-panel {
  border-color: #f5d391;
  background: #fff8e8;
}

.credits-section.is-low .credit-bar span {
  background: var(--gold);
}

.credits-section.is-critical .credits-panel {
  border-color: #ffc5b8;
  background: #fff1ee;
}

.credits-section.is-critical .credit-stat strong,
.credits-section.is-critical .credits-copy p:last-child {
  color: #9b2d1a;
}

.credits-section.is-critical .credit-bar span {
  background: var(--coral);
}

.creator,
.preview,
.history-item,
.tutorial-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(23, 33, 38, 0.06);
}

.creator,
.preview {
  padding: 28px;
}

.section-title h2,
.history-section h2,
.tutorials-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--ink);
  padding: 14px;
  min-width: 0;
}

textarea {
  min-height: 176px;
  resize: vertical;
  line-height: 1.5;
}

.character-counter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.character-counter.is-warning {
  color: #b85b00;
}

textarea:focus,
select:focus,
input:focus {
  outline: 3px solid rgba(13, 124, 102, 0.16);
  border-color: var(--green);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.primary-button {
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--green);
  padding: 15px 18px;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--green-dark);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
}

.script-output {
  min-height: 170px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.player {
  display: grid;
  grid-template-columns: 48px 1fr 42px;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.play-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--coral);
}

.track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e7eef0;
}

.track-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.2s ease;
}

.audio-preview {
  display: none;
  width: 100%;
  margin-top: 18px;
}

.audio-preview.is-ready {
  display: block;
}

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

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

.track-preview {
  margin-top: 14px;
}

.audio-editor {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.audio-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.field.compact {
  margin-top: 0;
  gap: 7px;
}

.field.compact input {
  padding: 11px 12px;
}

.timeline-stats {
  display: grid;
  justify-items: end;
  gap: 5px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-stats strong {
  color: var(--green-dark);
  font-size: 15px;
}

.waveform-shell {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.waveform-shell canvas {
  display: block;
  width: 100%;
  height: 120px;
}

.needle-range {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  width: calc(100% - 20px);
  height: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.needle-range:focus {
  outline: none;
}

.needle-range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.needle-range::-webkit-slider-thumb {
  width: 4px;
  height: 108px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(243, 107, 79, 0.16);
}

.needle-range::-moz-range-track {
  height: 100%;
  background: transparent;
}

.needle-range::-moz-range-thumb {
  width: 4px;
  height: 108px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(243, 107, 79, 0.16);
}

.voice-needle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.voice-needle-row input[type="range"] {
  accent-color: var(--coral);
}

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

.history-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  background: #eef5f2;
}

.history-heading > p:not(.section-label) {
  max-width: 360px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.history-heading .tiny-button {
  margin-top: 18px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.history-item > * {
  min-width: 0;
}

.history-item span {
  color: var(--muted);
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tutorials-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.plan-badge {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  line-height: 1.5;
}

.plan-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.billing-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid #b9e2cd;
  border-radius: 8px;
  background: #effaf4;
  color: var(--green-dark);
}

.billing-summary span,
.billing-summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.billing-summary strong {
  grid-row: span 2;
  align-self: center;
  font-size: 22px;
  color: var(--green-dark);
}

.topbar .billing-summary {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 10px;
  margin-top: 0;
  margin-left: auto;
  padding: 8px 12px;
  border-color: var(--line);
  background: white;
}

.topbar .billing-summary span {
  font-size: 12px;
  white-space: nowrap;
}

.topbar .billing-summary strong {
  grid-row: auto;
  font-size: 13px;
  white-space: nowrap;
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.tutorial-card {
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.tutorial-card,
.tutorial-card * {
  min-width: 0;
}

.tutorial-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #0d1b1f;
}

.tutorial-card strong {
  display: block;
  line-height: 1.35;
}

.tutorial-card.is-empty {
  min-height: 190px;
  align-content: center;
  background: #fbfdfd;
  color: var(--muted);
}

.tutorial-card.is-empty strong {
  color: var(--ink);
}

.admin-section {
  padding: 54px clamp(18px, 5vw, 64px);
  background: #f7faf9;
}

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

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

.admin-heading h2 {
  margin: 0;
  font-size: 28px;
}

.admin-add {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 0.6fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-add .field,
.admin-add .primary-button,
.admin-add .secondary-button {
  margin-top: 0;
}

.admin-api {
  width: min(100%, 640px);
  margin: 28px 0 0 auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.superadmin-panel {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #b8d5c9;
  border-radius: 10px;
  background: linear-gradient(145deg, #f3fbf7, #ffffff);
  box-shadow: 0 18px 40px rgba(20, 82, 61, 0.08);
}

.superadmin-intro {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.superadmin-system {
  margin-top: 20px;
}

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

.system-grid > span {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.system-grid small {
  color: var(--muted);
}

.system-grid strong {
  overflow-wrap: anywhere;
}

.backup-list {
  margin-top: 14px;
  color: var(--muted);
}

.backup-list summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--green-dark);
}

.backup-list ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.update-package-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 20px;
}

.update-package-form .field,
.update-package-form .primary-button {
  margin-top: 0;
}

.admin-api-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.api-key-field {
  grid-row: auto;
}

.api-key-field small {
  color: var(--muted);
  font-size: 12px;
}

.admin-api-wide {
  grid-column: span 2;
}

.admin-api-grid textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: white;
}

.api-format-hints {
  grid-column: auto;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.api-format-hints span {
  font-weight: 900;
  color: var(--ink);
}

.api-format-hints small {
  color: var(--muted);
  font-weight: 700;
}

.admin-heading.compact {
  align-items: center;
}

.admin-heading.compact h2 {
  font-size: 24px;
}

.admin-tutorials {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tutorial-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.tutorial-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.user-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(90px, 0.32fr) minmax(110px, 0.42fr) minmax(0, 0.9fr) minmax(220px, auto);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.05);
}

.user-row > * {
  min-width: 0;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row small {
  color: var(--muted);
  font-weight: 700;
}

.password-cell {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.password-cell strong {
  color: var(--green-dark);
  font-size: 18px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.status-pill {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5f2;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.pending {
  background: #fff6df;
  color: #8a5a00;
}

.status-pill.blocked {
  background: #ffe9e4;
  color: #9b2d1a;
}

.client-settings {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.client-settings input[type="number"] {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.mini-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--ink);
  font-weight: 800;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.tiny-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.tiny-button.danger {
  border-color: #ffd1c8;
  color: #9b2d1a;
  background: #fff2ef;
}

.tiny-button.primary-action {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

@media (max-width: 1180px) {
  .user-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  }

  .password-cell,
  .status-pill,
  .client-settings,
  .user-actions {
    grid-column: 1 / -1;
  }

  .user-actions {
    justify-content: flex-start;
  }

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

  .admin-add .primary-button,
  .admin-add .secondary-button {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .credits-section,
  .history-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .studio-visual {
    min-height: 280px;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar .billing-summary {
    grid-template-columns: auto auto;
    margin-left: 0;
    order: 3;
  }

  .hero,
  .auth-screen,
  .workspace,
  .credits-section,
  .history-section,
  .audio-editor-head,
  .mix-grid,
  .tutorials-grid,
  .tutorial-editor-grid,
  .admin-api-grid,
  .admin-add,
  .user-row {
    grid-template-columns: 1fr;
  }

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

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

  .hero {
    min-height: auto;
  }

  .auth-screen {
    background: linear-gradient(180deg, #102729 0%, #164e48 48%, #eef5f2 48%, #eef5f2 100%);
  }

  .admin-heading {
    align-items: start;
    flex-direction: column;
  }

  .tutorials-heading {
    align-items: start;
    flex-direction: column;
  }

  .plan-summary {
    align-items: start;
    flex-direction: column;
  }

  .billing-summary {
    grid-template-columns: 1fr;
  }

  .billing-summary strong {
    grid-row: auto;
  }

  .credits-section {
    padding-bottom: 42px;
  }

  .credits-panel {
    grid-template-columns: 1fr;
  }

  .admin-heading-actions {
    justify-content: flex-start;
  }

  .admin-api-wide,
  .api-format-hints {
    grid-column: auto;
  }

  .client-settings {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .topbar .brand {
    grid-column: 1;
  }

  .topbar .ghost-button {
    grid-column: 2;
    width: auto;
    padding-inline: 12px;
  }

  .user-badge,
  .topbar .billing-summary {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    border-radius: 8px;
  }

  .topbar .billing-summary {
    grid-template-columns: auto 1fr;
  }

  .grid-two,
  .export-actions,
  .preview-actions,
  .audio-editor-head,
  .mix-grid,
  .auth-options {
    grid-template-columns: 1fr;
  }

  .timeline-stats {
    justify-items: start;
  }

  .auth-options {
    display: grid;
    align-items: start;
  }

  .history-item {
    display: grid;
  }

  .history-actions {
    justify-content: flex-start;
  }

  .creator,
  .preview,
  .auth-card {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .topbar,
  .hero,
  .auth-screen,
  .workspace,
  .credits-section,
  .history-section,
  .tutorials-section,
  .admin-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1,
  .auth-hero h1 {
    font-size: 40px;
  }

  .section-title h2,
  .history-section h2,
  .tutorials-heading h2,
  .credits-copy h2,
  .admin-heading h2 {
    font-size: 24px;
  }

  .creator,
  .preview,
  .auth-card,
  .admin-add,
  .admin-api,
  .admin-tutorials,
  .superadmin-panel,
  .credits-panel {
    padding: 16px;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: 44px 1fr 38px;
    gap: 10px;
  }

  .play-button {
    width: 44px;
    height: 44px;
  }
}
