:root {
  --bg: #f4f9fc;
  --surface: #ffffff;
  --surface-2: #ecf4f8;
  --ink: #00395a;
  --muted: #5f7284;
  --faint: #8ea0b1;
  --line: #d9e5ec;
  --line-strong: #c4d5df;
  --primary: #00395a;
  --primary-dark: #022b44;
  --primary-soft: #e5f1f7;
  --accent: #16a089;
  --accent-soft: #e8fbf6;
  --warn: #f2a104;
  --warn-soft: #fff5de;
  --danger: #cb4b4b;
  --danger-soft: #fff0f0;
  --radius: 20px;
  --shadow: 0 4px 30px rgba(0, 57, 90, .06), 0 24px 80px rgba(0, 57, 90, .08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(112, 208, 255, .18), transparent 28%),
    linear-gradient(180deg, #eef8fd 0%, #f7fbfe 16%, var(--bg) 40%, #f8fbfd 100%);
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.studio-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #0a4568 0%, #00395a 38%, #022f49 100%);
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 0 14px 24px;
  color: rgba(255,255,255,.92);
}
.brand-row {
  /* Logo dominates the top of the sidebar; profile pill sits in a chip
     anchored to the top-right corner so the logo keeps the full row width. */
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin: 0 -14px 16px;
  padding: 16px 12px 8px;
}
.brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 850;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 24px rgba(37, 99, 235, .2);
}

.brand-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.app-switcher {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px 4px 4px;
  text-align: left;
  color: white;
  backdrop-filter: blur(10px);
}
.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: white;
  font-weight: 800;
  flex: 0 0 auto;
}
.app-switcher-text { min-width: 0; flex: 1; display: grid; }
.app-switcher-text b, .app-switcher-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-switcher-text b { font-size: 12px; }
.app-switcher-text small { font-size: 10px; color: rgba(255,255,255,.72); }
.app-picker {
  margin: 8px 0 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  padding: 8px;
  backdrop-filter: blur(12px);
}
.picker-head { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.app-list { display: grid; gap: 5px; }
.app-option {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.app-option:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.14); }
.app-option.active { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.18); }
.app-option .dot { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,.18); background-size: cover; }
.app-option b, .app-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-option b { font-size: 12px; }
.app-option small { color: rgba(255,255,255,.68); font-size: 10px; }
.status-pill { border-radius: 999px; font-size: 10px; padding: 3px 8px; background: var(--accent-soft); color: #0a7a67; font-weight: 800; }
.status-pill.warn { background: var(--warn-soft); color: #b45309; }
.status-pill.bad { background: var(--danger-soft); color: var(--danger); }
.status-pill-button { border: 1px solid rgba(196, 213, 223, .92); padding: 8px 12px; font-size: 11px; background: #fff; }
.status-pill-button:hover { filter: brightness(.98); }
.status-pill-button:disabled { opacity: .65; cursor: default; }
.mini-add {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
  color: white;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  padding: 6px 10px;
}
.mini-add.ghost { background: transparent; }
.search-box {
  margin: 14px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 0 14px;
  height: 42px;
  background: rgba(255,255,255,.08);
}
.search-box input { border: 0; outline: 0; min-width: 0; width: 100%; color: white; background: transparent; }
.setup-nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.84);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  text-align: left;
  position: relative;
}
.nav-item span { width: 18px; text-align: center; color: rgba(255,255,255,.88); }
.nav-item:hover { background: rgba(255,255,255,.09); }
.nav-item.active { background: white; color: var(--primary); border-color: white; box-shadow: 0 14px 32px rgba(0, 21, 33, .18); }
.nav-item.active span { color: var(--primary); }
.nav-item em { margin-left: auto; font-style: normal; font-size: 10px; border-radius: 99px; padding: 2px 7px; color: var(--primary); background: rgba(0,57,90,.08); }
.nav-item strong { color: rgba(255,255,255,.7); font-weight: 700; }
.nav-divider { height: 1px; background: rgba(255,255,255,.1); margin: 18px 0; }
.side-section-head { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.7); font-size: 12px; margin-bottom: 9px; }
.side-section-head span { font-weight: 700; }
.library-link { margin-top: 4px; }

.workspace { min-width: 0; min-height: 100vh; padding-bottom: 92px; }
.topbar {
  min-height: 92px;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(196, 213, 223, .7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 18px 36px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.platform-label { color: var(--accent); font-weight: 800; font-size: 11px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 6px 0 0; font-size: 34px; line-height: 1.05; letter-spacing: -.04em; font-weight: 600; }
.top-actions { display: flex; gap: 10px; align-items: center; }

.screen-form { padding: 40px 36px 34px; }
.screen { display: none; }
.screen.active { display: block; }
.content-grid { display: grid; grid-template-columns: minmax(470px, 520px) minmax(320px, 420px); gap: 28px; align-items: start; }
.form-stack { display: grid; gap: 18px; }
.panel-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
  border: 1px solid rgba(196, 213, 223, .75);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.panel-card.narrow { max-width: 720px; }
.panel-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.03em; font-weight: 600; }
.screen-copy { margin: 0 0 22px; color: var(--muted); line-height: 1.55; max-width: 62ch; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-weight: 700; color: var(--primary); }
label small, .field-note { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(196, 213, 223, .95);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: rgba(0, 57, 90, .55); box-shadow: 0 0 0 4px rgba(229, 241, 247, .95); transform: translateY(-1px); }
.input-counter { position: relative; }
.input-counter input { padding-right: 80px; }
.counter { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.color-input { display: flex; align-items: center; border: 1px solid rgba(196, 213, 223, .95); border-radius: 14px; overflow: hidden; background: white; }
.color-input input { width: 54px; min-height: 42px; padding: 4px; border: 0; border-radius: 0; }
.color-input span { padding: 0 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.upload-box {
  height: 130px;
  border: 1px dashed rgba(0, 57, 90, .18);
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(236,244,248,.65));
  transition: border-color .14s, background .14s;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--primary); background: linear-gradient(180deg, rgba(229,241,247,.92), rgba(255,255,255,.98)); }
.upload-box img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow); }
.splash-dropzone { cursor: pointer; }
.splash-upload-field { margin-top: 2px; }
.upload-placeholder { text-align: center; color: var(--muted); }

.upload-placeholder b { color: #334155; display: block; margin-bottom: 4px; }
.upload-placeholder small { font-size: 12px; }
.icon-remove { position: absolute; top: 8px; right: 9px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: #334155; }
.promo-card {
  background: linear-gradient(145deg, #ffffff, #eef8fd);
  border: 1px solid rgba(196, 213, 223, .85);
  border-radius: 24px;
  min-height: 150px;
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.promo-card h2 { font-size: 24px; line-height: 1.1; margin: 0 0 10px; font-weight: 600; }
.promo-card p { margin: 0 0 16px; line-height: 1.5; color: #334155; }
.sparkles { position: absolute; right: 14px; top: 14px; color: var(--accent); font-size: 22px; }
.inline-card {
  border: 1px solid rgba(196, 213, 223, .85);
  border-radius: 22px;
  padding: 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fcfe);
  box-shadow: 0 12px 34px rgba(0, 57, 90, .05);
}
.inline-card p { margin: 0; font-size: 12px; line-height: 1.35; max-width: 330px; }
.switch-grid { display: grid; gap: 12px; }
.switch-grid.slim { margin-top: 8px; }
.toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(196, 213, 223, .82);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fcfe);
}
.toggle input { width: 40px; height: 23px; flex: 0 0 auto; appearance: none; border: 0; border-radius: 999px; background: #cbd5e1; position: relative; margin-top: 1px; }
.toggle input::after { content: ''; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: white; top: 2px; left: 2px; box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform .15s; }
.toggle input:checked { background: var(--primary); }
.toggle input:checked::after { transform: translateX(17px); }
.toggle span { display: grid; gap: 2px; }
.toggle small { color: var(--muted); line-height: 1.35; }
.nested { margin-left: 52px; }
.row-toggle-inline { margin-top: 10px; }
.row-toggle-inline input { width: 36px; height: 20px; }
.row-toggle-inline input::after { width: 16px; height: 16px; }
.row-toggle-inline input:checked::after { transform: translateX(16px); }
.preview-tile { display: flex; align-items: center; gap: 24px; border: 1px solid rgba(196, 213, 223, .82); border-radius: 22px; padding: 22px; background: linear-gradient(180deg, #ffffff, #f3f9fc); box-shadow: 0 12px 34px rgba(0, 57, 90, .04); }
.splash-grid { grid-template-columns: minmax(540px, 1fr) minmax(300px, 360px); }
.splash-config-card { display: grid; gap: 20px; }
.splash-preview-card { display: grid; gap: 14px; align-content: start; }
.splash-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.splash-type-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(196, 213, 223, .85);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f9fcfe);
  cursor: pointer;
}
.splash-type-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.splash-type-option span { display: grid; gap: 2px; }
.splash-type-option small { color: var(--muted); line-height: 1.35; }
.splash-type-option:has(input:checked) { border-color: rgba(0, 57, 90, .24); background: linear-gradient(180deg, #f3f9fc, #ffffff); box-shadow: inset 0 0 0 1px rgba(0, 57, 90, .06); }
.splash-appearance-row { align-items: end; }
.splash-gradient-field { display: flex; align-items: stretch; }
.splash-gradient-toggle { min-height: 72px; }
.splash-actions {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(196, 213, 223, .82);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f3f9fc);
}
.splash-actions b { font-size: 15px; }
.splash-actions p { margin: 0; color: var(--muted); line-height: 1.5; }
.splash-phone-preview { width: 150px; height: 270px; border-width: 9px; }
.phone-preview { width: 112px; height: 190px; border: 8px solid #0d2434; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #edf7fb, #fff); box-shadow: 0 18px 40px rgba(0, 57, 90, .18); }
.phone-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.splash-preview-fallback { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; }
#splash-preview-mark { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: white; font-weight: 850; background: linear-gradient(135deg, var(--primary), var(--accent)); }
#splash-preview-name { font-size: 12px; font-weight: 700; }
.splash-preview-card .field-note { margin: 0; }
.coming-soon { border: 1px dashed rgba(0, 57, 90, .18); border-radius: 18px; padding: 22px; color: var(--muted); background: linear-gradient(180deg, #ffffff, #f3f9fc); }
code { background: #eef2f7; border-radius: 6px; padding: 2px 5px; }
.btn {
  border: 1px solid rgba(196, 213, 223, .95);
  background: white;
  color: var(--ink);
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.btn:hover { background: var(--surface-2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 57, 90, .08); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 14px 28px rgba(0, 57, 90, .14); }
.btn-primary:hover { background: #161718; border-color: #161718; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: white; }
.btn-outline:hover { border-color: rgba(0, 57, 90, .28); color: var(--primary); background: #f2f8fb; }
.btn-ghost-danger { border-color: transparent; color: var(--danger); background: transparent; }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn.wide { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.icon-btn { border: 0; background: transparent; color: var(--muted); border-radius: 999px; font-size: 20px; padding: 6px 10px; }
.icon-btn:hover { background: #f1f7fa; }

.empty-state { padding: 64px 32px; }
.empty-card { max-width: 430px; margin: 10vh auto 0; text-align: center; background: linear-gradient(180deg, #ffffff, #f8fcfe); border: 1px solid rgba(196, 213, 223, .75); border-radius: 28px; padding: 38px; box-shadow: var(--shadow); }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); font-size: 22px; }
.empty-card h2 { margin: 0 0 8px; }
.empty-card p { color: var(--muted); line-height: 1.5; }

.save-bar {
  position: fixed;
  left: 280px;
  right: 0;
  bottom: 0;
  min-height: 72px;
  background: rgba(255,255,255,.84);
  border-top: 1px solid rgba(196, 213, 223, .72);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 28px;
  z-index: 30;
  backdrop-filter: blur(16px);
}
.save-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.save-context > span:first-child { color: #0f172a; font-size: 23px; }
.save-context b { color: #0f3a72; font-size: 13px; font-weight: 500; }
.save-actions { display: flex; gap: 8px; align-items: center; }
.form-errors { background: var(--danger-soft); border: 1px solid #fecdd3; color: var(--danger); border-radius: 10px; padding: 12px 14px; margin-top: 18px; }
.form-errors ul { margin: 6px 0 0 18px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 30, 48, .32); display: grid; place-items: center; z-index: 80; backdrop-filter: blur(6px); }
.modal { width: 440px; max-width: calc(100vw - 32px); background: linear-gradient(180deg, #ffffff, #f9fcfe); border: 1px solid rgba(196, 213, 223, .8); border-radius: 28px; box-shadow: 0 24px 80px rgba(0, 57, 90, .24); overflow: hidden; }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 22px; display: grid; gap: 16px; }
.modal-footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; background: var(--surface-2); }

.log-panel { position: fixed; bottom: 0; left: 0; right: 0; height: 310px; background: #03273d; color: #d8f0fb; z-index: 90; display: flex; flex-direction: column; }
.log-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,.08); color: #b9e4f7; }
.log-header .icon-btn { color: #bfdbfe; }
#log-body { flex: 1; overflow: auto; margin: 0; padding: 16px 18px; white-space: pre-wrap; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted-row { color: var(--muted); font-size: 12px; padding: 8px; }


.ui-navigation-grid { grid-template-columns: minmax(520px, 720px) minmax(280px, 360px); }
.nested-block { margin-top: 14px; }
.subsection-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 20px 0 10px; }
.subsection-head b, .subsection-head small { display: block; }
.subsection-head small { color: var(--muted); font-weight: 400; margin-top: 3px; }
.tab-builder { border: 1px solid rgba(196, 213, 223, .82); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #ffffff, #f9fcfe); }
.tab-row { display: grid; grid-template-columns: 1fr 72px 1.4fr; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.tab-row:first-child { border-top: 0; }
.tab-row.head { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.tab-row input { min-height: 38px; padding: 8px 10px; }
.nav-preview-card { position: sticky; top: 82px; }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.preview-header b { color: var(--primary); }
.ui-nav-preview { --preview-primary: var(--primary); position: relative; width: 230px; height: 420px; margin: 0 auto 14px; border: 10px solid #0c2435; border-radius: 36px; overflow: hidden; background: #f8fafc; box-shadow: 0 28px 70px rgba(0, 57, 90, .18); }
.preview-topbar { height: 50px; display: flex; align-items: center; padding: 0 16px; color: white; font-weight: 800; background: linear-gradient(135deg, var(--preview-primary), #0a567f); }
.preview-webpage { padding: 20px 14px 82px; min-height: 100%; background: linear-gradient(180deg, #ffffff, #edf7fb); }
.preview-hero { height: 86px; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 14%, white), #edf7fb); border: 1px solid var(--line); margin-bottom: 16px; }
.preview-line { height: 10px; width: 68%; border-radius: 999px; background: #dbe5f2; margin: 10px 0; }
.preview-line.wide { width: 92%; }
.preview-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.preview-card-row span { height: 74px; border-radius: 14px; background: white; border: 1px solid var(--line); }
.preview-bottom-tabs { position: absolute; left: 0; right: 0; bottom: 0; min-height: 64px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 8px 8px 10px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
.preview-bottom-tabs span { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 10px; }
.preview-bottom-tabs span.active { color: var(--preview-primary); }
.preview-bottom-tabs b { font-size: 17px; line-height: 1; }
.preview-bottom-tabs small { font-size: 10px; font-weight: 700; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-floating-menu { position: absolute; right: 16px; bottom: 20px; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: white; font-size: 22px; font-weight: 850; background: var(--preview-primary); box-shadow: 0 14px 30px color-mix(in srgb, var(--preview-primary) 35%, transparent); }



.brand-logo-image { height: 68px; width: auto; max-width: calc(100% - 82px); display: block; object-fit: contain; flex: 0 0 auto; }
.brand-logo { color: white; font-weight: 950; letter-spacing: -.02em; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.brand-row { position: relative; }
.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: white;
  border-radius: 16px;
  padding: 4px 6px;
}
.brand-block:hover { background: rgba(255,255,255,.08); }

/* AppWrap PNG logo — combined icon + wordmark. Sized to fit the sidebar
   brand row. The fallback gradient mark + text only render if the image
   fails to load (handled by the inline onerror in index.html). */
.brand-logo {
  /* Fills the brand-row horizontally. The source PNG is square with a lot of
     transparent padding around the icon+wordmark; setting width:100% makes
     the visible content read at a comfortable size in the sidebar. */
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  /* Pull vertically tight against the row edges — trims the empty band
     above and below the visible content. */
  margin-block: -28px;
}
.brand-fallback, .brand-text-fallback { display: none; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 850;
  letter-spacing: -.03em;
  font-size: 14px;
  background: linear-gradient(180deg, #ffffff, #e9f5fa);
  box-shadow: 0 14px 28px rgba(0, 17, 27, .22);
  flex: 0 0 auto;
}
.brand-text {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.04em;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-pill {
  /* Float in the top-right of the brand-row so the logo can use the full
     horizontal space. `.brand-row { position: relative }` gives the anchor. */
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 64px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: white;
  border: 1px solid rgba(255,255,255,.14);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.profile-pill:hover { background: rgba(255,255,255,.18); }
.profile-pill[aria-expanded="true"] { background: rgba(255,255,255,.18); box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.profile-pill:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.profile-pill span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--primary); font-weight: 800; font-size: 12px; }

/* Dropdown anchored to the brand row */
.profile-menu {
  position: absolute;
  top: calc(100% - 2px);
  right: 6px;
  min-width: 240px;
  background: linear-gradient(180deg, #ffffff, #f8fcfe);
  border: 1px solid rgba(196, 213, 223, .8);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 57, 90, .14), 0 2px 6px rgba(0, 57, 90, .06);
  padding: 6px;
  z-index: 100;
  animation: profileMenuIn .14s ease-out;
}
@keyframes profileMenuIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.profile-menu-item:hover { background: #eff7fb; }
.profile-menu-item:disabled { opacity: .55; cursor: not-allowed; }
.profile-menu-item:disabled:hover { background: transparent; }
.profile-menu-item .menu-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  flex: 0 0 auto;
}
.profile-menu-item b { display: block; font-size: 13px; font-weight: 700; }
.profile-menu-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.profile-menu-divider { height: 1px; background: var(--line); margin: 4px 6px; }
.team-switcher { min-height: 62px; display: flex; align-items: center; gap: 12px; border-bottom: 1px dashed rgba(255,255,255,.14); margin: 0 0 24px; padding: 14px 2px 22px; color: rgba(255,255,255,.9); }
.team-switcher .team-avatar { width: 36px; height: 36px; display: grid; place-items: center; color: var(--primary); background: white; border-radius: 50%; font-weight: 850; }
.team-switcher span:nth-child(2) { flex: 1; font-weight: 650; }
.global-nav { display: grid; gap: 12px; border-bottom: 1px dashed rgba(255,255,255,.14); padding-bottom: 28px; margin-bottom: 22px; }
.global-nav-item { min-height: 52px; border: 1px solid transparent; border-radius: 999px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: transparent; color: rgba(255,255,255,.86); text-align: left; }
.global-nav-item.active { background: white; color: var(--primary); box-shadow: 0 16px 32px rgba(0, 21, 33, .18); }
.home-mode .app-context-only { display: none !important; }
.editor-mode .global-nav { display: none; }
.editor-mode .team-switcher { display: none; }
.home-mode .workspace { padding: 0; }
.home-mode .topbar { min-height: 88px; background: rgba(255,255,255,.74); border-bottom: 1px solid rgba(196, 213, 223, .72); padding: 18px 28px; box-shadow: none; border-radius: 0; }
.home-mode .platform-label, .home-mode .back-to-apps { display: none; }
.back-to-apps { border: 0; background: transparent; color: var(--muted); font-weight: 750; padding: 0; margin-bottom: 8px; }
.back-to-apps:hover { color: var(--primary); }
.home-mode #screen-title { font-size: 28px; font-weight: 600; }
.home-mode #delete-app-btn, .home-mode #submit-build-btn { display: none; }
.editor-mode .home-only { display: none; }
.apps-home { padding: 34px 28px; min-height: calc(100vh - 88px); background: transparent; }
.home-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1380px; margin-bottom: 22px; }
.home-search { width: min(448px, 100%); height: 48px; display: flex; align-items: center; gap: 10px; color: #5b6678; border: 1px solid rgba(196, 213, 223, .92); border-radius: 999px; background: rgba(255,255,255,.94); padding: 0 16px; box-shadow: 0 10px 24px rgba(0, 57, 90, .05); }
.home-search input { border: 0; outline: 0; background: transparent; width: 100%; color: #0f172a; }
.home-filters { display: flex; align-items: center; gap: 16px; }
.home-filters select { width: 180px; height: 48px; border: 1px solid rgba(196, 213, 223, .92); border-radius: 999px; background: rgba(255,255,255,.94); color: #334155; padding: 0 16px; box-shadow: 0 10px 24px rgba(0, 57, 90, .05); }
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(300px, 480px)); gap: 24px; align-items: start; max-width: 1040px; }
.home-app-card { min-height: 170px; border: 1px solid rgba(196, 213, 223, .84); background: linear-gradient(180deg, #ffffff, #f8fcfe); border-radius: 28px; padding: 22px; text-align: left; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.home-app-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--primary), #0d5b87, #75d6ff); }
.home-app-card:hover { transform: translateY(-3px); border-color: rgba(0, 57, 90, .16); box-shadow: 0 18px 44px rgba(0, 57, 90, .12); }
.home-card-open { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; width: 100%; }
.home-card-open:hover { background: transparent; }
.home-card-actions { display: flex; justify-content: flex-end; }
.home-apk-link { min-width: 128px; }
.home-apk-hint { color: var(--muted); font-size: 12px; align-self: center; }
.home-card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 34px; gap: 14px; align-items: start; }
.home-app-icon, .home-app-fallback { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.home-app-fallback { display: none; place-items: center; color: white; font-weight: 850; }
.home-app-title b { display: flex; align-items: center; min-height: 24px; font-size: 18px; font-weight: 750; color: #0f172a; }
.home-app-title small { display: block; color: #64748b; font-size: 14px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-icons { color: #96a8b8; white-space: nowrap; font-size: 15px; padding-top: 7px; }
.card-menu { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(196, 213, 223, .92); border-radius: 999px; color: #0f172a; font-weight: 800; justify-self: end; background: rgba(236,244,248,.7); }
.home-card-divider { height: 1px; background: var(--line); margin: 30px 0 18px; }
.home-card-foot { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; height: 26px; border-radius: 999px; padding: 0 11px; font-size: 10px; font-weight: 800; }
.badge.paid { border: 1px solid rgba(196, 213, 223, .92); color: #0f172a; background: white; }
.badge.starter { border: 1px solid #6ee7b7; color: #059669; background: #ecfdf5; }
.owner-dot { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-weight: 850; box-shadow: 0 12px 24px rgba(0,57,90,.18); }

.order-shell { max-width: 1180px; display: grid; gap: 24px; }
.order-crumbs { display: flex; align-items: center; gap: 5px; min-height: 34px; font-size: 15px; color: #0f172a; }
.copy-chip, .help-chip { border: 1px solid rgba(196, 213, 223, .9); background: rgba(255,255,255,.94); border-radius: 999px; padding: 8px 12px; color: #0f172a; }
.help-chip { margin-left: auto; }
.platform-tabs { min-height: 58px; display: flex; align-items: center; gap: 14px; padding: 8px; border: 1px solid rgba(196, 213, 223, .8); border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); width: fit-content; }
.platform-tab { min-width: 100px; height: 42px; border: 0; border-radius: 999px; background: transparent; color: #0f172a; font-weight: 700; padding: 0 18px; }
.platform-tab.active { color: white; background: var(--primary); }
.order-section { display: grid; gap: 10px; }
.order-section h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-card { background: linear-gradient(180deg, #ffffff, #f9fcfe); border: 1px solid rgba(196, 213, 223, .82); border-radius: 26px; padding: 24px 20px; box-shadow: var(--shadow); }
.app-info-card { display: grid; gap: 18px; grid-template-columns: 1fr; }
.app-info-card h3 { margin: 0 0 7px; font-size: 20px; }
.app-info-card a { color: var(--primary); text-decoration: none; font-size: 15px; }
.dashed-line { grid-column: 1 / -1; border-top: 1px dashed var(--line-strong); }
.order-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; }
.order-row b { display: block; margin-bottom: 3px; }
.order-row small { color: #7690b0; line-height: 1.35; }
.phone-badge { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(0, 57, 90, .1); background: linear-gradient(180deg, #ffffff, #ebf5fa); color: var(--primary); font-size: 24px; box-shadow: 0 12px 24px rgba(0,57,90,.08); }
.platform-panel { display: none; }
.platform-panel.active { display: block; }
.build-status { color: #0b7a68; background: #e8fbf6; border-radius: 999px; padding: 10px 14px; white-space: nowrap; font-weight: 700; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); background: white; }
.btn-outline-danger:hover { background: var(--danger-soft); }
.danger-zone h2 { color: #dc2626; }
.danger-card { display: grid; gap: 12px; padding: 12px; }
.danger-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; border: 1px solid rgba(203, 75, 75, .18); border-radius: 20px; padding: 18px; background: linear-gradient(180deg, #fffdfd, #fff5f5); }
.danger-row small { color: #7690b0; line-height: 1.45; }
.danger-row em { color: #dc2626; font-style: normal; }


.editor-platform-switcher { display: inline-flex; gap: 4px; margin-top: 14px; padding: 6px; border: 1px solid rgba(196, 213, 223, .86); border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(0,57,90,.06); }
.config-platform { border: 0; border-radius: 999px; padding: 7px 14px; background: transparent; color: var(--muted); font-weight: 800; }
.config-platform.active { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(0,57,90,.18); }
.platform-form { display: none; }
.platform-form.active { display: grid; gap: 16px; }
.ios-settings-card { display: grid; gap: 16px; border: 1px solid rgba(196, 213, 223, .84); border-radius: 24px; padding: 22px; background: linear-gradient(180deg, #ffffff, #f7fbfd); box-shadow: var(--shadow); }
.platform-card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed rgba(196, 213, 223, .92); }
.platform-card-head > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: linear-gradient(180deg, #ffffff, #ebf5fa); font-weight: 900; font-size: 20px; box-shadow: 0 12px 24px rgba(0,57,90,.08); }
.platform-card-head b { display: block; font-size: 16px; }
.platform-card-head small { color: var(--muted); line-height: 1.4; }
.app-store-settings { align-items: center; justify-content: space-between; gap: 16px; }
.app-store-settings p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }

/* ── W2N-style settings rows (App Settings → Android-specific) ────────────── */
.setting-rows { margin-top: 18px; padding: 0; }
.setting-rows-head { display: flex; flex-direction: column; gap: 4px; padding: 22px 26px 16px; border-bottom: 1px solid rgba(196, 213, 223, .9); }
.setting-rows-head .platform-label { color: var(--muted); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.setting-rows-head h2 { margin: 0; font-size: 18px; }
.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 26px;
  border-top: 1px solid rgba(196, 213, 223, .82);
}
.setting-row:first-of-type { border-top: 0; }
.setting-row > div:first-child { min-width: 0; }
.setting-row b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--ink); font-weight: 700; }
.setting-row small { display: block; color: var(--muted); line-height: 1.45; font-weight: 400; }
.setting-row .setting-row-control { display: flex; align-items: center; gap: 10px; justify-self: end; }
.setting-row .color-input { min-width: 138px; }
.setting-row .hex-text { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }

/* Compact pill-style toggle for the right side of a row */
.row-toggle { position: relative; width: 42px; height: 24px; cursor: pointer; }
.row-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.row-toggle span {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .15s;
}
.row-toggle span::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15,23,42,.25);
  transition: transform .15s;
}
.row-toggle input:checked + span { background: var(--primary); }
.row-toggle input:checked + span::after { transform: translateX(18px); }
.row-toggle.disabled { opacity: .55; cursor: not-allowed; }
.row-toggle.disabled input { cursor: not-allowed; }

.orientation-radios { display: flex; align-items: center; gap: 18px; }
.orientation-radios label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.orientation-radios input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; min-height: 0; padding: 0; }

.pro-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: #fff0eb; color: #c2410c;
  border: 1px solid #fed7c2;
  font-size: 10px; font-weight: 700;
  margin-left: 6px;
}

/* Auth, profile, and users screens */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, rgba(117, 213, 255, .24), transparent 30%), linear-gradient(180deg, rgba(2, 43, 68, .08), rgba(244, 249, 252, .96));
  z-index: 200;
}
.auth-card {
  width: min(480px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,254,.96));
  border: 1px solid rgba(196, 213, 223, .82);
  border-radius: 32px;
  padding: 34px;
  box-shadow: 0 28px 80px rgba(0, 57, 90, .18);
}
.auth-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.auth-logo {
  /* Source PNG is 1024² with significant transparent padding around the icon+
     wordmark. Sizing generously so the visible content reads as the hero. */
  height: 360px;
  width: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
  margin-bottom: -40px; /* trim a bit of the natural whitespace below */
}
.auth-brand { margin-top: -24px; } /* and a bit at the top */
.auth-form { display: grid; gap: 16px; }
.auth-form h1 { font-size: 25px; margin: 0; }
.auth-copy { color: var(--muted); line-height: 1.55; margin: -6px 0 2px; }
.auth-submit { width: 100%; min-height: 44px; }
.auth-footer { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-loading-state { display: grid; place-items: center; gap: 14px; color: var(--muted); min-height: 190px; }
.auth-spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 999px; animation: authSpin .75s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-loading .studio-shell { filter: blur(2px); pointer-events: none; user-select: none; }
.form-success { background: #ecfdf5; border: 1px solid #bbf7d0; color: #047857; border-radius: 10px; padding: 12px 14px; margin-top: 18px; }
.readonly-pill { display: inline-flex; min-height: 38px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--primary); background: var(--primary-soft); font-weight: 800; width: fit-content; }
.profile-tabs, .settings-tabs { display: inline-flex; gap: 6px; margin: 4px 0 22px; padding: 6px; border: 1px solid rgba(196, 213, 223, .86); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 8px 22px rgba(0,57,90,.06); }
.profile-tab, .settings-tab { border: 0; border-radius: 999px; padding: 8px 16px; background: transparent; color: var(--muted); font-weight: 800; }
.profile-tab.active, .settings-tab.active { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(0,57,90,.18); }
.profile-panel, .settings-panel { display: none; }
.profile-panel.active, .settings-panel.active { display: grid; gap: 16px; }
.settings-hardware-intro { align-items: center; justify-content: space-between; gap: 16px; }
.settings-hardware-intro p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.global-mode .app-context-only,
.global-mode .top-actions,
.global-mode .editor-platform-switcher { display: none !important; }
.global-mode .workspace { padding-bottom: 0; }
.global-mode .topbar { height: 72px; background: white; border-bottom: 1px solid var(--line); padding: 0 28px; }
.users-table { display: grid; gap: 8px; }
.users-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.2fr) 150px auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.users-head { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.users-head span { padding: 0 4px; }
.user-actions { display: flex; gap: 8px; justify-content: flex-end; }
.user-actions .btn { min-height: 36px; padding: 7px 11px; }

/* ── Documentation reader ─────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  max-width: 1200px;
}
.docs-sidebar {
  position: sticky;
  top: 78px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.docs-sidebar-title { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.docs-sidebar-copy { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.docs-list { display: grid; gap: 6px; }
.docs-list-item {
  display: grid;
  gap: 3px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.docs-list-item:hover { background: var(--surface-2); border-color: var(--line); }
.docs-list-item.active { background: var(--primary-soft); border-color: #bfd2ff; }
.docs-list-item b { font-size: 13px; font-weight: 700; }
.docs-list-item small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.docs-list-item.unavailable { opacity: .55; cursor: not-allowed; }

.docs-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 36px;
  box-shadow: var(--shadow);
  min-height: 60vh;
  max-width: 880px;
  overflow-x: auto;
}
.docs-meta { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.docs-meta-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.docs-meta h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.docs-download { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; font-size: 13px; text-decoration: none; }
.docs-summary { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.docs-updated { color: var(--faint); font-size: 12px; }

/* Rendered markdown styles — scoped to .docs-content so we don't bleed
   into the rest of the dashboard. Tuned to feel like GitHub's reader. */
.docs-content { color: var(--ink); line-height: 1.65; font-size: 15px; }
.docs-content h1, .docs-content h2, .docs-content h3, .docs-content h4 { line-height: 1.25; letter-spacing: -.01em; }
.docs-content h1 { font-size: 26px; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.docs-content h2 { font-size: 21px; margin: 28px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.docs-content h3 { font-size: 17px; margin: 22px 0 8px; }
.docs-content h4 { font-size: 14px; margin: 18px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.docs-content p { margin: 0 0 14px; }
.docs-content ul, .docs-content ol { margin: 0 0 14px; padding-left: 24px; }
.docs-content li { margin-bottom: 6px; }
.docs-content a { color: var(--primary); text-decoration: none; }
.docs-content a:hover { text-decoration: underline; }
.docs-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #eef2f7;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  color: #1e293b;
}
.docs-content pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 12px 0 18px;
  font-size: 13px;
  line-height: 1.55;
}
.docs-content pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.docs-content blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
}
.docs-content hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.docs-content strong { font-weight: 700; }

@media (max-width: 960px) {

  .studio-shell { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .home-toolbar { flex-direction: column; align-items: stretch; }
  .home-filters { justify-content: space-between; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace { padding-bottom: 92px; }
  .topbar { padding-left: 16px; }
  .screen-form { padding: 22px 16px; }
  .content-grid, .ui-navigation-grid { grid-template-columns: 1fr; }
  .order-row, .danger-row, .app-info-card { grid-template-columns: 1fr; }
  .build-validity { justify-items: start; }
  .platform-tabs { overflow-x: auto; align-items: center; }
  .save-bar { left: 0; flex-wrap: wrap; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: relative; top: auto; max-height: none; }
  .docs-article { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .topbar { height: auto; padding: 12px 14px; gap: 12px; align-items: flex-start; }
  .top-actions, .save-actions { flex-wrap: wrap; justify-content: flex-end; }
  .field-row, .single-break { grid-template-columns: 1fr; }
  .inline-card, .preview-tile { flex-direction: column; align-items: flex-start; }
  .tab-row { grid-template-columns: 1fr; }
}


/* Admin console */
.admin-shell { max-width: 1100px; display: grid; gap: 20px; }
.admin-hero { padding: 26px 28px; }
.admin-hero h2 { margin: 6px 0 8px; font-size: 28px; }
.admin-tabs {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 6px;
  border: 1px solid rgba(196, 213, 223, .86);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 22px rgba(0,57,90,.06);
}
.admin-tab { border: 0; border-radius: 999px; padding: 8px 16px; background: transparent; color: var(--muted); font-weight: 800; }
.admin-tab.active { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(0,57,90,.18); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-card { max-width: none; }
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-card-head .screen-copy { margin-bottom: 0; }

.stripe-settings-form { display: grid; gap: 16px; }
.settings-grid { display: grid; gap: 16px; }
.settings-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stripe-guardrail { border: 1px solid rgba(37, 99, 235, .18); border-radius: 18px; padding: 14px 16px; background: linear-gradient(180deg, #ffffff, #eef7ff); color: var(--muted); margin-bottom: 16px; }
.stripe-guardrail b { display: block; color: var(--primary); margin-bottom: 4px; }
.stripe-guardrail p { margin: 0; line-height: 1.45; }
.switch-row, .mini-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 750; }
.mini-check { margin-top: 8px; font-size: 12px; }
.stripe-status-grid { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) {
  .settings-grid.two-col, .settings-grid.three-col { grid-template-columns: 1fr; }
}
