: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: #151527;
  --cyan: #10727c;
  --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: #070a10;
  --workspace-2: #0b111c;
  --sidebar: #070a10;
  --sidebar-2: #0e1420;
  --panel: rgba(14, 20, 31, 0.82);
  --panel-strong: #111827;
  --ink: #edf4ff;
  --muted: #9aa8ba;
  --line: rgba(154, 168, 186, 0.22);
  --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, #15919d, var(--cyan));
  box-shadow: 0 10px 22px rgba(16, 114, 124, 0.22), 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(16, 114, 124, 0.28), 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(16, 114, 124, 0.20);
  border-color: rgba(16, 114, 124, 0.46);
}

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;
}

.code-output {
  white-space: pre-wrap;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.78);
  color: #f8fafc;
  font: 700 15px/1.65 Inter, system-ui, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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;
}

.mobile-gate {
  display: none;
}

.mobile-gate-card {
  width: min(420px, calc(100% - 36px));
  display: grid;
  gap: 14px;
  border: 1px solid rgba(16, 114, 124, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(18, 38, 42, 0.13);
  padding: 28px;
  text-align: left;
}

.mobile-gate-card img {
  width: 176px;
  height: auto;
  display: block;
}

.mobile-gate-card h1 {
  color: #102427;
  font-size: 30px;
  line-height: 1.08;
}

.mobile-gate-card p:not(.eyebrow) {
  color: #5d7074;
  font-size: 16px;
  line-height: 1.55;
}

.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #d7d7d7;
  color: #f8fafc;
}

.auth-shell {
  width: min(1180px, 100%);
  min-height: min(690px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(360px, 0.82fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: #070c20;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.auth-main {
  display: grid;
  align-content: start;
  gap: 28px;
  justify-items: start;
  min-height: 100%;
  padding: clamp(52px, 6vw, 84px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%),
    #070c20;
}

.auth-intro {
  width: min(520px, 100%);
  display: grid;
  gap: 10px;
  text-align: left;
}

.auth-intro h1 {
  display: none;
  color: #ffffff;
  font-size: clamp(32px, 3.2vw, 46px);
  font-weight: 900;
  line-height: 1.05;
}

.auth-intro .hint {
  display: none;
  color: #bac6d8;
  font-size: 16px;
  line-height: 1.55;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 0;
  overflow: visible;
  backdrop-filter: none;
}

.auth-card::before {
  content: none;
}

.auth-brand {
  width: min(420px, 100%);
  justify-content: flex-start;
  margin-bottom: 0;
  filter: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.auth-card .eyebrow,
.auth-intro .eyebrow {
  color: #29a5ad;
}

.auth-card h1 {
  color: #ffffff;
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 900;
}

.auth-card .hint {
  color: rgba(226, 232, 240, 0.66);
}

.auth-card label {
  color: rgba(226, 232, 240, 0.80);
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
  color: #ffffff;
}

.auth-card input::placeholder,
.auth-card textarea::placeholder {
  color: rgba(226, 232, 240, 0.48);
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  outline: 3px solid rgba(16, 114, 124, 0.22);
  border-color: rgba(57, 194, 201, 0.62);
}

.auth-card button[type="submit"] {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: linear-gradient(180deg, #15919d, #10727c);
  color: #fff;
  box-shadow: 0 14px 30px rgba(16, 114, 124, 0.24);
}

.auth-links {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 18px;
}

.auth-links .link-button,
.auth-card > .link-button {
  color: rgba(226, 232, 240, 0.74);
  font-weight: 850;
}

.auth-links .link-button:hover,
.auth-card > .link-button:hover {
  color: #39c2c9;
}

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

.auth-choice-card {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(16, 114, 124, 0.14);
  background: #f8fbfa;
  color: #102427;
  box-shadow: none;
  padding: 18px;
}

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

.auth-choice-card span {
  color: #667a7f;
  font-size: 14px;
  line-height: 1.45;
}

.auth-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 114, 124, 0.36);
  background: #eef8f6;
  box-shadow: 0 14px 34px rgba(16, 114, 124, 0.12);
}

.google-button {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
  font-weight: 850;
  text-decoration: none;
}

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

.auth-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #090d1e;
  box-shadow: none;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: 52% 50%;
  filter: saturate(0.78) contrast(1.08) brightness(0.78);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 31, 0.08), rgba(8, 12, 31, 0.54)),
    linear-gradient(90deg, rgba(8, 12, 31, 0.62), rgba(16, 114, 124, 0.12) 52%, rgba(8, 12, 31, 0.24));
}

.auth-visual-caption {
  display: none;
}

.auth-visual-caption span {
  color: #39c2c9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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;
}

.user-profile-list {
  gap: 12px;
}

.user-profile-card {
  display: grid;
  gap: 14px;
}

.user-profile-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.user-avatar-control {
  display: block;
  cursor: pointer;
}

.user-avatar-control input {
  display: none;
}

.user-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid #d9dee8;
  border-radius: 50%;
  background: #eef4f6;
  color: #10727c;
  font-weight: 950;
  overflow: hidden;
}

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

.user-profile-form {
  align-items: end;
}

.user-profile-actions {
  align-items: end;
  margin-top: 0;
}

.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: 286px minmax(0, 1fr);
  background: #f5f6fa;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(180deg, #101321, #181a2b);
  color: #fff;
  border-right: 1px solid rgba(154, 168, 186, 0.18);
  box-shadow: 14px 0 28px rgba(15, 18, 32, 0.16);
}

.brand-lockup {
  display: grid;
  gap: 10px;
  align-items: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 28px 26px 18px;
}

.brand-logo {
  display: block;
  width: min(188px, 100%);
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.version-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.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;
  filter: none;
  opacity: 1;
}

.auth-main .auth-brand {
  width: min(620px, 100%);
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  filter: brightness(0) invert(1);
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 24px 0 24px;
}

.nav-item {
  justify-self: stretch;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(226, 230, 240, 0.72);
  font-size: 15px;
  line-height: 1;
  font-weight: 780;
  text-align: left;
  transform: none;
}

.nav-item::before {
  width: 22px;
  flex: 0 0 22px;
  color: rgba(226, 230, 240, 0.78);
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.nav-item[data-page="dashboard"]::before { content: "⌂"; }
.nav-item[data-page="manual"]::before { content: "✚"; }
.nav-item[data-page="flows"]::before { content: "⛓"; }
.nav-item[data-page="studio"]::before { content: "✎"; }
.nav-item[data-page="storyStudio"]::before { content: "◰"; }
.nav-item[data-page="archive"]::before { content: "▣"; }
.nav-item[data-page="settings"]::before { content: "⚙"; }
.nav-item[data-page="users"]::before { content: "◉"; }
.nav-item[data-page="subscription"]::before { content: "€"; }
.nav-item[data-page="help"]::before { content: "☎"; }
.nav-item[data-page="admin"]::before { content: "◆"; }
.nav-item[data-page="service"]::before { content: "☏"; }
.nav-item[data-page="broadcasters"]::before { content: "▥"; }
.nav-item[data-page="coupons"]::before { content: "%"; }
.nav-item[data-page="newsletters"]::before { content: "✉"; }
.nav-item[data-page="metareview"]::before { content: "✓"; }
.nav-item[data-page="status"]::before { content: "●"; }

.nav-item.active,
.nav-item:hover {
  border-left-color: #10727c;
  background: rgba(255, 255, 255, 0.085);
  box-shadow: none;
  color: #fff;
  filter: none;
  transform: none;
}

.nav-item.active::before,
.nav-item:hover::before {
  color: #ffffff;
}

.nav-credit-box {
  display: grid;
  gap: 5px;
  margin: 10px 18px 14px;
  padding: 13px 14px;
  border: 1px solid rgba(16, 114, 124, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 114, 124, 0.18), rgba(16, 114, 124, 0.08));
  box-shadow: inset 3px 0 0 var(--cyan), 0 12px 22px rgba(0, 0, 0, 0.16);
  color: #fff;
}

.nav-credit-label,
.nav-credit-meta,
.nav-credit-price {
  color: rgba(209, 217, 229, 0.78);
  font-size: 11px;
  line-height: 1.35;
}

.nav-credit-box strong {
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
}

.nav-credit-link {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #8ee5dc;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-align: left;
  transform: none;
}

.nav-credit-link:hover {
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-decoration: underline;
  transform: none;
}

.workspace {
  min-width: 0;
  padding: 0;
  background: #f5f6fa;
}

.workspace-header {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 32px;
  padding: 18px 32px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid rgba(28, 31, 47, 0.10);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  backdrop-filter: blur(18px);
  color: var(--ink);
}

.workspace-header .eyebrow,
.workspace-header .meta,
.workspace-header p {
  color: var(--muted);
}

.workspace-header button.ghost,
.workspace-header button.secondary,
.workspace-header .profile-trigger {
  min-height: 38px;
  border-color: rgba(28, 31, 47, 0.10);
  background: #ffffff;
  color: #2a2d40;
  box-shadow: 0 8px 20px rgba(28, 31, 47, 0.06);
}

body.dark-theme .workspace-header {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 113, 52, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(8, 13, 23, 0.96), rgba(8, 13, 23, 0.82));
  color: #fff;
}

body.dark-theme .workspace-header button.ghost,
body.dark-theme .workspace-header button.secondary,
body.dark-theme .workspace-header .profile-trigger,
body.dark-theme #accountBadge,
body.dark-theme .language-switch {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.92);
  color: #edf4ff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

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

.language-switch {
  width: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(28, 31, 47, 0.10);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(28, 31, 47, 0.06);
  padding: 0 10px;
  color: #2a2d40;
}

.language-flag {
  width: 30px;
  height: 30px;
  min-height: 30px;
  position: relative;
  display: block;
  border: 2px solid transparent;
  border-radius: 50%;
  background-color: #ffffff;
  background-clip: padding-box;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  padding: 0;
  overflow: hidden;
  transform: none;
}

.language-flag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 11px rgba(15, 23, 42, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.language-flag.active {
  border-color: #e9f8fb;
  box-shadow: 0 0 0 2px #10727c, 0 4px 11px rgba(15, 23, 42, 0.18);
}

.language-flag-nl {
  background: linear-gradient(180deg, #ae1c28 0 33.33%, #ffffff 33.33% 66.66%, #21468b 66.66% 100%);
}

.language-flag-en {
  background:
    linear-gradient(27deg, transparent 0 42%, #ffffff 42% 47%, #cf142b 47% 53%, #ffffff 53% 58%, transparent 58%),
    linear-gradient(153deg, transparent 0 42%, #ffffff 42% 47%, #cf142b 47% 53%, #ffffff 53% 58%, transparent 58%),
    linear-gradient(90deg, transparent 0 38%, #ffffff 38% 44%, #cf142b 44% 56%, #ffffff 56% 62%, transparent 62%),
    linear-gradient(180deg, transparent 0 34%, #ffffff 34% 42%, #cf142b 42% 58%, #ffffff 58% 66%, transparent 66%),
    #00247d;
}

.language-flag-fy {
  background: url("/assets/friesland-flag.png") center / cover no-repeat;
}

body.dark-theme .language-flag.active {
  border-color: #e9f8fb;
  box-shadow: 0 0 0 2px #63e6ef, 0 4px 11px rgba(0, 0, 0, 0.28);
}

.profile-menu-wrap {
  position: relative;
  display: grid;
  justify-items: end;
}

#accountBadge {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(28, 31, 47, 0.10);
  background: #ffffff;
  color: #2a2d40;
  box-shadow: 0 8px 20px rgba(28, 31, 47, 0.06);
  padding: 0 14px 0 8px;
  text-transform: none;
}

#accountBadge::before {
  content: none;
}

.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), transparent 18%),
    linear-gradient(135deg, #ef3b3d, #10727c);
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
}

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

.profile-menu {
  position: fixed;
  top: var(--profile-menu-top, 82px);
  right: var(--profile-menu-right, 32px);
  z-index: 1000;
  width: 220px;
  display: none;
  gap: 4px;
  border: 1px solid rgba(28, 31, 47, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  padding: 8px;
}

.profile-menu-wrap.open .profile-menu,
.profile-menu-wrap:focus-within .profile-menu {
  display: grid;
}

.profile-menu-item {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #1f2937;
  padding: 0 12px;
  text-align: left;
  transform: none;
}

.profile-menu-item:hover {
  background: #f3f6f8;
  box-shadow: none;
  transform: none;
}

.profile-menu-item.danger-item {
  color: #b42318;
}

body.dark-theme .profile-menu {
  border-color: rgba(255, 255, 255, 0.14);
  background: #111827;
}

body.dark-theme .profile-menu-item {
  color: #edf4ff;
}

body.dark-theme .profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .profile-menu-item.danger-item {
  color: #ffb4a8;
}

.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);
}

.warn-text {
  color: var(--amber);
  font-weight: 850;
}

.ok-text {
  color: var(--green);
  font-weight: 850;
}

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

.meta-readiness {
  border-style: dashed;
}

.page {
  display: none;
}

.page.active {
  display: grid;
  gap: 18px;
  padding: 0 32px 38px;
}

.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 var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  padding: 22px;
  backdrop-filter: none;
}

body.dark-theme .panel,
body.dark-theme .item,
body.dark-theme .studio-section {
  border-color: rgba(154, 168, 186, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(9, 14, 23, 0.76);
}

.panel:not(.setup-card)::before {
  content: none;
}

.panel::after {
  content: none;
}

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

.stat strong {
  color: #111827;
  font-size: 32px;
  line-height: 1;
}

.stat::before {
  content: none;
}

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

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

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

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  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;
}

.business-section {
  border-color: #e3e7ef;
}

body.dark-theme .business-section,
body.dark-theme .business-section .item,
body.dark-theme .business-kpis .panel {
  border-color: #e3e7ef;
  background: #ffffff;
  color: #111827;
}

body.dark-theme .business-section .meta,
body.dark-theme .business-kpis .meta {
  color: #667487;
}

.business-section h2 {
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
}

.business-section .eyebrow {
  color: #10727c;
  margin-bottom: 6px;
}

.business-layout {
  grid-template-columns: minmax(420px, 1.08fr) minmax(320px, 0.92fr);
  align-items: start;
}

.business-kpis {
  gap: 14px;
}

.business-kpis .stat {
  border-left: 4px solid #10727c;
  padding: 18px 18px 17px;
}

.business-kpis .stat:nth-child(2) {
  border-left-color: #1f7ae0;
}

.business-kpis .stat:nth-child(3) {
  border-left-color: #16a36a;
}

.business-list {
  gap: 8px;
}

.business-list .item,
.business-section .list .item {
  border-color: #e7ebf3;
  background: #fbfcfe;
}

.business-section .row {
  align-items: flex-start;
}

.business-section input,
.business-section textarea,
.business-section select {
  background: #ffffff;
  border-color: #d9dee8;
}

.business-section .secondary {
  border-color: #d9dee8;
  background: #ffffff;
  color: #1f2937;
}

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

.studio-editor-shell {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(520px, 1fr) minmax(300px, 390px);
  gap: 0;
  align-items: stretch;
  min-height: calc(100vh - 210px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #070b12;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

body.studio-fullscreen-mode {
  overflow: hidden;
}

body.studio-fullscreen-mode .sidebar,
body.studio-fullscreen-mode .workspace-header {
  display: none;
}

body.studio-fullscreen-mode .app-shell {
  grid-template-columns: 1fr;
}

body.studio-fullscreen-mode .workspace,
body.studio-fullscreen-mode .page.active {
  padding: 0;
}

body.studio-fullscreen-mode .studio-editor-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  min-height: 100vh;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

body.studio-fullscreen-mode .flow-editor-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  border: 0;
  border-radius: 0;
}

body.studio-fullscreen-mode .studio-layer-panel,
body.studio-fullscreen-mode .studio-properties-panel,
body.studio-fullscreen-mode .flow-core-panel {
  max-height: 100vh;
}

.studio-loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 114, 124, 0.24), transparent 32%),
    linear-gradient(135deg, #060a11, #0d1320);
  color: #f8fafc;
}

.studio-loader-card {
  width: min(420px, calc(100vw - 40px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.86);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.studio-loader-card h2 {
  margin: 0;
  color: #fff;
}

.studio-loader-dot {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 4px solid rgba(103, 216, 221, 0.2);
  border-top-color: #67d8dd;
  animation: studioSpin 0.8s linear infinite;
}

@keyframes studioSpin {
  to { transform: rotate(360deg); }
}

.studio-picker-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(16, 114, 124, 0.22), transparent 34%),
    linear-gradient(135deg, #08111f, #101827);
  color: #fff;
}

.studio-picker-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 34px;
}

.studio-picker-hero .meta {
  color: #aeb8c8;
}

.studio-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.studio-template-card {
  overflow: hidden;
  padding: 0;
}

.studio-template-card.active {
  border-color: rgba(16, 114, 124, 0.55);
  box-shadow: 0 0 0 3px rgba(16, 114, 124, 0.12), var(--shadow);
}

.studio-template-preview {
  min-height: 178px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 18px;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.66)),
    linear-gradient(135deg, rgba(16, 114, 124, 0.95), rgba(13, 19, 32, 0.96));
  color: #fff;
}

.studio-template-preview strong {
  max-width: 88%;
  font-size: 26px;
  line-height: 1.05;
}

.story-template-preview {
  min-height: 220px;
  aspect-ratio: 9 / 16;
  justify-self: center;
  width: min(100%, 150px);
  background:
    linear-gradient(180deg, transparent 26%, rgba(0, 0, 0, 0.72)),
    linear-gradient(160deg, rgba(16, 114, 124, 0.96), rgba(6, 119, 216, 0.92));
}

.story-template-preview strong {
  max-width: 100%;
  font-size: 21px;
}

.template-preview-badge {
  width: max-content;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 8px;
  background: #10727c;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.empty-preview {
  place-items: center;
  align-content: center;
  background: linear-gradient(135deg, rgba(16, 114, 124, 0.18), rgba(15, 23, 42, 0.08));
  color: #10727c;
}

.empty-preview strong {
  font-size: 64px;
  line-height: 1;
}

.studio-template-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.studio-template-card-body h3 {
  margin: 0 0 5px;
}

.studio-tool-rail {
  display: grid;
  grid-auto-rows: min-content;
  gap: 12px;
  padding: 16px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  background: #060a11;
}

.tool-dot {
  width: 36px;
  height: 36px;
  justify-self: center;
  display: block;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 50%, #ff6940 0 34%, rgba(255, 105, 64, 0.16) 36% 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tool-rail-button {
  width: 42px;
  min-height: 42px;
  justify-self: center;
  padding: 0;
  border-radius: 8px;
  border-color: rgba(148, 163, 184, 0.24);
  background: transparent;
  color: #aeb8c8;
  box-shadow: none;
  font-size: 11px;
  font-weight: 950;
}

.tool-rail-button:hover,
.tool-rail-button.active {
  background: #10727c;
  color: #fff;
  border-color: rgba(103, 216, 221, 0.48);
}

.studio-layer-panel,
.studio-properties-panel,
.studio-canvas-panel {
  min-height: 0;
}

.studio-layer-panel {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 14px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 16px;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  background: #070b12;
  color: #f8fafc;
  box-shadow: none;
}

.studio-layer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.studio-layer-head h2,
.studio-properties-panel h2,
.studio-canvas-panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
}

.vra-studio .eyebrow {
  color: #67d8dd;
}

.vra-studio .meta {
  color: #8f9bad;
}

.compact-row {
  align-items: center;
}

.studio-layer-block {
  display: grid;
  gap: 8px;
}

.studio-layer-block h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-plus,
.text-icon {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
}

.studio-layer-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
  text-align: left;
  box-shadow: none;
}

.studio-layer-row[draggable="true"] {
  cursor: grab;
}

.studio-layer-row.dragging-layer {
  opacity: 0.62;
  transform: scale(0.98);
  border-color: rgba(103, 216, 221, 0.7);
}

.studio-layer-row.layer-drop-target {
  position: relative;
  border-color: rgba(103, 216, 221, 0.72);
  background: rgba(16, 114, 124, 0.24);
}

.studio-layer-row.layer-drop-target::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: -6px;
  height: 3px;
  border-radius: 999px;
  background: #67d8dd;
  box-shadow: 0 0 18px rgba(103, 216, 221, 0.55);
}

.studio-layer-row:hover,
.studio-layer-row.active {
  border-color: rgba(103, 216, 221, 0.45);
  background: rgba(16, 114, 124, 0.16);
}

.studio-layer-row.active {
  box-shadow: inset 3px 0 0 #67d8dd;
}

.studio-layer-row strong,
.studio-layer-row small {
  display: block;
}

.layer-actions {
  color: #cbd5e1;
  font-size: 12px;
  opacity: 0.78;
  white-space: nowrap;
}

.studio-layer-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.layer-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(16, 114, 124, 0.22);
  color: #67d8dd;
  font-size: 11px;
  font-weight: 950;
}

.studio-add-layer {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.studio-add-layer summary {
  cursor: pointer;
  padding: 12px;
  color: #f8fafc;
  font-weight: 900;
}

.studio-add-layer button {
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  justify-content: flex-start;
  background: transparent;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.studio-add-layer-button {
  width: 100%;
  justify-content: center;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
  box-shadow: none;
}

.layer-catalog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 6, 23, 0.70);
  backdrop-filter: blur(10px);
}

.layer-catalog-panel {
  width: min(920px, 96vw);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #070b12;
  color: #f8fafc;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.layer-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.layer-catalog-head h2 {
  margin: 0;
  color: #f8fafc;
}

.layer-catalog-search {
  color: #aeb8c8;
}

.layer-catalog-search input {
  margin-top: 8px;
  border-color: rgba(255, 105, 64, 0.68);
  background: rgba(6, 10, 17, 0.86);
  color: #f8fafc;
}

.layer-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.shape-picker-panel {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

.layer-catalog-card,
.shape-choice-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: #f8fafc;
  text-align: center;
  box-shadow: none;
}

.shape-choice-card {
  min-height: 124px;
}

.layer-catalog-card:hover,
.shape-choice-card:hover {
  border-color: rgba(103, 216, 221, 0.58);
  background: rgba(16, 114, 124, 0.16);
}

.layer-catalog-card.beta-card {
  border-color: rgba(255, 105, 64, 0.48);
  background: rgba(255, 105, 64, 0.08);
}

.layer-catalog-card strong,
.shape-choice-card strong {
  font-size: 20px;
}

.layer-catalog-card span,
.shape-choice-card span {
  color: #aeb8c8;
  font-size: 13px;
}

.studio-context-menu {
  position: fixed;
  z-index: 120;
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #080c14;
  color: #f8fafc;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.studio-context-menu button {
  justify-content: start;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f8fafc;
  box-shadow: none;
  font-size: 13px;
}

.studio-context-menu button:hover {
  background: rgba(16, 114, 124, 0.22);
}

.studio-context-menu button.danger {
  color: #fecaca;
}

.studio-context-menu button.danger:hover {
  background: rgba(220, 38, 38, 0.22);
}

.studio-leave-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.studio-leave-card {
  width: min(520px, 94vw);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #080c14;
  color: #f8fafc;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.studio-leave-card h2 {
  margin: 0;
  color: #fff;
}

.studio-leave-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.studio-layer-footer {
  display: grid;
  gap: 10px;
  align-self: end;
}

.back-template-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.studio-canvas-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 114, 124, 0.18), transparent 34%),
    linear-gradient(180deg, #080d17, #0d1320);
  box-shadow: none;
}

.studio-properties-panel {
  max-height: calc(100vh - 210px);
  overflow: auto;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  background: #0d1320;
  box-shadow: none;
}

.flow-editor-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  min-height: calc(100vh - 210px);
  height: calc(100vh - 210px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #070b12;
  color: #f8fafc;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.flow-core-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 16px;
  border-radius: 0;
  background: #070b12;
  box-shadow: none;
}

.flow-core-canvas-panel {
  min-height: 0;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 22px;
}

body.studio-fullscreen-mode .flow-core-canvas-panel {
  max-height: 100vh;
}

.flow-core-stack {
  position: relative;
  width: min(720px, 100%);
  justify-self: center;
  display: grid;
  gap: 14px;
  padding: 24px 0 44px;
}

.flow-core-stack::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 52px;
  left: 36px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #67d8dd, rgba(103, 216, 221, 0.1));
}

.flow-core-block {
  position: relative;
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 106px;
  padding: 16px;
  border: 1px solid rgba(103, 216, 221, 0.24);
  border-radius: 8px;
  background: rgba(10, 16, 27, 0.96);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  cursor: grab;
}

.flow-core-block.dragging {
  opacity: 0.46;
}

.flow-core-block.disabled,
.studio-layer-row.disabled {
  opacity: 0.45;
  filter: grayscale(1);
}

.flow-core-block.disabled {
  border-style: dashed;
}

.flow-core-grip {
  color: rgba(203, 213, 225, 0.62);
  font-weight: 950;
  line-height: 1;
  padding-top: 8px;
}

.flow-core-index {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #10727c;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 0 0 8px #070b12;
}

.flow-core-content {
  display: grid;
  gap: 8px;
}

.flow-core-content strong {
  font-size: 20px;
  line-height: 1.1;
}

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

.flow-core-controls label {
  margin: 0;
}

.flow-core-panel label:has(input[type="checkbox"]),
.flow-core-controls label:has(input[type="checkbox"]) {
  color: #f8fafc;
}

.flow-core-add-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.flow-core-add-option .icon-button {
  min-height: 44px;
  border-color: rgba(103, 216, 221, 0.36);
  background: #10727c;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.flow-core-errors {
  display: grid;
  gap: 10px;
}

.flow-core-error,
.flow-core-ok {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.035);
}

.flow-core-error {
  border-color: rgba(255, 105, 64, 0.42);
  background: rgba(255, 105, 64, 0.1);
}

.flow-core-ok {
  border-color: rgba(103, 216, 221, 0.36);
  background: rgba(16, 114, 124, 0.15);
}

.studio-properties-head {
  display: grid;
  gap: 6px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.studio-canvas-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.vra-studio .studio-section {
  border-color: rgba(148, 163, 184, 0.20);
  background: rgba(255, 255, 255, 0.035);
}

.vra-studio .studio-section h3 {
  color: #f8fafc;
}

.vra-studio label {
  color: #cbd5e1;
}

.vra-studio input,
.vra-studio textarea,
.vra-studio select {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(6, 10, 17, 0.78);
  color: #f8fafc;
}

.vra-studio input[type="color"] {
  padding: 4px;
}

.vra-studio .upload-tile,
.vra-studio .scenario-box {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(6, 10, 17, 0.58);
  color: #f8fafc;
}

.vra-studio .upload-tile {
  border-style: dashed;
}

.vra-studio .save-studio {
  width: 100%;
  background: linear-gradient(180deg, #1597a3, #10727c);
}

.studio-topbar {
  padding: 18px;
}

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

.template-strip.vertical {
  display: grid;
  margin-top: 0;
  overflow: visible;
}

.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(16, 114, 124, 0.58);
  background: linear-gradient(180deg, #1597a3, #10727c);
  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;
}

.headline-parts {
  display: grid;
  gap: 10px;
}

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

.image-scenario-grid {
  display: grid;
  gap: 10px;
}

.scenario-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

body.dark-theme .scenario-box {
  background: rgba(255, 255, 255, 0.06);
}

.scenario-box strong {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.scenario-box input[type="range"] {
  width: 100%;
}

.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;
}

.comments-layout {
  align-items: start;
}

.comment-card p {
  overflow-wrap: anywhere;
}

.comment-replies {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.item.subtle {
  background: rgba(255, 255, 255, 0.04);
}

.faq-list details summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list details[open] summary {
  margin-bottom: 10px;
}

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

.vra-studio .studio-preview-panel {
  padding: 18px 22px 22px;
}

.vra-studio .preview-toolbar {
  color: #f8fafc;
}

.vra-studio .preview-toolbar h2 {
  color: #f8fafc;
}

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

.preview-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-toolbar {
  align-items: center;
}

.visually-soft {
  min-width: 160px;
}

.studio-layer-control {
  min-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.studio-layer-control select {
  margin-top: 4px;
  padding: 6px 8px;
  min-height: 34px;
  font-size: 13px;
}

body.dark-theme .studio-layer-control {
  background: rgba(15, 23, 42, 0.86);
}

.vra-studio .studio-layer-control {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(6, 10, 17, 0.72);
  color: #f8fafc;
}

.vra-studio .studio-toolbar .toggle-label {
  color: #f8fafc;
}

.instagram-preview-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16), var(--inset);
}

.vra-studio .instagram-preview-shell {
  max-width: min(760px, 100%);
  justify-self: center;
  border-color: rgba(148, 163, 184, 0.20);
  background: #0a0f19;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.vra-studio .studio-visual-frame {
  align-self: center;
}

body.dark-theme .instagram-preview-shell {
  background: rgba(7, 11, 20, 0.96);
}

.instagram-preview-header,
.instagram-preview-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}

.instagram-preview-header {
  border-bottom: 1px solid var(--line);
}

.instagram-preview-footer {
  display: grid;
  border-top: 1px solid var(--line);
}

.ig-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--cyan));
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

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

.ig-subline {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.ig-verified {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.ig-more {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: 2px;
}

.ig-actions {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.instagram-preview-footer p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.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);
}

.vra-studio .canvas-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    #101722;
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.vra-studio canvas {
  max-height: calc(100vh - 390px);
  width: auto;
  max-width: 100%;
}

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.story-preview {
  aspect-ratio: 9 / 16;
}

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: 3px;
  background: #10727c;
}

.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: #fbfcfe;
  box-shadow: none;
  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: #10727c;
  color: #fff;
}

.tour-overlay,
.legal-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 82% 82%, rgba(16, 114, 124, 0.18), transparent 24%),
    rgba(7, 12, 32, 0.78);
  backdrop-filter: blur(14px);
  padding: 22px;
}

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

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

.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;
}

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

.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 850;
  text-decoration: none;
}

.status-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 18px;
}

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

.incident-update-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.system-log-list {
  display: grid;
  gap: 9px;
  max-height: 760px;
  overflow: auto;
  padding-right: 3px;
}

.system-log-entry {
  border: 1px solid var(--line);
  border-left: 4px solid #738196;
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 13px;
}

.system-log-warning { border-left-color: var(--amber); }
.system-log-error { border-left-color: var(--danger); }
.system-log-security { border-left-color: #6157d9; }

.system-log-entry code {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.pill.danger-pill {
  background: rgba(192, 57, 43, 0.12);
  color: #a8281b;
}

.pill.security-pill {
  background: rgba(97, 87, 217, 0.12);
  color: #4a41b0;
}

body.dark-theme .pill.danger-pill { color: #ff9f94; }
body.dark-theme .pill.security-pill { color: #bdb7ff; }

/* Public status page */
.public-status-page {
  min-height: 100vh;
  background: #f7f8fb;
  color: #111827;
}

.status-site-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.status-site-header,
.status-overall,
.status-site-section {
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: #fff;
}

.status-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 22px;
}

.status-site-header img {
  display: block;
  width: 154px;
  height: auto;
}

.status-site-header a {
  color: #5d6675;
  font-weight: 750;
  text-decoration: none;
}

.status-overall {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
}

.status-overall-indicator {
  border-radius: 6px;
  background: #16a36a;
}

.status-overall[data-status="degraded"] .status-overall-indicator,
.status-overall[data-status="maintenance"] .status-overall-indicator { background: #d98610; }
.status-overall[data-status="partial_outage"] .status-overall-indicator { background: #e26b2f; }
.status-overall[data-status="major_outage"] .status-overall-indicator { background: #c0392b; }

.status-overall h1 {
  font-size: 30px;
  margin-bottom: 7px;
}

.status-site-section {
  margin-top: 18px;
  padding: 24px;
}

.status-site-section h2 {
  margin-bottom: 16px;
}

.public-component-list,
.public-incident-list {
  display: grid;
  gap: 0;
}

.public-component {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid #edf0f4;
  padding: 16px 0;
}

.public-component:first-child { border-top: 0; }

.public-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-metric {
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfe;
}

.public-metric strong {
  font-size: 14px;
}

.public-metric .row span {
  font-weight: 900;
}

.metric-bar {
  overflow: hidden;
  height: 9px;
  margin: 14px 0 10px;
  border-radius: 99px;
  background: #e7ecf2;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a36a;
  transition: width .25s ease;
}

.public-metric.warn .metric-bar span { background: #d98610; }
.public-metric.danger .metric-bar span { background: #c0392b; }

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a36a;
  margin-right: 8px;
}

.status-dot.degraded,
.status-dot.maintenance { background: #d98610; }
.status-dot.partial_outage { background: #e26b2f; }
.status-dot.major_outage { background: #c0392b; }

.public-incident {
  border-top: 1px solid #edf0f4;
  padding: 18px 0;
}

.public-incident:first-child { border-top: 0; }

.public-incident-update {
  border-left: 2px solid #e1e5eb;
  margin-top: 12px;
  padding-left: 14px;
}

.status-site-footer {
  color: #6b7280;
  padding: 22px 2px;
  text-align: center;
  font-size: 13px;
}

.status-loading,
.status-empty {
  color: #6b7280;
}

@media (max-width: 1050px) {
  .auth-view {
    padding: 28px;
  }

  .auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-main {
    justify-items: center;
  }

  .auth-brand {
    justify-content: center;
  }

  .auth-visual {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .brand-lockup {
    margin: 12px;
  }

  .version-badge {
    min-height: 24px;
    font-size: 10px;
  }

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

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

  .nav-credit-box {
    min-width: 220px;
    margin: 0;
    flex: 0 0 220px;
  }

  .workspace {
    padding: 0;
  }

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

  .workspace-header {
    padding: 20px 22px;
  }

  .page.active {
    padding: 0 22px 28px;
  }

  .studio-editor-shell,
  .flow-editor-shell,
  .studio-layout,
  .two,
  .three,
  .admin-org-grid,
  .status-admin-layout,
  .status-component-grid,
  .incident-grid {
    grid-template-columns: 1fr;
  }

  .studio-layer-panel,
  .studio-properties-panel,
  .flow-core-panel {
    position: static;
    max-height: none;
  }

  body.studio-fullscreen-mode .flow-editor-shell {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .flow-core-canvas-panel {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }

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

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

@media (max-width: 620px) {
  .public-metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-view {
    align-items: flex-start;
    padding: 18px;
  }

  .auth-shell {
    width: 100%;
  }

  .auth-main {
    gap: 22px;
  }

  .auth-intro {
    text-align: left;
  }

  .auth-intro h1 {
    font-size: 42px;
  }

  .auth-brand {
    justify-content: flex-start;
  }

  .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;
  }

  .status-site-shell {
    width: min(100% - 20px, 920px);
    padding-top: 10px;
  }

  .status-site-header,
  .status-overall,
  .status-site-section {
    padding: 18px;
  }

  .status-site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-component {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px), ((hover: none) and (pointer: coarse) and (max-width: 1180px)) {
  body {
    min-height: 100vh;
    background:
      linear-gradient(135deg, rgba(16, 114, 124, 0.12), transparent 42%),
      linear-gradient(180deg, #f8fbfa, #eef4f3);
  }

  .auth-view,
  .app-shell,
  .tour-overlay,
  .legal-overlay,
  .modal-overlay {
    display: none !important;
  }

  .mobile-gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
  }
}

body.mobile-portal {
  background: #f3f7f8;
}

body.mobile-portal .mobile-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

body.mobile-portal .auth-view,
body.mobile-portal .app-shell,
body.mobile-portal .tour-overlay,
body.mobile-portal .legal-overlay,
body.mobile-portal .modal-overlay {
  display: none !important;
}

@media (max-width: 900px), ((hover: none) and (pointer: coarse) and (max-width: 1180px)) {
  body.mobile-portal .mobile-gate {
    display: none !important;
  }

  body.mobile-portal .auth-view:not(.hidden) {
    display: flex !important;
    min-height: 100vh;
    padding: 18px;
  }

  body.mobile-portal .app-shell:not(.hidden) {
    display: grid !important;
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  body.mobile-portal .tour-overlay:not(.hidden),
  body.mobile-portal .legal-overlay:not(.hidden),
  body.mobile-portal .modal-overlay:not(.hidden) {
    display: grid !important;
  }

  body.mobile-portal .auth-shell {
    width: 100%;
  }

  body.mobile-portal .auth-visual,
  body.mobile-portal .workspace-header .eyebrow,
  body.mobile-portal .profile-menu-wrap,
  body.mobile-portal .nav-credit-box {
    display: none !important;
  }

  body.mobile-portal .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 10px 10px 0;
    background: #111827;
  }

  body.mobile-portal .brand-lockup {
    display: none;
  }

  body.mobile-portal .nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 10px;
    overflow: visible;
  }

  body.mobile-portal .nav-item {
    min-height: 44px;
    justify-content: center;
    padding: 9px 6px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    white-space: normal;
  }

  body.mobile-portal .nav-item::before {
    display: none;
  }

  body.mobile-portal .workspace {
    padding: 0;
  }

  body.mobile-portal .workspace-header {
    display: flex;
    padding: 18px;
  }

  body.mobile-portal .workspace-header h1 {
    font-size: 30px;
  }

  body.mobile-portal .page.active {
    padding: 0 14px 24px;
  }

  body.mobile-portal .panel {
    padding: 18px;
  }

  body.mobile-portal .business-layout,
  body.mobile-portal .two,
  body.mobile-portal .three,
  body.mobile-portal .user-profile-form {
    grid-template-columns: 1fr;
  }

  body.mobile-portal .business-section .row,
  body.mobile-portal .item .row,
  body.mobile-portal .actions,
  body.mobile-portal .tour-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.mobile-portal button,
  body.mobile-portal input,
  body.mobile-portal select,
  body.mobile-portal textarea {
    font-size: 16px;
  }

  body.mobile-portal .mobile-tool-panel {
    gap: 14px;
  }
}
