/* LexCase shared visual identity — deep garnet + warm copper, ivory
   background. Deliberately distinct from the navy/gold used by the Real
   Estate Intake System and from the old pine/brass LexCase demo — this is
   its own identity: serious, protective, warm rather than cold, built to
   read as "premium personal injury firm." */

:root {
  --garnet: #6e1f2e;
  --garnet-dark: #45141f;
  --garnet-light: #8f3347;
  --copper: #c98a4b;
  --copper-light: #e0ac74;
  --cream: #faf7f2;
  --cream-dark: #efe4d6;
  --ink: #241c1c;
  --muted: #6f645f;
  --danger: #b1473a;
  --success: #2f6f4e;
  --warning: #b8823a;
  --info: #4a6fa5;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(69, 20, 31, 0.14);
  --shadow-sm: 0 2px 10px rgba(69, 20, 31, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--garnet);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

.mono { font-family: 'IBM Plex Mono', 'Courier New', monospace; }
a { color: var(--garnet); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Top brand bar ---------- */
.brand-bar {
  background: linear-gradient(135deg, var(--garnet) 0%, var(--garnet-dark) 100%);
  color: var(--cream);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.brand-bar .firm-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-bar .firm-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--copper-light), var(--copper));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--garnet-dark);
  font-weight: 700;
  font-size: 1.05rem;
  font-family: 'Fraunces', Georgia, serif;
  flex-shrink: 0;
}

.brand-bar .firm-name small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  color: var(--copper-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}

/* ---------- AI badge, used in several places ---------- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(201,138,75,0.2), rgba(201,138,75,0.06));
  border: 1px solid rgba(201,138,75,0.45);
  color: var(--copper);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
}
.ai-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 3px rgba(201,138,75,0.25);
}

/* ---------- Stage tracker ---------- */
.stage-tracker {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 18px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stage-step {
  flex: 1 1 0;
  min-width: 96px;
  text-align: center;
  position: relative;
  padding-top: 22px;
}

.stage-step .dot {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 2px solid #cabcae;
  z-index: 2;
}

.stage-step .line {
  position: absolute;
  top: 7px; left: -50%;
  width: 100%; height: 2px;
  background: var(--cream-dark);
  z-index: 1;
}

.stage-step:first-child .line { display: none; }

.stage-step .label {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
  overflow-wrap: break-word;
}

.stage-step.completed .dot { background: var(--garnet); border-color: var(--garnet); }
.stage-step.completed .line { background: var(--garnet); }
.stage-step.completed .label { color: var(--garnet); }

.stage-step.current .dot {
  background: var(--copper);
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(201, 138, 75, 0.28);
}
.stage-step.current .label { color: var(--garnet); font-weight: 700; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.case-number-badge {
  display: inline-block;
  background: var(--garnet);
  color: var(--cream);
  font-family: 'IBM Plex Mono', monospace;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ---------- Priority badges ---------- */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.priority-Urgent { background: rgba(177,71,58,0.13); color: var(--danger); }
.priority-High { background: rgba(184,130,58,0.15); color: var(--warning); }
.priority-Normal { background: rgba(74,111,165,0.12); color: var(--info); }
.priority-Low { background: rgba(111,100,95,0.12); color: var(--muted); }

/* ---------- Case type badges ---------- */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--cream-dark);
  color: var(--garnet);
}
