:root {
  --ui-bg: #f5f6f7;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f9fafb;
  --ui-text: #292724;
  --ui-muted: #6f6b66;
  --ui-line: #e2e0dc;
  --ui-line-strong: #cbc7c1;
  --ui-primary: var(--tenant-primary, #403a35);
  --ui-accent: var(--tenant-accent, #b78b3d);
  --ui-danger: #b33a3a;
  --ui-success: #237a4b;
  --ui-radius-sm: 10px;
  --ui-radius: 16px;
  --ui-radius-lg: 22px;
  --ui-shadow: 0 12px 34px rgba(35, 31, 27, 0.08);
  --ui-font:
    ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html {
  min-width: 320px;
  background: var(--ui-bg);
  color-scheme: light;
  font-size: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Do not expose a developer build label as part of the laser form. */
.laser-form .inner-toolbar::after {
  content: none !important;
  display: none !important;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

h1,
h2,
h3,
h4,
.hero h1,
.hero h1 em,
.section-title h2,
.saved-heading h2,
.saved-card h3,
.auth-card h1,
.authorization {
  font-family: var(--ui-font);
  font-style: normal;
  letter-spacing: -0.025em;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ui-accent) 48%, transparent);
  outline-offset: 2px;
}

/* Entrada e boas-vindas */
.auth-shell,
.invite-shell,
.greeting-screen,
.access-pending,
.mfa-gate {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(20px, 4vw, 48px);
  background:
    radial-gradient(
      circle at 78% 12%,
      rgba(183, 139, 61, 0.16),
      transparent 30rem
    ),
    linear-gradient(145deg, #2f2b28 0%, #403a35 100%);
}

.auth-shell,
.invite-shell,
.access-pending,
.mfa-gate {
  display: grid;
  place-items: center;
}

.auth-card,
.invite-card,
.signup-card,
.access-pending > div,
.mfa-gate > div {
  width: min(100%, 460px);
  max-height: calc(100svh - 40px);
  margin: 0;
  padding: clamp(24px, 4vw, 38px);
  overflow-y: auto;
  background: var(--ui-surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--ui-radius-lg);
  box-shadow: 0 28px 80px rgba(12, 10, 9, 0.3);
}

.auth-card h1,
.invite-card h1 {
  margin: 24px 0 6px;
  color: var(--ui-text);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 650;
  line-height: 1.12;
}

.auth-card > p,
.invite-card > p {
  margin: 0 0 22px;
  color: var(--ui-muted);
  font-size: 1rem;
}

.saas-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: none;
}

.auth-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 22px 0 0;
  padding: 4px;
  background: #eeece9;
  border-radius: 13px;
}

.auth-mode button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-muted);
  font-weight: 600;
}

.auth-mode button.active {
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: 0 2px 8px rgba(35, 31, 27, 0.08);
}

.greeting-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  text-align: center;
}

.greeting-screen p {
  z-index: 1;
  max-width: min(92vw, 900px);
  margin: 0;
  color: #ffffff;
  font-family: var(--ui-font);
  font-size: clamp(2rem, 7vw, 4.75rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.greeting-screen span {
  z-index: 1;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--ui-font);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.greeting-glow {
  opacity: 0.5;
  filter: blur(16px);
}

/* Navegação e cabeçalho */
main {
  min-height: 100svh;
  background: var(--ui-bg);
}

.account-bar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 68px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--ui-line);
  color: var(--ui-text);
  box-shadow: 0 4px 18px rgba(35, 31, 27, 0.04);
  backdrop-filter: blur(14px);
}

.tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.account-bar button,
.tabs button,
.account button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-muted);
  font-weight: 650;
  white-space: nowrap;
}

.tabs button:hover,
.account button:hover {
  background: var(--ui-surface-soft);
  color: var(--ui-text);
}

.tabs button.active,
.account-bar .tabs button.active {
  background: #f0eeeb;
  background: color-mix(in srgb, var(--ui-primary) 10%, white);
  border-color: color-mix(in srgb, var(--ui-primary) 18%, white);
  color: var(--ui-primary);
  box-shadow: none;
}

.tabs button.admin-tab {
  color: #6e5628;
}

.account {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.account span {
  max-width: 320px;
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account button {
  border-color: var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-text);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(22px, 5vw, 64px);
  min-height: 210px;
  padding: clamp(28px, 5vw, 54px) max(24px, calc((100vw - 1180px) / 2));
  overflow: hidden;
  background: linear-gradient(125deg, #37322e 0%, #4b443e 100%);
  color: #fff;
}

.hero::before,
.hero::after {
  pointer-events: none;
  opacity: 0.38;
}

.hero::after {
  width: 330px;
  height: 330px;
  top: -190px;
  right: -90px;
}

.hero-copy {
  z-index: 1;
  max-width: 660px;
}

.eyebrow,
.eyebrow.dark {
  color: #d7bd83;
  font-family: var(--ui-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #816a38;
}

.hero h1 {
  margin: 10px 0 8px;
  max-width: 720px;
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 650;
  line-height: 1.06;
}

.hero h1 em {
  display: inline;
  color: #e4c98d;
  font-weight: inherit;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1rem;
  letter-spacing: 0;
}

.hero img {
  z-index: 1;
  flex: 0 0 auto;
  width: min(28vw, 260px);
  max-height: 130px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(16, 13, 11, 0.25);
}

/* Área de trabalho */
main > form,
main > .laser-form,
main > .builder-shell,
main > .template-picker,
main > .saved-panel,
main > .organization-settings,
main > .admin-panel {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 54px;
}

form {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 54px;
}

section,
.saved-panel,
.template-picker,
.builder-shell,
.admin-panel,
.organization-settings {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
}

section {
  margin-bottom: 18px;
  padding: clamp(22px, 3.2vw, 34px);
}

.section-title,
.saved-heading,
.picker-heading,
.builder-section-head,
.admin-list-heading {
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f0eeeb;
  background: color-mix(in srgb, var(--ui-primary) 10%, white);
  color: var(--ui-primary);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 750;
}

.section-title h2,
.saved-heading h2,
.picker-heading h2,
.builder-header h2,
.admin-panel h2 {
  margin: 0;
  color: var(--ui-text);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 680;
  line-height: 1.2;
}

.grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field span,
.signature span,
.color-field > span {
  color: #595550;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text);
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #99938c;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 18%, transparent);
}

.conditional-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
  margin-top: 20px;
}

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

.question {
  min-width: 0;
  padding: 16px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}

.question:hover {
  border-color: var(--ui-line-strong);
  transform: none;
  box-shadow: none;
}

.choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice legend {
  margin-bottom: 10px;
  color: var(--ui-text);
  font-size: 0.95rem;
  font-weight: 650;
}

.choice label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin-right: 18px;
  color: var(--ui-muted);
}

.choice input {
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: var(--ui-primary);
}

.measure-table {
  max-width: 100%;
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}

.measure-head,
.measure-row {
  grid-template-columns: minmax(160px, 1.3fr) minmax(130px, 1fr) minmax(
      130px,
      1fr
    );
  min-width: 540px;
}

.measure-head {
  background: #46403b;
}

.measure-row span {
  padding: 0 14px;
}

.measure-row input {
  min-height: 46px;
  border-radius: 0;
}

.authorization {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: #faf7ef;
  border: 1px solid #eadfc7;
  border-left: 4px solid var(--ui-accent);
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.55;
}

.signature {
  margin-top: 22px;
  padding: 18px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line-strong);
  border-radius: 12px;
}

.signature small {
  display: block;
  margin: 4px 0 12px;
  color: var(--ui-muted);
  font-size: 0.82rem;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  touch-action: none;
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
}

.inner-toolbar,
.draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  color: var(--ui-muted);
}

.inner-toolbar button,
.draft-bar button,
.secondary,
.clear {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #fff;
  color: var(--ui-text);
  font-weight: 650;
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
}

.actions a,
.actions button,
.primary,
.pdf,
.whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.primary {
  min-width: 210px;
  background: var(--ui-primary);
  color: #fff;
}

.pdf {
  background: #6e604f;
  color: #fff;
}

.whatsapp {
  background: #207a4b;
  color: #fff;
}

.profile-avatar,
.profile-photo-preview {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .6);
}

.profile-initial {
  display: inline-grid;
  place-items: center;
  background: var(--tenant-primary, #6f5843);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
}

.account .profile-avatar {
  flex: 0 0 42px;
}

.profile-settings {
  max-width: 520px;
}

.profile-settings > p {
  color: var(--muted);
}

.profile-settings .logo-upload-control {
  min-height: 92px;
}

.actions p {
  flex: 1 0 100%;
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--ui-muted);
  text-align: center;
}

/* Listas, clientes e configurações */
.saved-panel,
.template-picker,
.builder-shell,
.admin-panel,
.organization-settings {
  padding: clamp(22px, 3.2vw, 34px);
}

.saved-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.saved-heading input {
  width: min(100%, 360px);
}

.saved-list,
.client-grid,
.template-grid,
.admin-companies,
.account-requests {
  display: grid;
  gap: 14px;
}

.saved-card,
.client-card,
.account-requests > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  box-shadow: none;
}

.saved-card:hover,
.client-card:hover {
  transform: none;
  border-color: var(--ui-line-strong);
  box-shadow: none;
}

.saved-card h3,
.client-card h3 {
  margin: 0 0 4px;
  color: var(--ui-text);
  font-size: 1.05rem;
  font-weight: 700;
}

.saved-card p,
.client-card p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 0.9rem;
}

.saved-card > div:last-child,
.client-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.saved-card button,
.client-actions button,
.account-actions button,
.modal-close {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #fff;
  color: var(--ui-text);
  font-weight: 650;
}

.saved-card .danger,
.client-actions .danger,
.account-actions .delete-account {
  border-color: #eccaca;
  background: #fff7f7;
  color: var(--ui-danger);
}

.saved-card .open-pdf {
  background: #eee9e2;
  color: #4b433c;
}

.client-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.client-card {
  align-items: flex-start;
  flex-direction: column;
}

.client-actions {
  justify-content: flex-start;
}

.client-stats,
.admin-metrics,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.template-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  margin-top: 22px;
}

.template-grid > button {
  min-height: 170px;
  padding: 20px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  color: var(--ui-text);
  text-align: left;
  box-shadow: none;
}

.template-grid > button:hover:not(:disabled) {
  transform: none;
  border-color: var(--ui-accent);
  box-shadow: 0 10px 24px rgba(35, 31, 27, 0.08);
}

.template-grid h3 {
  margin: 16px 0 6px;
  font-family: var(--ui-font);
  font-size: 1.15rem;
  font-weight: 700;
}

.template-grid p {
  color: var(--ui-muted);
}

.builder-sections {
  display: grid;
  gap: 16px;
}

.builder-section,
.organization-settings section {
  margin-bottom: 0;
  box-shadow: none;
}

.builder-section-head,
.builder-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.builder-fields {
  display: grid;
  gap: 12px;
}

.builder-field {
  padding: 14px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}

.logo-upload,
.client-editor {
  padding: 18px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}

.logo-upload img,
.logo-placeholder {
  max-width: 220px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 12px;
}

.plan-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1eadb;
  color: #6f5625;
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(20, 18, 16, 0.58);
  backdrop-filter: blur(4px);
}

.detail-modal,
.client-editor {
  width: min(100%, 760px);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: 0 24px 70px rgba(20, 18, 16, 0.24);
}

.empty-state,
.empty-admin-list,
.list-status {
  padding: 26px 18px;
  color: var(--ui-muted);
  text-align: center;
}

footer {
  padding: 24px max(20px, calc((100vw - 1180px) / 2));
  background: #37322e;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

@media (max-width: 1100px) {
  .account-bar {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .tabs {
    flex-basis: calc(100% - 250px);
  }

  .hero {
    padding-inline: 28px;
  }

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

@media (max-width: 820px) {
  .account-bar {
    position: sticky;
    align-items: stretch;
    padding: 8px 12px 10px;
  }

  .tabs {
    order: 2;
    flex-basis: 100%;
    padding-bottom: 2px;
  }

  .account {
    order: 1;
    width: 100%;
    justify-content: space-between;
  }

  .account span {
    max-width: calc(100vw - 110px);
  }

  .hero {
    min-height: 170px;
    padding: 26px 20px;
  }

  .hero img {
    width: 120px;
    max-height: 90px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.7rem);
  }

  main > form,
  main > .laser-form,
  main > .builder-shell,
  main > .template-picker,
  main > .saved-panel,
  main > .organization-settings,
  main > .admin-panel,
  form {
    width: min(100% - 24px, 760px);
    margin-top: 18px;
  }

  .cols-2,
  .cols-3,
  .questions,
  .conditional-row {
    grid-template-columns: 1fr;
  }

  .saved-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-heading input {
    width: 100%;
  }

  .saved-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-card > div:last-child {
    justify-content: flex-start;
    width: 100%;
  }

  .builder-section-head,
  .builder-field,
  .inner-toolbar,
  .draft-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .inner-toolbar button,
  .draft-bar button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .auth-shell,
  .invite-shell,
  .greeting-screen,
  .access-pending,
  .mfa-gate {
    padding: 12px;
  }

  .auth-card,
  .invite-card,
  .signup-card {
    max-height: calc(100svh - 24px);
    padding: 22px 18px;
    border-radius: 18px;
  }

  .hero {
    align-items: flex-start;
    gap: 14px;
    min-height: 156px;
  }

  .hero img {
    width: 76px;
    max-height: 76px;
  }

  .hero p {
    font-size: 0.88rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  main > form,
  main > .laser-form,
  main > .builder-shell,
  main > .template-picker,
  main > .saved-panel,
  main > .organization-settings,
  main > .admin-panel,
  form {
    width: calc(100% - 16px);
    margin: 12px auto 34px;
  }

  section,
  .saved-panel,
  .template-picker,
  .builder-shell,
  .admin-panel,
  .organization-settings {
    padding: 18px 14px;
    border-radius: 13px;
  }

  .section-title {
    align-items: flex-start;
  }

  .section-title h2,
  .saved-heading h2,
  .picker-heading h2,
  .builder-header h2 {
    font-size: 1.35rem;
  }

  .question {
    padding: 14px 12px;
  }

  .choice label {
    margin-right: 12px;
  }

  .signature {
    padding: 12px;
  }

  .signature-canvas {
    height: 155px;
  }

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

  .actions a,
  .actions button,
  .primary,
  .pdf,
  .whatsapp {
    width: 100%;
    min-width: 0;
  }

  .saved-card > div:last-child,
  .client-actions,
  .account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saved-card button,
  .client-actions button,
  .account-actions button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .detail-modal,
  .client-editor {
    max-height: calc(100svh - 16px);
    border-radius: 13px;
  }
}

@media (max-width: 380px) {
  .hero img {
    display: none;
  }

  .saved-card > div:last-child,
  .client-actions,
  .account-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* banner-logo-and-profile-action-v1 */
.account button.profile-initial {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.52);
  padding: 0;
}

.account button.profile-initial:hover,
.account button.profile-initial:focus-visible {
  outline: 3px solid rgba(218,185,112,.72);
  outline-offset: 2px;
}

/* profile-menu-v1 */
.profile-menu {
  position: relative;
}

.profile-trigger {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 0;
}

.profile-trigger:focus-visible {
  outline: 3px solid rgba(218,185,112,.8);
  outline-offset: 3px;
  border-radius: 50%;
}

.profile-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: 228px;
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid #ded5ca;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(42,33,27,.22);
  padding: 8px;
}

.profile-menu-identity {
  padding: 10px 11px 12px;
  border-bottom: 1px solid #eee7df;
  margin-bottom: 6px;
}

.profile-menu-identity strong,
.profile-menu-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-identity small {
  color: #7d746e;
  margin-top: 3px;
  font-size: 11px;
}

.profile-popover button {
  width: 100%;
  cursor: pointer;
  color: #3c332d;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;
  text-align: left;
  font: 600 13px Arial, Helvetica, sans-serif;
}

.profile-popover button:hover,
.profile-popover button:focus-visible {
  background: #f3ece3;
  outline: 0;
}

.profile-popover .profile-menu-signout {
  color: #a5453d;
}

/* profile-icon-gold-border-v1 */
.account .profile-trigger {
  width: 42px;
  min-height: 42px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 2px solid #c9a456;
  border-radius: 50%;
}

.account .profile-trigger:hover {
  background: transparent;
  border-color: #a97d28;
}

.account .profile-trigger .profile-avatar {
  display: block;
  width: 38px;
  height: 38px;
  border: 0;
}

/* native-profile-menu-v1 */
.profile-menu > summary {
  list-style: none;
}

.profile-menu > summary::-webkit-details-marker {
  display: none;
}

.profile-menu[open] .profile-trigger {
  border-color: #a97d28;
}
.platform-control-panel{margin-top:1.25rem}.platform-status{min-height:1.5rem;color:#b98524;font-weight:600}.platform-admin-grid{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(340px,1.1fr);gap:1rem}.platform-admin-grid form,.platform-billing{padding:1rem;border:1px solid rgba(201,154,61,.28);border-radius:14px}.platform-admin-grid textarea{min-height:90px}.billing-row{padding:.7rem 0;border-top:1px solid rgba(201,154,61,.2)}.billing-row summary{cursor:pointer}.billing-row form{margin-top:.7rem}@media(max-width:760px){.platform-admin-grid{grid-template-columns:1fr}}
.billing-notice{display:flex;gap:.55rem;align-items:center;padding:.7rem 1rem;background:#4b3820;color:#fff4d9;border-bottom:1px solid #c99a3d;font-size:.92rem}.billing-notice strong{color:#f1c76c}
.admin-tabs{display:flex;gap:.55rem;margin:1rem 0;border-bottom:1px solid rgba(201,154,61,.25)}.admin-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;padding:.7rem .9rem;color:inherit}.admin-tabs button.active{border-color:#c99a3d;color:#c99a3d}.admin-message{min-height:1.4rem;color:#b98524}
.platform-admin-grid small{display:block;margin-top:.35rem;color:#9b8f85;font-size:.78rem}.platform-admin-grid h3{padding-bottom:.55rem;border-bottom:1px solid rgba(201,154,61,.25)}
