/* Conservative internal layout. Visual-reference comparison remains pending. */
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-feature-settings: normal;
  font-variant: normal;
}

.workspace, .auth-page, .modal, .toast {
  font-weight: 400;
  font-feature-settings: normal;
}
.workspace {
  --green: #163f35;
  --green-dark: #10352b;
  --lime: #d4f48c;
  --paper: #f5f7f4;
  --ink: #182720;
  --muted: #6b786e;
  --line: #e3e8e1;
  padding-left: 240px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.6;
}
.workspace h1,
.workspace .page-heading h1,
.workspace .workspace-welcome h1,
.workspace .first-canvas h1,
.workspace .admin-store-title h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.8px;
}
.workspace h2,
.workspace .empty h2,
.workspace .first-gallery-heading h2,
.workspace .subscription-card h2,
.workspace .store-card h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.4px;
  line-height: 1.3;
}
.workspace h3,
.workspace .workspace-checklist-card .checklist-heading h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.2px;
}
.workspace .content p,
.workspace .page-heading p,
.workspace .card-header p,
.workspace .empty p,
.workspace .workspace-products-card .empty p {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--muted);
}
.workspace strong,
.workspace .dashboard-stats strong,
.workspace .dashboard-stats .subscription-stat,
.workspace .quick-action strong,
.workspace .product-cell strong,
.workspace .subscription-card .sub-price {
  font-weight: 600;
}
.workspace .field label, .auth-page .auth-box .field label {
  font-size: 12px;
  font-weight: 500;
  color: #334d3d;
}
.workspace .field .hint, .workspace .hint {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
}
.workspace .sidebar {
  width: 240px;
  padding: 29px 17px 21px;
  background: #163f35;
  border-right: 1px solid #294c3e;
  box-shadow: none;
}
.workspace .sidebar .brand {
  padding: 0 13px 25px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
}
.workspace .sidebar .brand img { width: 30px; height: 30px; }
.workspace .nav-item {
  min-height: 44px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 400;
  color: #ccded2;
  letter-spacing: 0;
}
.workspace .nav-item.active { font-weight: 600; }
.workspace .nav-caption { font-weight: 500; color: #a3c0ad; }
.workspace .store-switch { margin-bottom: 24px; min-height: 46px; }
.workspace .store-switch select { min-width: 0; font-size: 12px; font-weight: 400; }
.workspace .sidebar-user strong { font-weight: 600; }
.workspace .sidebar-user small { color: #aec8b6; }
.workspace .topbar {
  height: 72px;
  padding-inline: 34px;
  background: #fff;
  border-color: var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.workspace .topbar .breadcrumb { min-width: 0; font-size: 12px; }
.workspace .topbar .breadcrumb strong { font-weight: 500; }
.workspace .topbar .avatar { font-weight: 600; box-shadow: none; }
.workspace .topbar .mobile-menu { min-width: 44px; min-height: 44px; }
.workspace .content { padding: 30px 34px 54px; }
.workspace .card, .workspace .stat, .workspace .store-card {
  border-radius: 14px;
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.workspace .card { padding: 24px; }
.workspace .workspace-welcome {
  background: #163f35;
  border-color: #294c3e;
  border-radius: 14px;
  box-shadow: none;
}
.workspace .workspace-welcome:before, .workspace .workspace-welcome:after { display: none; }
.workspace .workspace-welcome p { color: #c3d6c8; }
.workspace .subscription-card { background: #163f35; color: #fff; }
.workspace .subscription-card p { color: #c3d6c8; }
.workspace .progress-track > span { background: #8eb855; }
.workspace .btn, .auth-page .auth-box .btn {
  min-height: 48px;
  font-weight: 500;
  font-size: 13px;
  box-shadow: none;
}
.workspace .btn:hover { transform: none; box-shadow: none; }
.workspace .btn.small, .workspace .topbar .btn.small { min-height: 44px; font-weight: 500; }
.workspace .field input, .workspace .field select, .workspace .field textarea, .workspace .control,
.auth-page .auth-box .field input, .auth-page .auth-box .field select, .auth-page .auth-box .field textarea {
  min-height: 48px;
  padding: 12px;
  border: 1px solid #dce3da;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  border-radius: 8px;
  box-shadow: none;
}
.workspace .field textarea { min-height: 112px; }
.workspace .field input:focus, .workspace .field select:focus, .workspace .field textarea:focus,
.auth-page .auth-box .field input:focus, .auth-page .auth-box .field select:focus, .auth-page .auth-box .field textarea:focus {
  border-color: #73947e;
  box-shadow: 0 0 0 3px #163f3512;
  outline: none;
}
.workspace .admin-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.workspace .stat { min-width: 0; }
.workspace .stat small { overflow-wrap: anywhere; }
.workspace .mobile-bottom-nav a, .workspace .mobile-bottom-nav button { font-weight: 500; }

/* Preserve the existing split authentication layout and forest identity. */
.auth-page { --green: #163f35; --lime: #d4f48c; background: #f6f8f2; }
.auth-page .auth-story { background: #163f35; }
.auth-page .auth-story h1 { font-weight: 600; }
.auth-page .auth-box h1 { font-size: 28px; font-weight: 600; letter-spacing: -.7px; }
.auth-page .auth-box > p, .auth-page .auth-back, .auth-page .auth-bottom {
  color: #6b786e;
  font-weight: 400;
  line-height: 1.75;
}
.auth-page .auth-box .field input::placeholder { color: #7d897f; font-size: inherit; }
.auth-page .auth-box .password-wrap input { padding-right: 46px; }
.auth-page .auth-box .password-wrap button { top: 7px; }

/* Messages wrap within the available width and retain their semantic colors. */
.workspace .notice, .auth-page .notice, .modal .notice {
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #d0dfd0;
  border-radius: 10px;
  background: #edf5ed;
  color: #315138;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
  box-shadow: none;
}
.workspace .notice > svg, .auth-page .notice > svg, .modal .notice > svg { flex: 0 0 17px; margin-top: 2px; }
.workspace .notice > span, .workspace .notice > div,
.auth-page .notice > span, .auth-page .notice > div, .modal .notice > span, .modal .notice > div {
  min-width: 0;
  flex: 1 1 180px;
}
.workspace .notice p, .auth-page .notice p, .modal .notice p { color: inherit; font-size: inherit; }
.workspace .notice.amber, .auth-page .notice.amber, .modal .notice.amber {
  border-color: #e9d8ac;
  background: #fff7e5;
  color: #80571a;
}
.workspace .notice.error, .auth-page .notice.error, .modal .notice.error,
.workspace .error-text, .auth-page .error-text, .modal .error-text {
  border: 1px solid #edc2bc;
  background: #fff1ef;
  color: #922e29;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.toast {
  max-width: min(440px, calc(100vw - 32px));
  min-width: 0;
  align-items: flex-start;
  background: #163f35;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
}
.toast.error { background: #983a32; color: #fff; }
.toast > svg { flex: 0 0 17px; margin-top: 2px; }
.toast > span, .toast > div { min-width: 0; overflow-wrap: anywhere; }
.workspace .testing-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  color: #6b786e;
  font-size: 12px;
  line-height: 1.7;
}
.workspace .testing-status > svg { width: 15px; height: 15px; }
.workspace .testing-status > span { min-width: 0; overflow-wrap: anywhere; }
.workspace .testing-status a { display: inline-flex; align-items: center; gap: 3px; color: #365e48; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.workspace .testing-status a svg { width: 12px; height: 12px; }
.workspace .content p.form-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  color: #6b786e;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.workspace .form-footnote > svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.workspace .product-extra { margin: 0; padding: 0; border: 0; }
.workspace .product-extra > summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  color: #334d3d;
  font-size: 13px;
  font-weight: 500;
}
.workspace .product-extra > summary::-webkit-details-marker { display: none; }
.workspace .product-extra > summary > span { margin-left: auto; color: #6b786e; font-size: 11px; font-weight: 400; }
.workspace .product-extra > summary:after { content: '+'; width: 13px; text-align: center; font-size: 17px; font-weight: 400; color: #6b786e; }
.workspace .product-extra[open] > summary:after { content: '−'; }
.workspace .product-extra > .stack { margin-top: 18px; }
.workspace .product-extra:not([open]) > .stack { display: none; }

/* Compact creation: the essentials stay visible; personalization is optional. */
.workspace .compact-store-setup { max-width: 980px; }
.workspace .compact-store-setup .page-heading { margin-bottom: 24px; }
.workspace .compact-store-setup .page-heading p { max-width: 620px; }
.workspace .compact-setup-card { padding: 28px; }
.compact-setup-form {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: start;
  gap: 28px 32px;
  min-width: 0;
}
.compact-setup-basics { display: grid; gap: 19px; min-width: 0; }
.workspace .compact-setup-basics .card-header { margin-bottom: 2px; }
.workspace .compact-setup-basics .card-header h2 { font-size: 21px; font-weight: 600; }
.workspace .compact-setup-basics .card-header p { margin-top: 7px; }
.workspace .compact-setup-basics > .hint { margin-top: -12px; }
.workspace .compact-setup-basics .field { min-width: 0; gap: 7px; }
.workspace .compact-store-setup .url-input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border-color: #dce3da;
  background: #f8faf5;
  border-radius: 8px;
}
.workspace .compact-store-setup .url-input:focus-within { border-color: #73947e; box-shadow: 0 0 0 3px #163f3512; }
.workspace .compact-store-setup .url-input > span { flex: 0 0 auto; padding-left: 12px; font-size: 11px; color: #6b786e; }
.workspace .compact-store-setup .url-input input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 3px;
  box-shadow: none;
}
.compact-setup-optional { min-width: 0; border: 1px solid #e3e8e1; border-radius: 10px; background: #fafbf8; }
.compact-setup-optional > summary {
  min-height: 54px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: #334d3d;
}
.compact-setup-optional > summary::-webkit-details-marker { display: none; }
.compact-setup-optional > summary > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.compact-setup-optional > summary small { font-size: 11px; font-weight: 400; color: #6b786e; }
.compact-setup-optional > summary svg { width: 16px; height: 16px; }
.compact-setup-optional[open] > summary > svg { transform: rotate(180deg); }
.compact-setup-optional-content { display: grid; gap: 21px; padding: 6px 17px 20px; min-width: 0; }
.compact-setup-optional:not([open]) > .compact-setup-optional-content { display: none; }
.workspace .compact-setup-upload { min-height: 126px; padding: 18px; background: #fff; border-color: #ccd8c8; border-radius: 9px; }
.workspace .compact-setup-upload > span { display: grid; justify-items: center; gap: 8px; }
.workspace .compact-setup-upload p { color: #6b786e; font-size: 13px; }
.workspace .compact-setup-upload > img { max-width: 100%; max-height: 90px; object-fit: contain; }
.workspace .compact-setup-upload input[type=file] { min-height: 0; padding: 0; border: 0; }
.workspace .compact-setup-upload:focus-within { outline: 2px solid #73947e; outline-offset: 3px; }
.workspace .compact-setup-optional .color-options { gap: 9px; }
.workspace .compact-setup-optional input[type=color] { width: 43px; height: 43px; min-height: 43px; padding: 4px; }
.workspace .compact-setup-actions { grid-column: 1 / -1; margin-top: 0; padding-top: 24px; gap: 12px; }
.workspace .compact-setup-actions .btn { min-height: 48px; }

@media (max-width: 1279px) {
  .workspace { padding-left: 233px; }
  .workspace .sidebar { width: 233px; }
  .workspace .topbar { padding-inline: 28px; }
  .workspace .content { padding-inline: 28px; }
}
@media (max-width: 1100px) {
  .workspace .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-setup-form { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workspace .compact-setup-actions { grid-column: auto; }
}
@media (max-width: 850px) {
  .workspace { padding-left: 0; }
  .workspace .sidebar { width: 264px; }
  .workspace .topbar { padding-inline: 24px; }
  .workspace .content { padding: 27px 24px 120px; }
  .compact-setup-form { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .workspace .compact-setup-actions { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .compact-setup-form { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workspace .compact-setup-actions { grid-column: auto; }
}
@media (max-width: 600px) {
  .workspace .topbar { height: 72px; padding-inline: 17px; background: #fff; }
  .workspace .content { padding: 23px 17px 116px; }
  .workspace h1, .workspace .page-heading h1, .workspace .workspace-welcome h1,
  .workspace .first-canvas h1, .workspace .admin-store-title h1 { font-size: 26px; font-weight: 600; letter-spacing: -.7px; }
  .workspace h2, .workspace .empty h2, .workspace .first-gallery-heading h2,
  .workspace .subscription-card h2, .workspace .store-card h2 { font-size: 20px; font-weight: 600; }
  .workspace .card { padding: 21px; border-radius: 14px; }
  .workspace .page-heading p, .workspace .content p { font-size: 13px; }
  .workspace .field input, .workspace .field select, .workspace .field textarea, .workspace .control,
  .auth-page .auth-box .field input, .auth-page .auth-box .field select, .auth-page .auth-box .field textarea {
    font-size: 16px;
    min-height: 49px;
  }
  .workspace .field input[type=color] { width: 43px; min-height: 43px; }
  .workspace .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace .mobile-bottom-nav a, .workspace .mobile-bottom-nav button { font-size: 10px; }
  .workspace .compact-setup-card { padding: 22px 18px; }
  .workspace .compact-setup-basics .card-header h2 { font-size: 20px; }
  .workspace .compact-store-setup .url-input > span { font-size: 10px; padding-left: 10px; }
  .workspace .compact-store-setup .url-input input { font-size: 16px; min-width: 0; padding-right: 8px; }
  .compact-setup-optional > summary { padding-inline: 14px; }
  .compact-setup-optional-content { padding-inline: 14px; }
  .workspace .compact-setup-actions { display: flex; flex-direction: column; padding-top: 22px; gap: 10px; }
  .workspace .compact-setup-actions .btn { width: 100%; min-height: 49px; flex: none; }
  .auth-page .auth-box h1 { font-size: 27px; }
  .auth-page .auth-box .btn { min-height: 49px; }
  .workspace .notice, .auth-page .notice, .modal .notice { font-size: 13px; padding: 12px 13px; }
  #toasts { left: 16px; right: 16px; max-width: calc(100vw - 32px); }
  body:has(.workspace) #toasts { bottom: max(98px, calc(env(safe-area-inset-bottom) + 86px)); }
}

@media(max-width:600px){.workspace .compact-setup-actions .btn[type=submit]{order:-1}}
