:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --ink: #161712;
  --muted: #666a61;
  --quiet: #8c8f86;
  --rule: rgba(22, 23, 18, .12);
  --red: #ce1126;
  --red-dark: #9c0f1f;
  --gold: #b69238;
  --green: #25785d;
  --blue: #315f8d;
  --black: #111111;
  --shadow: 0 20px 50px rgba(17, 17, 17, .08);
  --radius: 8px;
  --max: 1480px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

.material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 24;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 68px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(248, 247, 243, .92);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  font-weight: 900;
  transform: skewX(-8deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 13px;
  line-height: 1.15;
  text-transform: uppercase;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions,
.json-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-pill {
  min-height: 40px;
  padding: 4px 6px 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.compact-icon-btn {
  width: 32px;
  min-height: 32px;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.primary-btn {
  padding: 0 15px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(206, 17, 38, .18);
}

.primary-btn:hover {
  background: var(--red-dark);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.icon-btn:disabled {
  cursor: wait;
  opacity: .68;
}

.secondary-btn,
.icon-btn {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule);
}

.danger-btn,
.danger-icon-btn {
  min-height: 40px;
  border: 1px solid rgba(206, 17, 38, .34);
  border-radius: var(--radius);
  background: #fff7f8;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.danger-icon-btn {
  width: 40px;
  padding: 0;
}

.secondary-btn {
  padding: 0 14px;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.app-result {
  width: min(var(--max), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(49, 95, 141, .22);
  border-radius: var(--radius);
  background: #eef5fb;
  color: var(--ink);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
  box-shadow: var(--shadow);
}

.auth-panel {
  width: min(520px, calc(100% - 32px));
  margin: 32px auto 0;
}

.auth-card,
.profile-card {
  padding: 24px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 3px 0 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-card label,
.profile-card label {
  display: grid;
  gap: 7px;
}

.auth-card label span,
.profile-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-card input,
.profile-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
}

.auth-card small,
.profile-actions small {
  min-height: 18px;
  color: var(--muted);
  font-weight: 700;
}

.profile-dialog {
  width: min(760px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.profile-dialog::backdrop {
  background: rgba(22, 23, 18, .34);
}

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

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

.app-result[hidden] {
  display: none;
}

.app-result.is-success {
  border-color: rgba(37, 120, 93, .28);
  background: #eff8f4;
}

.app-result.is-warning {
  border-color: rgba(182, 146, 56, .34);
  background: #fff9e8;
}

.app-result.is-pending {
  border-color: rgba(49, 95, 141, .28);
  background: #eef5fb;
}

.app-result > .material-symbols-outlined {
  color: var(--blue);
  margin-top: 2px;
}

.app-result.is-success > .material-symbols-outlined {
  color: var(--green);
}

.app-result.is-warning > .material-symbols-outlined {
  color: var(--gold);
}

.app-result strong,
.app-result small,
.app-result a {
  display: block;
}

.app-result strong {
  font-size: 13px;
}

.app-result small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.45;
}

.app-result a {
  margin-top: 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.result-links {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.result-link {
  padding: 9px 10px;
  border: 1px solid rgba(37, 120, 93, .22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
}

.result-link span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.result-link small {
  margin-top: 2px;
  color: var(--red);
  font-size: 12px;
}

.app-result button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.progress-bar {
  height: 9px;
  margin-top: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(49, 95, 141, .15);
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width .24s ease;
}

.progress-value {
  min-width: 42px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.workspace {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 8px;
}

.step {
  min-height: 72px;
  padding: 10px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 850;
}

.step.is-active {
  color: var(--red);
  border-color: rgba(206, 17, 38, .32);
  background: #fff8f6;
}

.main-column {
  display: grid;
  gap: 16px;
}

.creator-page:not(.is-active-page) {
  display: none !important;
}

.creator-page.is-active-page {
  display: block;
}

.review-layout.creator-page.is-active-page {
  display: grid;
}

.preview-column.creator-page.is-active-page {
  display: block;
  grid-column: 2;
}

.intro-band,
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-band {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: .98;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.15;
}

.status-strip {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--quiet);
}

.status-strip.is-ready .status-dot {
  background: var(--green);
}

.panel {
  padding: 18px;
}

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

.file-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropzone {
  min-height: 166px;
  border: 2px dashed rgba(49, 95, 141, .28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(49, 95, 141, .08), rgba(182, 146, 56, .08)),
    var(--surface-2);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px;
  color: var(--muted);
}

.dropzone.is-over {
  border-color: var(--red);
  background: #fff8f6;
}

.dropzone .material-symbols-outlined {
  color: var(--blue);
  font-size: 34px;
}

.dropzone strong {
  max-width: 640px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.dropzone small {
  max-width: 620px;
  line-height: 1.55;
}

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

.doc-grid.is-drag-over {
  outline: 2px dashed rgba(49, 95, 141, .38);
  outline-offset: 8px;
  border-radius: var(--radius);
}

.doc-card {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.source-pack-rule { color: var(--muted); font-size: .85rem; font-weight: 700; }
.doc-slot-actions { display: grid; justify-items: end; gap: 6px; }
.doc-slot-actions button { border: 1px solid #d8d8d8; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.doc-slot.is-failed .doc-slot-actions button { border-color: #c9182b; color: #c9182b; }
.doc-drop-hint {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.structured-review-block { grid-column: 1 / -1; display: grid; gap: 10px; }
.structured-review-block h3 { margin: 12px 0 0; }
.review-edit-row { display: grid; grid-template-columns: 1.4fr 1fr 1.5fr 1fr; gap: 8px; align-items: center; }
.review-edit-row input { min-width: 0; border: 1px solid #ddd; border-radius: 9px; padding: 9px 10px; font: inherit; background: #fff; }
.review-experience.review-edit-row { grid-template-columns: 112px minmax(0, 1fr); }
.review-experience.review-edit-row > div.review-experience-fields { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(120px, .5fr) minmax(100px, .35fr); gap: 10px; }
.review-approval { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.review-approval input { width: 22px; height: 22px; accent-color: #c9182b; }
.review-approval span { display: grid; gap: 4px; }
.review-approval small { color: var(--muted); }
.review-approval-inline { margin-top: 18px; padding: 16px; border: 1px solid #d8d8d8; border-radius: 12px; background: #faf9f7; }
.review-approval.needs-attention { border-color: #d71920; background: #fff2f3; box-shadow: 0 0 0 3px rgba(215,25,32,.1); }
@media (max-width: 760px) { .review-edit-row, .review-experience.review-edit-row > div { grid-template-columns: 1fr; } }

.doc-slot.is-ready {
  border-color: rgba(37, 120, 93, .28);
  background: #f3fbf6;
}

.doc-slot.is-extracting {
  border-color: rgba(49, 95, 141, .24);
  background: #f4f8fc;
}

.doc-slot.is-failed {
  border-color: rgba(206, 17, 38, .3);
  background: #fff6f6;
}

.doc-slot.is-required {
  border-style: dashed;
  background: rgba(255, 255, 255, .62);
}

.doc-slot {
  position: relative;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.doc-slot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px dashed transparent;
  border-radius: inherit;
  pointer-events: none;
}

.doc-slot.is-drag-over {
  border-color: rgba(49, 95, 141, .55);
  background: #f2f7fb;
  box-shadow: 0 12px 30px rgba(49, 95, 141, .14);
  transform: translateY(-1px);
}

.doc-slot.is-drag-over::after {
  border-color: var(--blue);
}

.doc-slot.is-drag-over .doc-drop-hint {
  color: var(--blue);
}

.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--blue);
}

.doc-card strong,
.doc-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-card strong {
  font-size: 13px;
}

.doc-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.doc-card .doc-error {
  color: var(--red);
  white-space: normal;
}

.doc-type {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.doc-readiness {
  grid-column: 1 / -1;
  padding: 13px 14px;
  border: 1px solid rgba(206, 17, 38, .22);
  border-radius: var(--radius);
  background: #fff8f6;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.doc-readiness.is-ready {
  border-color: rgba(37, 120, 93, .28);
  background: #f3fbf6;
}

.doc-readiness .material-symbols-outlined {
  color: var(--red);
}

.doc-readiness.is-ready .material-symbols-outlined {
  color: var(--green);
}

.doc-readiness strong,
.doc-readiness small {
  display: block;
}

.doc-readiness strong {
  font-size: 13px;
}

.doc-readiness small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 102px;
  padding: 11px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(206, 17, 38, .6);
  box-shadow: 0 0 0 3px rgba(206, 17, 38, .08);
}

.wide {
  grid-column: 1 / -1;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.td-photo-field {
  display: grid;
  gap: 6px;
}

.td-photo-control {
  min-height: 82px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.td-photo-preview {
  width: 64px;
  height: 64px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.td-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-photo-preview.has-photo > span {
  display: none;
}

.td-photo-actions {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: start;
}

.td-photo-actions .secondary-btn {
  min-height: 38px;
}

.td-photo-actions small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr);
  gap: 16px;
}

.review-wide {
  grid-column: 1 / -1;
}

.review-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.counter {
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.muted-counter {
  background: var(--surface-2);
  color: var(--green);
  border: 1px solid rgba(37, 120, 93, .2);
}

.support-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.profile-note {
  margin-top: 12px;
}

.gallery-target {
  min-width: 220px;
}

.image-picker-tools {
  margin-bottom: 12px;
}

.gallery-search {
  display: grid;
  gap: 6px;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.gallery-tab {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.gallery-tab.is-active {
  background: #fff8f6;
  border-color: rgba(206, 17, 38, .32);
  color: var(--red);
}

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

.gallery-card {
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  color: var(--ink);
}

.gallery-card.is-selected {
  border-color: rgba(206, 17, 38, .74);
  box-shadow: 0 0 0 3px rgba(206, 17, 38, .1);
}

.gallery-thumb {
  display: block;
  width: 100%;
  height: 118px;
  background: #ddd center / cover;
}

.gallery-card strong,
.gallery-card small {
  display: block;
  padding: 0 10px;
}

.gallery-card strong {
  margin-top: 9px;
  font-size: 13px;
}

.gallery-card small {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.online-image-box,
.custom-image-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.online-image-box strong,
.online-image-box small,
.custom-image-box strong,
.custom-image-box small {
  display: block;
}

.online-image-box strong,
.custom-image-box strong {
  font-size: 13px;
}

.online-image-box small,
.custom-image-box small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.online-image-form {
  min-width: min(420px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.custom-image-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.custom-image-row {
  width: 100%;
  min-height: 66px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
}

.custom-image-row.is-selected {
  border-color: rgba(206, 17, 38, .74);
  box-shadow: 0 0 0 3px rgba(206, 17, 38, .1);
}

.custom-image-row:disabled {
  cursor: wait;
  opacity: .72;
}

.custom-image-thumb {
  height: 50px;
  border-radius: 6px;
  background: var(--surface-2) center / cover;
}

.custom-image-row strong,
.custom-image-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-image-row strong {
  font-size: 13px;
}

.custom-image-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.allocation-input {
  min-height: 142px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .94)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(22, 23, 18, .04) 27px 28px);
  font-family: var(--ff);
}

.allocation-input::placeholder {
  color: #c8cdd4;
  opacity: .62;
  font-weight: 600;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}

.profile-form-actions small {
  color: var(--muted);
}

.checklist {
  display: grid;
  gap: 9px;
}

.check-row {
  padding: 11px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

.check-row .material-symbols-outlined {
  color: var(--gold);
}

.check-row strong {
  display: block;
  font-size: 13px;
}

.check-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.45;
}

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

.metric {
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.metric strong,
.metric small {
  display: block;
}

.metric strong {
  font-size: 26px;
  line-height: 1;
}

.metric small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.timing-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.allocation-input::placeholder {
  color: #c4cbd3;
  opacity: .55;
  font-weight: 500;
}

.review-assets {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1fr);
  gap: 12px;
}

.review-asset-hero,
.review-experience {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.review-asset-hero > span,
.review-experience > span {
  display: block;
  background: var(--surface-2) center / cover;
}

.review-asset-hero > span {
  aspect-ratio: 16 / 8;
}

.review-asset-hero div,
.review-experience div {
  padding: 12px;
}

.review-asset-hero strong,
.review-asset-hero small,
.review-experience strong,
.review-experience small {
  display: block;
}

.review-asset-hero strong,
.review-experience strong {
  font-size: 13px;
  line-height: 1.3;
}

.review-asset-hero small,
.review-experience small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.review-experience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.review-experience {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
}

.review-experience > span {
  min-height: 126px;
}

.review-experience-fields {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(120px, .5fr) minmax(100px, .35fr);
  gap: 10px;
}

.review-experience-fields label {
  display: grid;
  gap: 5px;
}

.review-experience-fields small {
  margin: 0;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.review-experience-fields input,
.review-experience-fields textarea {
  width: 100%;
  min-width: 0;
}

.review-description-field {
  grid-column: 1 / -1;
}

.review-visible-toggle {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.review-visible-toggle input {
  width: 18px;
  min-height: 18px;
}

.review-visible-toggle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timing-empty {
  grid-column: 1 / -1;
}

.timing-day {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.timing-day header {
  min-height: 58px;
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.timing-day-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tiny-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.day-hero-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  background: #fbfdff;
}

.day-hero-row > span {
  min-height: 72px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2) center / cover;
}

.day-hero-row label {
  display: grid;
  gap: 6px;
}

.day-hero-row small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timing-day header strong,
.timing-day header span,
.timing-day header small {
  display: block;
}

.timing-day header strong {
  font-size: 13px;
}

.timing-day header span,
.timing-day header small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.timing-rows {
  display: grid;
}

.timing-row {
  min-height: 64px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
  border-top: 1px solid rgba(22, 23, 18, .08);
}

.timing-row:first-child {
  border-top: 0;
}

.timing-row label,
.timing-row-fields {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.timing-row label span {
  display: block;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.timing-row input {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.timing-row input:focus {
  border-color: rgba(206, 17, 38, .32);
  background: #fff;
  outline: 0;
  padding: 0 8px;
}

.timing-time-input {
  color: var(--red) !important;
  font-weight: 950 !important;
  font-variant-numeric: tabular-nums;
}

.timing-row-fields {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}

.timing-delete {
  width: 30px;
  height: 30px;
  margin-top: 17px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.timing-delete .material-symbols-outlined {
  font-size: 17px;
}

.timing-add {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-top: 1px dashed rgba(22, 23, 18, .16);
  background: rgba(248, 247, 243, .72);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timing-missing {
  padding: 13px 12px;
  color: var(--muted);
  font-size: 13px;
}

.preview-column {
  position: static;
}

.phone {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  max-height: none;
  overflow: auto;
  border: 10px solid #151515;
  border-radius: 34px;
  background: #f8f8f6;
  box-shadow: 0 28px 70px rgba(17, 17, 17, .22);
}

.phone-top {
  min-height: 54px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.phone-top button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(206, 17, 38, .22);
  border-radius: 50%;
  background: #fff7f6;
  color: var(--red);
  display: grid;
  place-items: center;
}

.today-hero {
  padding: 22px 18px;
  background:
    linear-gradient(140deg, rgba(206, 17, 38, .95), rgba(17, 17, 17, .88)),
    #b61024;
  color: #fff;
}

.today-hero small {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.today-hero h2 {
  font-size: 30px;
  line-height: 1.03;
}

.today-hero p {
  margin-top: 9px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}

.next-up {
  margin: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ce1126;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.next-up small,
.next-up span {
  display: block;
}

.next-up small {
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.next-up strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.05;
}

.next-up span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  line-height: 1.35;
}

.next-up b {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.next-up.is-late {
  background: repeating-linear-gradient(135deg, #ffde17 0 18px, #f51b26 18px 36px);
  color: #111;
  box-shadow: 0 16px 32px rgba(206, 17, 38, .25);
}

.next-up.is-late small,
.next-up.is-late span {
  color: #111;
}

.next-up.is-late b {
  font-size: 33px;
}

.phone-section {
  margin: 14px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}

.phone-section h3 {
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: uppercase;
}

.timeline-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(22, 23, 18, .08);
}

.timeline-row:first-child {
  border-top: 0;
}

.timeline-row time {
  color: var(--red);
  font-weight: 900;
  font-size: 12px;
}

.timeline-row strong {
  display: block;
  font-size: 13px;
}

.timeline-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

#phoneBrief {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.empty {
  padding: 16px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .preview-column {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 10px 14px;
  }

  .workspace {
    width: min(100% - 20px, var(--max));
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .step {
    min-height: 54px;
  }

  .intro-band,
  .review-layout,
  .form-grid,
  .profile-grid,
  .doc-grid,
  .gallery-grid,
  .review-assets,
  .review-experience-list,
  .timing-overview {
    grid-template-columns: 1fr;
  }

  .preview-column {
    grid-column: auto;
  }

  .phone {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .brand small,
  .top-actions .primary-btn span + span {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .account-pill {
    max-width: 168px;
  }

  #accountName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel,
  .intro-band,
  .auth-card,
  .profile-card {
    padding: 14px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .custom-image-box {
    align-items: stretch;
    flex-direction: column;
  }

  .online-image-box {
    align-items: stretch;
    flex-direction: column;
  }

  .online-image-form {
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .top-actions .primary-btn,
  .top-actions .secondary-btn {
    width: auto;
  }

  .profile-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Workspace redesign shell */
:root {
  --navy: #10223b;
  --soft-radius: 16px;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #f05c56, var(--gold));
}

.workspace-redesign {
  width: min(100%, var(--max));
  margin-top: 0;
  grid-template-columns: 270px minmax(0, 1fr) 380px;
  gap: 24px;
  padding: 22px 24px 44px 0;
}

.workspace-sidebar {
  top: 86px;
  min-height: calc(100vh - 108px);
  padding: 0 16px 16px;
  align-content: start;
  border-right: 1px solid var(--rule);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 20px;
  border-bottom: 1px solid var(--rule);
}

.sidebar-brand strong,
.sidebar-brand small,
.current-tour-card strong,
.current-tour-card small,
.sidebar-help strong,
.sidebar-help small {
  display: block;
}

.sidebar-brand strong {
  font-size: 14px;
  line-height: 1.05;
}

.sidebar-brand small,
.current-tour-card small,
.sidebar-help small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.creator-mark-grid {
  width: 42px;
  height: 42px;
  padding: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.creator-mark-grid i {
  border-radius: 4px;
}

.creator-mark-grid i:nth-child(1) { background: var(--red); }
.creator-mark-grid i:nth-child(2) { background: var(--blue); }
.creator-mark-grid i:nth-child(3) { background: var(--gold); }
.creator-mark-grid i:nth-child(4) { background: #7c57d7; }

.nav-section {
  display: grid;
  gap: 5px;
  margin-top: 18px;
}

.nav-label {
  padding: 0 12px 5px;
  color: #8c8172;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.workspace-sidebar .step {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  place-items: center start;
  text-align: left;
  border-radius: var(--radius);
}

.workspace-sidebar .step span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-sidebar .step.is-active {
  border-color: rgba(16, 34, 59, .2);
  background: var(--navy);
  color: #fff;
}

.nav-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eee9e1;
  color: #6b6257;
  font-size: 11px;
  font-weight: 900;
}

.step.is-active .nav-badge {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.step-number {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.current-tour-card {
  margin: 2px 8px 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}

.tour-brand-square {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 900;
}

.sidebar-help {
  margin: auto 10px 0;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fff, #f4efe8);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: 0;
}

.page-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

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

.workspace-metric,
.tour-card-main,
.create-tour-card,
.activity-panel,
.profile-preview-card {
  border: 1px solid var(--rule);
  border-radius: var(--soft-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 31, 34, .06);
}

.workspace-metric {
  padding: 17px 18px;
}

.workspace-metric strong,
.workspace-metric span {
  display: block;
}

.workspace-metric strong {
  font-size: 26px;
  line-height: 1;
}

.workspace-metric span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tour-board {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, .8fr) 330px;
  gap: 16px;
  align-items: stretch;
}
.tour-list {
  min-width: 0;
  display: grid;
  gap: 14px;
}
.tour-list .tour-card-main {
  min-height: 176px;
}
.tour-card-main.is-current {
  border-color: #8eb0d5;
  box-shadow: 0 0 0 2px rgba(49,95,141,.12), 0 12px 28px rgba(28,31,34,.08);
}
.tour-empty {
  min-height: 176px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  background: rgba(255,255,255,.7);
}
.save-tour-btn {
  margin-left: auto;
}

.tour-card-main {
  min-height: 220px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tour-card-top,
.tour-lockup,
.tour-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-card-top,
.tour-card-actions {
  justify-content: space-between;
}

.tour-card-commands {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tour-lockup h2 {
  margin: 0;
  font-size: 20px;
}

.tour-lockup small {
  color: var(--muted);
  font-size: 12px;
}

.tour-card-main p {
  margin: 0;
  color: #363e47;
  font-weight: 650;
  line-height: 1.45;
}

.workspace-status {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.workspace-status.red { background: #fff0f2; color: var(--red); }
.workspace-status.green { background: #e9f7f1; color: var(--green); }
.workspace-status.gold { background: #f5eed7; color: #947000; }

.dashboard-progress {
  margin-top: auto;
}

.dashboard-progress span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}

.create-tour-card {
  min-height: 220px;
  padding: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  border-style: dashed;
  color: var(--ink);
}

.create-tour-card > span {
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: #fff;
  color: var(--red);
  box-shadow: var(--shadow);
}

.create-tour-card strong,
.create-tour-card small,
.activity-row strong,
.activity-row small {
  display: block;
}

.create-tour-card small {
  max-width: 260px;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.activity-panel {
  padding: 20px;
}

.activity-panel h2 {
  margin: 0 0 14px;
}

.activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eaf3ff;
}

.activity-0 { background: #fff0f2; }
.activity-2 { background: #f5eed7; }

.activity-row strong {
  font-size: 12px;
  line-height: 1.35;
}

.activity-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.setup-action-bar {
  position: sticky;
  bottom: 16px;
  z-index: 8;
  padding: 13px 15px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d7d0c5;
  border-radius: var(--soft-radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(30, 33, 36, .12);
  backdrop-filter: blur(12px);
}

.setup-action-bar:not(.is-active-page) {
  display: none !important;
}

.setup-action-bar strong,
.setup-action-bar span {
  display: block;
}

.setup-action-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.profile-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

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

.profile-preview-card {
  position: sticky;
  top: 94px;
  padding: 24px;
  text-align: center;
}

.profile-large-preview {
  width: 108px;
  height: 108px;
  margin: 0 auto 16px;
  border-radius: 28px;
}

.profile-preview-card h2 {
  margin: 0;
  font-family: "Noto Serif", Georgia, serif;
}

.profile-preview-card p {
  color: var(--muted);
  line-height: 1.45;
}

.profile-preview-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.profile-preview-actions span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: #fff;
  color: var(--red);
}

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

.settings-grid > div {
  padding: 15px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fbfaf8;
}

.settings-grid strong,
.settings-grid small {
  display: block;
}

.account-settings-grid,
.admin-account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-setting-card,
.account-form,
.account-list-wrap {
  padding: 22px;
  border: 2px solid #d6e0ec;
  border-radius: 18px;
  background: #fbfcfe;
}

.account-setting-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-setting-card > .material-symbols-outlined {
  font-size: 38px;
  color: var(--navy);
}

.account-setting-card strong,
.account-setting-card small {
  display: block;
}

.account-setting-card small,
.account-form p,
.account-form > small {
  margin-top: 6px;
  color: var(--muted);
}

.account-form {
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-form h3,
.account-list-wrap h3 {
  margin: 0;
  font-size: 22px;
}

.account-form label {
  display: grid;
  gap: 7px;
}

.account-form label span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-form input {
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid #cbd8e7;
  border-radius: 14px;
  font: inherit;
}

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

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  background: #fff;
}

.account-row.is-open {
  border-color: rgba(49, 95, 141, .42);
  background: #f4f8fd;
}

.account-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

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

.account-row small {
  margin-top: 4px;
  color: var(--muted);
}

.account-row button {
  min-height: 42px;
}

.workspace-owner-strip {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
}

.workspace-owner-strip strong,
.workspace-owner-strip small {
  display: block;
}

.workspace-owner-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

.settings-grid small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.workspace-redesign .preview-column.creator-page.is-active-page {
  grid-column: 3;
}

@media (max-width: 1180px) {
  .workspace-redesign {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .tour-board,
  .profile-workspace-grid,
  .settings-grid,
  .account-settings-grid,
  .admin-account-layout {
    grid-template-columns: 1fr;
  }

  .workspace-redesign .preview-column.creator-page.is-active-page {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .workspace-redesign {
    width: min(100% - 20px, var(--max));
    padding-right: 0;
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    min-height: 0;
    padding: 0;
    border-right: 0;
  }

  .workspace-metrics,
  .profile-inline-form {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-redesign .preview-column.creator-page.is-active-page {
    grid-column: auto;
  }
}

.compact-allocation textarea {
  min-height: 132px;
}

.source-upload-note {
  margin: -6px 0 14px;
}

.profile-photo-uploader {
  padding: 14px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fbfaf8;
}

.profile-form-preview {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: #fff;
}

.profile-photo-copy {
  display: grid;
  gap: 8px;
}

.profile-photo-copy strong,
.profile-photo-copy small {
  display: block;
}

.profile-photo-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.profile-inline-form input[readonly] {
  background: #f4f1eb;
  color: var(--muted);
}

@media (max-width: 640px) {
  .profile-photo-uploader {
    grid-template-columns: 1fr;
  }
}

/* Desktop comfort styling inspired by Expense Locker */
@media (min-width: 960px) {
  :root {
    --bg: #f3f6fb;
    --surface-2: #f7f9fc;
    --rule: rgba(104, 119, 141, .24);
    --shadow: 0 18px 42px rgba(16, 34, 59, .10);
    --radius: 14px;
    --soft-radius: 20px;
  }

  body {
    background:
      linear-gradient(rgba(31, 64, 112, .045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(31, 64, 112, .045) 1px, transparent 1px),
      var(--bg);
    background-size: 96px 96px;
    font-size: 17px;
  }

  .topbar {
    min-height: 78px;
    padding: 14px 30px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    transform: none;
    box-shadow: 0 10px 24px rgba(206, 17, 38, .16);
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 14px;
  }

  .primary-btn,
  .secondary-btn,
  .icon-btn {
    min-height: 52px;
    border-radius: 999px;
    gap: 10px;
    font-size: 16px;
    font-weight: 900;
  }

  .primary-btn {
    padding: 0 28px;
    background: linear-gradient(135deg, #e3182d, #b4071d);
    box-shadow: 0 16px 34px rgba(206, 17, 38, .22);
  }

  .secondary-btn {
    padding: 0 22px;
    background: #eef3f8;
    border-color: #cfd9e6;
    color: #101a2b;
  }

  .icon-btn {
    width: 52px;
    background: #eef3f8;
    border-color: #cfd9e6;
  }

  .material-symbols-outlined {
    font-size: 24px;
  }

  .workspace-redesign {
    max-width: 1640px;
    grid-template-columns: 320px minmax(0, 1fr) 430px;
    gap: 30px;
    padding: 28px 34px 56px 0;
  }

  .workspace-sidebar {
    padding: 0 22px 22px;
  }

  .sidebar-brand {
    padding: 10px 10px 24px;
    gap: 14px;
  }

  .creator-mark-grid {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    gap: 5px;
    padding: 9px;
  }

  .sidebar-brand strong {
    font-size: 18px;
  }

  .sidebar-brand small {
    font-size: 14px;
  }

  .nav-section {
    gap: 9px;
    margin-top: 24px;
  }

  .nav-label {
    padding: 0 16px 6px;
    font-size: 12px;
  }

  .workspace-sidebar .step {
    min-height: 62px;
    padding: 0 18px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    border-radius: 18px;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(16, 34, 59, .04);
  }

  .workspace-sidebar .step.is-active {
    background: linear-gradient(135deg, #10223b, #183d67);
    box-shadow: 0 16px 34px rgba(16, 34, 59, .22);
  }

  .nav-badge {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 14px;
  }

  .step-number {
    font-size: 14px;
  }

  .current-tour-card {
    min-height: 92px;
    padding: 18px;
    grid-template-columns: 42px minmax(0, 1fr);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(16, 34, 59, .06);
  }

  .tour-brand-square {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
  }

  .current-tour-card strong {
    font-size: 18px;
  }

  .current-tour-card small,
  .sidebar-help small {
    font-size: 14px;
  }

  .sidebar-help {
    padding: 18px;
    border-radius: 18px;
  }

  .main-column {
    gap: 24px;
  }

  .page-head {
    margin-bottom: 28px;
  }

  .page-head h1,
  .intro-band h1 {
    font-size: 56px;
    line-height: .98;
  }

  .page-head p,
  .intro-band p {
    max-width: 900px;
    font-size: 20px;
    line-height: 1.55;
  }

  .eyebrow,
  .panel-kicker {
    font-size: 13px;
    letter-spacing: .18em;
  }

  .intro-band,
  .panel,
  .tour-card-main,
  .create-tour-card,
  .activity-panel,
  .profile-preview-card {
    border: 1px solid #d6e0ec;
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(16, 34, 59, .09);
  }

  .intro-band,
  .panel {
    padding: 34px;
  }

  .panel-head {
    margin-bottom: 24px;
  }

  .panel-head h2,
  .activity-panel h2 {
    font-size: 30px;
    line-height: 1.05;
  }

  .workspace-metrics {
    gap: 18px;
    margin-bottom: 24px;
  }

  .workspace-metric {
    min-height: 118px;
    padding: 24px;
    border-radius: 20px;
    border-color: #d6e0ec;
    background: #fff;
  }

  .workspace-metric strong {
    font-size: 42px;
  }

  .workspace-metric span {
    font-size: 13px;
  }

  .tour-board {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .tour-card-main,
  .create-tour-card {
    min-height: 230px;
    padding: 28px;
  }

  .tour-list {
    max-width: 1080px;
  }

  .create-tour-card {
    max-width: 1080px;
    min-height: 190px;
  }

  .activity-panel {
    max-width: 1080px;
  }

  .tour-lockup h2 {
    font-size: 30px;
  }

  .tour-lockup small,
  .tour-card-main p {
    font-size: 17px;
  }

  .workspace-status {
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
  }

  .progress-bar {
    height: 12px;
    background: #e5ebf2;
  }

  .progress-fill {
    background: linear-gradient(90deg, #ff2fb9, #d000ff);
  }

  .create-tour-card > span {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    font-size: 34px;
  }

  .create-tour-card strong {
    font-size: 24px;
  }

  .create-tour-card small {
    font-size: 16px;
  }

  .activity-panel {
    padding: 28px;
  }

  .activity-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 17px 0;
  }

  .activity-dot {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .activity-row strong {
    font-size: 16px;
  }

  .activity-row small {
    font-size: 14px;
  }

  .form-grid,
  .profile-inline-form {
    gap: 20px;
  }

  .form-grid label span,
  .profile-card label span,
  .auth-card label span,
  .field-label,
  .gallery-search span,
  .gallery-target span {
    font-size: 13px;
    letter-spacing: .08em;
  }

  input,
  select,
  textarea,
  .auth-card input,
  .profile-card input {
    min-height: 64px;
    border: 2px solid #ccd8e7;
    border-radius: 18px;
    padding: 0 22px;
    font-size: 22px;
    font-weight: 750;
    background: #fff;
  }

  textarea,
  .allocation-input {
    padding: 18px 22px;
    font-size: 18px;
    line-height: 1.45;
  }

  .compact-allocation textarea {
    min-height: 118px;
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: #6a99d7;
    box-shadow: 0 0 0 5px rgba(49, 95, 141, .12);
  }

  .doc-grid {
    gap: 18px;
  }

  .doc-card {
    min-height: 128px;
    padding: 22px;
    border-radius: 20px;
    border: 2px solid #d6e0ec;
    box-shadow: 0 12px 28px rgba(16, 34, 59, .06);
  }

  .doc-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .doc-card strong {
    font-size: 20px;
  }

  .doc-card small {
    font-size: 15px;
  }

  .doc-type {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
  }

  .doc-slot-actions button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
  }

  .setup-action-bar {
    padding: 20px 24px;
    border-radius: 24px;
  }

  .setup-action-bar strong {
    font-size: 18px;
  }

  .setup-action-bar span,
  .support-copy {
    font-size: 16px;
  }

  .profile-photo-uploader {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
    border: 2px solid #d6e0ec;
    border-radius: 22px;
  }

  .profile-form-preview {
    width: 124px;
    height: 124px;
    border-radius: 30px;
  }

  .profile-photo-copy strong {
    font-size: 22px;
  }

  .profile-photo-copy small,
  .profile-preview-card p {
    font-size: 16px;
  }

  .profile-preview-card {
    padding: 34px;
  }

  .profile-large-preview {
    width: 136px;
    height: 136px;
    border-radius: 34px;
  }

  .profile-preview-card h2 {
    font-size: 34px;
  }

  .profile-preview-actions span {
    width: 56px;
    height: 56px;
  }

  .gallery-tabs {
    gap: 10px;
    margin-bottom: 20px;
  }

  .gallery-tab {
    min-height: 52px;
    padding: 0 20px;
    border-radius: 16px;
    font-size: 16px;
  }

  .gallery-tab.is-active {
    background: #fff0f2;
    border-color: rgba(206, 17, 38, .34);
    box-shadow: 0 10px 24px rgba(206, 17, 38, .10);
  }

  .gallery-grid {
    gap: 18px;
  }

  .gallery-card {
    border-radius: 20px;
    border: 2px solid #d6e0ec;
    box-shadow: 0 12px 28px rgba(16, 34, 59, .06);
  }

  .gallery-thumb {
    height: 176px;
  }

  .gallery-card strong {
    margin-top: 14px;
    font-size: 19px;
  }

  .gallery-card small {
    margin: 6px 0 16px;
    font-size: 15px;
  }

  .online-image-box,
  .custom-image-box {
    padding: 20px;
    border-radius: 20px;
    background: #eef3f8;
  }

  .online-image-box strong,
  .custom-image-box strong {
    font-size: 20px;
  }

  .online-image-box small,
  .custom-image-box small {
    font-size: 16px;
  }

  .review-layout {
    gap: 22px;
  }

  .review-experience.review-edit-row {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .review-experience > span {
    min-height: 190px;
  }

  .review-experience.review-edit-row > div.review-experience-fields,
  .review-experience-fields {
    grid-template-columns: minmax(300px, 1fr) minmax(160px, .45fr) minmax(130px, .32fr);
    gap: 14px;
  }

  .review-experience-fields input,
  .review-experience-fields textarea,
  .day-hero-row input {
    min-height: 46px;
    border-width: 1px;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
  }

  .review-experience-fields textarea {
    min-height: 92px;
    line-height: 1.35;
  }

  .check-row,
  .metric,
  .timing-day,
  .review-asset-hero,
  .review-experience,
  .settings-grid > div {
    border: 2px solid #d6e0ec;
    border-radius: 18px;
  }

  .check-row {
    padding: 18px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .check-row strong,
  .review-asset-hero strong,
  .review-experience strong,
  .timing-day header strong {
    font-size: 18px;
  }

  .check-row small,
  .review-asset-hero small,
  .review-experience small,
  .timing-day header span,
  .timing-day header small {
    font-size: 15px;
  }

  .metric {
    padding: 22px;
  }

  .metric strong {
    font-size: 40px;
  }

  .metric small {
    font-size: 13px;
  }
}

/* Final desktop spacing pass: keep editor pages wide and make TD profile clearly editable. */
@media (min-width: 960px) {
  .workspace-redesign {
    grid-template-columns: 320px minmax(0, 1fr);
    column-gap: 34px;
  }

  .main-column {
    grid-column: 2;
    width: 100%;
    max-width: 1320px;
    min-width: 0;
  }

  .workspace-redesign:has(.preview-column.is-active-page) {
    grid-template-columns: 320px minmax(0, 1fr) 430px;
  }

  .workspace-redesign:has(.preview-column.is-active-page) .main-column {
    max-width: none;
  }

  .profile-workspace .page-head {
    max-width: 1120px;
    align-items: center;
  }

  .profile-workspace .page-head h1 {
    font-size: 48px;
    line-height: 1;
  }

  .profile-workspace .page-head p {
    max-width: 760px;
  }

  .profile-workspace-grid {
    grid-template-columns: minmax(680px, 1fr) 360px;
    gap: 28px;
    max-width: 1180px;
  }

  .profile-workspace-grid > .panel {
    padding: 30px;
  }

  .profile-workspace-grid .panel-head {
    margin-bottom: 20px;
  }

  .profile-workspace-grid .panel-head h2 {
    max-width: 620px;
    font-size: 26px;
    line-height: 1.15;
  }

  .profile-inline-form {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    align-items: start;
  }

  .profile-photo-uploader.wide {
    grid-column: 1 / -1;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 190px;
  }

  .profile-form-preview {
    width: 140px;
    height: 140px;
  }

  .profile-photo-copy {
    align-content: center;
    gap: 12px;
  }

  .profile-photo-copy .file-picker {
    width: max-content;
    min-width: 210px;
  }

  .profile-preview-card {
    top: 112px;
  }

  .intro-band.creator-page.is-active-page {
    max-width: 1120px;
    padding: 28px 34px;
  }

  .intro-band.creator-page.is-active-page h1 {
    font-size: 44px;
    line-height: 1;
  }

  .intro-band.creator-page.is-active-page p {
    max-width: 860px;
    font-size: 18px;
  }

  #detailsPanel,
  #uploadPanel,
  #galleryPanel,
  .image-bank-panel,
  #reviewPanel,
  .creator-page[data-page="publish"].panel,
  .creator-page[data-page="settings"].panel {
    max-width: 1180px;
  }

  #detailsPanel .panel-head,
  #galleryPanel .panel-head,
  #uploadPanel .panel-head {
    align-items: center;
  }

  #detailsPanel .form-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

  #detailsPanel .compact-allocation {
    grid-column: 1 / -1;
  }

  #detailsPanel input,
  #detailsPanel select,
  #detailsPanel textarea {
    font-size: 18px;
  }

  #detailsPanel input,
  #detailsPanel select {
    min-height: 58px;
  }

  .setup-action-bar.creator-page.is-active-page {
    max-width: 1180px;
  }

  .review-layout.creator-page.is-active-page {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1180px;
    gap: 26px;
  }

  .review-layout .panel {
    min-width: 0;
  }

  .review-layout .panel-head {
    align-items: center;
  }

  .review-layout .panel-head h2 {
    font-size: 28px;
    line-height: 1.15;
  }

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

  .review-approval {
    padding: 18px;
    border: 1px solid #d6e0ec;
    border-radius: 18px;
    background: #fbfdff;
  }
  .timing-overview {
    grid-template-columns: 1fr;
  }
  .timing-row {
    grid-template-columns: 110px minmax(0, 1fr) 46px;
    padding: 14px 18px;
  }
  .timing-row-fields {
    grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.5fr);
    gap: 18px;
  }
  .timing-row input {
    min-height: 44px;
    font-size: 16px;
  }
}

/* Final desktop layout guard.
   Earlier responsive blocks were leaving the create-tour card as a middle column,
   which produced the tall blank panel shown on normal desktop widths. */
@media (min-width: 1120px) {
  .workspace-redesign {
    width: 100%;
    max-width: none;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    padding-right: 34px;
  }

  .main-column {
    grid-column: 2;
    min-width: 0;
  }

  .dashboard-page[data-page="tours"].creator-page.is-active-page {
    width: 100%;
    max-width: 1320px;
  }

  .tour-board {
    grid-template-columns: minmax(520px, 1fr) minmax(320px, 380px);
    align-items: start;
    gap: 22px;
  }

  .tour-list {
    grid-column: 1;
    max-width: none;
  }

  .create-tour-card {
    grid-column: 1;
    max-width: none;
    min-height: 150px;
  }

  .activity-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: none;
    position: sticky;
    top: 104px;
  }
}

@media (max-width: 1119px) {
  .tour-board {
    grid-template-columns: 1fr;
  }

  .activity-panel,
  .create-tour-card,
  .tour-list {
    grid-column: auto;
    grid-row: auto;
    max-width: none;
  }
}
