:root {
  --genesis-navy-950: #07182c;
  --genesis-navy-900: #0b1f3a;
  --genesis-navy-800: #12345a;
  --genesis-blue-700: #003da5;
  --genesis-blue-600: #1459bd;
  --genesis-blue-100: #e9f1ff;
  --genesis-gold-500: #c79b2b;
  --genesis-gold-100: #fff7dd;
  --genesis-green-700: #167249;
  --genesis-green-100: #e8f7ef;
  --genesis-red-700: #b4232e;
  --genesis-red-100: #fdecee;
  --genesis-orange-700: #9a4d08;
  --genesis-orange-100: #fff1df;
  --genesis-ink: #172033;
  --genesis-muted: #617086;
  --genesis-line: #dce3ec;
  --genesis-line-strong: #c8d2df;
  --genesis-bg: #f3f6fa;
  --genesis-surface: #ffffff;
  --genesis-surface-soft: #f7f9fc;
  --genesis-shadow: 0 14px 36px rgba(7, 24, 44, 0.08);
  --genesis-shadow-soft: 0 3px 14px rgba(7, 24, 44, 0.06);
  --genesis-radius: 14px;
  --genesis-radius-small: 9px;
  --genesis-sidebar-width: 244px;
  --genesis-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--genesis-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--genesis-ink);
  background: var(--genesis-bg);
  font-family: var(--genesis-font);
  font-size: 14px;
  line-height: 1.48;
  text-rendering: optimizeLegibility;
}

.genesis-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 16% 18%, rgba(20, 89, 189, 0.34), transparent 33rem),
    linear-gradient(135deg, var(--genesis-navy-950), var(--genesis-navy-800));
}

.login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(6, 26, 47, 0.72);
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 500px;
  padding: 54px;
  background:
    linear-gradient(145deg, rgba(0, 61, 165, 0.5), rgba(7, 24, 44, 0.2)),
    repeating-linear-gradient(135deg, transparent 0 32px, rgba(255, 255, 255, 0.025) 32px 33px);
}

.login-brand .brand-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 34px;
  border-radius: 16px;
  font-size: 28px;
}

.login-brand .eyebrow {
  color: #d4ad4b;
}

.login-brand h1 {
  margin: 8px 0 10px;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 0.98;
  letter-spacing: 0.08em;
}

.login-brand > p:last-child {
  max-width: 320px;
  margin: 0;
  color: #c7d8ed;
  font-size: 14px;
  line-height: 1.6;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 54px;
  color: var(--genesis-ink);
  background: #fff;
}

.login-card h2 {
  margin: 6px 0;
  color: var(--genesis-navy-900);
  font-size: 31px;
}

.login-card .muted,
.login-help {
  margin: 0;
  color: var(--genesis-muted);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--genesis-navy-900);
  font-size: 11px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--genesis-line-strong);
  border-radius: 9px;
  background: #fff;
}

.login-form .button.primary {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  color: #fff;
  border-color: var(--genesis-blue-700);
  background: var(--genesis-blue-700);
}

.login-form .button.primary:hover {
  border-color: var(--genesis-navy-900);
  background: var(--genesis-navy-900);
}

.notice.danger {
  padding: 11px 13px;
  border: 1px solid #f4bdc2;
  border-radius: 9px;
  color: var(--genesis-red-700);
  background: var(--genesis-red-100);
  font-size: 12px;
  font-weight: 700;
}

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

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

a {
  color: var(--genesis-blue-700);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--genesis-blue-600);
}

:focus-visible {
  outline: 3px solid rgba(20, 89, 189, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 9px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--genesis-blue-700);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--genesis-sidebar-width) minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 22% -4%, rgba(20, 89, 189, 0.72), transparent 30%),
    linear-gradient(180deg, var(--genesis-navy-900), var(--genesis-navy-950));
}

.brand-block {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 24px 21px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.brand-block strong {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand-block small {
  margin-top: 1px;
  color: #a9c7ef;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, var(--genesis-blue-600), var(--genesis-blue-700));
  box-shadow: 0 8px 20px rgba(0, 61, 165, 0.28);
  font-size: 19px;
  font-weight: 850;
}

.primary-nav {
  display: grid;
  gap: 5px;
  padding: 20px 12px;
}

.nav-button {
  min-height: 46px;
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #dfeeff;
  background: transparent;
  text-align: left;
  font-weight: 680;
}

.nav-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-button.is-active {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(20, 89, 189, 0.38);
  box-shadow: inset 3px 0 0 #6fa9fa;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #cde2ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.sidebar-guide {
  margin: auto 14px 18px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-guide strong {
  display: block;
  margin-top: 7px;
  font-size: 13px;
}

.sidebar-guide p {
  margin: 6px 0 0;
  color: #b9cce5;
  font-size: 11px;
  line-height: 1.48;
}

.user-block {
  min-height: 72px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-block strong,
.user-block small {
  display: block;
  overflow: hidden;
  max-width: 145px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-block strong {
  font-size: 12px;
}

.user-block small {
  margin-top: 2px;
  color: #abc4e4;
  font-size: 10px;
}

.user-block > span:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

.logout-button {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  color: #dce8f7;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--genesis-blue-600);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.avatar-seller {
  color: #78500c;
  background: #f7d991;
}

.avatar-buyer {
  background: var(--genesis-blue-600);
}

.avatar-large {
  width: 58px;
  height: 58px;
  font-size: 17px;
}

.app-workspace {
  min-width: 0;
}

.mobile-header,
.mobile-nav {
  display: none;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  padding: 32px 30px 56px;
}

#genesis-view {
  width: min(100%, 1580px);
  margin: 0 auto;
}

.page-section {
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 5px 0 5px;
  color: var(--genesis-navy-950);
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.page-header p {
  max-width: 760px;
  margin: 0;
  color: var(--genesis-muted);
  font-size: 14px;
}

.eyebrow,
.action-kicker {
  display: inline-block;
  color: var(--genesis-blue-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button {
  min-height: 38px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--genesis-line-strong);
  border-radius: 9px;
  color: var(--genesis-navy-800);
  background: #fff;
  box-shadow: 0 1px 1px rgba(7, 24, 44, 0.04);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  border-color: #9faebe;
  color: var(--genesis-navy-950);
  background: #f8fafc;
}

.button-primary {
  border-color: var(--genesis-blue-700);
  color: #fff;
  background: var(--genesis-blue-700);
  box-shadow: 0 7px 16px rgba(0, 61, 165, 0.16);
}

.button-primary:hover {
  border-color: var(--genesis-blue-600);
  color: #fff;
  background: var(--genesis-blue-600);
}

.button-secondary {
  color: var(--genesis-blue-700);
  border-color: #aabbd0;
}

.button-success {
  border-color: var(--genesis-green-700);
  color: #fff;
  background: var(--genesis-green-700);
}

.button-danger {
  border-color: var(--genesis-red-700);
  color: #fff;
  background: var(--genesis-red-700);
}

.button-quiet,
.text-button {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.button-quiet:hover,
.text-button:hover {
  background: var(--genesis-bg);
}

.text-button {
  min-height: 30px;
  padding: 4px 7px;
  color: var(--genesis-blue-700);
  font-size: 12px;
  font-weight: 750;
}

.danger-text {
  color: var(--genesis-red-700);
}

.surface {
  border: 1px solid var(--genesis-line);
  border-radius: var(--genesis-radius);
  background: var(--genesis-surface);
  box-shadow: var(--genesis-shadow-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 17px;
  border: 1px solid var(--genesis-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--genesis-shadow-soft);
}

.metric-card strong {
  color: var(--genesis-navy-950);
  font-size: 29px;
  line-height: 1;
}

.metric-card span {
  margin-top: 10px;
  font-weight: 760;
}

.metric-card small {
  margin-top: 3px;
  color: var(--genesis-muted);
  font-size: 11px;
}

.metric-attention {
  border-color: #e7cc82;
  background: linear-gradient(145deg, #fff, var(--genesis-gold-100));
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(150px, 210px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--genesis-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.filter-bar label,
.field {
  display: grid;
  gap: 5px;
}

.filter-bar label > span,
.field > span,
.choice-fieldset legend {
  color: #364458;
  font-size: 11px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--genesis-line-strong);
  border-radius: 8px;
  color: var(--genesis-ink);
  background: #fff;
  outline: 0;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--genesis-blue-600);
  box-shadow: 0 0 0 3px rgba(20, 89, 189, 0.13);
}

input::placeholder,
textarea::placeholder {
  color: #8b98a9;
}

.result-count {
  align-self: center;
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--genesis-muted);
  background: #edf1f6;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.pipeline-board {
  display: grid;
  grid-auto-columns: minmax(246px, 1fr);
  grid-auto-flow: column;
  gap: 11px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scroll-snap-type: x proximity;
  scrollbar-color: #aab8c8 transparent;
}

.pipeline-column {
  min-height: 410px;
  overflow: hidden;
  border: 1px solid var(--genesis-line);
  border-radius: 12px;
  background: #e9eef4;
  scroll-snap-align: start;
}

.pipeline-column > header {
  min-height: 49px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--genesis-line);
  background: #f8fafc;
}

.pipeline-column > header h2 {
  margin: 0;
  color: var(--genesis-navy-800);
  font-size: 12px;
  font-weight: 800;
}

.pipeline-column > header > span:last-child {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--genesis-muted);
  background: #e9eef4;
  font-size: 10px;
  font-weight: 800;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c8a9a;
}

.stage-contact_new { background: #64748b; }
.stage-brief_ready { background: var(--genesis-blue-600); }
.stage-review_pending { background: var(--genesis-gold-500); }
.stage-consultation_scheduled { background: #7c3aed; }
.stage-consultation_done { background: #0f8b8d; }
.stage-project_active { background: #dc6b20; }
.stage-completed { background: var(--genesis-green-700); }

.case-stack {
  display: grid;
  gap: 9px;
  padding: 9px;
}

.column-empty {
  margin: 26px 8px;
  color: #7b8898;
  text-align: center;
  font-size: 11px;
}

.case-card {
  overflow: hidden;
  border: 1px solid var(--genesis-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(7, 24, 44, 0.05);
}

.case-card-open {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 0;
  background: #fff;
  text-align: left;
}

.case-card-open:hover {
  background: #fbfcfe;
}

.case-card-top,
.case-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.case-card-open > strong {
  margin-top: 2px;
  color: var(--genesis-navy-950);
  font-size: 13px;
}

.case-address {
  min-height: 34px;
  color: var(--genesis-muted);
  font-size: 11px;
  line-height: 1.4;
}

.case-meta {
  color: #7b8796;
  font-size: 9px;
  font-weight: 680;
}

.type-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #334155;
  background: #edf1f5;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.type-seller {
  color: #76500c;
  background: #fff0c5;
}

.type-buyer {
  color: #174c93;
  background: #e4efff;
}

.next-action {
  width: 100%;
  min-height: 45px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  border: 0;
  border-top: 1px solid var(--genesis-line);
  color: var(--genesis-blue-700);
  background: #f6f9fd;
  text-align: left;
}

.next-action span:first-child {
  color: #7a8797;
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.next-action strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closed-cases {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.section-heading > span {
  color: var(--genesis-muted);
  font-size: 12px;
}

.closed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.form-surface {
  padding: 22px;
}

.form-section-heading {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 11px;
  align-items: start;
  margin-bottom: 17px;
}

.form-section-heading h2,
.action-heading h2,
.panel-heading h2 {
  margin: 0;
  color: var(--genesis-navy-950);
  font-size: 17px;
  letter-spacing: -0.01em;
}

.form-section-heading p,
.action-heading p {
  margin: 4px 0 0;
  color: var(--genesis-muted);
  font-size: 12px;
}

.step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--genesis-blue-700);
  font-size: 11px;
  font-weight: 850;
}

.section-divider {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--genesis-line);
}

.choice-fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.choice-card {
  position: relative;
  min-height: 66px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--genesis-line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--genesis-blue-600);
  background: var(--genesis-blue-100);
  box-shadow: 0 0 0 2px rgba(20, 89, 189, 0.1);
}

.choice-card input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--genesis-blue-700);
}

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

.choice-card strong {
  font-size: 12px;
}

.choice-card small {
  margin-top: 2px;
  color: var(--genesis-muted);
  font-size: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field-wide,
.form-grid .wide {
  grid-column: 1 / -1;
}

.form-footer,
.action-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--genesis-line);
}

.form-footer p,
.action-footer > span {
  max-width: 520px;
  margin: 0;
  color: var(--genesis-muted);
  font-size: 11px;
}

.guide-panel {
  position: sticky;
  top: 24px;
  padding: 19px;
}

.guide-steps {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  min-height: 70px;
}

.guide-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 13px;
  width: 2px;
  background: var(--genesis-line);
}

.guide-steps li > span {
  width: 28px;
  height: 28px;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--genesis-line-strong);
  border-radius: 50%;
  color: var(--genesis-muted);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}

.guide-steps li.is-current > span {
  border-color: var(--genesis-blue-700);
  color: #fff;
  background: var(--genesis-blue-700);
}

.guide-steps strong,
.guide-steps small {
  display: block;
}

.guide-steps strong {
  margin-top: 3px;
  font-size: 12px;
}

.guide-steps small {
  margin-top: 2px;
  color: var(--genesis-muted);
  font-size: 10px;
}

.privacy-note {
  margin-top: 11px;
  padding: 12px;
  border-radius: 9px;
  color: #5f4c16;
  background: var(--genesis-gold-100);
}

.privacy-note strong {
  font-size: 11px;
}

.privacy-note p {
  margin: 4px 0 0;
  font-size: 10px;
}

.case-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
}

.client-identity {
  min-width: 0;
  display: flex;
  gap: 13px;
  align-items: center;
}

.client-identity h2 {
  max-width: 650px;
  overflow: hidden;
  margin: 7px 0 2px;
  color: var(--genesis-navy-950);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-identity p {
  margin: 0;
  color: var(--genesis-muted);
  font-size: 10px;
}

.next-action-callout {
  min-width: 300px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid #d5e2f4;
  border-radius: 11px;
  background: linear-gradient(135deg, #f7faff, var(--genesis-blue-100));
}

.next-action-callout > span {
  color: var(--genesis-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-action-callout strong {
  grid-column: 1;
  color: var(--genesis-navy-950);
  font-size: 12px;
}

.next-action-callout .button {
  grid-row: 1 / 3;
  grid-column: 2;
}

.journey-stepper {
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--genesis-line);
  border-radius: 12px;
  background: #fff;
}

.journey-stepper ol {
  min-width: 780px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-stepper li {
  position: relative;
  display: grid;
  gap: 5px;
  justify-items: center;
  color: #7b8797;
  font-size: 9px;
  font-weight: 740;
  text-align: center;
}

.journey-stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 17px);
  width: calc(100% - 34px);
  height: 2px;
  background: var(--genesis-line);
}

.journey-marker {
  width: 27px;
  height: 27px;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--genesis-line-strong);
  border-radius: 50%;
  color: #7b8797;
  background: #fff;
  font-size: 9px;
  font-weight: 850;
}

.journey-stepper li.is-complete {
  color: var(--genesis-green-700);
}

.journey-stepper li.is-complete .journey-marker {
  border-color: var(--genesis-green-700);
  color: #fff;
  background: var(--genesis-green-700);
}

.journey-stepper li.is-complete::after {
  background: var(--genesis-green-700);
}

.journey-stepper li.is-current {
  color: var(--genesis-blue-700);
}

.journey-stepper li.is-current .journey-marker {
  border-color: var(--genesis-blue-700);
  color: #fff;
  background: var(--genesis-blue-700);
  box-shadow: 0 0 0 4px rgba(20, 89, 189, 0.11);
}

.journey-stepper li.is-exit .journey-marker {
  border-color: var(--genesis-red-700);
  background: var(--genesis-red-700);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.68fr);
  gap: 15px;
  align-items: start;
}

.case-main-column,
.case-side-column {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.action-panel {
  overflow: hidden;
  border-color: #cbdcf3;
  box-shadow: var(--genesis-shadow);
}

.action-heading {
  padding: 18px 19px 15px;
  border-bottom: 1px solid var(--genesis-line);
  background: linear-gradient(135deg, #fff, #f6f9fd);
}

.action-panel > form,
.action-panel > .email-preview {
  padding: 18px 19px;
}

.action-panel > .action-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.reject-form {
  margin: 0 19px 19px;
  padding: 14px !important;
  border: 1px solid #efb8bd;
  border-radius: 10px;
  background: var(--genesis-red-100);
}

.inline-form {
  margin: 0;
}

.email-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 11px;
}

.email-meta span,
.detail-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--genesis-line);
  border-radius: 9px;
  background: #f9fbfd;
}

.email-meta small,
.email-meta strong,
.detail-grid small,
.detail-grid strong {
  display: block;
}

.email-meta small,
.detail-grid small {
  color: var(--genesis-muted);
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.email-meta strong,
.detail-grid strong {
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: 11px;
}

.email-document {
  padding: 15px;
  border: 1px solid var(--genesis-line);
  border-radius: 10px;
  background: #fff;
}

.email-document > small {
  color: var(--genesis-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.email-document h3 {
  margin: 4px 0 12px;
  font-size: 14px;
}

.email-document pre {
  margin: 0;
  color: #2d3948;
  font: 12px/1.65 var(--genesis-font);
  white-space: pre-wrap;
}

.completion-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 19px;
  color: var(--genesis-muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.completion-divider::before,
.completion-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--genesis-line);
}

.terminal-panel {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.terminal-panel h2 {
  margin: 3px 0;
}

.terminal-panel p {
  margin: 0;
  color: var(--genesis-muted);
  font-size: 12px;
}

.terminal-success { border-color: #a9dcc1; background: linear-gradient(135deg, #fff, var(--genesis-green-100)); }
.terminal-danger { border-color: #efb8bd; background: linear-gradient(135deg, #fff, var(--genesis-red-100)); }
.terminal-muted { background: #f8fafc; }

.state-symbol {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--genesis-blue-700);
  font-size: 20px;
  font-weight: 850;
}

.detail-panel {
  overflow: hidden;
}

.panel-heading {
  min-height: 51px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--genesis-line);
}

.detail-body {
  padding: 15px;
}

.brief-copy,
.panel-note {
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
}

.brief-copy {
  font-size: 13px;
  line-height: 1.65;
}

.panel-note {
  margin: 0 15px 15px;
  padding: 11px;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 11px;
}

.empty-copy {
  margin: 0;
  color: var(--genesis-muted);
  font-size: 11px;
}

.panel-empty {
  padding: 15px;
}

.contact-list {
  margin: 0;
}

.contact-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 15px;
  border-bottom: 1px solid #edf1f5;
}

.contact-list > div:last-child {
  border-bottom: 0;
}

.contact-list dt {
  color: var(--genesis-muted);
  font-size: 10px;
  font-weight: 760;
}

.contact-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 660;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 15px;
}

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

.status-contact_new { color: #475569; background: #e8edf3; }
.status-brief_ready { color: #174c93; background: #e4efff; }
.status-review_pending { color: #76500c; background: #fff0c5; }
.status-consultation_scheduled { color: #6531a7; background: #f0e8ff; }
.status-consultation_done { color: #11686a; background: #e4f5f5; }
.status-project_active { color: #8a480f; background: #ffebdb; }
.status-completed { color: #14623f; background: #e4f5ec; }
.status-rejected { color: #92212a; background: #fde6e8; }
.status-archived { color: #536273; background: #e9edf2; }

.activity-list {
  margin: 0;
  padding: 6px 15px 14px;
  list-style: none;
}

.activity-list li {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
}

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

.activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--genesis-blue-600);
  box-shadow: 0 0 0 1px var(--genesis-blue-600);
}

.activity-list strong {
  font-size: 11px;
}

.activity-list p {
  margin: 2px 0;
  color: #445267;
  font-size: 10px;
}

.activity-list small {
  color: var(--genesis-muted);
  font-size: 9px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--genesis-line);
  text-align: left;
  vertical-align: middle;
  font-size: 11px;
}

th {
  color: #536174;
  background: #f7f9fc;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfcfe;
}

.table-client {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  color: var(--genesis-blue-700);
  background: transparent;
  text-align: left;
}

.table-client strong {
  font-size: 11px;
}

.table-client small {
  max-width: 260px;
  overflow: hidden;
  color: var(--genesis-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-note {
  max-width: 360px;
  color: #4b596b;
}

.empty-state,
.view-state {
  min-height: 340px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 30px;
  border: 1px dashed var(--genesis-line-strong);
  border-radius: var(--genesis-radius);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-state h2,
.view-state h1 {
  margin: 13px 0 4px;
  color: var(--genesis-navy-950);
  font-size: 19px;
}

.empty-state p,
.view-state p {
  max-width: 470px;
  margin: 0 0 16px;
  color: var(--genesis-muted);
  font-size: 12px;
}

.error-state .state-symbol {
  background: var(--genesis-red-700);
}

.loader {
  width: 38px;
  height: 38px;
  border: 4px solid #d9e2ed;
  border-top-color: var(--genesis-blue-700);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: min(390px, calc(100vw - 40px));
  padding: 12px 14px;
  border-left: 4px solid #67c690;
  border-radius: 9px;
  color: #fff;
  background: var(--genesis-navy-950);
  box-shadow: 0 18px 45px rgba(7, 24, 44, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 12px;
  font-weight: 700;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-left-color: #ef6b75;
}

.email-actions {
  flex-wrap: wrap;
}

.delivery-confirmed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #14633b;
  background: #e7f6ed;
  font-size: 10px;
  font-weight: 850;
}

.project-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--genesis-line);
  border-radius: 10px;
  background: var(--genesis-surface-soft);
}

.project-checklist legend {
  padding: 0 5px;
  color: var(--genesis-navy-900);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-checklist label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--genesis-text);
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
}

.project-checklist input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--genesis-blue-700);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--genesis-line);
}

.event-name {
  display: block;
  margin-bottom: 5px;
  color: var(--genesis-navy-900);
  font-size: 11px;
}

@media (max-width: 1180px) {
  :root {
    --genesis-sidebar-width: 208px;
  }

  .app-main {
    padding: 27px 22px 48px;
  }

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

  .case-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.7fr);
  }

  .form-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 900px) {
  .genesis-login-page {
    padding: 18px;
  }

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

  .login-brand {
    min-height: auto;
    padding: 32px;
  }

  .login-brand .brand-mark {
    margin-bottom: 22px;
  }

  .login-card {
    padding: 32px;
  }

  .app-shell {
    display: block;
  }

  .app-sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 58px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 8px 16px;
    color: #fff;
    background: var(--genesis-navy-900);
  }

  .brand-block.compact {
    padding: 0;
    border: 0;
  }

  .brand-block.compact .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 15px;
  }

  .mobile-user {
    overflow: hidden;
    max-width: 45vw;
    color: #c7d8ed;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-logout {
    padding: 6px 9px;
    font-size: 8px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--genesis-line-strong);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 42px rgba(7, 24, 44, 0.2);
    backdrop-filter: blur(15px);
  }

  .mobile-nav .nav-button {
    min-height: 50px;
    justify-content: center;
    color: var(--genesis-muted);
    background: transparent;
    box-shadow: none;
    font-size: 10px;
  }

  .mobile-nav .nav-button.is-active {
    border-color: #d4e2f5;
    color: var(--genesis-blue-700);
    background: var(--genesis-blue-100);
    box-shadow: none;
  }

  .mobile-nav .nav-icon {
    color: inherit;
    background: transparent;
  }

  .app-main {
    padding: 22px 16px 96px;
  }

  .form-layout,
  .case-layout {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    position: static;
  }

  .case-side-column {
    grid-template-columns: 1fr 1fr;
  }

  .case-side-column > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .genesis-login-page {
    padding: 0;
    background: var(--genesis-navy-950);
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-brand,
  .login-card {
    padding: 26px 22px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .mobile-user {
    display: none;
  }

  .app-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .page-header {
    display: block;
  }

  .page-header h1 {
    font-size: 27px;
  }

  .page-actions {
    justify-content: flex-start;
    margin-top: 13px;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric-card {
    min-height: 105px;
    padding: 13px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .result-count {
    justify-self: start;
  }

  .pipeline-board {
    grid-auto-columns: minmax(86vw, 1fr);
  }

  .form-surface,
  .guide-panel {
    padding: 16px;
  }

  .choice-fieldset,
  .form-grid,
  .email-meta,
  .detail-grid,
  .case-side-column {
    grid-template-columns: 1fr;
  }

  .field-wide,
  .detail-grid .wide,
  .case-side-column > :last-child {
    grid-column: auto;
  }

  .form-footer,
  .action-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer .button,
  .action-footer .button,
  .action-footer form,
  .action-footer form .button {
    width: 100%;
  }

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

  .next-action-callout {
    min-width: 0;
  }

  .client-identity h2 {
    white-space: normal;
  }

  .contact-list > div {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 9px;
  }

  tr {
    padding: 12px;
    border: 1px solid var(--genesis-line);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--genesis-shadow-soft);
  }

  td {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 8px;
    padding: 5px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--genesis-muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
  }

  td:first-child {
    display: block;
    margin-bottom: 7px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--genesis-line);
  }

  td:first-child::before {
    display: none;
  }
}

@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;
  }
}

@media (prefers-contrast: more) {
  :root {
    --genesis-line: #a6b1bf;
    --genesis-line-strong: #7d8998;
  }

  .button,
  input,
  select,
  textarea {
    border-width: 2px;
  }
}
