:root {
  --workspace: #fff2ef;
  --workspace-2: #f6eef4;
  --sidebar: #070b35;
  --sidebar-2: #171d62;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --ink: #101622;
  --muted: #667487;
  --line: rgba(74, 86, 104, 0.18);
  --blue: #070b35;
  --cyan: #ff7134;
  --coral: #ff284a;
  --peach: #fff0ef;
  --green: #16a36a;
  --amber: #d98610;
  --danger: #c0392b;
  --shadow: 0 24px 54px rgba(7, 11, 53, 0.13);
  --shadow-hard: 0 18px 0 rgba(255, 40, 74, 0.10), 0 38px 84px rgba(7, 11, 53, 0.22);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.dark-theme {
  --workspace: #0b1220;
  --workspace-2: #131e2f;
  --sidebar: #060b13;
  --sidebar-2: #111827;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: #111827;
  --ink: #edf4ff;
  --muted: #9aa8ba;
  --line: rgba(223, 232, 244, 0.14);
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
  --shadow-hard: 0 18px 0 rgba(0, 0, 0, 0.18), 0 38px 84px rgba(0, 0, 0, 0.42);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 40, 74, 0.14), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(255, 113, 52, 0.18), transparent 30%),
    linear-gradient(180deg, var(--workspace), var(--workspace-2));
  color: var(--ink);
}

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

button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff7657, var(--coral));
  box-shadow: 0 10px 22px rgba(255, 40, 74, 0.26), var(--inset);
  color: #fff;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

button:hover {
  filter: saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(255, 40, 74, 0.32), var(--inset);
}

button:active {
  transform: translateY(1px);
}

button.ghost,
button.secondary {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #fff0ef);
  color: var(--ink);
  box-shadow: 0 9px 18px rgba(7, 11, 53, 0.08), var(--inset);
}

button.danger {
  background: linear-gradient(180deg, #e65a49, var(--danger));
  box-shadow: 0 10px 22px rgba(192, 57, 43, 0.24), var(--inset);
}

button.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--coral);
  text-align: left;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 12px 13px;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(255, 113, 52, 0.24);
  border-color: rgba(255, 40, 74, 0.42);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
  background: rgba(8, 13, 23, 0.78);
  color: var(--ink);
}

body.dark-theme input[type="color"] {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-theme button.ghost,
body.dark-theme button.secondary {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  color: var(--ink);
}

body.dark-theme .workspace-header,
body.dark-theme .auth-card,
body.dark-theme .item,
body.dark-theme .legal-card,
body.dark-theme .tour-card,
body.dark-theme .legal-document {
  background: rgba(17, 24, 39, 0.82);
  border-color: rgba(255, 255, 255, 0.10);
}

body.dark-theme .badge,
body.dark-theme .pill {
  background: rgba(255, 113, 52, 0.16);
  color: #ffd0bd;
}

body.dark-theme .pill.ok,
body.dark-theme .badge.ok {
  background: rgba(22, 163, 106, 0.16);
  color: #78e3b4;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

label:has(input[type="checkbox"]) {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
}

label input[type="checkbox"] {
  width: 17px;
  height: 17px;
}

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

h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 23px;
  letter-spacing: 0;
}

h3 {
  font-size: 16px;
}

.hidden {
  display: none !important;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(160deg, #ff2045 0%, #ff3f42 45%, #ff7a2f 100%);
}

.auth-card {
  position: relative;
  width: min(540px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 250, 248, 0.90);
  box-shadow: var(--shadow-hard);
  padding: 36px;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--coral), var(--cyan), #ffd36d);
}

.auth-brand {
  margin-bottom: 38px;
}

.auth-links {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}

.auth-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.auth-choice-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(255, 40, 74, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 238, 232, 0.90)),
    #fff;
  color: var(--ink);
  box-shadow: 0 18px 36px rgba(15, 54, 89, 0.13), var(--inset);
  padding: 22px;
}

.auth-choice-card strong {
  font-size: 24px;
  letter-spacing: 0;
}

.auth-choice-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(15, 54, 89, 0.18), var(--inset);
}

.google-button {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 9px 18px rgba(15, 23, 42, 0.08), var(--inset);
  font-weight: 850;
  text-decoration: none;
}

.google-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

body.admin-portal .google-button,
body.admin-portal #showSignup {
  display: none;
}

body.admin-portal .auth-links {
  justify-content: center;
}

.subtle-link {
  width: max-content;
  align-self: center;
  border: 0;
  border-bottom: 1px solid #aab4c2;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 750;
}

.subtle-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  transform: none;
  box-shadow: none;
}

.token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.token-row code {
  display: block;
  min-height: 42px;
  border-radius: 8px;
  background: #111827;
  color: #e5f2ff;
  padding: 12px;
  overflow-wrap: anywhere;
}

.pin-box {
  width: max-content;
  border-radius: 8px;
  background: #111827;
  color: #e5f2ff;
  padding: 18px 22px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.pin-inline {
  border-radius: 8px;
  background: #111827;
  color: #e5f2ff;
  padding: 8px 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.org-settings-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.org-logo-box {
  width: 150px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
}

.org-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.admin-org-card form {
  gap: 14px;
}

.admin-dashboard-grid {
  margin-top: 18px;
}

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

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

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

.hint,
.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.local-link {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6f2;
  padding: 12px;
  overflow-wrap: anywhere;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(circle at 30% 8%, rgba(255, 113, 52, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(255, 40, 74, 0.18), transparent 34%),
    linear-gradient(155deg, var(--sidebar), var(--sidebar-2));
  color: #fff;
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.24);
}

.brand-lockup {
  display: flex;
  align-items: center;
  margin: 28px 24px 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 240, 239, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  padding: 16px;
}

.brand-logo {
  display: block;
  width: min(210px, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.22));
}

.auth-brand {
  justify-content: center;
  margin: 0 0 38px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 18px;
}

.auth-brand .brand-logo {
  width: 230px;
  max-width: 62vw;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 34px 24px 30px;
}

.nav-item {
  justify-self: stretch;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 113, 52, 0.24), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 24px rgba(0, 0, 0, 0.18);
  color: #fff;
  filter: none;
}

.workspace {
  min-width: 0;
  padding: 36px;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 113, 52, 0.30), transparent 34%),
    linear-gradient(135deg, #070b35, #171d62 60%, #ff284a 140%);
  box-shadow: 0 24px 60px rgba(7, 11, 53, 0.18), var(--inset);
  backdrop-filter: blur(18px);
  color: #fff;
}

.workspace-header .eyebrow,
.workspace-header .meta,
.workspace-header p {
  color: rgba(255, 255, 255, 0.74);
}

.workspace-header button.ghost,
.workspace-header button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 24px rgba(0, 0, 0, 0.12);
}

body.dark-theme .workspace-header {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 113, 52, 0.24), transparent 34%),
    linear-gradient(135deg, #060b13, #171d62 68%, #ff284a 155%);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  color: var(--coral);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(255, 40, 74, 0.12);
  border-radius: 999px;
  background: #fff0ef;
  color: #9f2634;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.ok,
.pill.ok {
  border-color: rgba(22, 163, 106, 0.22);
  background: #e7f8f0;
  color: var(--green);
}

.badge.warn,
.pill.warn {
  border-color: rgba(217, 134, 16, 0.22);
  background: #fff5df;
  color: var(--amber);
}

.page {
  display: none;
}

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

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

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

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

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--inset);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.panel:not(.setup-card)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--cyan));
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.40), transparent 38%);
}

.stat {
  min-height: 142px;
  display: grid;
  gap: 8px;
  align-content: space-between;
  overflow: hidden;
}

.stat strong {
  font-size: 36px;
  line-height: 1;
}

.stat::before {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -36px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 24px solid rgba(255, 113, 52, 0.18);
}

.stack {
  display: grid;
  gap: 13px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.06), var(--inset);
  padding: 15px;
}

.item.active {
  border-color: rgba(255, 40, 74, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 40, 74, 0.12), 0 16px 30px rgba(255, 40, 74, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(420px, 1fr);
  gap: 18px;
  align-items: start;
}

.studio-controls {
  display: grid;
  gap: 10px;
}

.studio-topbar {
  padding: 18px;
}

.template-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.template-chip {
  flex: 0 0 auto;
  min-height: 38px;
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #fff0ef);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08), var(--inset);
}

.template-chip.active {
  border-color: rgba(255, 113, 52, 0.50);
  background: linear-gradient(180deg, #ff8a5c, #ff284a);
  color: #fff;
}

.compact-studio {
  gap: 10px;
  padding: 16px;
}

.studio-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  padding: 13px;
}

body.dark-theme .studio-section {
  background: rgba(255, 255, 255, 0.05);
}

.studio-section h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

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

.upload-tile {
  min-height: 116px;
  display: grid;
  gap: 8px;
  align-content: center;
  border: 1px dashed rgba(255, 40, 74, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 40, 74, 0.08), rgba(255, 113, 52, 0.08));
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
}

.upload-tile input {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
}

.upload-tile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.save-studio {
  min-height: 48px;
}

.studio-preview-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.canvas-stage {
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 40, 74, 0.10), rgba(255, 113, 52, 0.10)),
    rgba(8, 13, 23, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

canvas {
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(17, 24, 39, 0.94), rgba(29, 43, 65, 0.94)),
    #d8dde2;
  box-shadow: 0 18px 0 rgba(15, 23, 42, 0.10), 0 36px 80px rgba(15, 23, 42, 0.30);
  cursor: grab;
  touch-action: none;
}

canvas.dragging {
  cursor: grabbing;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.26);
  color: #fff;
  padding: 14px 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.legal-page {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 40, 74, 0.13), transparent 30%),
    linear-gradient(180deg, #fff2ef, #f6eef4);
  padding: 42px 18px;
}

.legal-document {
  width: min(860px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-hard);
  padding: 34px;
}

.legal-document a {
  color: var(--coral);
  font-weight: 850;
}

.legal-document h1 {
  margin-top: 22px;
}

.legal-document h2 {
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal-document p {
  color: #2d3748;
  line-height: 1.6;
}

.setup-card {
  border-left: 0;
  overflow: hidden;
}

.setup-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--coral), var(--cyan), #ffd36d);
}

.setup-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  padding: 12px;
}

.setup-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff0ef;
  color: var(--muted);
  font-weight: 950;
}

.setup-step.done .setup-dot {
  background: linear-gradient(135deg, var(--coral), var(--cyan));
  color: #fff;
}

.tour-overlay,
.legal-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.tour-overlay {
  z-index: 20;
}

.legal-overlay {
  z-index: 30;
}

.modal-overlay {
  z-index: 35;
}

.legal-card,
.tour-card,
.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-hard);
  padding: 28px;
}

.legal-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
}

.legal-summary {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.legal-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  padding: 12px;
}

.legal-summary code {
  display: block;
  margin-top: 8px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 12px;
  overflow-wrap: anywhere;
  font-size: 16px;
  letter-spacing: 0;
}

.legal-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.legal-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.tour-card {
  width: min(560px, 100%);
}

.modal-card {
  width: min(520px, 100%);
}

.tour-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  margin-top: 10px;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .brand-lockup,
  .nav-list {
    padding: 24px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
  }

  .nav-item {
    justify-self: auto;
    white-space: nowrap;
  }

  .workspace {
    padding: 22px;
  }

  .workspace-header,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-layout,
  .two,
  .three,
  .admin-org-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-card,
  .legal-card,
  .tour-card,
  .panel,
  .workspace-header {
    padding: 20px;
  }

  .setup-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .setup-step button {
    grid-column: 1 / -1;
  }

  .header-actions,
  .tour-actions,
  .auth-links {
    width: 100%;
  }

  .auth-choice-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-quick-actions {
    grid-template-columns: 1fr;
  }

  .header-actions button,
  .tour-actions button {
    flex: 1;
  }
}
