:root {
  --background: #f5f7fb;
  --background-alt: #eef3fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --accent: #e51451;
  --accent-soft: #fde2eb;
  --accent-strong: #c01045;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 22px;
  --radius-sm: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(229, 20, 81, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

.auth-shell,
.app-shell { min-height: 100vh; }

.auth-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(100%, 1120px);
  min-height: 720px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 32px;
  overflow: hidden;
}

.auth-hero {
  padding: 56px;
  background:
    radial-gradient(circle at top left, rgba(229, 20, 81, 0.12), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-hero h1 {
  margin: 20px 0 12px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-hero p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hero-stat,
.panel,
.metric,
.table-wrap,
.timeline,
.toast,
.form-card,
.empty-state,
.hero-card,
.hero-meta-card,
.step-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.hero-stat { padding: 20px; }
.hero-stat strong { display: block; font-size: 18px; margin-bottom: 6px; }
.hero-stat span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.auth-form-wrap {
  padding: 56px;
  display: grid;
  align-content: center;
  background: var(--surface);
}

.auth-form-wrap h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.03em; }
.auth-form-wrap p { margin: 0 0 28px; color: var(--muted); }

.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); font-size: 14px; font-weight: 500; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: 140ms ease;
}

.textarea { min-height: 112px; padding: 14px 15px; resize: vertical; }

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #f48fb1;
  box-shadow: 0 0 0 4px rgba(229, 20, 81, 0.12);
}

.button-row,
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; }

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

.button,
.ghost-button,
.secondary-button,
.danger-button,
.nav-item {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 160ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.button,
.ghost-button,
.secondary-button,
.danger-button {
  padding: 0 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.button {
  background: linear-gradient(180deg, #ee1b5d 0%, #e51451 100%);
  color: #ffffff;
  border-color: rgba(229, 20, 81, 0.92);
  box-shadow: 0 10px 24px rgba(229, 20, 81, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button:hover {
  background: linear-gradient(180deg, #f01d61 0%, #dd0f4c 100%);
  border-color: #dd0f4c;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(229, 20, 81, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.secondary-button {
  background: #fff6f8;
  color: var(--accent-strong);
  border-color: #f6cada;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.ghost-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.danger-button {
  background: #fff5f5;
  color: var(--danger);
  border-color: #fed7d7;
}

.hint { color: var(--muted-2); font-size: 13px; }

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fbfdff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #e51451, #f06292);
  color: white;
  font-weight: 800;
}

.brand-copy strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand-copy span { color: var(--muted); font-size: 13px; }

.nav-group { display: grid; gap: 8px; margin-bottom: 24px; }
.nav-label { padding: 0 8px; color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.nav-item:hover { background: var(--surface-soft); color: var(--text); }

.nav-item.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(229, 20, 81, 0.18);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }

.main { padding: 28px; }
.page-shell { max-width: 1440px; margin: 0 auto; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
}

.topbar h1 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.05em; font-weight: 750; }
.topbar p { margin: 8px 0 0; max-width: 760px; color: var(--muted); line-height: 1.65; font-size: 15px; }

.topbar-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--accent-strong);
  border: 1px solid #f8bbd0;
  font-size: 12px;
  font-weight: 600;
}

.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); }

.layout-grid { display: grid; gap: 20px; }

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
}

.tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.tab.active {
  background: #eff6ff;
  color: var(--accent-strong);
  border-color: #f8bbd0;
  font-weight: 600;
}

.hero-banner,
.content-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 20px; }

.hero-card,
.hero-meta-card,
.panel,
.metric,
.form-card { padding: 22px; }

.hero-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.hero-card h2 { margin: 12px 0 10px; font-size: 28px; letter-spacing: -0.04em; }
.hero-card p { margin: 0; color: var(--muted); line-height: 1.7; }

.hero-meta { display: grid; gap: 16px; }
.hero-meta-card strong { display: block; margin-bottom: 6px; font-size: 28px; letter-spacing: -0.03em; }
.hero-meta-card span { color: var(--muted); line-height: 1.6; font-size: 13px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-card { padding: 18px; }
.step-card strong { display: block; margin-bottom: 6px; font-size: 16px; }
.step-card span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 12px; font-size: 32px; letter-spacing: -0.04em; }
.metric small { display: inline-flex; margin-top: 12px; padding: 6px 10px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); }

.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.panel-header h2,
.panel-header h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.panel-header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.table-wrap { overflow: hidden; }
.table-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 0; }
.table-title h3 { margin: 0; font-size: 16px; }
.table-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th,
td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
th { background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: #fafcff; }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.badge.success { background: var(--success-soft); border-color: #bbf7d0; color: var(--success); }
.badge.warning { background: var(--warning-soft); border-color: #fde68a; color: var(--warning); }
.badge.danger { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.badge.info { background: #fff1f5; border-color: #f8bbd0; color: var(--accent-strong); }

.split { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.form-card { position: sticky; top: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.timeline { padding: 16px; display: grid; gap: 14px; }
.timeline-item { display: grid; gap: 4px; padding-left: 14px; border-left: 2px solid #fde2eb; }
.timeline-item strong { font-size: 14px; }
.timeline-item span { color: var(--muted); font-size: 13px; }

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

.table-link:hover {
  color: var(--accent-strong);
}

.contract-detail-page {
  gap: 18px;
}

.contract-detail-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.contract-detail-section {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.contract-section-header {
  padding: 18px 18px 0;
}

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

.detail-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-item strong {
  font-size: 15px;
  line-height: 1.5;
}

.detail-item small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.contract-metric-grid .metric strong .badge {
  font-size: 13px;
}

.empty-state { padding: 40px 22px; text-align: center; color: var(--muted); background: var(--surface-soft); }
.kpi-inline { display: flex; flex-wrap: wrap; gap: 10px; }

.checklist-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.check-item input { margin: 0; }


body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 60;
}

.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}

.modal-wide { width: min(100%, 760px); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.modal-header h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.modal-header p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.modal-body { padding: 22px; }
.modal-close { white-space: nowrap; }

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 40;
}

.toast { min-width: 280px; padding: 14px 16px; }
.toast strong { display: block; margin-bottom: 4px; }
.toast span { color: var(--muted); font-size: 13px; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 1180px) {
  .metric-grid,
  .content-grid,
  .hero-banner,
  .split,
  .form-grid,
  .quick-grid,
  .auth-card { grid-template-columns: 1fr; }

  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
  .form-card { position: static; }
  .toolbar-between { align-items: flex-start; }
}

.catalog-actions { margin-top: -6px; }
.filter-input { min-width: 260px; }

.topbar-content {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

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

.catalog-page {
  gap: 18px;
}

.catalog-tabs {
  margin-bottom: 2px;
}

.catalog-table-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.045);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 360px);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted-2);
  font-size: 14px;
  pointer-events: none;
}

.table-filter-input {
  padding-left: 38px;
  min-width: 0;
  background: #ffffff;
}

.table-count {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.catalog-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.catalog-table tbody td {
  padding-top: 20px;
  padding-bottom: 20px;
}

.catalog-table tbody tr:hover {
  background: #fbfcff;
}

.table-primary-cell {
  display: grid;
  gap: 6px;
}

.table-primary-cell strong {
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.table-primary-cell span {
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font);
}

.inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge.subtle {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.empty-inline {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .search-input-wrap {
    width: 100%;
  }
}

.catalog-table th:last-child,
.catalog-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

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

.row-action-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.standard-page {
  gap: 20px;
}

.table-toolbar-actions {
  align-items: center;
  justify-content: flex-end;
}

.table-list-item + .table-list-item {
  margin-top: 8px;
}

.row-actions-inline {
  gap: 8px;
  align-items: center;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.standard-metric {
  padding: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.standard-panel {
  padding: 22px;
  border-radius: 22px;
}

.compact-timeline {
  gap: 12px;
}

.compact-timeline .timeline-item {
  padding: 12px 0 12px 14px;
}

@media (max-width: 1180px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

.table-primary-cell.compact {
  gap: 3px;
}

.compact-select {
  min-height: 36px;
  max-width: 160px;
  font-size: 13px;
}

.contract-preview {
  min-height: 52px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fbfdff;
}

.toast {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.toast-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast strong {
  display: block;
  margin: 0;
  color: var(--text);
}

.toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.toast-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.toast-close {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 12px;
}

.toast-success {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.toast-success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast-warning {
  border-color: #fde68a;
  background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.toast-warning .toast-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.toast-error {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff, #fef2f2);
}

.toast-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.contract-create-page {
  gap: 24px;
}

.contract-create-layout {
  align-items: start;
  gap: 24px;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

.contract-form-panel,
.contract-summary-panel {
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.contract-form-panel {
  overflow: hidden;
}

.contract-form-sections {
  display: grid;
  gap: 18px;
}

.contract-form-section {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 255, 0.98));
}

.section-title {
  display: grid;
  gap: 4px;
}

.section-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.invoice-table-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: #fff;
}

.invoice-table {
  min-width: 100%;
}

.invoice-table thead th {
  background: #fafbff;
}

.invoice-table td {
  vertical-align: top;
}

.invoice-table .select,
.invoice-table .input {
  min-width: 0;
  width: 100%;
}

.contract-line-cell {
  min-width: 240px;
}

.contract-market-copy {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: var(--muted);
  font-weight: 600;
}

.contract-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-term-copy {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  white-space: nowrap;
  color: var(--text-color);
  font-weight: 600;
}

.contract-row-remove {
  display: inline-flex;
  justify-content: flex-end;
}

.contract-summary-panel {
  position: sticky;
  top: 32px;
  gap: 18px;
  align-self: start;
}

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

.contract-create-preview {
  display: grid;
  gap: 14px;
  min-height: 220px;
}

.contract-preview-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
}

.contract-preview-group strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.contract-form-footer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.contract-tabs {
  margin-bottom: 4px;
}

@media (max-width: 1180px) {
  .contract-create-layout {
    grid-template-columns: 1fr;
  }

  .contract-summary-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .contract-form-section {
    padding: 18px;
  }

  .contract-create-metrics {
    grid-template-columns: 1fr;
  }

  .contract-form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .contract-row-remove {
    justify-content: flex-start;
  }
}

.contract-cart-list {
  display: grid;
  gap: 14px;
}

.contract-cart-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fcfcff);
}

.contract-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.contract-cart-head strong,
.contract-cart-item-main strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contract-cart-head span,
.contract-cart-item-main span,
.contract-cart-foot span,
.contract-cart-head-total label {
  color: var(--muted);
  font-size: 0.9rem;
}

.contract-cart-head-total {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.contract-cart-head-total strong {
  font-size: 1rem;
}

.contract-cart-items {
  display: grid;
  gap: 10px;
}

.contract-cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--border-soft);
}

.contract-cart-items .contract-cart-item-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.contract-cart-item-main {
  display: grid;
  gap: 4px;
}

.contract-cart-item-price {
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-color);
}

.contract-cart-foot {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.contract-cart-foot div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.contract-cart-foot strong {
  font-size: 0.96rem;
}

@media (max-width: 720px) {
  .contract-cart-head,
  .contract-cart-item-row,
  .contract-cart-foot div {
    flex-direction: column;
    align-items: flex-start;
  }

  .contract-cart-head-total {
    justify-items: start;
    text-align: left;
  }
}

.marketing-shell {
  min-height: 100vh;
  padding: 28px;
}

.marketing-topbar {
  width: min(1320px, 100%);
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.marketing-brand {
  display: grid;
  gap: 4px;
}

.marketing-brand strong {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.marketing-brand span {
  color: var(--muted);
}

.marketing-main {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  padding: 34px;
  border-radius: 28px;
  overflow: hidden;
}

.marketing-hero-copy h1,
.marketing-cta h2,
.section-heading h2 {
  margin: 18px 0 12px;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.marketing-hero-copy h1 {
  max-width: 720px;
  font-size: clamp(3rem, 5vw, 4.8rem);
}

.marketing-hero-copy p,
.marketing-cta p,
.section-heading p,
.marketing-card p,
.workflow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.marketing-hero-actions {
  margin-top: 28px;
}

.marketing-proof-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.marketing-proof-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(229, 20, 81, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,241,245,0.92));
}

.marketing-proof-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.marketing-proof-card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.marketing-hero-visual {
  display: flex;
  align-items: stretch;
}

.visual-window {
  width: 100%;
  min-height: 100%;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(229, 20, 81, 0.18);
  background:
    radial-gradient(circle at top right, rgba(229, 20, 81, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #fff7fa);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.visual-window-bar {
  width: 120px;
  height: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(229, 20, 81, 0.14);
}

.visual-chip-row,
.visual-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.visual-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(229, 20, 81, 0.14);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 600;
}

.visual-metric-card,
.visual-mini-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.94);
}

.visual-metric-card.accent {
  background: linear-gradient(180deg, rgba(229, 20, 81, 0.08), rgba(255,255,255,0.96));
  border-color: rgba(229, 20, 81, 0.18);
}

.visual-metric-card span,
.visual-mini-card span {
  display: block;
  color: var(--muted);
}

.visual-metric-card strong,
.visual-mini-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.visual-metric-card small {
  color: var(--muted);
}

.marketing-section {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 6px;
}

.marketing-grid {
  display: grid;
  gap: 18px;
}

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

.marketing-card {
  padding: 22px;
}

.marketing-card strong,
.workflow-step strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.marketing-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.workflow-step {
  display: grid;
  gap: 10px;
}

.workflow-step span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #fff1f5;
  color: var(--accent-strong);
  font-weight: 700;
}

.marketing-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at left center, rgba(229, 20, 81, 0.08), transparent 28%),
    #ffffff;
}

@media (max-width: 1120px) {
  .marketing-hero,
  .marketing-grid-3,
  .marketing-workflow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .marketing-shell,
  .auth-shell {
    padding: 18px;
  }

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

  .marketing-proof-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero,
  .auth-form-wrap,
  .marketing-hero {
    padding: 28px;
  }
}

.marketing-highlight-card {
  background: linear-gradient(180deg, #ffffff, #fff7fa);
  border-color: rgba(229, 20, 81, 0.14);
}
