:root {
  color-scheme: dark;
  --bg: #050814;
  --bg-2: #0d1730;
  --panel: rgba(12, 18, 35, 0.76);
  --panel-strong: rgba(16, 24, 46, 0.96);
  --text: #f7f9ff;
  --muted: #a2b0cb;
  --accent: #7388ff;
  --accent-2: #8b6cff;
  --accent-3: #28c7c1;
  --success: #4ade80;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 70px rgba(2, 6, 18, 0.5);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(115, 136, 255, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(139, 108, 255, 0.12), transparent 26%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  width: 280px;
  height: 280px;
  background: #5b7cff;
  top: -80px;
  left: -80px;
}

.orb-two {
  width: 320px;
  height: 320px;
  background: #9b5cff;
  right: -120px;
  top: 180px;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.topbar > .brand:first-child {
  grid-column: 2;
  justify-self: center;
  width: min(420px, 68vw);
  aspect-ratio: 2.25 / 1;
  background: url('logos/Logoandname.png') center/contain no-repeat;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

.topbar > .brand:first-child > span {
  display: none;
}

.topbar > .brand:first-child .brand-mark {
  display: none;
}

.account-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.workspace-spotlight-copy {
  position: relative;
}

.brand-center {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(420px, 68vw);
  text-decoration: none;
}

.brand-center .brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
}

.brand-spacer {
  display: none;
}

.topbar > .brand:not(.brand-center) {
  display: none;
}

.topbar > .brand:first-child {
  background: none;
  text-indent: 0;
  overflow: visible;
  white-space: normal;
}

.topbar > .brand:first-child > span {
  display: initial;
}

.topbar > .brand:first-child .brand-mark {
  display: initial;
}

.workspace-spotlight-copy::before {
  content: none;
}

.nav-links {
  display: flex;
  gap: 18px;
}

.account-name { color: var(--muted); font-weight: 700; }
.text-button { background: transparent; color: #d6ddff; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.auth-card { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; align-items: start; padding: 24px; margin: 14px 0 26px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(180deg, rgba(16, 24, 48, 0.9), rgba(10, 16, 32, 0.82)); box-shadow: var(--shadow); backdrop-filter: blur(22px); overflow: hidden; }
.auth-overview { display: grid; align-content: start; gap: 12px; }
.auth-card h2 { margin-bottom: 4px; }
.auth-card p:not(.eyebrow) { color: var(--muted); }
.benefit-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.benefit-list li { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); }
.benefit-list li::before { content: '✓'; color: var(--accent-3); font-weight: 800; margin-top: 1px; }
.auth-form { display: grid; gap: 10px; }
.auth-panel { margin-top: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,0.04); }
.auth-overview .auth-note { margin: 2px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.95rem; }
.auth-highlights { display: grid; gap: 8px; margin-top: 4px; }
.auth-highlights div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.auth-highlights strong { display: block; margin-bottom: 4px; }
.auth-highlights span { color: var(--muted); line-height: 1.55; }
.auth-panel h3 { margin-bottom: 8px; }
.auth-panel p { margin-bottom: 10px; line-height: 1.65; }
.auth-panel-list { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.auth-form-copy { margin-top: 2px; line-height: 1.65; }
.form-message { min-height: 1.3em; margin: 0; color: #fda4af !important; }
.workspace-spotlight { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px; margin-bottom: 18px; border-radius: 24px; }
.workspace-spotlight-copy { max-width: 640px; }
.workspace-spotlight-points { display: grid; gap: 10px; min-width: 220px; }
.workspace-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); }
.workspace-step strong { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 800; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 24px 0 28px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(106, 124, 255, 0.12);
  color: #cbd5ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 4.1vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-text {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 620px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-stats > div {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  min-width: 110px;
}

.hero-stats strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}


.hero-preview-card,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-preview-card {
  padding: 18px;
  border-radius: 24px;
}

.preview-window {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.16);
}

.preview-topbar {
  display: flex;
  gap: 7px;
  padding-bottom: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.65);
}

.preview-body {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(6, 13, 26, 0.8);
}

.preview-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
}

.preview-content h3 {
  margin-bottom: 6px;
}

.preview-content p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.chip-row,
.platform-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.platform-pill {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: #e8edff;
}

.platform-chip-row {
  margin-top: 12px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.feature-card {
  padding: 18px 18px 20px;
  border-radius: 18px;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: start;
}

.card {
  padding: 24px;
  border-radius: 24px;
}

.composer {
  grid-row: span 2;
}

.queue {
  grid-column: 1 / -1;
}

.card-heading {
  margin-bottom: 18px;
}

.card-heading p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.65;
}

.composer-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.composer-steps span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #dfe7ff;
  font-weight: 700;
}

.composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(115, 136, 255, 0.75);
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(115, 136, 255, 0.12);
  background: rgba(255,255,255,0.06);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.input-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.media-field {
  margin-top: 16px;
}

.media-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.media-preview-frame {
  min-height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(3, 8, 20, 0.72);
  display: grid;
  place-items: center;
}

.media-preview-frame img,
.media-preview-frame video {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  display: block;
}

.media-preview-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.schedule-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.schedule-tools {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.checklist {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.checklist h3 {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.checklist ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.checklist li {
  color: var(--muted);
}

.checklist li.done {
  color: #cce3ff;
}

.switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 10px 24px rgba(102, 123, 255, 0.22);
}

button.secondary {
  background: rgba(255,255,255,0.055);
  color: var(--text);
}

button:active {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.workspace-tab:focus-visible,
.nav-links a:focus-visible,
.text-button:focus-visible {
  outline: 2px solid rgba(115, 136, 255, 0.85);
  outline-offset: 2px;
}

.platform-list {
  display: grid;
  gap: 10px;
}

.platform-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.platform-card.active {
  border-color: rgba(122, 143, 255, 0.8);
  background: linear-gradient(135deg, rgba(106, 124, 255, 0.16), rgba(143, 92, 255, 0.1));
}

.platform-meta strong {
  display: block;
  margin-bottom: 4px;
}

.platform-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary {
  margin-top: 18px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.03));
}

.queue-item strong {
  display: block;
  margin-bottom: 6px;
}

.queue-item p {
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.queue-item .status {
  color: var(--success);
  font-weight: 700;
  display: inline-block;
}

.status.status-failed,
.status.status-cancelled {
  color: #fda4af;
}

.status.status-processing {
  color: #facc15;
}

.status.status-queued,
.status.status-scheduled {
  color: #93c5fd;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 900px) {
  .hero,
  .dashboard,
  .feature-strip,
  .auth-card {
    grid-template-columns: 1fr;
  }

  .hero,
  .workspace-spotlight {
    gap: 16px;
  }

  .workspace-spotlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card {
    align-items: start;
  }

  .composer {
    grid-row: auto;
  }

  .queue {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px 14px 36px;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .topbar > .brand:first-child {
    grid-column: auto;
    justify-self: center;
    width: min(320px, 84vw);
  }

  .account-actions {
    grid-column: auto;
    justify-self: center;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .composer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card { grid-template-columns: 1fr; gap: 16px; }
    .auth-overview { padding: 2px 0; }
  .auth-panel { padding: 14px; }
}

.admin-panel { grid-column: 1 / -1; }
.admin-users { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-table select { width: auto; min-width: 105px; padding: 8px; border-radius: 9px; }
.workspace-nav { display: flex; gap: 8px; margin: 10px 0 22px; padding: 7px; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,0.04); }
.workspace-tab { flex: 1 0 auto; padding: 10px 14px; border-radius: 11px; background: transparent; color: var(--muted); box-shadow: none; }
.workspace-tab:hover { background: rgba(255,255,255,0.06); transform: none; }
.workspace-tab.active { color: var(--text); background: linear-gradient(135deg, rgba(115,136,255,0.34), rgba(139,108,255,0.3)); }
.dashboard.view-queue [data-view-panel]:not([data-view-panel="queue"]),
.dashboard.view-settings [data-view-panel]:not([data-view-panel="settings"]),
.dashboard.view-admin [data-view-panel]:not([data-view-panel="admin"]) { display: none; }
.authenticated #workspaceHero, .authenticated #features { display: none; }
.authenticated .app-shell { padding-top: 18px; }
.settings-panel { grid-column: 1 / -1; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settings-form { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,0.03); }
.settings-form h3, .settings-form p { margin: 0; }
.settings-form p { color: var(--muted); line-height: 1.5; }
.danger-zone { border-color: rgba(248, 113, 113, 0.45); }
.danger-button { background: #b91c1c; color: white; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.queue-actions button { padding: 8px 12px; font-size: 0.82rem; }

.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px 4px 0; margin-top: 6px; color: var(--muted); font-size: 0.88rem; border-top: 1px solid rgba(255,255,255,0.08); }
.site-footer div { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: #cbd5ff; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.legal-page { max-width: 900px; margin: 0 auto; padding: 30px 22px 56px; }
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 38px; }
.legal-header a { color: var(--text); text-decoration: none; font-weight: 800; }
.legal-content { padding: clamp(22px, 5vw, 50px); border: 1px solid var(--border); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.legal-content h1 { margin-bottom: 8px; }
.legal-content h2 { margin: 34px 0 10px; font-size: 1.3rem; }
.legal-content p, .legal-content li { color: var(--muted); line-height: 1.75; }
.legal-content ul { padding-left: 22px; }
.legal-content a { color: #cbd5ff; }
.legal-notice { padding: 14px 16px; border-left: 3px solid var(--accent-3); border-radius: 10px; background: rgba(38, 208, 206, 0.08); }
.legal-meta { color: var(--muted); margin-bottom: 28px; }
