:root {
  --bg: #f6f1eb;
  --bg-elevated: #fcfaf7;
  --bg-rose: #f7edf1;
  --bg-lilac: #f3eef8;
  --sidebar: #36474f;
  --sidebar-soft: #4c6470;
  --panel: #ffffff;
  --panel-muted: #f7f3ed;
  --border: #e0d3c2;
  --border-strong: #baa07f;
  --text: #36474f;
  --muted: #7a7f74;
  --muted-strong: #724834;
  --accent: #724834;
  --accent-deep: #5d3b2b;
  --accent-gold: #baa07f;
  --accent-soft: rgba(186, 160, 127, 0.18);
  --rose: #c98da2;
  --rose-deep: #ab7088;
  --rose-soft: rgba(201, 141, 162, 0.16);
  --lilac: #b59ac8;
  --lilac-soft: rgba(181, 154, 200, 0.16);
  --success: #aeb48d;
  --success-soft: rgba(174, 180, 141, 0.22);
  --danger: #724834;
  --danger-soft: rgba(114, 72, 52, 0.12);
  --info: #739caf;
  --info-soft: rgba(115, 156, 175, 0.18);
  --focus: rgba(115, 156, 175, 0.22);
  --shadow-sm: 0 1px 2px rgba(54, 71, 79, 0.08);
  --shadow-md: 0 18px 48px rgba(54, 71, 79, 0.12);
  --shadow-lg: 0 28px 80px rgba(114, 72, 52, 0.14);
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xl: 28px;
  --font-body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Aboreto", serif;
  --font-editorial: "Antic Didone", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 141, 162, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(181, 154, 200, 0.14), transparent 26%),
    radial-gradient(circle at bottom right, rgba(115, 156, 175, 0.14), transparent 24%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.82), rgba(247, 243, 237, 0.94)),
    linear-gradient(180deg, #efe5d9, #f8f4ee),
    var(--bg);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

.page-noise,
.page-orb {
  pointer-events: none;
}

.page-noise {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.85) 0.6px, transparent 0.6px),
    radial-gradient(rgba(186, 160, 127, 0.22) 0.7px, transparent 0.7px);
  background-size: 22px 22px, 34px 34px;
  background-position: 0 0, 12px 10px;
}

.page-orb {
  display: block;
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.34;
}

.page-orb-left {
  top: -7rem;
  left: -6rem;
  background: radial-gradient(circle, rgba(201, 141, 162, 0.65), rgba(201, 141, 162, 0));
  animation: floatGlow 15s ease-in-out infinite;
}

.page-orb-right {
  right: -6rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(181, 154, 200, 0.6), rgba(181, 154, 200, 0));
  animation: floatGlow 18s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 18px, 0) scale(1.06); }
}

.page-frame {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.page-frame.app-with-sidebar {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 1.2rem;
  min-height: calc(100vh - 2rem);
  align-items: start;
}

.context-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  min-height: calc(100vh - 2rem);
  padding: 1.25rem;
  color: #fff8ee;
  background:
    linear-gradient(180deg, rgba(54, 71, 79, 0.9), rgba(86, 68, 90, 0.86)),
    linear-gradient(135deg, rgba(115, 156, 175, 0.84), rgba(201, 141, 162, 0.58));
  border: 1px solid rgba(255, 248, 238, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.user-main {
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 0;
}

.user-main > .topbar,
.user-main > .view-panel {
  width: 100%;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 1.25rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem 0;
  align-items: center;
}

.login-hero,
.login-panel,
.topbar,
.welcome-hero,
.module-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.login-hero {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  background:
    linear-gradient(135deg, rgba(54, 71, 79, 0.86), rgba(114, 72, 52, 0.72)),
    linear-gradient(135deg, #739caf, #724834);
  color: #fffaf3;
}

.login-hero h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0.04em;
}

.login-hero p {
  max-width: 58ch;
  color: rgba(255, 250, 243, 0.78);
  line-height: 1.7;
}

.login-shell-minimal {
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 1.1rem;
}

.login-shell-editorial {
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 1.35rem;
}

.login-hero-minimal {
  min-height: 540px;
  justify-content: center;
  padding: clamp(1.6rem, 3vw, 2.3rem);
  background:
    linear-gradient(135deg, rgba(54, 71, 79, 0.88), rgba(114, 72, 52, 0.76)),
    linear-gradient(135deg, #739caf, #724834);
}

.login-hero-editorial {
  min-height: 620px;
  justify-content: space-between;
  padding: clamp(1.8rem, 3vw, 2.6rem);
}

.login-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.login-hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 250, 243, 0.2);
  border-radius: 999px;
  color: #fffaf3;
  background: rgba(255, 250, 243, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-hero-copy {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.login-hero-copy-editorial {
  max-width: 40rem;
  margin-top: 2rem;
}

.login-kicker {
  color: rgba(255, 255, 255, 0.74);
}

.login-hero-minimal h1 {
  max-width: 10ch;
  font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  line-height: 0.98;
}

.login-hero-text {
  max-width: 34rem;
  font-size: 1rem;
  color: rgba(255, 250, 243, 0.84);
}

.login-panel,
.module-card {
  padding: 1.25rem;
}

.login-panel-minimal {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-color: rgba(186, 160, 127, 0.36);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 54px rgba(114, 72, 52, 0.1);
}

.login-panel-intro {
  display: grid;
  gap: 0.45rem;
}

.login-panel-editorial {
  align-content: center;
}

.login-panel-intro-editorial {
  gap: 0.55rem;
}

.login-panel-intro p:last-child {
  margin: 0;
  color: var(--muted);
}

.login-form-minimal {
  margin-top: 0.2rem;
}

.login-actions-minimal {
  align-items: center;
  justify-content: space-between;
}

.login-submit-button {
  min-width: 12rem;
}

.login-note,
.login-feedback {
  margin-top: 0;
}

.login-soft-note {
  margin-top: 0.8rem;
}

.brand,
.brand-inline {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-logo,
.login-logo {
  display: block;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(93, 59, 43, 0.2));
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.brand-link:hover .brand-logo,
.brand-link:hover .login-logo {
  transform: scale(1.03);
}

.login-brand strong {
  color: #fffaf3;
  font-family: var(--font-editorial);
  font-size: 1rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle, rgba(255, 247, 214, 0.95) 0 18%, transparent 19%),
    conic-gradient(from 0deg, #f5d889, #b56b35, #f0c86d, #f5d889);
  color: #2c2119;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 1px rgba(255, 250, 243, 0.26), 0 10px 24px rgba(214, 170, 88, 0.2);
}

.brand-kicker,
.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.context-sidebar .brand-kicker,
.context-sidebar .eyebrow,
.context-sidebar .small-label {
  color: rgba(255, 239, 211, 0.68);
}

.brand h1,
.topbar h2,
.section-header h3,
.welcome-hero h3,
.login-panel h3 {
  margin: 0;
}

.brand h1 {
  color: #fffaf3;
  font-family: var(--font-editorial);
  font-size: 1.18rem;
  letter-spacing: 0.04em;
}

.topbar h2,
.section-header h3,
.section-subheader h3,
.login-panel h3,
.readonly-item strong,
.table-cell-primary strong {
  font-family: var(--font-editorial);
}

.welcome-hero h3,
.action-choice-card h4,
.step-card h4 {
  font-family: var(--font-editorial);
}

.small-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-block {
  margin-top: 1.15rem;
}

.sidebar-user-card,
.sidebar-guide {
  border: 1px solid rgba(255, 248, 238, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 243, 0.07);
  padding: 0.9rem;
}

.sidebar-user-card {
  display: grid;
  gap: 0.18rem;
}

.sidebar-user-card strong {
  color: #fffaf3;
  font-size: 0.98rem;
}

.sidebar-user-card span,
.sidebar-client-pill,
.sidebar-guide p {
  color: rgba(255, 250, 243, 0.74);
}

.sidebar-guide p {
  margin: 0.25rem 0 0;
  line-height: 1.55;
}

.sidebar-logout {
  width: 100%;
  justify-content: center;
}

.sidebar-admin-button {
  width: 100%;
  justify-content: center;
}

.topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 243, 245, 0.86));
  box-shadow: 0 16px 40px rgba(114, 72, 52, 0.08);
}

.topbar-main {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.topbar-menu-button {
  display: none !important;
  flex: 0 0 auto;
  min-width: 3rem;
  width: 3rem;
  padding: 0;
}

.burger-icon {
  display: inline-grid;
  gap: 0.28rem;
}

.burger-icon span {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.topbar-copy {
  display: grid;
  gap: 0.15rem;
}

.topbar h2 {
  font-family: var(--font-editorial);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.topbar-copy p,
.hero-text,
.step-card p,
.intro-strip,
.selected-client-box,
.empty-state,
.feedback-box,
.soft-note span,
.list-card p,
.html-preview {
  color: var(--muted);
  line-height: 1.62;
}

.topbar-actions,
.section-actions,
.form-actions,
.toolbar,
.signature-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.app-footer {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  margin: 1.2rem 0 0.2rem;
  padding: 1rem 1.25rem 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.app-footer-label {
  opacity: 0.82;
}

.app-footer strong {
  color: var(--accent);
  font-family: var(--font-editorial);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
}

.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 1rem;
}

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

.welcome-hero {
  padding: 1.25rem;
}

.reception-hero {
  padding: 1.35rem;
}

.reception-header {
  margin-bottom: 1rem;
}

.reception-copy {
  display: grid;
  gap: 1rem;
}

.reception-intro {
  margin-top: 0;
}

.reception-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.reception-highlight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(186, 160, 127, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(252, 246, 240, 0.92));
  box-shadow: 0 14px 28px rgba(114, 72, 52, 0.06);
}

.reception-highlight-card strong,
.reception-side-note span {
  color: var(--text);
}

.reception-highlight-card strong {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.98rem;
}

.reception-highlight-card span:last-child {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.58;
}

.reception-highlight-icon,
.reception-side-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237, 228, 218, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 10px 22px rgba(114, 72, 52, 0.08);
}

.reception-highlight-icon svg,
.reception-side-note-icon svg,
.reception-search-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reception-toolbar {
  justify-content: space-between;
  align-items: center;
}

.reception-search {
  flex: 1 1 20rem;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.reception-side-card {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.25rem;
}

.reception-side-card h3 {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.reception-quick-links .ghost-button {
  min-width: 0;
}

.reception-quick-link {
  justify-content: space-between;
  min-height: 3.15rem;
  padding-inline: 1rem;
}

.reception-side-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-top: 1px solid rgba(186, 160, 127, 0.18);
}

.reception-side-note span:last-child {
  color: var(--muted);
  line-height: 1.52;
}

.reception-list-card {
  margin-top: 1rem;
}

.reception-toolbar-shell {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.reception-search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  flex: 1 1 22rem;
  min-height: 3.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(186, 160, 127, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250, 244, 238, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 12px 26px rgba(114, 72, 52, 0.05);
}

.reception-search-box:focus-within {
  border-color: rgba(115, 156, 175, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 0 0 4px rgba(115, 156, 175, 0.12),
    0 14px 28px rgba(114, 72, 52, 0.08);
}

.reception-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(186, 160, 127, 0.12);
}

.reception-toolbar-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.reception-meta-pill {
  border: 1px solid rgba(186, 160, 127, 0.18);
  background: rgba(255,255,255,0.72);
}

.skin-type-field {
  display: grid;
  gap: 0.7rem;
  align-self: stretch;
}

.skin-type-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(186, 160, 127, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249, 243, 237, 0.95));
  box-shadow: 0 14px 28px rgba(114, 72, 52, 0.05);
}

.skin-type-panel-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.skin-type-panel-head h4 {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: 1.08rem;
}

.skin-type-panel-kicker {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skin-type-panel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(186, 160, 127, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255,255,255,0.84);
  font-size: 0.78rem;
  font-weight: 700;
}

.skin-type-guide {
  overflow: hidden;
  border: 1px solid rgba(186, 160, 127, 0.2);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.95);
}

.skin-type-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.skin-type-col-type {
  width: 10rem;
}

.skin-type-col-desc {
  width: auto;
}

.skin-type-table th,
.skin-type-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  vertical-align: middle;
}

.skin-type-table thead th {
  color: var(--accent-deep);
  background: linear-gradient(180deg, rgba(186, 160, 127, 0.16), rgba(255,255,255,0.96));
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(186, 160, 127, 0.18);
}

.skin-type-table tbody td {
  color: var(--text);
  line-height: 1.55;
  border-bottom: 1px solid rgba(186, 160, 127, 0.14);
}

.skin-type-table tbody tr:nth-child(even) td {
  background: rgba(255, 252, 247, 0.72);
}

.skin-type-table tbody tr:last-child td {
  border-bottom: 0;
}

.skin-type-table th:first-child,
.skin-type-table td:first-child {
  color: var(--accent-deep);
  font-weight: 700;
  border-right: 1px solid rgba(186, 160, 127, 0.14);
  white-space: nowrap;
}

.reception-table-shell {
  margin-top: 1rem;
}

.journey-hero,
.consent-hero,
.history-hero {
  padding: 1.35rem;
}

.journey-actions-card,
.consent-main-card,
.history-main-card {
  margin-top: 1rem;
}

.journey-choice-grid {
  margin-top: 1.1rem;
}

.journey-choice-card {
  position: relative;
  min-height: 16rem;
  padding: 1.25rem 1.2rem;
  border-radius: 26px;
  border-color: rgba(186, 160, 127, 0.24);
  background:
    radial-gradient(circle at top right, rgba(115, 156, 175, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250, 244, 238, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 18px 34px rgba(114, 72, 52, 0.08);
}

.journey-client-box {
  margin-bottom: 0.8rem;
}

.journey-client-box strong,
.journey-client-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.journey-client-box #selectedClientLabel {
  display: block;
  max-width: 20ch;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: clamp(1.7rem, 3.3vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.journey-inline-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  max-width: 42rem;
  margin-top: 0.1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(186, 160, 127, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248, 242, 236, 0.92));
}

.journey-inline-note span:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.journey-inline-note-icon,
.journey-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.journey-inline-note-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238, 230, 221, 0.96));
  box-shadow: 0 10px 20px rgba(114, 72, 52, 0.07);
}

.journey-inline-note-icon svg,
.journey-choice-icon svg,
.journey-choice-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journey-note,
.consent-feedback-box {
  margin-top: 1rem;
}

.history-filters-premium {
  margin-top: 1.1rem;
}

.history-shell-premium {
  margin-top: 0;
}

.consent-language-field {
  max-width: 22rem;
}

.html-preview .inline-consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin: 0.65rem 0 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(107, 90, 76, 0.28);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.9);
  cursor: pointer;
}

.html-preview .inline-consent-check-box {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  border: 1.5px solid rgba(107, 90, 76, 0.36);
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 10px 20px rgba(114, 72, 52, 0.08);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--accent-deep);
}

.consent-preview-card {
  max-height: 70vh;
  min-height: 680px;
}

.consent-signature-box {
  margin-top: 0.35rem;
}

.consent-form-actions {
  justify-content: space-between;
}

.history-client-box,
.journey-client-box {
  margin-top: 1rem;
}

.history-client-box {
  padding: 1.2rem 1.3rem;
}

.history-client-box strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.history-client-box #historyClientLabel {
  display: block;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: clamp(1.9rem, 3.8vw, 3.3rem);
  line-height: 1.03;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.login-editorial-steps,
.reception-steps {
  margin-top: 1.4rem;
}

.welcome-hero h3 {
  max-width: 15ch;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.05;
}

.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.single-layout {
  grid-template-columns: 1fr;
}

.quick-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.quick-link {
  text-decoration: none;
}

.selected-client-box-large {
  margin-top: 1rem;
  font-size: 1rem;
}

.action-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.action-choice-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffdfb, #f7f3ed);
  text-decoration: none;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.action-choice-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 141, 162, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(201, 141, 162, 0.08),
    0 22px 40px rgba(114, 72, 52, 0.1);
}

.action-choice-card h4 {
  margin: 0.7rem 0 0.4rem;
  font-size: 1.18rem;
}

.action-choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.journey-choice-icon {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(236, 227, 217, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 12px 24px rgba(114, 72, 52, 0.08);
}

.journey-choice-kicker {
  display: inline-block;
  margin-top: 1rem;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.journey-choice-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.15rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.step-card,
.soft-note,
.intro-strip,
.selected-client-box,
.empty-state,
.feedback-box,
.list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,243,237,0.88));
  box-shadow: 0 16px 36px rgba(114, 72, 52, 0.06);
}

.step-card {
  padding: 0.95rem;
}

.login-hero .step-card {
  border-color: rgba(255, 250, 243, 0.18);
  background: rgba(255, 250, 243, 0.1);
}

.step-number {
  display: inline-flex;
  margin-bottom: 0.6rem;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-hero .step-number,
.login-hero .step-card h4 {
  color: #fffaf3;
}

.step-card h4 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}

.section-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.section-header::after,
.modal-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 7rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--accent-gold));
}

.section-subheader {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.eyebrow-tight {
  margin-bottom: 0.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.bootstrap-form {
  padding-bottom: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
}

.password-field input {
  grid-area: 1 / 1;
  width: 100%;
  padding-right: 3.25rem;
}

.password-toggle-button {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  width: 2.4rem;
  min-height: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-color: transparent;
  background: transparent;
  z-index: 1;
  margin: 0 0.45rem 0 0;
  flex: 0 0 auto;
}

.password-toggle-button:hover {
  border-color: var(--border);
  background: rgba(186, 160, 127, 0.12);
}

.field label {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.field input,
.field textarea,
.field select,
.search-input {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: #fffdf8;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field textarea {
  min-height: 17rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.search-input::placeholder {
  color: #9aa5aa;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-input:focus {
  outline: 0;
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--focus);
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  border-radius: var(--radius-md);
  padding: 0.72rem 1rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  font-family: var(--font-editorial);
  margin-right: 0.45rem;
}

.button-icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.button-icon-logout {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.55rem;
}

.button-icon-logout svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}


.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  border: 0;
  background: rgba(54, 71, 79, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-backdrop[hidden] {
  display: none !important;
}

.primary-button {
  border: 1px solid var(--accent-deep);
  color: #fffaf3;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-gold)),
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  box-shadow: var(--shadow-sm);
  border-radius: 999px;
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--accent-deep), var(--rose-deep));
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(114, 72, 52, 0.16);
}

.ghost-button {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: #fffdfa;
  border-radius: 999px;
}

.context-sidebar .ghost-button {
  border-color: rgba(255, 248, 238, 0.18);
  color: #fffaf3;
  background: rgba(255, 250, 243, 0.08);
}

.ghost-button:hover {
  border-color: var(--rose);
  background: linear-gradient(180deg, #fff7f8, #f8efe4);
  transform: translateY(-1px);
}

.context-sidebar .ghost-button:hover {
  border-color: rgba(245, 216, 137, 0.42);
  background: rgba(255, 250, 243, 0.14);
}

.soft-note,
.intro-strip,
.selected-client-box,
.empty-state,
.feedback-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.feedback-box.is-success {
  border-color: #d7dfac;
  background: var(--success-soft);
  color: #566633;
}

.feedback-box.is-error {
  border-color: #e8baba;
  background: var(--danger-soft);
  color: var(--danger);
}

.soft-note {
  display: grid;
  gap: 0.3rem;
}

.status-badge,
.sidebar-client-pill,
.module-chip,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong);
  background: #fffaf3;
  font-size: 0.86rem;
  font-weight: 700;
}

.context-sidebar .status-badge,
.context-sidebar .sidebar-client-pill {
  border-color: rgba(255, 248, 238, 0.14);
  color: rgba(255, 250, 243, 0.86);
  background: rgba(255, 250, 243, 0.08);
}

.topbar-chip {
  white-space: nowrap;
}

.status-badge.is-success {
  color: #6e7654;
  border-color: rgba(174, 180, 141, 0.45);
  background: var(--success-soft);
}

.status-badge.is-error {
  color: var(--danger);
  border-color: rgba(114, 72, 52, 0.28);
  background: var(--danger-soft);
}

.topbar-actions > .visually-hidden {
  display: none !important;
}

.status-badge.is-loading {
  gap: 0.5rem;
  color: var(--accent-deep);
  border-color: #e8c498;
  background: #fff4e4;
}

.status-badge.is-loading::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(124, 63, 34, 0.22);
  border-top-color: var(--accent-deep);
  border-radius: 999px;
  animation: spin 720ms linear infinite;
}

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

.list-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.dual-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sub-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fffdf8;
}

.section-subheader-compact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.table-shell {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fffdf8;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(114, 72, 52, 0.08);
}

.table-shell .table-head {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-head,
.table-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

.clients-table {
  grid-template-columns: minmax(16rem, 1.4fr) minmax(16rem, 1.2fr) 5.5rem 8.5rem minmax(16rem, 1fr);
}

.clients-table-compact {
  grid-template-columns: minmax(16rem, 1.45fr) minmax(14rem, 1.1fr) minmax(16rem, 1fr);
}

.history-table {
  grid-template-columns: 10rem minmax(18rem, 1.7fr) minmax(13rem, 1.1fr) 8rem minmax(10rem, auto);
}

.history-shell {
  border-color: #dbc6ae;
  box-shadow: 0 10px 26px rgba(80, 52, 29, 0.05);
}

.history-shell .table-head {
  background: linear-gradient(180deg, rgba(186, 160, 127, 0.18), rgba(174, 180, 141, 0.14));
}

.table-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(186, 160, 127, 0.12), rgba(255, 255, 255, 0.96));
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-body {
  display: grid;
}

.table-record + .table-record,
.table-body > .table-row + .table-row {
  border-top: 1px solid var(--border);
}

.table-row {
  padding: 1rem;
  background: #fffdf8;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.table-record {
  background: #fffdf8;
}

.history-shell .table-record + .table-record {
  border-top: 1px solid rgba(206, 183, 154, 0.6);
}

.history-shell .table-row {
  padding: 1rem 1rem 0.95rem;
}

.history-shell .table-cell strong {
  color: var(--text);
  font-size: 0.95rem;
}

.history-shell .table-cell span {
  line-height: 1.45;
}

.table-row.is-selected {
  background: linear-gradient(180deg, rgba(201, 141, 162, 0.12), rgba(186, 160, 127, 0.08));
  box-shadow: inset 3px 0 0 var(--rose);
}

.table-row:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,241,244,0.96));
  box-shadow: inset 0 0 0 1px rgba(201, 141, 162, 0.1);
}

.table-cell {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.table-cell strong,
.table-cell span {
  overflow-wrap: anywhere;
}

.table-cell-primary strong {
  font-size: 0.98rem;
}

.table-cell span {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.client-row-actions,
.clients-table .table-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
}

.client-row-actions .row-action {
  display: inline-flex;
  visibility: visible;
  opacity: 1;
}

.client-row-actions-compact {
  justify-content: flex-end;
}

.history-actions {
  justify-content: center;
  gap: 0.65rem;
}

.row-action {
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.clients-table .row-action {
  min-width: 0;
  padding-inline: 0.72rem;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 237, 0.96));
}

.pagination-summary {
  color: var(--muted);
  font-size: 0.9rem;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pagination-button {
  min-height: 2.2rem;
  padding: 0.5rem 0.85rem;
}

.pagination-indicator {
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.history-action-button {
  gap: 0;
  width: 2.7rem;
  min-width: 2.7rem;
  height: 2.7rem;
  min-height: 2.7rem;
  padding: 0;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(80, 52, 29, 0.06);
}

.history-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: #efe1cf;
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  margin: 0;
}

.history-action-view {
  border-color: #d7c1a9;
  background: linear-gradient(180deg, #fffdfa, #f8efe4);
}

.history-action-icon-expand {
  background: #e9dcc8;
  color: #6f432c;
  font-size: 0.92rem;
}

.row-action-danger {
  border-color: #e8baba;
  color: var(--danger);
}

.danger-button {
  border-color: #e8baba;
  color: var(--danger);
  background: #fff8f7;
}

.danger-button:hover {
  border-color: #d3968e;
  background: #fbe9e6;
}

.history-shell .empty-state,
.table-shell .empty-state {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.scroll-list {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.history-scroll-list {
  max-height: 620px;
}

.history-filters {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(9rem, auto) minmax(9rem, auto) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}

.compact-field {
  gap: 0.25rem;
}

.compact-field input {
  min-height: 2.7rem;
}

.scroll-list::-webkit-scrollbar {
  width: 8px;
}

.scroll-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border-strong);
}

.list-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: #fffdf8;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.list-card.is-selected {
  border-color: #d39b80;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.list-card-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.list-card h3 {
  margin: 0;
  font-size: 1rem;
}

.list-card p {
  margin: 0.25rem 0 0;
}

.meta-pill {
  min-height: 2rem;
  color: var(--muted-strong);
  background: #f3eadf;
  font-size: 0.82rem;
}

.signature-box {
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(0deg, rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.92)),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(206, 183, 154, 0.42) 32px);
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 250px;
  touch-action: none;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,244,246,0.88)),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(201, 141, 162, 0.18) 32px);
  box-shadow: inset 0 0 0 1px rgba(186, 160, 127, 0.38);
}

.html-preview {
  max-height: 360px;
  overflow: auto;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fffdf8;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  line-height: 1.55;
}

.consent-form .html-preview {
  min-height: 620px;
  max-height: 72vh;
}

.html-preview h1 {
  max-width: 42rem;
  margin: 0 auto 1.35rem;
  font-size: 1.08rem;
  line-height: 1.42;
  letter-spacing: 0.02em;
  text-align: center;
}

.html-preview p {
  margin: 0 0 0.9rem;
  text-align: justify;
}

.html-preview ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.html-preview li {
  margin: 0 0 0.55rem;
  padding-left: 0.25rem;
  text-align: justify;
}

.consent-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.85rem 0;
}

.consent-field-grid-client {
  grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr);
}

.consent-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 0.45rem;
  min-height: 2.2rem;
}

.consent-field span {
  color: var(--text);
  font-weight: 700;
}

.consent-field strong {
  display: block;
  min-height: 1.7rem;
  padding: 0 0.25rem 0.18rem;
  border-bottom: 1.5px solid var(--text);
  color: var(--text);
  font-weight: 400;
}

.consent-service-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: end;
  margin: 1rem 0 1.4rem;
}

.consent-service-line span {
  font-weight: 700;
}

.consent-service-line strong {
  display: block;
  min-height: 1.7rem;
  padding: 0 0.25rem 0.18rem;
  border-bottom: 1.5px solid var(--text);
  font-weight: 400;
}

.html-preview table {
  width: 100%;
  margin: 1rem 0 1.15rem;
  border-collapse: collapse;
  color: var(--text);
  font-size: 0.96rem;
}

.html-preview td {
  min-height: 2rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #6b5a4c;
  vertical-align: top;
}

.html-preview .signature-cell {
  min-width: 12rem;
  vertical-align: bottom;
}

.signature-placeholder-line {
  display: block;
  width: 100%;
  min-height: 4.5rem;
  border-bottom: 1.5px solid var(--text);
}

.document-signature-area {
  display: grid;
  justify-items: center;
  width: min(360px, 100%);
  margin: 1.4rem auto 1.4rem;
  text-align: center;
}

.document-signature-area > .signature-placeholder-line {
  min-height: 5rem;
}

.document-signature-area strong {
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.document-signature-area small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.inline-document-signature {
  display: grid;
  justify-items: center;
  align-items: end;
  min-height: 5.25rem;
}

.inline-document-signature img {
  display: block;
  max-width: 180px;
  max-height: 70px;
  object-fit: contain;
  margin-bottom: -0.3rem;
}

.inline-document-signature span {
  display: block;
  width: 100%;
  border-bottom: 1.5px solid var(--text);
}

.signed-history-card {
  gap: 1rem;
}

.history-table {
  display: grid;
  gap: 0.65rem;
}

.history-table-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(12rem, 1.4fr) minmax(10rem, 1fr) 7rem auto;
  gap: 0.75rem;
  align-items: center;
}

.history-table-head {
  padding: 0 0.9rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-table-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fffdf8;
}

.history-table-item > .history-table-row {
  padding: 0.85rem 0.9rem;
}

.history-toggle-button {
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
}

.history-document {
  min-height: 82vh;
  max-height: none;
  padding: clamp(1.5rem, 3.4vw, 2.75rem);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(24, 18, 14, 0.6);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-panel {
  width: min(1180px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(114, 72, 52, 0.18);
}

.modal-panel-xl {
  width: min(1380px, 96vw);
  max-height: calc(100vh - 1.25rem);
}

.history-modal-panel {
  width: min(1520px, 98vw);
  height: calc(100vh - 0.75rem);
  max-height: calc(100vh - 0.75rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 28px;
}

.module-card.reception-list-card,
.module-card.history-main-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(186, 160, 127, 0.34);
  background:
    radial-gradient(circle at top right, rgba(201, 141, 162, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 251, 245, 0.96));
  box-shadow:
    0 26px 60px rgba(114, 72, 52, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.module-card.reception-list-card::before,
.module-card.history-main-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 1.25rem;
  width: 6rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), rgba(186, 160, 127, 0.25));
  opacity: 0.9;
}

.reception-side-card,
.history-client-box,
.journey-client-box,
.selected-client-box-large {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(186, 160, 127, 0.3);
  background:
    radial-gradient(circle at top right, rgba(115, 156, 175, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(252, 247, 242, 0.96));
  box-shadow: 0 18px 38px rgba(114, 72, 52, 0.08);
}

.reception-side-card::after,
.history-client-box::after,
.journey-client-box::after,
.selected-client-box-large::after {
  content: "";
  position: absolute;
  inset: auto -2.5rem -2.5rem auto;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 180, 141, 0.22), transparent 72%);
  pointer-events: none;
}

.quick-link,
.reception-quick-links .ghost-button {
  position: relative;
  overflow: hidden;
  border-color: rgba(114, 72, 52, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(114, 72, 52, 0.08);
}

.quick-link::after,
.reception-quick-links .ghost-button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 141, 162, 0.48), transparent);
}

.table-shell {
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid rgba(186, 160, 127, 0.28);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 242, 0.97));
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 22px 44px rgba(114, 72, 52, 0.08);
}

.table-shell .table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(186, 160, 127, 0.2);
  border-radius: 20px;
}

.table-head {
  padding: 0.95rem 1.15rem;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(186, 160, 127, 0.16), rgba(255, 255, 255, 0.98));
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.table-body {
  display: grid;
  gap: 0.8rem;
}

.table-record,
.table-body > .table-row {
  border: 1px solid rgba(186, 160, 127, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 245, 0.96));
  box-shadow: 0 14px 30px rgba(114, 72, 52, 0.06);
  overflow: hidden;
}

.table-record + .table-record,
.table-body > .table-row + .table-row {
  border-top: 1px solid rgba(186, 160, 127, 0.18);
}

.table-row {
  position: relative;
  padding: 1.1rem 1.15rem;
  background: transparent;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.table-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(201, 141, 162, 0.78), rgba(115, 156, 175, 0.46));
  opacity: 0;
  transition: opacity 180ms ease;
}

.history-shell .table-row,
.clients-table-compact.table-row,
.clients-table.table-row {
  min-height: 7rem;
}

.table-row.is-selected,
.table-row:hover {
  transform: translateY(-2px);
}

.table-row.is-selected::before,
.table-row:hover::before {
  opacity: 1;
}

.table-row.is-selected {
  background: linear-gradient(180deg, rgba(201, 141, 162, 0.08), rgba(186, 160, 127, 0.05));
  box-shadow:
    inset 0 0 0 1px rgba(201, 141, 162, 0.14),
    0 16px 34px rgba(114, 72, 52, 0.08);
}

.table-row:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,241,244,0.88));
  box-shadow:
    inset 0 0 0 1px rgba(201, 141, 162, 0.1),
    0 16px 34px rgba(114, 72, 52, 0.08);
}

.table-cell {
  gap: 0.28rem;
}

.table-cell-primary strong {
  font-size: 1.04rem;
  font-family: "Antic Didone", serif;
  letter-spacing: 0.01em;
}

.table-cell strong {
  color: #31424a;
}

.table-cell span {
  color: #66737a;
  font-size: 0.91rem;
}

.table-actions {
  gap: 0.55rem;
}

.row-action {
  min-height: 2.55rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(114, 72, 52, 0.15);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(114, 72, 52, 0.06);
}

.row-action .button-icon,
.history-action-icon {
  color: var(--accent);
}

.history-action-icon svg,
.row-action .button-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.row-action:hover,
.history-action-button:hover {
  border-color: rgba(201, 141, 162, 0.32);
  box-shadow: 0 12px 24px rgba(114, 72, 52, 0.08);
}

.row-action-danger {
  border-color: rgba(182, 94, 94, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 243, 0.96));
}

.history-shell {
  border-color: rgba(186, 160, 127, 0.28);
  box-shadow: 0 20px 42px rgba(80, 52, 29, 0.07);
}

.history-shell .table-head {
  background: linear-gradient(180deg, rgba(186, 160, 127, 0.2), rgba(174, 180, 141, 0.12));
}

.history-shell .table-record {
  background:
    radial-gradient(circle at top right, rgba(115, 156, 175, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 246, 0.96));
}

.history-actions {
  justify-content: flex-end;
}

.history-action-button {
  width: 2.8rem;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(114, 72, 52, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246, 239, 232, 0.96));
}

.history-action-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.empty-state {
  border: 1px dashed rgba(186, 160, 127, 0.4);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 244, 238, 0.98));
}

.table-pagination {
  margin-top: 0.9rem;
  padding: 1rem 0.25rem 0;
  border-top: 0;
  background: transparent;
}

.modal-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(186, 160, 127, 0.08));
  position: relative;
}

.modal-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.module-card,
.login-panel,
.topbar,
.welcome-hero,
.list-card,
.soft-note,
.empty-state,
.feedback-box,
.table-shell,
.modal-panel {
  animation: fadeUpSoft 320ms ease;
}

@keyframes fadeUpSoft {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-form-shell {
  padding: 1.1rem;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1.25rem;
}

.modal-form-shell .bootstrap-form:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.modal-document {
  min-height: 0;
  height: calc(100vh - 8.5rem);
  margin: 0;
  border: 0;
  border-radius: 0;
}

.history-modal-panel .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 1.1rem 1.25rem;
}

.history-modal-panel .modal-document {
  height: auto;
  min-height: 0;
  max-height: none;
  padding: clamp(1.65rem, 3.8vw, 3rem);
  overflow: auto;
}

.history-modal-panel .history-document {
  min-height: 100%;
}

.history-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  min-height: 0;
  height: 100%;
}

.history-modal-layout .modal-document {
  border-right: 1px solid rgba(186, 160, 127, 0.18);
}

.history-sessions-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,250,244,0.98));
}

.history-sessions-head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
}

.history-sessions-head h4 {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: 1.2rem;
}

.history-session-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(186, 160, 127, 0.2);
  border-radius: 22px;
  background: rgba(255,255,255,0.86);
}

.history-session-form textarea {
  min-height: 8.5rem;
}

.history-session-list {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 0;
  padding-right: 0.3rem;
}

.history-session-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(186, 160, 127, 0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 14px 28px rgba(114, 72, 52, 0.05);
}

.history-session-card-head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
}

.history-session-actions {
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.history-session-actions .row-action {
  width: 2.55rem;
  min-width: 2.55rem;
  height: 2.55rem;
  min-height: 2.55rem;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(114, 72, 52, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247, 241, 235, 0.96));
  box-shadow:
    0 10px 22px rgba(114, 72, 52, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.history-session-actions .history-action-icon {
  width: 1rem;
  height: 1rem;
  color: #6f7e85;
}

.history-session-edit:hover {
  border-color: rgba(115, 156, 175, 0.35);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(236, 244, 248, 0.98));
  box-shadow:
    0 14px 26px rgba(115, 156, 175, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.history-session-edit:hover .history-action-icon {
  color: #4e7687;
}

.history-session-delete {
  border-color: rgba(201, 141, 162, 0.22) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255, 243, 247, 0.98)) !important;
}

.history-session-delete:hover {
  border-color: rgba(201, 141, 162, 0.42) !important;
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(255, 236, 242, 1)) !important;
  box-shadow:
    0 14px 26px rgba(201, 141, 162, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.82);
}

.history-session-delete .history-action-icon,
.history-session-delete:hover .history-action-icon {
  color: #b86a83;
}

.history-session-card-head strong {
  display: block;
  color: var(--accent-deep);
}

.history-session-card-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-session-card p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}

.skin-type-guide {
  overflow-x: auto;
}

.skin-type-guide table {
  min-width: 32rem;
}

.skin-type-guide::-webkit-scrollbar {
  height: 8px;
}

.skin-type-guide::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(186, 160, 127, 0.45);
}

.skin-type-guide::-webkit-scrollbar-track {
  background: transparent;
}

.signed-document {
  display: grid;
  gap: 1rem;
}

.signed-preview {
  max-height: none;
}

.signature-proof {
  display: none;
  position: relative;
  justify-items: center;
  gap: 0.2rem;
  width: min(360px, 100%);
  margin: 0.75rem auto 0;
  padding-top: 0.2rem;
  color: var(--text);
}

.signature-proof img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 260px;
  max-height: 96px;
  object-fit: contain;
  margin-bottom: -0.35rem;
}

.signature-rule {
  width: 100%;
  border-bottom: 1.5px solid var(--text);
}

.signature-proof strong {
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.signature-proof span {
  color: var(--muted);
  font-size: 0.82rem;
}

.readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.readonly-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-muted);
}

.readonly-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.readonly-item strong {
  color: var(--text);
  font-size: 0.98rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.primary-button.is-loading,
.ghost-button.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.primary-button.is-loading::after,
.ghost-button.is-loading::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  margin-left: 0.55rem;
  border: 2px solid rgba(255, 250, 243, 0.35);
  border-top-color: #fffaf3;
  border-radius: 999px;
  animation: spin 720ms linear infinite;
}

.ghost-button.is-loading::after {
  border-color: rgba(124, 63, 34, 0.22);
  border-top-color: var(--accent-deep);
}

.protected-panel.is-locked .module-card {
  position: relative;
  opacity: 0.62;
}

.protected-panel.is-locked .module-card::after {
  content: "Ingresa al sistema para usar esta seccion";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  border-radius: inherit;
  background: rgba(255, 250, 243, 0.88);
  color: var(--accent-deep);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.protected-panel.is-locked .module-card > * {
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .login-hero {
    min-height: auto;
  }

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

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

  .welcome-layout {
    grid-template-columns: 1fr;
  }

  .reception-highlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1366px) {
  .page-frame {
    width: calc(100% - 1.5rem);
  }

  .page-frame.app-with-sidebar {
    grid-template-columns: 264px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .page-frame {
    width: calc(100% - 1rem);
    padding: 0.5rem 0;
  }

  .page-frame.app-with-sidebar {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 100vh;
  }

  .context-sidebar {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 30;
    width: min(340px, calc(100vw - 1rem));
    min-height: calc(100vh - 1rem);
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 220ms ease, box-shadow 220ms ease;
  }

  .context-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 0 24px 60px rgba(54, 71, 79, 0.24);
  }

  .user-main {
    max-width: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .topbar-menu-button {
    display: inline-flex !important;
  }

  .topbar,
  .section-header,
  .section-subheader,
  .list-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-main {
    width: 100%;
  }

  .topbar-actions,
  .section-actions,
  .form-actions,
  .toolbar,
  .signature-actions {
    width: 100%;
  }

  .topbar-actions > *,
  .section-actions > *,
  .form-actions > *,
  .signature-actions > *,
  .modal-actions > * {
    flex: 1 1 auto;
  }

  .form-grid,
  .dual-card-grid,
  .readonly-grid,
  .consent-field-grid,
  .consent-field-grid-client,
  .history-filters,
  .welcome-steps,
  .action-choice-grid,
  .reception-highlight-grid {
    grid-template-columns: 1fr;
  }

  .reception-toolbar {
    align-items: stretch;
  }

  .reception-search-box {
    width: 100%;
  }

  .reception-toolbar-tags {
    width: 100%;
  }

  .reception-toolbar-tags > * {
    flex: 1 1 auto;
    justify-content: center;
  }

  .history-table-head {
    display: none;
  }

  .history-modal-layout {
    grid-template-columns: 1fr;
  }

  .history-modal-layout .modal-document {
    border-right: 0;
    border-bottom: 1px solid rgba(186, 160, 127, 0.18);
  }

  .history-sessions-panel {
    padding: 1rem;
  }

  .history-table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .table-head {
    display: none;
  }

  .clients-table,
  .clients-table-compact,
  .history-table,
  .table-row {
    grid-template-columns: 1fr;
  }

  .client-row-actions,
  .clients-table .table-actions {
    flex-wrap: wrap;
  }

  .modal-panel,
  .modal-panel-xl {
    width: min(100%, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    border-radius: 1.35rem;
  }

  .modal-backdrop {
    padding: 0.5rem;
    align-items: stretch;
  }

  .modal-form-shell {
    padding-inline: 1rem;
  }

  .skin-type-panel {
    padding: 0.85rem;
  }

  .skin-type-panel-head {
    gap: 0.6rem;
  }

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

  .pagination-actions {
    justify-content: stretch;
  }

  .pagination-actions > * {
    flex: 1 1 auto;
  }

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

  .modal-panel,
  .modal-panel-xl {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal-document {
    height: calc(100vh - 10.5rem);
  }

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

  .history-action-button {
    width: 2.7rem;
    min-width: 2.7rem;
  }

  .field-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .page-frame {
    width: 100%;
    padding: 0;
  }

  .context-sidebar {
    top: 0;
    left: 0;
    width: min(360px, 88vw);
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0 1rem 1rem 0;
  }

  .topbar,
  .topbar-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-main {
    gap: 0.75rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-actions {
    width: 100%;
  }

  .modal-actions > * {
    width: 100%;
  }

  .modal-form-shell {
    padding-inline: 0.9rem;
  }

  .skin-type-guide table {
    min-width: 28rem;
  }

}

@media (max-width: 560px) {
  .login-shell {
    width: 100%;
    padding: 0;
  }

  .login-hero,
  .login-panel,
  .module-card,
  .topbar {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .topbar-menu-button {
    min-width: 2.8rem;
    width: 2.8rem;
  }

  .ghost-button,
  .primary-button,
  .status-badge,
  .meta-pill {
    width: 100%;
  }

  .password-toggle-button {
    width: 2.4rem;
    min-width: 2.4rem;
  }

  .login-submit-button {
    min-width: 0;
  }

  .modal-panel,
  .modal-panel-xl {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal-header {
    gap: 0.85rem;
    padding: 0.95rem 0.9rem;
  }

  .modal-form-shell {
    padding-inline: 0.75rem;
    padding-bottom: 1rem;
  }

  .form-grid {
    gap: 0.85rem;
  }

  .skin-type-panel {
    padding: 0.75rem;
    border-radius: 18px;
  }

  .skin-type-panel-head h4 {
    font-size: 1rem;
  }

  .skin-type-panel-chip {
    width: 100%;
    justify-content: center;
  }

  .skin-type-guide {
    border-radius: 14px;
  }

  .skin-type-guide table {
    min-width: 24rem;
  }

  .history-sessions-panel {
    padding: 0.85rem;
  }

  .history-session-form,
  .history-session-card {
    padding: 0.9rem;
    border-radius: 18px;
  }

}
