:root {
  --bg: #f7f7f4;
  --app-bg-image: none;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #17324d;
  --muted: #66798e;
  --primary: #0e5c8d;
  --accent: #d3382d;
  --gold: #efb51f;
  --success: #1c8b4f;
  --shadow: 0 18px 60px rgba(19, 43, 69, 0.08);
  --radius-xl: 5px;
  --radius-lg: 5px;
  --ui-radius: 5px;
  --ui-gap: 10px;
  --font: "Segoe UI Variable Text", "Bahnschrift", "Trebuchet MS", sans-serif;
  --surface: rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    var(--app-bg-image),
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 16%, transparent), transparent 30%),
    radial-gradient(circle at bottom right, color-mix(in srgb, var(--gold) 18%, transparent), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 80%, #ffffff) 0%, color-mix(in srgb, var(--bg) 94%, #ffffff) 100%);
  background-size: cover, auto, auto, auto;
  background-position: center center, top left, bottom right, center center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, scroll, scroll, scroll;
  color: var(--text);
  font-family: var(--font);
}

body {
  position: relative;
  overflow-x: clip;
}

.design-target {
  position: relative;
}

.design-pin {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.92);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  display: none;
}

body.is-designer-mode .design-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.design-pin .icon {
  font-size: 13px;
}

.designer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 40px rgba(0,0,0,0.1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 16px;
  transform: translateX(0);
  overflow-y: auto;
}

.designer-drawer h3 {
  margin: 0 0 8px 0;
}

.designer-drawer form {
  display: block;
  flex: none;
  min-height: auto;
  overflow: visible;
}

.designer-drawer .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.designer-drawer .form-field > label,
.designer-drawer .designer-alpha-row > label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(23, 50, 77, 0.76);
}

.designer-drawer input[type="text"],
.designer-drawer input[type="email"],
.designer-drawer input[type="search"],
.designer-drawer input[type="password"],
.designer-drawer select,
.designer-drawer textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(18, 53, 85, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 18px rgba(16, 42, 66, 0.04);
  color: #17324d;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.designer-drawer input[type="text"]::placeholder,
.designer-drawer textarea::placeholder {
  color: rgba(102, 121, 142, 0.8);
}

.designer-drawer input[type="text"]:focus,
.designer-drawer input[type="email"]:focus,
.designer-drawer input[type="search"]:focus,
.designer-drawer input[type="password"]:focus,
.designer-drawer select:focus,
.designer-drawer textarea:focus,
.designer-drawer input[type="file"]:focus,
.designer-drawer input[type="range"]:focus {
  outline: none;
  border-color: rgba(14, 92, 141, 0.32);
  box-shadow:
    0 0 0 4px rgba(14, 92, 141, 0.08),
    0 10px 24px rgba(16, 42, 66, 0.08);
}

.designer-drawer .designer-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.98));
  backdrop-filter: blur(10px);
  padding: 14px 0 6px;
  border-top: 1px solid rgba(23, 50, 77, 0.08);
  box-shadow: 0 -14px 28px rgba(16, 42, 66, 0.06);
}

.designer-drawer-body {
  flex: none;
  min-height: auto;
  overflow: visible;
  padding-right: 2px;
  padding-bottom: 92px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.designer-status {
  margin-left: auto;
}

.designer-actions .save-btn,
.designer-actions .ghost-button {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.designer-actions .save-btn {
  border: 1px solid rgba(9, 74, 117, 0.15);
  background: linear-gradient(135deg, #0e5c8d, #1576b3);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(14, 92, 141, 0.24);
}

.designer-actions .save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(14, 92, 141, 0.28);
}

.designer-actions .save-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  box-shadow: none;
}

.designer-actions .ghost-button {
  border-color: rgba(18, 53, 85, 0.12);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(244, 248, 251, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px rgba(16, 42, 66, 0.06);
}

.designer-actions .ghost-button:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 92, 141, 0.18);
}

.designer-accordion {
  border: 1px solid rgba(23, 50, 77, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.96), #ffffff);
  overflow: hidden;
}

.designer-accordion[open] {
  box-shadow: 0 16px 30px rgba(19, 43, 69, 0.08);
}

.designer-accordion summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.designer-accordion summary:hover {
  background: rgba(14, 92, 141, 0.035);
}

.designer-accordion summary::-webkit-details-marker {
  display: none;
}

.designer-accordion summary span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.designer-accordion summary small {
  color: var(--muted);
}

.designer-accordion-indicator {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 92, 141, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.designer-accordion[open] .designer-accordion-indicator {
  transform: rotate(45deg);
}

.designer-accordion-body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(23, 50, 77, 0.08);
}

.designer-control-grid {
  display: grid;
  gap: 12px;
}

.designer-spacing-fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(18, 53, 85, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(244, 248, 251, 0.98));
}

.designer-spacing-fieldset legend {
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(23, 50, 77, 0.76);
}

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

.designer-spacing-grid .form-field {
  margin-bottom: 0;
}

.designer-color-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(18, 53, 85, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(244, 248, 251, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.designer-color-row input[type="text"] {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
}

.designer-alpha-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(247, 250, 252, 0.92);
  border: 1px solid rgba(18, 53, 85, 0.08);
}

.designer-alpha-row label {
  margin: 0;
  font-size: 0.92rem;
}

.designer-drawer input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.designer-alpha-value {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
  color: var(--primary);
}

.designer-color-picker {
  width: 52px;
  min-width: 52px;
  height: 46px;
  padding: 3px;
  border: 1px solid rgba(23, 50, 77, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 42, 66, 0.08);
}

.designer-inline-actions,
.designer-section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.designer-logo-preview {
  min-height: 100px;
  padding: 14px;
  border: 1px dashed rgba(14, 92, 141, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(14, 92, 141, 0.04), rgba(14, 92, 141, 0.01)),
    #ffffff;
  display: grid;
  place-items: center;
}

.designer-logo-preview.is-empty {
  color: var(--muted);
}

.designer-logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.designer-background-preview {
  min-height: 120px;
  border: 1px dashed rgba(14, 92, 141, 0.28);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.85);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.designer-background-preview.is-empty {
  color: var(--muted);
}

.designer-drawer input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border-radius: 16px;
  border: 1px dashed rgba(14, 92, 141, 0.26);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(246, 249, 252, 0.98));
  color: var(--text);
}

.designer-drawer input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-right: 10px;
  background: linear-gradient(135deg, rgba(14, 92, 141, 0.12), rgba(14, 92, 141, 0.06));
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.designer-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 998;
}

.background-orb {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.55;
}

.background-orb-left {
  top: 24vh;
  left: -160px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(14, 92, 141, 0.15), transparent 70%);
}

.background-orb-right {
  bottom: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(211, 56, 45, 0.12), transparent 72%);
}

.app-shell {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(14, 92, 141, 0.15), rgba(14, 92, 141, 0.02)),
    linear-gradient(135deg, #ffffff, #e7f3fb);
  border: 1px solid rgba(14, 92, 141, 0.12);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.4rem;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#app-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

.subhead {
  margin: 4px 0 0;
  color: var(--muted);
}

.toolbar,
.lang-switch,
.role-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.sidebar,
.panel,
.detail-card,
.form-shell,
.metric-card,
.list-card,
.hero-banner {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.user-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 92, 141, 0.07), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(14, 92, 141, 0.12);
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 22px;
}

.sidebar-nav-group {
  display: grid;
  gap: 0;
}

.sidebar-utility-dock {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 16px;
  padding-left: 6px;
}

.sidebar-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(12, 95, 143, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 245, 252, 0.96));
  color: #0c5f8f;
  box-shadow: 0 16px 34px rgba(12, 95, 143, 0.15);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-settings-button:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 95, 143, 0.28);
  box-shadow: 0 20px 40px rgba(12, 95, 143, 0.18);
}

.sidebar-settings-button.is-active {
  border-color: rgba(12, 95, 143, 0.34);
  background: linear-gradient(180deg, rgba(231, 244, 252, 0.98), rgba(214, 234, 248, 0.96));
  box-shadow: 0 18px 38px rgba(12, 95, 143, 0.2);
}

.sidebar-settings-button:focus-visible {
  outline: 2px solid rgba(12, 95, 143, 0.34);
  outline-offset: 3px;
}

.sidebar-settings-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.sidebar-settings-svg {
  width: 30px;
  height: 30px;
  display: block;
}

.muted {
  color: var(--muted);
}

.nav-link,
.pill,
.ghost-button,
.accent-button,
.status-chip,
.filter-chip,
.table-chip {
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
  color: var(--design-text, var(--text));
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--design-hover-bg, rgba(14, 92, 141, 0.08));
  color: var(--design-hover-text, var(--design-text, var(--text)));
  border-color: rgba(14, 92, 141, 0.18);
}

.nav-count {
  min-width: 28px;
  padding: 4px 8px;
  text-align: center;
  border-radius: 999px;
  background: rgba(211, 56, 45, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.list-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

.layout.is-auth .sidebar {
  display: none;
}

.content {
  display: grid;
  gap: 24px;
}

.page-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  padding: 16px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(13, 31, 48, 0.18);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(0);
}

.page-message-success {
  border-color: #cfe9d8;
  background: linear-gradient(180deg, rgba(234, 248, 239, 0.96), rgba(222, 243, 230, 0.96));
  color: #2a6b46;
}

.page-message-error {
  border-color: #f0c8c4;
  background: linear-gradient(180deg, rgba(253, 239, 238, 0.96), rgba(249, 224, 221, 0.96));
  color: #b63b31;
}

.page-message.is-hiding {
  opacity: 0;
  transform: translateY(10px);
}

.panel-loading-notice {
  margin-bottom: 14px;
  border-style: dashed;
  border-color: #d7e1e8;
  background: rgba(255, 255, 255, 0.94);
}

.hero-banner {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 181, 31, 0.18), transparent 68%);
}

.hero-grid,
.stats-grid,
.split-grid,
.list-grid,
.form-grid,
.detail-grid,
.quick-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: stretch;
}

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

.metric-card {
  padding: 20px;
  border-radius: var(--radius-lg);
}

.metric-card .metric-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.metric-card .metric-value {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
}

.metric-card .metric-note {
  margin: 10px 0 0;
  color: var(--muted);
}

.panel,
.detail-card,
.form-shell {
  padding: 22px;
  border-radius: var(--radius-xl);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header p {
  margin: 0;
}

.list-grid {
  grid-template-columns: 1.25fr minmax(280px, 0.95fr);
}

.split-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.list-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.list-card:hover,
.list-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(14, 92, 141, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

.list-card-header,
.inline-meta,
.toolbar-row,
.filters-row,
.summary-row,
.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.list-card-header {
  justify-content: space-between;
}

.case-id {
  font-size: 1.15rem;
  font-weight: 700;
}

.status-chip {
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-chip.status-new,
.filter-chip.is-active[data-status="new"] {
  background: rgba(211, 56, 45, 0.12);
  color: var(--accent);
}

.status-chip.status-review,
.filter-chip.is-active[data-status="review"] {
  background: rgba(239, 181, 31, 0.15);
  color: #8c6200;
}

.status-chip.status-assigned,
.filter-chip.is-active[data-status="assigned"] {
  background: rgba(28, 139, 79, 0.12);
  color: var(--success);
}

.status-chip.status-closed,
.filter-chip.is-active[data-status="closed"] {
  background: rgba(14, 92, 141, 0.12);
  color: var(--primary);
}

.inline-meta,
.summary-row {
  color: var(--muted);
  font-size: 0.94rem;
}

.summary-row strong,
.detail-grid strong,
.property-list strong {
  color: var(--text);
}

.pill,
.ghost-button,
.accent-button,
.filter-chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  font-weight: 600;
  line-height: 1.1;
  transition: 0.2s ease;
}

.pill,
.ghost-button,
.filter-chip {
  color: var(--design-text, var(--text));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 251, 0.98));
  border-color: rgba(10, 31, 53, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 33, 50, 0.06);
}

.pill:hover,
.pill.is-active,
.ghost-button:hover,
.filter-chip:hover {
  background: var(--design-hover-bg, rgba(14, 92, 141, 0.08));
  color: var(--design-hover-text, var(--design-text, var(--text)));
  border-color: rgba(14, 92, 141, 0.18);
}

.accent-button {
  background: linear-gradient(135deg, #c92d23, #e14a3f);
  color: var(--design-accent-text, #ffffff) !important;
  border-color: rgba(148, 24, 17, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(211, 56, 45, 0.24);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.accent-button:hover {
  background: var(--design-hover-bg, linear-gradient(135deg, #c62d24, #db4237));
  color: var(--design-accent-hover-text, var(--design-accent-text, #ffffff)) !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 34px rgba(211, 56, 45, 0.28);
}

.toolbar-row {
  justify-content: space-between;
  margin-bottom: 18px;
}

.search-input,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(10, 31, 53, 0.14);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  color: var(--text);
}

.search-input:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(14, 92, 141, 0.35);
  box-shadow: 0 0 0 3px rgba(14, 92, 141, 0.08);
}

.filters-row {
  margin-top: 12px;
}

.filter-chip.is-active {
  font-weight: 700;
}

.empty-state {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(10, 31, 53, 0.18);
  text-align: center;
  color: var(--muted);
}

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

.detail-block {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(10, 31, 53, 0.08);
}

.detail-block h4 {
  margin: 0 0 10px;
}

.property-list {
  display: grid;
  gap: 10px;
}

.property-list div {
  display: grid;
  gap: 4px;
}

.table-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(14, 92, 141, 0.08);
  color: var(--primary);
}

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

.quick-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(10, 31, 53, 0.08);
}

.quick-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.quick-action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.quick-action:hover {
  border-color: rgba(14, 92, 141, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

.auth-shell {
  align-items: start;
}

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

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

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

.form-field {
  display: grid;
  gap: 8px;
}

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

.form-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.section-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(10, 31, 53, 0.08);
}

.data-table th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

@media (max-width: 1200px) {
  .stats-grid,
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .list-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .dashboard-case-row {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .dashboard-case-row > *:nth-child(n+3) {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

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

  .form-grid,
  .form-grid.form-grid-3,
  .detail-grid,
  .stats-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 246, 0.98)),
    radial-gradient(circle at 0% 100%, rgba(18, 92, 141, 0.05), transparent 34%);
}

body::before {
  content: "";
  position: fixed;
  inset: 90px 0 0 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(18, 92, 141, 0.05), transparent 22%),
    linear-gradient(140deg, transparent 0 18%, rgba(255, 255, 255, 0.85) 18% 22%, transparent 22% 100%),
    linear-gradient(157deg, transparent 0 30%, rgba(255, 255, 255, 0.75) 30% 31.5%, transparent 31.5% 100%),
    linear-gradient(166deg, transparent 0 39%, rgba(255, 255, 255, 0.72) 39% 40.2%, transparent 40.2% 100%);
  opacity: 0.95;
  z-index: 0;
}

.background-orb {
  display: none;
}

.app-shell {
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 30px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0;
  background: var(--design-bg, rgba(255, 255, 255, 0.52));
  box-shadow: var(--design-shadow, 0 10px 30px rgba(16, 42, 66, 0.08));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff7fd, #ffffff);
  font-size: 1rem;
  box-shadow: none;
}

.brand-block {
  gap: 12px;
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

#app-title {
  font-size: 1.3rem;
  line-height: 1.1;
}

.subhead {
  font-size: 0.88rem;
}

.toolbar {
  gap: 18px;
}

.lang-switch .muted,
.role-switch .muted {
  display: none;
}

.pill,
.ghost-button,
.accent-button,
.filter-chip,
.table-chip {
  border-radius: 4px;
}

.pill {
  padding: 7px 10px;
  font-size: 0.8rem;
}

.table-chip {
  padding: 8px 10px;
}

.layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  margin-top: 0;
  padding: 22px 26px 32px;
}

.sidebar,
.panel,
.detail-card,
.form-shell,
.metric-card,
.list-card,
.hero-banner {
  background: var(--design-bg, var(--panel));
  border: 1px solid var(--design-border, rgba(255, 255, 255, 0.4));
  box-shadow: var(--design-shadow, var(--shadow));
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  padding: 10px 14px 18px;
  border-radius: 8px;
}

.user-card {
  padding: 18px 18px 12px;
  border: 0;
  border-bottom: 1px dashed #d9d9d9;
  border-radius: 0;
  background: transparent;
}

.user-card h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #145f95;
}

.nav-list {
  gap: 0;
  margin-top: 14px;
}

.nav-link {
  padding: 16px 14px;
  border: 0;
  border-bottom: 1px solid #e6e6e6;
  border-radius: 0;
  font-size: 0.98rem;
}

.nav-link:hover,
.nav-link.is-active {
  background: #f4f4f4;
  border-color: #e6e6e6;
}

.nav-count {
  background: transparent;
  color: #cc2f23;
  padding: 0;
  min-width: unset;
}

.content {
  gap: 16px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 16px;
  align-items: start;
}

.dashboard-shell-simple {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-main,
.dashboard-aside {
  display: grid;
  gap: 12px;
}

.action-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 44px;
  text-align: left;
  border: 1px solid #e6e6e6;
  background: #ffffff;
  cursor: pointer;
  border-radius: 8px;
  color: var(--design-text, inherit);
  transition: 0.2s ease;
}

.summary-action:hover {
  background: var(--design-hover-bg, #f6fbfe);
  color: var(--design-hover-text, var(--design-text, inherit));
}

.summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.summary-copy {
  display: grid;
  gap: 1px;
}

.summary-copy strong {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.summary-copy small {
  color: inherit;
  font-size: 11px;
}

.summary-action-blue .summary-icon { background: #0c5f8f; }
.summary-action-green .summary-icon { background: #18853d; }
.summary-action-red .summary-icon { background: #d61f14; }

.summary-action-blue .summary-copy strong,
.summary-action-blue .summary-copy small { color: #0c5f8f; }
.summary-action-green .summary-copy strong,
.summary-action-green .summary-copy small { color: #18853d; }
.summary-action-red .summary-copy strong,
.summary-action-red .summary-copy small { color: #d61f14; }

.dashboard-panel,
.side-widget {
  border-radius: 8px;
  padding: 12px 14px 16px;
}

.section-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-toolbar h3,
.panel h3,
.panel h2,
.detail-card h3,
.form-shell h2,
.form-shell h3 {
  margin: 0;
  color: #0c5f8f;
  font-weight: 400;
}

.section-toolbar p,
.panel-header p {
  font-size: 0.88rem;
}

.compact-search {
  width: 180px;
}

.entity-spotlight-grid {
  display: grid;
  gap: 10px;
}

.entity-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px minmax(180px, 0.9fr);
  gap: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
}

.entity-spotlight-main,
.entity-spotlight-side {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

.entity-spotlight-title {
  color: #0c5f8f;
  font-size: 1.05rem;
}

.entity-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entity-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1c8b4f;
  font-size: 0.82rem;
}

.entity-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.entity-action-button {
  padding: 0;
  min-height: auto;
  border: 0;
  background: transparent;
  color: #0c5f8f;
  box-shadow: none;
}

.entity-action-button:hover {
  background: transparent;
  color: #094b70;
}

.entity-action-button-danger {
  color: #d3382d;
}

.entity-action-button-danger:hover {
  color: #b82c23;
}

.entity-shared-toggle {
  align-items: flex-start;
}

.entity-spotlight-count {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 2rem;
  color: #0c5f8f;
}

.dashboard-case-list {
  display: grid;
}

.dashboard-case-row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 0.9fr) minmax(140px, 1fr) 120px 170px 50px auto;
  gap: 14px;
  align-items: center;
  padding: 16px 6px;
  border-top: 1px dashed #dadada;
  cursor: pointer;
}

.dashboard-case-row:hover,
.entity-spotlight:hover,
.alert-card:hover,
.list-card-clickable:hover {
  background: #f8f8f8;
}

.dashboard-case-row:first-child {
  border-top: 1px dashed #dadada;
}

.document-thumb {
  width: 34px;
  height: 50px;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #ececec, #fafafa),
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(0, 0, 0, 0.06) 5px 6px);
  overflow: hidden;
}

.document-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-case-id {
  color: #0c5f8f;
  font-size: 1.1rem;
}

.dashboard-case-sub {
  color: #6a6a6a;
  font-size: 0.86rem;
  margin-top: 4px;
}

.status-text {
  font-size: 0.88rem;
  text-transform: uppercase;
}

.status-text-new,
.status-text-review {
  color: #d61f14;
}

.status-text-updated,
.status-text-processing,
.status-text-insurance_query,
.status-text-sent {
  color: #b86a00;
}

.status-text-assigned {
  color: #0c5f8f;
}

.status-text-paid,
.status-text-closed,
.status-text-archived,
.status-text-draft {
  color: #18853d;
}

.row-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border: 1px solid currentColor;
}

.row-check-signed {
  color: #1c9b28;
  background: rgba(28, 155, 40, 0.08);
}

.row-check-unsigned {
  color: #d61f14;
  background: rgba(214, 31, 20, 0.08);
}

.dashboard-footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.square-button,
.accent-button {
  border-radius: 3px;
}

.side-widget-title {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #1a66a0;
  color: #1a66a0;
  font-size: 0.96rem;
}

.side-widget-emphasis .side-widget-title {
  color: #d61f14;
  border-bottom-color: #d61f14;
}

.alert-card {
  padding: 12px 14px;
  border-radius: 4px;
  background: #d70900;
  color: #ffffff;
  line-height: 1.6;
  cursor: pointer;
}

.alert-card-id {
  font-size: 1.35rem;
  font-weight: 700;
}

.widget-empty {
  color: #666666;
  font-size: 0.96rem;
  padding: 12px 4px 4px;
}

.split-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.entity-admin-shell {
  align-items: start;
}

.entity-admin-side {
  position: sticky;
  top: 110px;
}

.panel,
.detail-card,
.form-shell {
  padding: 14px 16px;
  border-radius: 8px;
}

.panel-header {
  margin-bottom: 10px;
}

.search-input,
.form-input,
.form-select,
.form-textarea {
  border-radius: 4px;
  background: #ffffff;
  border-color: #d9d9d9;
  box-shadow: none;
}

.list-card {
  background: #ffffff;
  border: 1px solid #dfdfdf;
  border-radius: 4px;
}

.list-card:hover,
.list-card.is-selected {
  transform: none;
  background: #fcfcfc;
  border-color: #d0d0d0;
}

.status-chip {
  border-radius: 4px;
  padding: 5px 8px;
  letter-spacing: 0;
  font-weight: 400;
}

.detail-card {
  align-self: start;
}

.case-detail-page {
  padding: 16px 18px 20px;
}

.detail-grid {
  grid-template-columns: 1fr;
}

.detail-block {
  border-radius: 4px;
  background: #fafafa;
}

.detail-block h4 {
  color: #0c5f8f;
  font-weight: 400;
}

.form-shell .toolbar-row,
.detail-card .toolbar-row {
  justify-content: flex-start;
}

.quick-grid {
  gap: 10px;
}

.quick-card {
  border-radius: 4px;
  background: #ffffff;
}

.auth-shell {
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

  .dashboard-case-row {
    grid-template-columns: 44px 1fr;
  }

  .dashboard-case-row > *:nth-child(n+3) {
    grid-column: 2;
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .action-strip,
  .auth-shell,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .compact-search {
    width: 100%;
  }

  .entity-spotlight {
    grid-template-columns: 1fr;
  }
}

/* Dashboard refinement to match the provided reference more closely */

.topbar {
  min-height: 80px;
  padding: 10px 38px;
}

.brand-block {
  min-width: 280px;
}

.brand-block > div:last-child {
  display: none;
}

.brand-logo {
  position: relative;
  width: 72px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 22px 13px, #44c7ff 0 10px, transparent 10px),
    radial-gradient(circle at 38px 15px, rgba(68, 199, 255, 0.65) 0 8px, transparent 8px),
    linear-gradient(155deg, transparent 0 38%, #1b79b6 38% 46%, transparent 46% 100%),
    linear-gradient(180deg, transparent 0 70%, #0c5f8f 70% 76%, transparent 76% 100%);
  box-shadow: none;
  color: transparent;
}

.brand-logo::before {
  content: "SJ-Gutachten";
  position: absolute;
  left: 0;
  bottom: -13px;
  font-size: 10px;
  font-weight: 700;
  color: #161616;
  white-space: nowrap;
}

.brand-logo::after {
  content: "KFZ Sachverstaendigenbuero";
  position: absolute;
  left: 0;
  bottom: -24px;
  font-size: 6px;
  color: #5d5d5d;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  font-size: 0;
}

#app-title,
.subhead {
  display: none;
}

.toolbar {
  justify-content: flex-end;
  gap: 16px;
}

.header-language {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-language .pill {
  min-width: 42px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #d8d8d8;
  background: #ffffff;
  color: #5f5f5f;
  font-size: 0.9rem;
  line-height: 1;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 14px;
  border-radius: 5px;
  border: 1px solid rgba(12, 95, 143, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.lang-flag-sr {
  background-image: url("/assets/images/flags/serbia.svg");
}

.lang-flag-de {
  background-image: url("/assets/images/flags/germany.svg");
}

.lang-flag-en {
  background-image: url("/assets/images/flags/english.svg?v=20260411-2");
}

.intake-open-draft-button {
  min-width: 180px;
}

.role-dashboard-search {
  width: 100%;
}

.role-dashboard-aside {
  align-content: start;
}

.intake-debug-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px dashed #cfd9e4;
  background: #fbfdff;
}

.intake-debug-title {
  color: #0c5f8f;
  font-size: 14px;
}

.intake-debug-pre {
  margin: 0;
  padding: 10px;
  border-radius: 5px;
  background: #f2f7fb;
  color: #28445f;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.intake-debug-log {
  display: grid;
  gap: 6px;
}

.intake-debug-log-line {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid #e3ebf2;
  font-size: 12px;
}

.intake-debug-log-line strong {
  color: #0c5f8f;
}

.intake-debug-log-line span {
  color: #557189;
  word-break: break-word;
}

.header-language .pill.is-active {
  border-color: #0c5f8f;
  color: #0c5f8f;
  background: #f6fbff;
}

.header-icon-row {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: visible;
}

.header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: visible;
}

.header-icon-button-blue {
  color: #0c5f8f;
}

.header-icon-button-gold {
  color: #efb000;
}

.header-icon-button-featured {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(12, 95, 143, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.94));
  box-shadow: 0 8px 22px rgba(12, 95, 143, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.header-icon-button-featured:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(12, 95, 143, 0.16);
}

.header-icon-button-blue.header-icon-button-featured {
  border-color: rgba(12, 95, 143, 0.24);
}

.header-icon-button-gold.header-icon-button-featured {
  border-color: rgba(239, 176, 0, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.98), rgba(255, 247, 217, 0.94));
  box-shadow: 0 10px 24px rgba(239, 176, 0, 0.18);
}

.header-icon-button-danger {
  width: 28px;
  height: 28px;
  border: 1px solid #eb2014;
  border-radius: 4px;
  color: #eb2014;
}

.header-icon-button-install {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.94));
  animation: installPulse 2.4s ease-in-out infinite;
}

@keyframes installPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
  50% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18); }
}

.portrait-only-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #0c5f8f 0%, #063f61 100%);
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 32px;
}

.portrait-only-overlay p {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.portrait-only-overlay .portrait-overlay-sub {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.7;
}

@media screen and (orientation: landscape) and (max-height: 540px) {
  .portrait-only-overlay {
    display: flex;
  }
}

.header-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.header-icon-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(217, 45, 32, 0.28);
  z-index: 2;
}

.mobile-footer-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(217, 45, 32, 0.28);
  z-index: 2;
}

.header-icon-button-bell.has-badge {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(239, 176, 0, 0.24), 0 0 0 4px rgba(239, 176, 0, 0.08);
  border-color: rgba(239, 176, 0, 0.38);
}

.case-detail-notify-button {
  border-color: rgba(12, 95, 143, 0.2);
  color: #0c5f8f;
  background: rgba(246, 251, 255, 0.95);
}

.layout {
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 26px 24px;
}

.sidebar {
  padding: 0 10px 14px;
  border-radius: 8px;
  min-height: 545px;
}

.user-card {
  padding: 26px 20px 18px;
  margin: 0 6px;
}

.user-card-email {
  color: var(--design-text, #145f95);
  font-size: 18px;
  font-weight: 400;
  text-align: center;
}

.user-card-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.user-card-button:hover .user-card-email {
  text-decoration: underline;
  color: var(--design-hover-text, var(--design-text, #145f95));
}

.nav-list {
  margin-top: 20px;
}

.nav-link {
  margin: 0 6px;
  padding: 16px 16px;
  font-size: 18px;
  color: #777777;
}

.nav-link:hover,
.nav-link.is-active {
  background: #f2f2f2;
  color: #616161;
}

.nav-count {
  display: none;
}

.content {
  gap: 10px;
}

.dashboard-shell {
  grid-template-columns: minmax(0, 1fr) 476px;
  gap: 10px;
}

.dashboard-main,
.dashboard-aside {
  gap: 10px;
}

.action-strip {
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-action {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 7px;
  gap: 8px;
}

.summary-icon {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: transparent !important;
  flex-shrink: 0;
}

.summary-svg {
  width: 26px;
  height: 26px;
  display: block;
}

.summary-action-blue .summary-icon {
  color: #0c5f8f;
}

.summary-action-green .summary-icon {
  color: #18853d;
}

.summary-action-red .summary-icon {
  color: #d61f14;
}

.summary-action-accent .summary-icon {
  color: #d3382d;
}

.summary-action-accent .summary-copy strong,
.summary-action-accent .summary-copy small { color: #d3382d; }

.summary-copy {
  gap: 1px;
}

.summary-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.summary-copy small {
  font-size: 11px;
}

.dashboard-panel,
.side-widget {
  padding: 10px 10px 12px;
}

.section-toolbar {
  align-items: center;
  margin-bottom: 8px;
}

.section-toolbar h3 {
  font-size: 18px;
}

.compact-search {
  width: 175px;
  padding: 9px 12px;
  font-size: 14px;
}

.entity-spotlight {
  grid-template-columns: minmax(0, 1fr) 52px minmax(230px, 0.95fr);
  gap: 10px;
  padding: 14px 12px;
}

.entity-spotlight-title {
  font-size: 15px;
}

.entity-spotlight-meta,
.entity-spotlight-side {
  font-size: 12px;
  line-height: 1.55;
}

.entity-spotlight-count {
  align-items: flex-start;
  font-size: 18px;
  font-weight: 700;
}

.dashboard-case-row {
  grid-template-columns: 46px minmax(160px, 1fr) minmax(150px, 1fr) 120px 160px 36px;
  gap: 12px;
  padding: 18px 6px;
}

.dashboard-case-id {
  font-size: 16px;
}

.dashboard-case-row > div:nth-child(3),
.dashboard-case-row > div:nth-child(4) {
  font-size: 15px;
}

.dashboard-case-status {
  text-align: right;
}

.status-text {
  font-size: 13px;
}

.dashboard-case-sub {
  font-size: 12px;
}

.row-check {
  font-size: 18px;
}

.dashboard-footer-actions {
  margin-top: 8px;
}

.dashboard-outline-button {
  min-width: 198px;
  padding: 12px 18px;
  border: 1px solid #eb2014;
  color: #eb2014;
  background: #ffffff;
  font-size: 14px;
}

.dashboard-outline-button:hover {
  background: #fff6f5;
  border-color: #eb2014;
}

.dashboard-hidden-action {
  display: none;
}

.side-widget {
  min-height: 80px;
}

.side-widget-emphasis {
  min-height: 128px;
}

.side-widget-title {
  font-size: 16px;
}

.alert-card {
  width: 248px;
  min-height: 76px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
}

.alert-card-id {
  font-size: 14px;
}

.widget-empty {
  padding: 6px 2px 2px;
  font-size: 14px;
}

.widget-empty-centered {
  text-align: center;
}

.cases-legacy-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 10px;
}

.cases-legacy-main {
  min-height: 400px;
  padding: 18px 14px 18px;
}

.cases-legacy-header {
  padding: 6px 8px 22px;
  border-bottom: 1px solid #e1e1e1;
}

.cases-legacy-header h2 {
  margin: 0;
  color: #0c5f8f;
  font-size: 20px;
  font-weight: 300;
}

.cases-legacy-header p {
  margin: 8px 0 0;
  font-size: 13px;
}

.cases-legacy-side {
  display: grid;
  align-content: start;
  gap: 10px;
}

.cases-filter-search,
.cases-filter-box {
  padding: 10px;
  border-radius: 8px;
}

.cases-sidebar-search {
  padding: 12px 16px;
  font-size: 14px;
}

.case-listing-stack {
  display: grid;
}

.case-listing-row {
  display: grid;
  grid-template-columns: 46px minmax(170px, 1.05fr) minmax(160px, 1fr) 120px 170px 34px auto;
  gap: 16px;
  align-items: center;
  padding: 18px 6px;
  border-bottom: 1px dashed #d8d8d8;
  cursor: pointer;
}

.case-listing-row:hover {
  background: #fafafa;
}

.case-listing-col {
  font-size: 15px;
}

.case-listing-col-primary {
  min-width: 0;
}

.case-listing-plate {
  white-space: nowrap;
}

.case-listing-status {
  text-align: right;
}

.cases-filter-box {
  display: grid;
  gap: 12px;
}

.case-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333333;
  font-size: 15px;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.case-filter-check {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: #ffffff;
  flex: 0 0 auto;
}

.case-filter-option.is-active .case-filter-check {
  background: #d9d9d9;
  border-color: #c9c9c9;
}

.case-filter-option.is-active .case-filter-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(40deg);
}

.signature-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.signature-clear-button {
  padding: 8px 12px;
  font-size: 13px;
}

.signature-pad-shell {
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #ffffff;
}

.signed-doc-upload-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signed-doc-empty {
  color: #aaa;
  font-size: 13px;
}

.signed-doc-pdf-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f9f9f9;
  font-size: 13px;
  color: #444;
}

.signed-doc-pdf-icon {
  font-size: 20px;
}

.signed-doc-image-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.signed-doc-upload-label {
  display: inline-block;
}

.signed-doc-download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f9f9f9;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s;
}

.signed-doc-download-link:hover {
  background: #eef4ff;
}

.signed-doc-image-link {
  display: inline-block;
}

.signed-doc-image-link .signed-doc-image-preview {
  cursor: pointer;
  transition: opacity 0.15s;
}

.signed-doc-image-link:hover .signed-doc-image-preview {
  opacity: 0.85;
}

.signature-pad-shell-expanded {
  width: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.signature-pad {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 249, 249, 0.96)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(12, 95, 143, 0.06) 31px 32px);
  touch-action: none;
  cursor: crosshair;
}

.signature-pad-canvas {
  display: block;
  width: 100%;
  height: 320px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 249, 249, 0.96)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(12, 95, 143, 0.06) 31px 32px);
  touch-action: none;
  cursor: crosshair;
}

.signature-pad-canvas-expanded {
  flex: 1 1 auto;
  min-height: 320px;
  height: min(52vh, 420px);
}

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

.signature-intake-copy {
  margin-bottom: 2px;
}

.signature-pad-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.signature-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 12px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #ffffff;
}

.signature-preview-image {
  max-width: 100%;
  max-height: 170px;
  display: block;
}

.document-upload-shell {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.document-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.secondary-action-button {
  min-width: 170px;
}

.document-upload-input-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px dashed #0c5f8f;
  border-radius: 6px;
  color: #0c5f8f;
  background: #f5fbff;
  cursor: pointer;
  overflow: hidden;
}

.document-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.document-upload-preview,
.document-upload-empty {
  margin-top: 14px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
}

.document-upload-preview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.document-upload-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
}

.document-upload-meta {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #5a5a5a;
  font-size: 0.92rem;
}

.service-booklet-preview-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-booklet-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: #0f5f83;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.service-booklet-link:hover,
.service-booklet-link:focus-visible {
  color: #0b4866;
  outline: none;
}

.case-detail-claim-link,
.case-detail-claim-link:hover,
.case-detail-claim-link:focus-visible {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 0;
}

.service-booklet-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 30, 46, 0.72);
  backdrop-filter: blur(2px);
  animation: service-booklet-viewer-fade-in 0.15s ease-out;
}

.service-booklet-viewer-overlay.is-closing {
  animation: service-booklet-viewer-fade-out 0.15s ease-in forwards;
}

.service-booklet-viewer-modal {
  display: flex;
  flex-direction: column;
  max-width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.service-booklet-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4ecf4;
  background: #f6fafc;
  color: #0f5f83;
}

.service-booklet-viewer-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  background: #0b1e2e;
}

.service-booklet-viewer-body img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 4px;
  background: #ffffff;
}

@keyframes service-booklet-viewer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes service-booklet-viewer-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.document-upload-empty {
  min-height: 180px;
  padding: 18px 16px;
  color: #7b7b7b;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
}

.scene-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.scene-photo-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
}

.scene-photo-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ececec;
}

.scene-photo-label-input {
  min-height: 40px;
}

.scene-photo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6a6a6a;
  font-size: 0.8rem;
}

.scene-photo-editor-layout {
  display: grid;
  gap: 18px;
}

.scene-photo-editor-group {
  display: grid;
  gap: 12px;
}

.scene-photo-editor-heading {
  color: #6b90b0;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scene-photo-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.scene-photo-slot-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e4ee;
  border-radius: 10px;
  background: #fbfdff;
}

.scene-photo-slot-title {
  color: #3f5870;
  font-size: 13px;
  line-height: 1.3;
}

.scene-photo-preview-card {
  display: grid;
  gap: 8px;
}

.scene-photo-preview-card-guide {
  gap: 10px;
}

.scene-photo-preview-card img {
  width: 100%;
  height: 138px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e1e7ed;
  background: #ffffff;
}

.scene-photo-empty {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 12px;
  border: 1px dashed #c5d5e3;
  border-radius: 8px;
  color: #7b8fa3;
  background: #f7fbff;
  text-align: center;
}

.scene-photo-guide-note {
  color: #70879b;
  font-size: 12px;
  line-height: 1.45;
}

.scene-photo-remove-button {
  justify-self: start;
}

.scene-photo-upload-shell {
  width: 100%;
}

.scene-photo-editor-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.scene-photo-additional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.scene-photo-description-field {
  height: 100%;
}

.scene-photo-description-textarea {
  min-height: 220px;
}

.intake-reference-shell {
  display: block;
}

.intake-reference-card {
  padding: 16px;
}

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

.intake-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.intake-case-meta {
  min-width: 0;
}

.intake-ocr-card {
  margin-top: 14px;
  min-height: 180px;
  padding: 18px 20px;
  border: 1px solid #d9e0e5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(16, 33, 48, 0.08);
}

.intake-ocr-card-loading {
  border-color: #d6e3ea;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.intake-ocr-card-success {
  border-color: #cfe8d8;
  box-shadow: 0 16px 38px rgba(47, 126, 79, 0.14);
  background: linear-gradient(180deg, #ffffff, #f4fbf6);
}

.intake-ocr-card-error {
  border-color: #efc9c5;
  box-shadow: 0 16px 38px rgba(182, 59, 49, 0.12);
  background: linear-gradient(180deg, #ffffff, #fdf4f3);
}

.intake-ocr-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #0c5f8f;
  font-size: 18px;
}

.intake-ocr-card-success .intake-ocr-card-header {
  color: #2d7a4d;
}

.intake-ocr-card-error .intake-ocr-card-header {
  color: #b63b31;
}

.intake-ocr-card-list {
  display: grid;
  gap: 8px;
}

.intake-ocr-card-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.intake-ocr-card-label {
  color: #6f7f8d;
}

.intake-ocr-card-value {
  color: #42515f;
}

.intake-ocr-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(12, 95, 143, 0.18);
  border-top-color: #0c5f8f;
  border-radius: 50%;
  animation: intake-spin 0.85s linear infinite;
}

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

.intake-upload-panel {
  min-height: 100%;
  padding: 14px 16px 16px;
  border: 1px solid #d7d7d7;
  background: #ffffff;
}

.intake-upload-title {
  margin-bottom: 12px;
  color: #777;
  font-size: 13px;
}

.intake-upload-input-shell {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 14px;
}

.intake-upload-ocr-button {
  margin-top: 10px;
  color: #db4237;
  border-color: #db4237;
  background: #fff;
  width: auto;
}

.intake-image-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.intake-image-editor-shell {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d9e0e5;
  border-radius: 10px;
  background: #f9fbfd;
}

.intake-image-editor-copy {
  margin-bottom: 10px;
  color: #6f7f8d;
  font-size: 13px;
}

.intake-image-crop-surface {
  position: relative;
  overflow: hidden;
  border: 1px dashed #8fb3cf;
  border-radius: 10px;
  background: #eef5fb;
  cursor: crosshair;
}

.intake-image-crop-surface img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.intake-image-crop-selection {
  position: absolute;
  border: 2px solid #0c5f8f;
  background: rgba(12, 95, 143, 0.18);
  box-shadow: 0 0 0 9999px rgba(12, 95, 143, 0.18);
  pointer-events: none;
}

.intake-image-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.intake-section {
  display: grid;
  gap: 12px;
}

.intake-section-title {
  padding: 6px 10px;
  background: #0d566d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intake-grid {
  display: grid;
  gap: 12px 12px;
}

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

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

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

.intake-split-entities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.intake-entity-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.intake-subsection-title {
  padding: 6px 10px;
  background: #0d566d;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intake-radio-field,
.case-detail-radio-field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.intake-radio-option,
.form-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f5f5f;
  font-size: 13px;
}

.yes-no-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #d9e3ee;
  border-radius: 999px;
  background: #f6fafc;
  justify-self: start;
  width: max-content;
}

.yes-no-switcher-option {
  position: relative;
  margin: 0;
}

.yes-no-switcher-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.yes-no-switcher-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.yes-no-switcher-option input:checked + .yes-no-switcher-label {
  background: #0f5f83;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 95, 131, 0.2);
}

.intake-switch-field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.intake-auth-toggle {
  display: inline-block;
}

.intake-service-booklet-field[hidden] {
  display: none !important;
}

.app-language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.app-language-option {
  padding: 8px 10px;
  border: 1px solid #d9e3ee;
  border-radius: 10px;
  background: #f8fbfe;
}

.app-language-settings-field {
  grid-column: 1 / -1;
}

.intake-radios-row {
  align-items: start;
}

.intake-owner-toggle-row {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.intake-checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  font-weight: 500;
}

.form-input[readonly] {
  background: #f0f3f6;
  color: #888;
  cursor: not-allowed;
}

.intake-submit-row {
  justify-content: flex-start;
  margin-top: 0;
}

.intake-save-button {
  width: auto;
  min-width: 120px;
  padding: 6px 10px;
  border-color: #db4237;
  color: #db4237;
  background: #fff;
  font-size: 11px;
}

.is-auth-screen .topbar,
.is-auth-screen .sidebar {
  display: none;
}

.is-auth-screen .layout {
  grid-template-columns: 1fr;
  padding: 0;
}

.is-auth-screen .content {
  min-height: 100vh;
}

.auth-page-shell {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding-top: 60px;
}

.auth-reference-card {
  width: 480px;
  max-width: calc(100vw - 32px);
  padding: 18px 20px 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
}

.partner-registration-page-card {
  width: min(920px, calc(100vw - 32px));
}

.partner-registration-page-header {
  margin-bottom: 12px;
}

.auth-reference-card h2 {
  margin: 0 0 14px;
  color: #0c5f8f;
  font-size: 21px;
  font-weight: 300;
}

.auth-reference-form {
  display: grid;
  gap: 12px;
}

.auth-reference-input {
  height: 42px;
  border-color: #878787;
}

.auth-remember-row {
  display: grid;
  gap: 8px;
  color: #595959;
  font-size: 14px;
}

.auth-toggle {
  position: relative;
  width: 38px;
  height: 22px;
}

.auth-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.auth-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d9d9;
  transition: 0.2s ease;
}

.auth-toggle-slider::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: 0.2s ease;
}

.auth-toggle input:checked + .auth-toggle-slider {
  background: #0f5f83;
}

.auth-toggle input:checked + .auth-toggle-slider::after {
  transform: translateX(16px);
}

.auth-error-text {
  color: #cb2b20;
  font-size: 13px;
}

.auth-submit-row {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.auth-reference-button {
  min-width: 148px;
  padding: 12px 24px;
  background: #0f5f83;
  box-shadow: none;
  color: #ffffff !important;
}

.auth-reference-button:hover {
  background: #0c5474;
  color: #ffffff !important;
}

.auth-register-link {
  width: fit-content;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #3f4b59;
  font-size: 15px;
  cursor: pointer;
}

.partner-registration-modal {
  width: min(760px, calc(100vw - 32px));
}

.partner-registration-review-modal {
  width: min(860px, calc(100vw - 32px));
}

.partner-registration-form {
  display: grid;
  gap: 20px;
}

.partner-registration-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  width: 100%;
  border-top: 1px solid #d4e1eb;
  border-bottom: 1px solid #d4e1eb;
}

.partner-registration-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: #f8fbfd;
  color: #6d7f8f;
  font-weight: 600;
  position: relative;
}

.partner-registration-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 0;
  bottom: 10px;
  width: 1px;
  background: #d4e1eb;
}

.partner-registration-step.is-active {
  border-color: #0c5f8f;
  background: #0c5f8f;
  color: #ffffff;
}

.partner-registration-step.is-done {
  border-color: #bfe1c6;
  background: #eaf7ee;
  color: #2f7c49;
}

.partner-registration-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.partner-registration-documents,
.partner-registration-review-docs {
  display: grid;
  gap: 14px;
}

.partner-registration-upload {
  width: fit-content;
}

.partner-registration-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.partner-registration-doc-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e3eb;
  border-radius: 14px;
  background: #fbfdff;
  text-decoration: none;
  color: inherit;
}

.partner-registration-doc-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dce4ea;
  background: #ffffff;
}

.partner-registration-doc-name {
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.partner-registration-doc-remove {
  width: fit-content;
}

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

.partner-registration-widget-list {
  display: grid;
  gap: 10px;
}

.partner-registration-widget-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7e3eb;
  border-radius: 14px;
  background: #fbfdff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-registration-widget-item:hover {
  border-color: #9bc5dc;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(12, 95, 143, 0.08);
}

.partner-registration-widget-item strong {
  color: #0c5f8f;
  font-size: 0.96rem;
}

.partner-registration-widget-item span,
.partner-registration-widget-item small {
  color: #6a7d8d;
}

.auth-demo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.auth-demo-chip {
  padding: 6px 10px;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #ffffff;
  color: #54606e;
  font-size: 12px;
  cursor: pointer;
}

.auth-demo-chip:hover {
  border-color: #0c5f8f;
  color: #0c5f8f;
}

.mobile-nav-toggle,
.mobile-nav-overlay {
  display: none;
}

.mobile-sticky-footer {
  display: none;
}

.mobile-nav-toggle {
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: #0c5f8f;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  border: 0;
  background: rgba(12, 20, 31, 0.42);
  cursor: pointer;
}

.mobile-footer-item {
  border: 0;
  background: transparent;
  color: #5f6b78;
  font: inherit;
  cursor: pointer;
  overflow: visible;
}

.case-detail-page {
  padding: 10px 10px 16px;
}

.case-detail-header {
  margin-bottom: 4px;
}

.case-detail-header .panel-header {
  margin-bottom: 0;
}

.case-detail-legacy-shell {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.case-detail-legacy-shell-flat {
  grid-template-columns: 1fr;
}

.case-detail-sections-stack {
  display: grid;
  gap: 30px;
}

.case-detail-legacy-aside {
  display: grid;
  align-content: start;
  gap: 10px;
  position: sticky;
  top: 110px;
}

.case-preview-card {
  padding: 8px;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  background: #ffffff;
}

.case-preview-thumb {
  width: 86px;
  height: 116px;
  margin: 0 auto;
  border: 1px solid #d3d3d3;
  background:
    linear-gradient(180deg, #ececec, #fafafa),
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(0, 0, 0, 0.06) 5px 6px);
}

.case-preview-thumb-image {
  display: block;
  width: 86px;
  height: 116px;
  margin: 0 auto;
  object-fit: cover;
  border: 1px solid #d3d3d3;
}

.case-preview-downloads {
  gap: 8px;
}

.case-preview-select {
  padding: 6px 8px;
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  color: #5e5e5e;
  font-size: 11px;
  text-align: right;
}

.case-preview-thumb-small {
  width: 92px;
  height: 58px;
}

.case-preview-download-button {
  width: 100%;
  padding: 7px 10px;
  font-size: 11px;
  background: #0f5f83;
  box-shadow: none;
  text-align: center;
  text-decoration: none;
}

.case-detail-legacy-main {
  border: 1px solid #ececec;
  background: #ffffff;
  padding: 18px 22px 18px;
}

.case-detail-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  align-items: start;
}

.case-detail-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0c5f8f;
  font-size: 30px;
  line-height: 1;
}

.case-detail-titlebar strong {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.case-detail-summary {
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 10px;
  min-width: 360px;
}

.case-detail-summary-block {
  font-size: 15px;
  line-height: 1.7;
}

.case-detail-summary-block-right {
  text-align: right;
}

.case-detail-summary-block-full {
  min-width: 0;
}

.case-detail-inline-admin-form {
  display: grid;
  gap: 8px;
  padding: 4px 0 0;
}

.case-detail-summary-link-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #262626;
}

.case-detail-summary-link-row + .case-detail-summary-link-row {
  padding-top: 2px;
  border-bottom: 0;
}

.case-detail-summary-link-row-meta .legacy-detail-label,
.case-detail-summary-link-row-meta .case-detail-summary-inline-label,
.case-detail-summary-link-row-meta .case-detail-summary-value-link {
  font-size: 15px;
  line-height: 1.35;
}

.case-detail-summary-link-row-meta .legacy-detail-label,
.case-detail-summary-link-row-meta .case-detail-summary-inline-label {
  color: #6b90b0;
  font-weight: 400;
}

.case-detail-summary-link-row-meta .case-detail-summary-value-link {
  color: #244f79;
  font-weight: 500;
  text-decoration: none;
}

.case-detail-summary-emphasis {
  color: #161616;
  font-size: 18px;
  font-weight: 600;
}

.case-detail-summary-text {
  color: #244f79;
  font-size: 17px;
  font-weight: 400;
}

.case-detail-summary-inline-label {
  justify-self: end;
  color: #214d77;
  font-size: 15px;
}

.case-detail-summary-action-link,
.case-detail-summary-value-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #c61d13;
  font: inherit;
  cursor: pointer;
}

.case-detail-summary-action-link {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.case-detail-summary-value-link {
  justify-self: start;
  color: #244f79;
  font-size: 17px;
  text-decoration: underline;
  text-decoration-color: rgba(36, 79, 121, 0.35);
  text-underline-offset: 3px;
}

.case-detail-status-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.case-detail-summary-editor {
  display: none;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fafafa;
}

.case-detail-summary-editor.is-open {
  display: grid;
  gap: 12px;
}

.case-detail-summary-editor-actions {
  display: flex;
  gap: 10px;
}

.case-detail-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.case-document-preview-stack {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.case-detail-document-panel {
  border: 1px solid #ececec;
  background: #ffffff;
  padding: 18px 22px 18px;
}

.case-detail-document-panel-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.case-detail-document-panel-header h3 {
  margin: 0;
  color: #0f5f83;
  font-size: 18px;
  font-weight: 700;
}

.case-detail-document-panel-header p {
  margin: 0;
  color: #7b8793;
  font-size: 13px;
}

.case-detail-document-panel .case-detail-document-actions {
  margin: 0 0 14px;
}

.case-detail-document-panel .case-document-preview-stack {
  margin: 0;
}

.case-document-accordion {
  border: 1px solid rgba(12, 95, 143, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.case-document-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #0c5f8f;
}

.case-document-accordion-summary::-webkit-details-marker {
  display: none;
}

.case-document-accordion-meta {
  font-size: 12px;
  font-weight: 600;
  color: #7b8ba2;
}

.case-document-accordion-body {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(12, 95, 143, 0.08);
}

.case-document-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 12px;
}

.case-document-sheet-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.case-document-sheet {
  width: min(100%, 980px);
  margin: 0 auto;
  min-height: 1328px;
  padding: 46px 58px 54px;
  background: #ffffff;
  border: 1px solid rgba(12, 95, 143, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  color: #55606c;
  font-family: Arial, "Helvetica Neue", sans-serif;
  display: flex;
  flex-direction: column;
}

.case-document-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.case-document-sheet-contact {
  display: grid;
  gap: 2px;
  max-width: 260px;
  color: #6b7480;
  font-size: 14.2px;
  line-height: 1.54;
}

.case-document-sheet-contact strong {
  color: #55606c;
}

.case-document-sheet-brand {
  flex: 1;
  display: flex;
  justify-content: center;
}

.case-document-sheet-brand img {
  width: 146px;
  max-width: 100%;
  object-fit: contain;
}

.case-document-sheet-title {
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid #bcc5cc;
  border-bottom: 1px dotted #a3acb4;
  color: #4c5662;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
}

.case-document-form-grid {
  display: grid;
  gap: 13px;
  margin-bottom: 28px;
}

.case-document-form-row {
  display: grid;
  grid-template-columns: minmax(178px, 214px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.case-document-form-row-multiline {
  align-items: stretch;
}

.case-document-form-label {
  color: #646f7a;
  font-size: 15.6px;
  font-weight: 600;
  line-height: 1.34;
}

.case-document-form-value {
  min-height: 30px;
  padding: 2px 6px 5px;
  border-bottom: 1px solid #a8b1ba;
  color: #37424d;
  font-size: 17.2px;
  font-weight: 600;
  line-height: 1.44;
}

.case-document-form-value-multiline {
  min-height: 84px;
}

.case-document-top-lines {
  display: grid;
  gap: 11px;
  margin: 10px 0 28px;
}

.case-document-top-line {
  min-height: 30px;
  padding: 2px 4px 5px;
  border-bottom: 1px solid #a8b1ba;
  color: #37424d;
  font-size: 17.2px;
  font-weight: 600;
  line-height: 1.44;
}

.case-document-copy {
  display: grid;
  gap: 13px;
  color: #626c77;
  font-size: 14.8px;
  line-height: 1.64;
}

.case-document-copy p,
.case-document-copy ol {
  margin: 0;
}

.case-document-copy-meta {
  gap: 10px;
  margin-top: 2px;
}

.case-document-section-caption {
  color: #4f5965;
  font-size: 14px;
  font-weight: 700;
}

.case-document-list {
  padding-left: 18px;
}

.case-document-checks {
  display: grid;
  gap: 11px;
  margin: 16px 0 18px;
}

.case-document-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #58626d;
  font-size: 14.1px;
  line-height: 1.62;
}

.case-document-check-box {
  width: 14px;
  height: 14px;
  border: 1px solid #909aa4;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 2px;
  color: #47515d;
  font-size: 11px;
  font-weight: 700;
}

.case-document-check-explainer {
  margin: 0 0 0 23px;
  color: #626c77;
  font-size: 13.7px;
  line-height: 1.6;
}

.case-document-tax-line {
  margin-top: 18px;
  color: #5e6872;
  font-size: 15.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.case-document-tax-label {
  color: #5e6872;
}

.case-document-tax-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f5965;
}

.case-document-tax-box {
  width: 14px;
  height: 14px;
  border: 1px solid #909aa4;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #47515d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.case-document-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: auto;
  padding-top: 30px;
}

.case-document-sheet-assignment .case-document-tax-line {
  margin-top: auto;
  padding-top: 28px;
  width: min(360px, 100%);
  margin-left: auto;
  align-self: flex-end;
  justify-content: center;
}

.case-document-sheet-assignment .case-document-footer {
  margin-top: 16px;
  padding-top: 0;
}

.case-document-sheet-mandate .case-document-footer {
  margin-top: 100px;
  padding-top: 0;
}

.case-document-date-block,
.case-document-signature-block {
  display: grid;
  gap: 6px;
}

.case-document-date-block {
  min-width: 214px;
}

.case-document-date-line {
  min-height: 30px;
  padding: 2px 4px 5px;
  border-bottom: 1px solid #a8b1ba;
  color: #37424d;
  font-size: 16.8px;
  font-weight: 600;
}

.case-document-signature-block {
  min-width: min(360px, 100%);
  justify-items: center;
  text-align: center;
}

.case-document-signature-surface {
  width: min(360px, 100%);
  min-height: 124px;
  padding: 2px 10px 8px;
  border-bottom: 1px solid #a8b1ba;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.case-document-signature-surface img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.case-document-signature-block strong {
  color: #4f5965;
  font-size: 14.2px;
}

.case-document-date-block small,
.case-document-signature-block small {
  color: #7b8793;
  font-size: 12.8px;
}

.case-document-signature-placeholder {
  min-height: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(12, 95, 143, 0.18);
  border-radius: 10px;
  color: #83909d;
  font-size: 12px;
}

.case-document-render-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 210mm;
  z-index: -1;
}

.case-document-render-host .case-document-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0;
  padding: 16mm 14mm 16mm;
  border: none;
  box-shadow: none;
}

.case-document-render-host .case-document-sheet-title {
  font-size: 24px;
}

.case-document-sheet-mandate .case-document-copy {
  font-size: 14.2px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .case-document-sheet {
    min-height: auto;
    padding: 20px 18px 22px;
  }

  .case-document-sheet-header {
    flex-direction: column;
  }

  .case-document-sheet-brand {
    justify-content: flex-start;
  }

  .case-document-form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .case-document-signature-block {
    justify-items: start;
    text-align: left;
  }

  .case-document-signature-surface {
    width: 100%;
  }
}

.case-document-preview-sheet {
  position: relative;
  width: min(100%, 880px);
  aspect-ratio: 210 / 297;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(12, 95, 143, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.case-document-preview-template {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-document-preview-sheet .pdf-template-field {
  position: absolute;
  color: #444c55;
  overflow: hidden;
}

.case-document-preview-sheet .pdf-template-text {
  padding: 0 4px;
  white-space: normal;
}

.case-document-preview-sheet .pdf-template-field img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-document-html-sheet {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(12, 95, 143, 0.12);
  border-radius: 18px;
  background: #fff;
}

.case-document-html-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(12, 95, 143, 0.12);
}

.case-document-html-header-meta {
  display: grid;
  gap: 4px;
}

.case-document-html-header-meta strong {
  color: #0c5f8f;
  font-size: 22px;
}

.case-document-html-header-meta span {
  color: #5f7088;
  font-size: 14px;
}

.case-document-html-grid {
  display: grid;
  gap: 10px;
}

.case-document-html-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(12, 95, 143, 0.08);
}

.case-document-html-row span {
  color: #6f8098;
  font-size: 13px;
}

.case-document-html-row strong {
  color: #24364c;
  font-size: 15px;
  line-height: 1.5;
}

.case-document-html-row-multi strong {
  font-weight: 600;
}

.case-document-html-copy {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f9fc;
  border: 1px solid rgba(12, 95, 143, 0.08);
}

.case-document-html-copy h5 {
  margin: 0;
  color: #0c5f8f;
  font-size: 14px;
}

.case-document-html-copy p {
  margin: 0;
  color: #52657d;
  line-height: 1.6;
}

.case-document-html-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.case-document-html-signature-block {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.case-document-html-signature-block small {
  color: #7b8ba2;
}

.case-document-html-signature-block-sign {
  justify-items: end;
  text-align: right;
}

.case-document-html-signature-block-sign img {
  max-height: 82px;
  object-fit: contain;
}

.case-document-html-signature-placeholder {
  min-width: 180px;
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(12, 95, 143, 0.18);
  border-radius: 12px;
  color: #7b8ba2;
}

@media (max-width: 900px) {
  .case-document-html-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .case-document-html-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .case-document-html-signature-block-sign {
    justify-items: start;
    text-align: left;
  }
}

.case-detail-page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.case-detail-page-shell.is-editor-open {
  grid-template-columns: minmax(0, 1fr);
}

.case-detail-page-main {
  min-width: 0;
}

.case-detail-editor-sidebar-shell {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 92px 20px 20px;
  overflow-y: auto;
  background: rgba(15, 23, 32, 0.14);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: caseDetailEditorFadeInRight 0.24s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.case-detail-editor-sidebar-shell.is-closing {
  animation: caseDetailEditorFadeOutRight 0.2s ease forwards;
  pointer-events: none;
}

.case-detail-editor-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100dvh - 112px);
  padding: 18px 20px 20px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.98));
  border: 1px solid rgba(12, 95, 143, 0.08);
  box-shadow: 0 28px 70px rgba(10, 26, 43, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
}

.case-detail-editor-sidebar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(12, 95, 143, 0.88), rgba(53, 152, 219, 0.46));
}

.case-detail-editor-sidebar > * {
  position: relative;
  z-index: 1;
}

@keyframes caseDetailEditorFadeInRight {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes caseDetailEditorFadeOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(28px);
  }
}

@media (max-width: 1180px) {
  .case-detail-page-shell.is-editor-open {
    grid-template-columns: 1fr;
  }

  .case-detail-editor-sidebar-shell {
    padding: 84px 16px 16px;
  }
}

.case-detail-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 32, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  overflow-x: hidden;
  animation: modalOverlayIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-detail-modal-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(12, 95, 143, 0.08), rgba(12, 95, 143, 0));
  pointer-events: none;
}

.case-detail-modal {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100dvh - 48px);
  padding: 18px 20px 20px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.98));
  border: 1px solid rgba(12, 95, 143, 0.08);
  box-shadow: 0 30px 80px rgba(10, 26, 43, 0.26);
  transform-origin: center top;
  overflow-y: auto;
  overflow-x: hidden;
  animation: modalCardIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-detail-editor-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(calc(100vw - 48px), 760px);
  max-height: calc(100dvh - 48px);
  margin: 0;
  transform: translate(-50%, -50%);
  animation: caseEditorModalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-detail-modal::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(12, 95, 143, 0.88), rgba(53, 152, 219, 0.46));
}

.case-detail-modal > * {
  position: relative;
  z-index: 1;
}

.case-detail-modal-header,
.case-detail-modal-form,
.notifications-modal-list,
.notifications-device-actions,
.notifications-device-hint {
  animation: modalContentIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-detail-modal-overlay.is-closing {
  animation: modalOverlayOut 0.22s ease forwards;
  pointer-events: none;
}

.case-detail-modal.is-closing {
  animation: modalCardOut 0.22s ease forwards;
}

.case-detail-editor-modal.is-closing {
  animation: caseEditorModalOut 0.22s ease forwards;
}

.case-detail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.case-detail-modal-header h3 {
  margin: 0;
  color: #0c5f8f;
  font-size: 22px;
  font-weight: 400;
}

.case-detail-modal-close {
  width: auto;
}

.case-detail-modal-form {
  display: grid;
  gap: 14px;
}

@keyframes modalOverlayIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

@keyframes modalOverlayOut {
  from {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  to {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
    box-shadow: 0 18px 38px rgba(10, 26, 43, 0.14);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 30px 80px rgba(10, 26, 43, 0.26);
  }
}

@keyframes caseEditorModalIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 22px)) scale(0.96);
    box-shadow: 0 18px 38px rgba(10, 26, 43, 0.14);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 30px 80px rgba(10, 26, 43, 0.26);
  }
}

@keyframes modalCardOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    box-shadow: 0 18px 38px rgba(10, 26, 43, 0.12);
  }
}

@keyframes caseEditorModalOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 16px)) scale(0.97);
    box-shadow: 0 18px 38px rgba(10, 26, 43, 0.12);
  }
}

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

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

.case-detail-modal-span-2 {
  grid-column: 1 / -1;
}

.case-detail-modal-textarea {
  min-height: 160px;
  resize: vertical;
}

.notifications-modal {
  width: min(560px, calc(100vw - 32px));
}

body.is-modal-open {
  overflow: hidden;
}

body.is-case-editor-open {
  overflow: hidden;
}

.notifications-modal-subtitle {
  margin-top: 4px;
}

.notifications-device-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(12, 95, 143, 0.12);
  border-radius: 16px;
  background: rgba(246, 251, 255, 0.92);
}

.notifications-device-hint {
  font-size: 0.86rem;
}

.case-detail-summary-link-row-notify {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-bottom: 10px;
  border-bottom: 0;
}

.case-detail-notify-button-cancel {
  border-color: rgba(217, 45, 32, 0.24);
  color: #b42318;
  background: rgba(255, 245, 245, 0.92);
}

.case-detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.case-detail-delete-button,
.case-row-delete-button {
  color: #b42318;
  background: transparent;
  border: 0;
  padding: 2px 0;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.case-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.entity-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.entity-detail-main {
  display: grid;
  gap: 18px;
}

.entity-detail-header,
.entity-detail-cases-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.entity-detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.entity-detail-title-row h2 {
  margin: 0;
}

.entity-detail-title-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.entity-detail-linked-count {
  color: #5c738a;
  font-size: 0.95rem;
  font-weight: 500;
}

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

/* ── Partner earnings sidebar layout ── */
.entity-layout {
  display: contents;
}

.entity-layout-with-sidebar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.entity-layout-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 16px;
}

.entity-earnings-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entity-earnings-total {
  font-size: 1.75rem;
  font-weight: 700;
  color: #145f95;
  line-height: 1.1;
}

.entity-earnings-range {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
}

.entity-earnings-range label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #6a88a2;
  font-weight: 500;
  flex: 1;
  min-width: 100px;
}

.entity-earnings-range input[type="date"] {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem !important;
  padding: 4px 6px !important;
}

.entity-earnings-chart-wrap {
  position: relative;
  padding: 5px;
}

.entity-earnings-chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes earningsLineIn {
  from { opacity: 0; stroke-dashoffset: 1; }
  to   { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes earningsAreaIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes earningsDotIn {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

.earnings-chart-area {
  animation: earningsAreaIn 0.5s ease both;
}

.earnings-chart-line {
  fill: none;
  stroke: #1a7bc4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  pathLength: 1;
  animation: earningsLineIn 0.7s ease both;
}

.earnings-chart-point {
  cursor: default;
  transform-origin: center;
  transform-box: fill-box;
  animation: earningsDotIn 0.3s ease both;
}

.earnings-chart-point-active {
  cursor: pointer;
}

.earnings-chart-point-active:hover {
  filter: brightness(1.2);
}

.earnings-chart-label {
  font-size: 7px;
  fill: #a0b8cc;
  text-anchor: middle;
}

.earnings-tooltip {
  position: absolute;
  background: #1a2e42;
  color: #fff;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.entity-earnings-empty {
  font-size: 0.82rem;
  color: #7b9ab8;
  margin: 8px 0;
  text-align: center;
}

.entity-earnings-meta {
  font-size: 0.82rem;
  color: #7b9ab8;
  border-top: 1px solid #edf2f8;
  padding-top: 8px;
}

.entity-earnings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.entity-earnings-expand-btn {
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.15s;
  padding: 4px !important;
  width: 26px !important;
  height: 26px !important;
}

.entity-earnings-expand-btn:hover {
  opacity: 1;
}

/* ── Earnings modal ── */
.earnings-chart-modal {
  width: min(100%, 700px) !important;
}

.earnings-chart-modal-wrap {
  padding: 8px 0 4px;
}

.earnings-modal-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #145f95;
  line-height: 1.1;
  margin-top: 2px;
}

.earnings-modal-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

/* Row 1: title + total left, close button right */
.earnings-modal-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.earnings-modal-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.earnings-modal-title h3 {
  margin: 0;
}

/* Row 2: Od, Do, select — all in one line */
.earnings-modal-row2 {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.earnings-modal-row2 .entity-earnings-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #6a88a2;
  font-weight: 500;
  flex: 0 0 auto;
}

.earnings-modal-row2 .entity-earnings-label-text {
  display: block;
}

.earnings-modal-row2 input[type="date"],
.earnings-groupby-select {
  font-size: 0.8rem !important;
  padding: 4px 6px !important;
  height: 32px;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .entity-layout-with-sidebar {
    flex-direction: column;
  }
  .entity-earnings-sidebar {
    width: 100%;
    position: static;
  }
}

.entity-detail-card {
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,253,0.98));
  box-shadow: 0 10px 24px rgba(10, 41, 69, 0.05);
}

.entity-detail-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #6a88a2;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-detail-card h3 {
  margin: 0 0 14px;
  color: #145f95;
  font-size: 1.2rem;
  font-weight: 500;
}

.entity-detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.entity-detail-card-head-compact {
  margin-bottom: 14px;
}

.entity-detail-card-head-compact h3 {
  margin-bottom: 0;
}

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

.entity-detail-two-col-compact {
  margin-bottom: 18px;
}

.entity-detail-lines {
  display: grid;
  gap: 10px;
  color: #55697e;
}

.entity-detail-lines strong {
  color: #18486f;
  font-weight: 500;
}

.entity-detail-status-chip-wrap {
  margin-bottom: 14px;
}

.entity-detail-case-list {
  display: grid;
  gap: 0;
}

.entity-form-subsection {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e6edf5;
}

.entity-form-subsection h4 {
  margin: 0;
  color: #145f95;
  font-size: 1rem;
  font-weight: 600;
}

.entity-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.entity-detail-doc-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 95, 149, 0.1);
}

.entity-document-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}

.entity-document-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(20, 95, 149, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 251, 0.98));
  color: #145f95;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(15, 33, 50, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.entity-document-action:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 95, 149, 0.22);
  box-shadow: 0 12px 22px rgba(15, 33, 50, 0.08);
}

.entity-document-note {
  color: #7b8fa3;
  font-size: 0.85rem;
  white-space: nowrap;
}

.entity-document-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 160px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.entity-document-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #d5e2ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #145f95;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.entity-document-card:hover {
  transform: translateY(-1px);
  border-color: #bfd4e7;
  box-shadow: 0 10px 24px rgba(10, 41, 69, 0.08);
}

.entity-document-card strong {
  color: #143e63;
  font-weight: 600;
}

.entity-document-card span {
  color: #6a88a2;
  font-size: 0.88rem;
}

.entity-document-card-compact {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
}

.entity-document-card-compact strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.entity-document-card-compact span {
  font-size: 0.8rem;
}

.entity-document-empty {
  min-width: 100%;
}

@media (max-width: 1200px) {
  .entity-detail-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .entity-detail-summary {
    grid-template-columns: 1fr;
  }

  .entity-detail-two-col {
    grid-template-columns: 1fr;
  }

  .entity-detail-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .entity-document-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .entity-detail-header,
  .entity-detail-cases-header {
    flex-direction: column;
    align-items: stretch;
  }

  .entity-detail-title-row,
  .entity-detail-title-meta {
    align-items: flex-start;
  }
}

.case-row-delete-button {
  opacity: 0.78;
  font-size: 12px;
  font-weight: 400;
}

.case-row-delete-button:hover,
.case-detail-delete-button:hover {
  background: transparent;
  color: #912018;
  opacity: 1;
  text-decoration: underline;
}

.notifications-list {
  display: grid;
  gap: 12px;
  max-height: min(70vh, 620px);
  overflow: auto;
}

.notification-card {
  padding: 14px 16px;
  border: 1px solid rgba(12, 95, 143, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.notification-card.is-unread {
  border-color: rgba(239, 176, 0, 0.26);
  box-shadow: 0 10px 24px rgba(239, 176, 0, 0.12);
}

.notification-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notification-card-header strong {
  font-size: 15px;
  line-height: 1.4;
}

.notification-card-time {
  color: #7b8ca0;
  font-size: 12px;
  white-space: nowrap;
}

.notification-card-body {
  margin-top: 8px;
  color: #486079;
  font-size: 14px;
  line-height: 1.55;
}

.notification-card-actions {
  margin-top: 10px;
}

.case-detail-signature-modal-copy {
  margin: 0 0 12px;
  color: #61768d;
  font-size: 14px;
  line-height: 1.5;
}

.signature-pad-shell-modal {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .case-detail-page-shell.is-editor-open {
    grid-template-columns: 1fr;
  }

  .case-detail-header-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }

  .case-detail-header-actions .ghost-button,
  .case-detail-header-actions .accent-button,
  .case-detail-header-actions .case-detail-delete-button {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .case-detail-header-actions .ghost-button,
  .case-detail-header-actions .accent-button {
    padding: 10px 12px;
    font-size: 12px;
  }

  .case-detail-header-actions .case-detail-delete-button {
    font-size: 12px;
  }

  .case-detail-editor-sidebar-shell {
    position: fixed;
    inset: 0;
    justify-content: stretch;
    align-items: flex-start;
    padding: 72px 8px 8px;
    overflow-y: auto;
  }

  .case-detail-editor-sidebar {
    top: 0;
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100dvh - 80px);
    margin-left: auto;
    border-radius: 12px;
  }

  .signature-pad-shell-expanded {
    min-height: 320px;
  }

  .signature-pad-canvas-expanded {
    height: min(42vh, 320px);
  }
}

.legacy-detail-action-link {
  color: #c61d13;
  font-size: 11px;
  text-transform: uppercase;
}

.case-detail-legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.legacy-detail-section {
  min-width: 0;
  border-radius: 5px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.legacy-detail-section-changed {
  background: transparent;
  box-shadow: none;
}

.legacy-detail-section-changed h4 {
  color: #6b90b0;
  border-bottom-color: #222222;
}

.legacy-section-heading-container {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}

.legacy-detail-section h4 {
  margin: 0;
  padding: 0;
  color: #6b90b0;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
}

.legacy-section-heading-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.legacy-section-edit-button {
  padding: 2px 5px;
  border: 1px solid #999;
  background: transparent;
  color: #999;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 20px;
}

.legacy-section-edit-button:hover {
  background: #999;
  color: white;
  border-color: #999;
}

.case-detail-status-button-changed {
  box-shadow: none;
  border-radius: 0;
}

.legacy-detail-body {
  display: grid;
  gap: 7px;
}

.legacy-detail-footer {
  margin-top: 12px;
}

.legacy-detail-row {
  display: block;
}

.legacy-detail-label {
  color: #6b90b0;
  font-size: 12px;
}

.legacy-detail-value {
  color: #3f3f3f;
  font-size: 16px;
  line-height: 1.45;
}

.legacy-detail-inline-text {
  display: inline;
  color: #8f8f8f;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
}

.legacy-detail-inline-label {
  color: #8f8f8f;
  font-weight: 300;
}

.legacy-detail-inline-value {
  color: #5a5a5a;
  font-weight: 300;
}

.legacy-detail-section-emphasis .legacy-detail-body {
  display: block;
}

.legacy-pill {
  display: inline-block;
  padding: 4px 8px;
  background: #d70000;
  color: #ffffff;
  font-size: 11px;
}

.legacy-photo-strip {
  margin-top: 14px;
}

.legacy-photo-strip h4 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  color: #6b90b0;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
}

.legacy-photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.legacy-photo-tag {
  padding: 6px 10px;
  border: 1px solid #4e4e4e;
  color: #4f4f4f;
  font-size: 10px;
  background: #ffffff;
}

.legacy-photo-tag.is-filled {
  border-color: #0c5f8f;
  color: #0c5f8f;
  background: #eef7ff;
}

.legacy-bottom-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

.legacy-bottom-split-signature {
  grid-template-columns: 1fr 1fr 1.6fr;
}

.legacy-signed-doc-standalone {
  margin-top: 14px;
}

.legacy-signature-section .legacy-signature-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 6px 0 0;
}

.legacy-signature-image {
  max-width: 100%;
  max-height: 112px;
  display: block;
  object-fit: contain;
}

.legacy-photo-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #d9d9d9;
  color: #0c5f8f;
  text-decoration: none;
  font-size: 0.88rem;
}

.legacy-photo-download:last-child {
  border-bottom: 0;
}

.legacy-doc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.legacy-doc-button {
  padding: 6px 12px;
  border-color: #c51e14;
  color: #ffffff;
  background: #c51e14;
  font-size: 11px;
}

.legacy-doc-button:hover {
  background: #b91810;
  border-color: #b91810;
}

.legacy-admin-panel {
  margin-top: 14px;
  padding: 12px;
  background: #f7f7f7;
}

.legacy-admin-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.legacy-admin-actions {
  display: flex;
  align-items: end;
}

.legacy-admin-button {
  min-width: 170px;
  box-shadow: none;
  background: #c51e14;
}

@media (max-width: 1280px) {
  .case-detail-legacy-shell {
    grid-template-columns: 1fr;
  }

  .case-detail-legacy-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .legacy-bottom-split-signature {
    grid-template-columns: 1fr;
  }

  .case-detail-summary {
    min-width: 0;
  }
}

@media (max-width: 960px) {
  .case-detail-topline,
  .case-detail-summary,
  .case-detail-legacy-grid,
  .legacy-bottom-split,
  .legacy-admin-form,
  .case-detail-legacy-aside {
    grid-template-columns: 1fr;
    display: grid;
  }

  .case-detail-topline {
    gap: 10px;
  }

  .case-detail-summary {
    min-width: 0;
  }

  .scene-photo-editor-bottom {
    grid-template-columns: 1fr;
  }

  .case-detail-titlebar {
    font-size: 24px;
  }

  .case-detail-summary-link-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .case-detail-summary-link-row.case-detail-summary-link-row-meta {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    justify-items: initial;
    align-items: center;
    column-gap: 8px;
  }

  .case-detail-summary-inline-label {
    justify-self: start;
  }

  .case-detail-summary-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .case-detail-modal-overlay {
    padding: 14px;
    align-items: flex-start;
  }

  .case-detail-modal {
    width: 100%;
    max-height: calc(100dvh - 28px);
    padding: 16px;
  }

  .case-detail-editor-modal {
    left: 14px;
    right: 14px;
    top: 14px;
    bottom: 14px;
    width: auto;
    max-height: none;
    transform: none;
    animation: modalCardIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .case-detail-editor-modal.is-closing {
    animation: modalCardOut 0.22s ease forwards;
  }

  .notifications-modal {
    width: 100%;
  }

  .partner-registration-review-grid {
    grid-template-columns: 1fr;
  }

  .partner-registration-actions {
    flex-direction: column;
  }

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

  .case-detail-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* Real brand assets */

body {
  background: transparent;
}

body::before {
  background: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  width: 134px;
  height: 60px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: transparent;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
}

.brand-logo::before,
.brand-logo::after {
  content: none;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo:focus-visible {
  outline: 2px solid rgba(12, 95, 143, 0.38);
  outline-offset: 4px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: 82px;
  padding: 10px 30px;
  background: var(--design-bg, rgba(255, 255, 255, 0.52));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(var(--design-blur, 18px)) saturate(135%);
  -webkit-backdrop-filter: blur(var(--design-blur, 18px)) saturate(135%);
}

.app-shell {
  padding-top: 92px;
}

.is-auth-screen .app-shell {
  padding-top: 0;
}

.sidebar,
.panel,
.detail-card,
.form-shell,
.metric-card,
.list-card,
.hero-banner,
.auth-reference-card,
.case-detail-legacy-main,
.case-preview-card {
  background: var(--design-bg, rgba(255, 255, 255, 0.78));
  border-color: var(--design-border, rgba(255, 255, 255, 0.36));
  box-shadow: var(--design-shadow, 0 18px 60px rgba(19, 43, 69, 0.08));
  backdrop-filter: blur(var(--design-blur, 18px)) saturate(135%);
  -webkit-backdrop-filter: blur(var(--design-blur, 18px)) saturate(135%);
}

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

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

  .alert-card {
    width: 100%;
  }

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

@media (max-width: 960px) {
  .topbar {
    padding: 12px 16px;
  }

  .toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .layout {
    padding: 10px;
  }

  .dashboard-aside {
    grid-template-columns: 1fr;
  }

  .case-listing-row,
  .dashboard-case-row {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .case-listing-row > *:nth-child(n+3),
  .dashboard-case-row > *:nth-child(n+3) {
    grid-column: 2;
  }

  .nav-link,
  .user-card-email,
  .summary-copy strong,
  .section-toolbar h3 {
    font-size: 16px;
  }
}

/* Global light typography */

html,
body,
button,
input,
select,
textarea {
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-weight: 400;
}

::placeholder {
  font-weight: 300;
}

.eyebrow,
.nav-link,
.pill,
.ghost-button,
.accent-button,
.filter-chip,
.table-chip,
.status-chip,
.summary-copy strong,
.summary-copy small,
.entity-spotlight-title,
.entity-spotlight-count,
.dashboard-case-id,
.alert-card-id,
.section-toolbar h3,
.side-widget-title,
.case-id,
.form-label,
.panel-header h3,
.detail-block h4,
.header-language .pill,
.user-card-email {
  font-weight: 300;
}

.row-check,
.status-text,
.nav-link.is-active,
.header-icon-button-danger,
.dashboard-outline-button,
.case-filter-option.is-active,
.case-filter-option.is-active .case-filter-check,
.summary-action-blue .summary-copy strong,
.summary-action-green .summary-copy strong,
.summary-action-red .summary-copy strong {
  font-weight: 400;
}

/* Final responsive pass */

html,
body {
  overflow-x: hidden;
}

.dashboard-shell,
.dashboard-main,
.dashboard-aside,
.dashboard-panel,
.side-widget,
.dashboard-case-row,
.dashboard-case-row > div,
.entity-spotlight,
.entity-spotlight > div {
  min-width: 0;
}

@media (max-width: 1400px) {
  .dashboard-shell {
    grid-template-columns: 1fr !important;
  }

  .dashboard-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
  }

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

  .cases-legacy-side {
    order: -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    align-items: start;
  }
}

@media (max-width: 1200px) {
  .dashboard-case-row,
  .case-listing-row {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .dashboard-case-row > *:nth-child(n+3),
  .case-listing-row > *:nth-child(n+3) {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: inline-flex;
    flex-direction: column;
    flex: 0 0 auto;
  }

  .is-mobile-nav-open .mobile-nav-overlay {
    display: block;
  }

  .mobile-sticky-footer {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 18;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    border: 1px solid rgba(218, 218, 218, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
    backdrop-filter: blur(10px);
  }

  .layout {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }

  .topbar {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    min-height: 88px;
    padding: 14px 16px !important;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
  }

  .brand-block {
    display: flex;
    order: 1;
    min-width: 0;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .brand-logo {
    width: 84px;
    height: 34px;
  }

  .toolbar {
    order: 2;
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin: 0 auto;
  }

  .lang-switch,
  .role-switch {
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .header-language {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .mobile-nav-toggle {
    order: 3;
    margin-left: 0;
    flex: 0 0 auto;
  }

  .header-icon-row {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .role-switch {
    display: none;
  }

  .header-icon-button {
    width: 22px;
    height: 22px;
  }

  .header-icon-button-danger {
    width: 26px;
    height: 26px;
  }

  .header-icon-svg {
    width: 18px;
    height: 18px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: min(82vw, 320px);
    min-height: 100vh;
    padding: 24px 10px 18px;
    margin: 0;
    border-radius: 0 12px 12px 0;
    transform: translateX(-102%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
  }

  .is-mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .user-card {
    margin: 0;
    padding: 16px 12px 12px;
  }

  .user-card-email {
    font-size: 15px;
    word-break: break-word;
  }

  .nav-list {
    margin-top: 10px;
  }

  .nav-link {
    margin: 0;
    padding: 12px;
    font-size: 14px;
  }

  .content {
    gap: 10px;
    padding-bottom: 92px;
  }

  .app-shell {
    padding-top: 98px;
  }

  .dashboard-shell,
  .dashboard-main,
  .dashboard-aside,
  .cases-legacy-shell,
  .case-detail-legacy-shell,
  .split-grid,
  .auth-shell {
    grid-template-columns: 1fr !important;
  }

  .action-strip {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .summary-action {
    min-height: 64px;
    padding: 12px 14px;
  }

  .summary-icon {
    width: 40px;
    height: 40px;
  }

  .summary-svg {
    width: 34px;
    height: 34px;
  }

  .summary-copy strong {
    font-size: 16px;
  }

  .summary-copy small {
    font-size: 12px;
  }

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

  .compact-search,
  .cases-sidebar-search {
    width: 100% !important;
  }

  .cases-legacy-shell,
  .role-dashboard-shell {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }

  .cases-legacy-side,
  .role-dashboard-aside {
    order: -1;
  }

  .cases-legacy-main,
  .role-dashboard-shell .dashboard-main {
    order: 1;
  }

  .entity-spotlight,
  .case-detail-legacy-grid,
  .legacy-bottom-split,
  .legacy-bottom-split-signature,
  .legacy-admin-form,
  .case-detail-summary,
  .case-detail-legacy-aside {
    grid-template-columns: 1fr !important;
  }

  .entity-spotlight {
    padding: 12px 10px;
  }

  .entity-spotlight-count {
    justify-content: flex-start;
  }

  .dashboard-case-row,
  .case-listing-row {
    grid-template-columns: 40px 1fr !important;
    gap: 8px;
    padding: 14px 4px;
  }

  .dashboard-case-row > *:nth-child(n+3),
  .case-listing-row > *:nth-child(n+3) {
    grid-column: 2 !important;
  }

  .dashboard-case-status,
  .case-listing-status {
    text-align: left;
  }

  .row-check {
    grid-column: 2;
  }

  .cases-legacy-main,
  .case-detail-legacy-main,
  .dashboard-panel,
  .side-widget,
  .panel,
  .form-shell,
  .auth-reference-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .case-detail-page {
    padding: 8px;
  }

  .case-detail-topline {
    display: grid;
    gap: 8px;
  }

  .case-detail-titlebar {
    flex-wrap: wrap;
    font-size: 16px;
  }

  .case-detail-summary {
    min-width: 0;
  }

  .legacy-photo-tags {
    gap: 6px;
  }

  .legacy-photo-tag,
  .legacy-doc-button {
    font-size: 11px;
  }

  .signature-pad {
    height: 180px;
  }

  .auth-page-shell {
    padding: 18px 10px 28px;
    min-height: 100vh;
    align-items: flex-start;
  }

  .auth-reference-card {
    width: 100%;
    max-width: none;
    padding: 16px 14px 20px;
  }

  .auth-reference-button {
    width: 100%;
    min-width: 0;
  }

  .page-message {
    right: 12px;
    left: 12px;
    bottom: 88px;
    width: auto;
    padding: 12px 14px;
    font-size: 14px;
  }

  .mobile-footer-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 10px;
  }

  .mobile-footer-item.is-active {
    background: rgba(15, 95, 131, 0.08);
    color: #0f5f83;
  }

.mobile-footer-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  overflow: visible;
}

.mobile-footer-icon.has-badge {
  color: #efb000;
  transform: translateY(-1px);
}

  .mobile-footer-svg {
    width: 24px;
    height: 24px;
    display: block;
  }

  .mobile-footer-label {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 92px;
    padding: 12px 14px !important;
    gap: 8px;
    flex-direction: row !important;
  }

  .brand-logo {
    width: 96px;
    height: 42px;
    flex: 0 0 auto;
  }

  .brand-logo img {
    object-fit: contain;
    object-position: left center;
  }

  .mobile-nav-toggle {
    width: 36px;
    height: 36px;
  }

  .sidebar {
    top: 82px;
    min-height: calc(100vh - 82px);
  }

  .app-shell {
    padding-top: 92px;
  }

  .header-language .pill {
    min-width: 28px;
    padding: 4px 5px;
    font-size: 11px;
  }

  .toolbar {
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    overflow: hidden;
    max-width: calc(100vw - 120px);
  }

  .mobile-sticky-footer {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .header-icon-row {
    gap: 8px;
  }

  .header-icon-button {
    width: 26px;
    height: 26px;
  }

  .header-icon-button-featured {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .header-icon-button-bell {
    box-shadow: 0 12px 26px rgba(239, 176, 0, 0.24);
  }

  .header-icon-button-danger {
    width: 28px;
    height: 28px;
  }

  .header-icon-svg {
    width: 20px;
    height: 20px;
  }

  .header-icon-badge {
    top: -6px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    line-height: 20px;
  }

  .dashboard-outline-button,
  .accent-button,
  .ghost-button {
    width: 100%;
  }

  .dashboard-footer-actions,
  .legacy-doc-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .case-detail-header-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .case-detail-header-actions .ghost-button,
  .case-detail-header-actions .accent-button,
  .case-detail-header-actions .case-detail-delete-button {
    width: auto !important;
  }

  .case-detail-header-actions .ghost-button,
  .case-detail-header-actions .accent-button {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .case-detail-header-actions .case-detail-delete-button {
    font-size: 12px !important;
  }

  .legacy-admin-button {
    min-width: 0;
    width: 100%;
  }

  .case-preview-card {
    padding: 10px;
  }

  .case-preview-thumb {
    width: 84px;
    height: 110px;
  }
}

@media (max-width: 900px) {
  .intake-top-grid,
  .intake-split-entities,
  .intake-grid-4,
  .intake-grid-3,
  .intake-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .document-upload-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .secondary-action-button {
    min-width: 0;
    width: 100%;
  }

  .document-upload-preview {
    grid-template-columns: 1fr;
  }

  .document-upload-preview img {
    height: 180px;
  }

  .scene-photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .intake-top-grid,
  .intake-split-entities,
  .intake-grid-4,
  .intake-grid-3,
  .intake-grid-2 {
    grid-template-columns: 1fr;
  }

  .document-upload-shell {
    padding: 12px;
  }

  .scene-photo-grid {
    grid-template-columns: 1fr;
  }

  .scene-photo-card-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .legacy-photo-download {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.intake-step-shell {
  gap: 24px;
}

.intake-step-shell-header {
  display: grid;
  gap: 6px;
}

.intake-steps-form {
  display: grid;
  gap: 22px;
}

.intake-claim-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 22px;
  border: 1px solid rgba(9, 83, 110, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 252, 0.96));
  box-shadow: 0 18px 40px rgba(9, 83, 110, 0.08);
}

.intake-claim-banner-copy {
  display: grid;
  gap: 6px;
}

.intake-claim-banner-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d8393;
}

.intake-claim-banner-copy strong {
  font-size: 32px;
  line-height: 1;
  color: #0d5c87;
}

.intake-claim-banner-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.intake-progress-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.intake-progress-chip-complete {
  background: rgba(28, 139, 96, 0.14);
  color: #0f7a4b;
}

.intake-progress-chip-partial {
  background: rgba(240, 153, 41, 0.16);
  color: #a35a00;
}

.intake-status-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  color: #6f8190;
  font-size: 13px;
}

.intake-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intake-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.intake-status-dot-empty {
  background: #d6e0e6;
}

.intake-status-dot-partial {
  background: #f0a153;
}

.intake-status-dot-complete {
  background: #33a06f;
}

.intake-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.intake-step-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(9, 83, 110, 0.12);
  background: #ffffff;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.intake-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(9, 83, 110, 0.09);
}

.intake-step-card.is-active {
  border-color: rgba(13, 92, 135, 0.45);
  box-shadow: 0 22px 44px rgba(13, 92, 135, 0.13);
}

.intake-step-card-empty {
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.intake-step-card-partial {
  border-color: rgba(240, 153, 41, 0.35);
  background: linear-gradient(180deg, #fffdf8, #fff7ec);
}

.intake-step-card-complete {
  border-color: rgba(28, 139, 96, 0.3);
  background: linear-gradient(180deg, #f6fffb, #eefbf5);
}

.intake-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 92, 135, 0.08);
  color: #0d5c87;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.intake-step-card-partial .intake-step-icon {
  background: rgba(240, 153, 41, 0.16);
  color: #a35a00;
}

.intake-step-card-complete .intake-step-icon {
  background: rgba(28, 139, 96, 0.16);
  color: #0f7a4b;
}

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

.intake-step-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f3250;
}

.intake-step-description {
  color: #6b7e8b;
  font-size: 13px;
  line-height: 1.45;
}

.intake-step-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.intake-step-status {
  font-size: 13px;
  font-weight: 700;
  color: #466375;
}

.intake-step-count {
  font-size: 12px;
  color: #8aa0ae;
}

.intake-section-modal {
  width: min(1080px, calc(100vw - 48px));
}

.intake-section-modal-form {
  display: grid;
  gap: 18px;
}

.intake-modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.intake-modal-actions .ghost-button {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  padding-inline: 20px;
  line-height: 1.2;
  overflow: visible;
}

.intake-submit-row {
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.intake-modal-save-button {
  border-color: rgba(13, 92, 135, 0.28);
  color: #0d5c87;
  background: rgba(13, 92, 135, 0.08);
}

.intake-reset-button {
  border-color: rgba(210, 85, 65, 0.22);
  color: #b94a34;
  background: rgba(210, 85, 65, 0.06);
  min-width: 156px;
  min-height: 52px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
}

.intake-save-button {
  border-color: #0d5c87;
  color: #ffffff;
  background: linear-gradient(180deg, #0f6b9d, #0c5f8f);
  box-shadow: 0 14px 28px rgba(12, 95, 143, 0.18);
  min-width: 168px;
  min-height: 52px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.intake-save-button:hover {
  background: linear-gradient(180deg, #116fA4, #0d5c87);
  box-shadow: 0 18px 34px rgba(12, 95, 143, 0.22);
}

.intake-modal-grid {
  display: grid;
  gap: 18px;
}

.intake-modal-grid-2 {
  grid-template-columns: 1.15fr 1fr;
}

.intake-modal-column {
  display: grid;
  gap: 14px;
}

.intake-signature-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(9, 83, 110, 0.1);
  border-radius: 18px;
  background: #fbfdff;
}

.intake-signature-preview img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.intake-step-placeholder {
  min-height: 220px;
}

@media (max-width: 1440px) {
  .intake-steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 860px) {
  .intake-claim-banner,
  .intake-modal-grid-2 {
    grid-template-columns: 1fr;
  }

  .intake-claim-banner {
    display: grid;
  }

  .intake-claim-banner-stats {
    justify-content: flex-start;
  }

  .intake-step-card {
    grid-template-columns: 56px 1fr;
  }

  .intake-step-meta {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .intake-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .intake-claim-banner-copy strong {
    font-size: 28px;
  }

  .intake-step-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 10px;
    min-height: 0;
    min-width: 0;
    padding: 16px 14px;
    border-radius: 18px;
  }

  .intake-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 16px;
  }

  .intake-step-title {
    font-size: 15px;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
  }

  .intake-step-description {
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
    text-align: center;
  }

  .intake-step-copy {
    justify-items: center;
    text-align: center;
  }

  .intake-step-meta {
    grid-column: auto;
    justify-items: center;
    text-align: center;
  }

  .intake-step-status {
    font-size: 12px;
  }

  .intake-step-count {
    font-size: 11px;
  }

  .intake-section-modal {
    width: calc(100vw - 22px);
  }

  .intake-modal-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .intake-submit-row {
    justify-content: stretch;
    gap: 10px;
  }

  .intake-submit-row .ghost-button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 48px;
    justify-content: center;
    padding: 0 14px;
    font-size: 14px;
    line-height: 1.2;
  }
}

@media (max-width: 420px) {
  .intake-steps-grid {
    grid-template-columns: 1fr;
  }
}

/* Global UI normalization */
body :is(
  .sidebar,
  .panel,
  .detail-card,
  .form-shell,
  .metric-card,
  .list-card,
  .hero-banner,
  .user-card,
  .nav-link,
  .ghost-button,
  .accent-button,
  .status-chip,
  .filter-chip,
  .table-chip,
  .nav-count,
  .form-input,
  .form-select,
  .form-textarea,
  .search-input,
  .document-upload-input-shell,
  .scene-photo-slot-card,
  .scene-photo-gallery-card,
  .scene-photo-trigger-card,
  .scene-photo-additional-upload-card,
  .scene-photo-preview-card img,
  .scene-photo-gallery-media img,
  .document-thumb img,
  .legacy-signature-image,
  .intake-section-modal,
  .case-detail-editor-sidebar,
  .case-detail-editor-sidebar-shell,
  .intake-claim-banner,
  .intake-step-card,
  .intake-signature-preview,
  .intake-ocr-card,
  .mobile-sticky-footer,
  .flash-message,
  .auth-card,
  .data-table,
  .case-listing-row,
  .case-filter-option,
  .document-upload-empty,
  .empty-state
) {
  border-radius: var(--ui-radius) !important;
}

body :is(
  .topbar,
  .brand-block,
  .toolbar,
  .lang-switch,
  .role-switch,
  .layout,
  .nav-list,
  .list-stack,
  .dashboard-footer-actions,
  .panel-header,
  .hero-banner,
  .hero-actions,
  .metric-grid,
  .metric-row,
  .list-card-header,
  .list-card-body,
  .list-card-footer,
  .cases-legacy-shell,
  .case-listing-stack,
  .case-detail-legacy-grid,
  .legacy-bottom-split,
  .scene-photo-editor-layout,
  .scene-photo-editor-group,
  .scene-photo-editor-grid,
  .scene-photo-editor-bottom,
  .scene-photo-additional-grid,
  .scene-photo-gallery-grid,
  .scene-photo-preview-actions,
  .scene-photo-gallery-actions,
  .intake-steps-grid,
  .intake-modal-grid,
  .intake-modal-column,
  .intake-modal-actions,
  .intake-submit-row,
  .entity-detail-grid,
  .case-detail-header-actions,
  .dashboard-grid,
  .dashboard-main-grid,
  .dashboard-side-grid,
  .dashboard-card-grid,
  .form-grid,
  .form-row
) {
  gap: var(--ui-gap) !important;
}

body :is(
  .app-shell,
  .layout,
  .panel,
  .sidebar,
  .list-stack,
  .case-listing-stack,
  .legacy-photo-strip,
  .legacy-bottom-split,
  .scene-photo-editor-layout,
  .scene-photo-editor-bottom,
  .scene-photo-gallery-grid,
  .scene-photo-additional-grid,
  .intake-steps-grid,
  .intake-submit-row,
  .entity-detail-grid
) {
  margin-top: var(--ui-gap);
}

body .layout {
  margin-top: 20px !important;
}

.scene-photo-trigger-card,
.scene-photo-additional-upload-card {
  position: relative;
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.scene-photo-trigger-card input,
.scene-photo-additional-upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.scene-photo-trigger-card img,
.scene-photo-additional-upload-card img {
  display: block;
  width: 100%;
  height: 172px;
  object-fit: cover;
  border-radius: 12px;
}

.scene-photo-trigger-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 14px;
  color: #16384d;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.78) 68%, rgba(255, 255, 255, 0.92) 100%);
  transition: opacity 0.22s ease;
}

.scene-photo-trigger-card-filled .scene-photo-trigger-overlay {
  opacity: 0;
}

.scene-photo-trigger-card-filled:hover .scene-photo-trigger-overlay,
.scene-photo-trigger-card-filled:focus-within .scene-photo-trigger-overlay {
  opacity: 1;
}

.scene-photo-trigger-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(12, 95, 143, 0.12);
  color: #0c5f8f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-photo-trigger-overlay strong {
  font-size: 14px;
  line-height: 1.3;
}

.scene-photo-trigger-overlay span:last-child {
  font-size: 12px;
  line-height: 1.45;
  color: #557086;
}

.scene-photo-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-photo-additional-upload-card {
  min-height: 172px;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #91b7d2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
  color: #48627a;
  text-align: center;
}

.scene-photo-additional-upload-plus {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(12, 95, 143, 0.08);
  color: #0c5f8f;
  font-size: 28px;
  line-height: 1;
}

.scene-photo-additional-upload-card strong {
  color: #28465c;
  font-size: 14px;
}

.scene-photo-additional-upload-card span:last-child {
  font-size: 12px;
  line-height: 1.45;
}

.scene-photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.scene-photo-gallery-grid-additional {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.scene-photo-gallery-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  background: #fbfdff;
}

.scene-photo-gallery-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.scene-photo-gallery-card-head strong {
  color: #345168;
  font-size: 13px;
  line-height: 1.35;
}

.scene-photo-gallery-status {
  color: #6f879a;
  font-size: 11px;
  white-space: nowrap;
}

.scene-photo-gallery-media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.scene-photo-gallery-media img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e1e7ed;
  background: #fff;
}

.scene-photo-gallery-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #48627a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-photo-gallery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
}

.scene-photo-gallery-hint {
  color: #70879b;
  font-size: 12px;
  line-height: 1.45;
}

.legacy-photo-gallery-strip {
  display: grid;
  gap: 12px;
}

.legacy-bottom-split-photos {
  align-items: start;
}

@media (max-width: 860px) {
  .scene-photo-gallery-grid,
  .scene-photo-editor-grid,
  .scene-photo-additional-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .scene-photo-gallery-grid,
  .scene-photo-editor-grid,
  .scene-photo-additional-grid {
    grid-template-columns: 1fr;
  }
}

.scene-photo-editor-grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.scene-photo-slot-card {
  gap: 8px;
  padding: 10px;
}

.scene-photo-slot-title {
  font-size: 12px;
}

.scene-photo-preview-card {
  position: relative;
}

.scene-photo-trigger-card img,
.scene-photo-additional-upload-card img {
  height: 112px;
  border-radius: 10px;
}

.scene-photo-trigger-overlay {
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.78) 100%);
}

.scene-photo-trigger-overlay strong {
  font-size: 12px;
  line-height: 1.2;
}

.scene-photo-preview-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.scene-photo-remove-chip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(16, 33, 48, 0.16);
  color: #37546b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.scene-photo-guide-note,
.scene-photo-trigger-badge {
  display: none;
}

.legacy-photo-gallery-strip h4 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #222222;
  color: #6b90b0;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
}

.scene-photo-gallery-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.scene-photo-gallery-grid-additional {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.scene-photo-gallery-card {
  gap: 8px;
  padding: 8px;
}

.scene-photo-gallery-card-head {
  justify-content: flex-start;
}

.scene-photo-gallery-card-head strong {
  font-size: 12px;
}

.scene-photo-gallery-status,
.scene-photo-gallery-overlay,
.scene-photo-gallery-hint {
  display: none;
}

.scene-photo-gallery-media img {
  height: 96px;
}

.scene-photo-gallery-card.is-guide .scene-photo-gallery-media img {
  opacity: 0.3;
}

.scene-photo-gallery-actions {
  min-height: 0;
  justify-content: center;
}

.scene-photo-gallery-card.is-guide .scene-photo-gallery-actions {
  display: none;
}

.scene-photo-gallery-actions .ghost-button.square-button {
  min-width: 0;
  min-height: 0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.scene-photo-gallery-media-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.case-detail-inline-scene-editor {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #d9e4ee;
  border-radius: 5px;
  background: #fbfdff;
}

.case-detail-inline-scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.case-detail-inline-scene-header h4 {
  margin: 0;
}

.case-detail-inline-scene-form {
  display: grid;
  gap: 10px;
}

.scene-photo-editor-layout-stacked {
  gap: 10px !important;
}

.scene-photo-editor-layout-stacked .scene-photo-editor-bottom {
  display: block;
}

.scene-photo-additional-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px !important;
}

.scene-photo-preview-card-compact .scene-photo-trigger-card img,
.scene-photo-additional-upload-card-compact {
  min-height: 96px;
}

.scene-photo-trigger-card-compact img {
  height: 96px;
}

.scene-photo-additional-upload-card-compact {
  padding: 10px;
  gap: 6px;
}

.scene-photo-additional-upload-card-compact strong {
  font-size: 12px;
}

.scene-photo-additional-upload-card-compact span:last-child {
  font-size: 11px;
}

.scene-photo-description-field-full {
  display: grid;
  gap: 6px;
}

.scene-photo-description-textarea-compact {
  min-height: 120px;
}

.scene-photo-preview-card-compact .scene-photo-preview-actions,
.scene-photo-preview-card .scene-photo-preview-actions {
  top: 6px;
  right: 6px;
}

.scene-photo-preview-card-compact .scene-photo-remove-chip,
.scene-photo-preview-card .scene-photo-remove-chip {
  width: 22px;
  height: 22px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1320px) {
  .scene-photo-gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .scene-photo-gallery-grid-additional {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .scene-photo-gallery-grid,
  .scene-photo-gallery-grid-additional {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .scene-photo-gallery-card {
    gap: 6px;
    padding: 6px;
  }

  .scene-photo-gallery-grid-additional > .legacy-detail-value,
  .scene-photo-gallery-grid-additional > .empty-state {
    grid-column: 1 / -1;
  }
}

.case-detail-scene-photo-modal {
  width: min(100%, 960px);
}
