/* Collegium Academicum — CArtei UI styles */

:root {
  --ca-teal: #35ADA4;
  --ca-teal-dark: #2f9991;
  --ca-text: #363636;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background: #fcfcfc;
  color: var(--ca-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Navbar ── */
.ca-navbar {
  background: white;
  border-bottom: 3px solid var(--ca-teal);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.ca-navbar-logo img { height: 36px; display: block; }
.ca-navbar-right { display: flex; align-items: center; gap: 1rem; }
.ca-navbar-user { font-size: 0.9rem; color: #7a7a7a; }
.ca-logout {
  font-size: 0.85rem; color: var(--ca-teal); border: 1px solid var(--ca-teal);
  border-radius: 4px; padding: 4px 12px; cursor: pointer; background: white;
  font-family: inherit; font-weight: 600;
}
.ca-logout:hover { background: var(--ca-teal); color: white; }
.ca-navbar-admin {
  font-size: 0.85rem; color: var(--ca-teal); font-weight: 600; text-decoration: none;
}
.ca-navbar-admin:hover { text-decoration: underline; }

/* ── Main ── */
.ca-main { flex: 1; padding: 0 1.5rem 3rem; }

/* ── Card ── */
.ca-card {
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 2rem;
  max-width: 1600px;
  margin: 1.5rem auto 0;
}

/* ── Form elements ── */
.ca-label {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #7a7a7a; margin-bottom: 0.5rem; display: block;
}
.ca-input, .ca-textarea {
  width: 100%; border: 1px solid #dbdbdb; border-radius: 4px;
  padding: 0.75rem; font-family: inherit; font-size: 1rem;
  color: var(--ca-text); background: #fcfcfc;
}
.ca-textarea { resize: vertical; min-height: 120px; }

/* ── Tenant profile field grid (tiled, side-by-side) ── */
.ca-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 0.85rem;
}
.ca-field { display: flex; flex-direction: column; min-width: 0; }
.ca-field-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #7a7a7a; margin-bottom: 0.3rem;
}
.ca-field-value { font-size: 0.95rem; color: var(--ca-text); word-break: break-word; }
.ca-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1px solid var(--ca-teal);
  color: var(--ca-teal); font-size: 0.68rem; font-weight: 700; text-transform: none;
  cursor: pointer; position: relative; user-select: none;
}
.ca-hint:hover, .ca-hint:focus-visible { background: var(--ca-teal); color: #fff; outline: none; }
.ca-hint-bubble {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ca-text); color: #fff; font-size: 0.78rem; font-weight: 400; line-height: 1.35;
  text-transform: none; letter-spacing: normal; padding: 0.5rem 0.65rem; border-radius: 6px;
  width: 230px; text-align: left; box-shadow: 0 4px 14px rgba(0,0,0,0.18); z-index: 10;
}
.ca-hint:hover .ca-hint-bubble, .ca-hint:focus .ca-hint-bubble, .ca-hint.open .ca-hint-bubble { display: block; }
.ca-hint-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ca-text);
}
.ca-field input, .ca-field select, .ca-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #dbdbdb; border-radius: 4px;
  padding: 0.5rem 0.6rem; font-family: inherit; font-size: 0.95rem;
  color: var(--ca-text); background: #fcfcfc;
}
/* Server-side validation error: highlight the offending input. */
.ca-field-error input, .ca-field-error select { border-color: #b00; background: #fff5f5; }
/* Boolean fields as an animated toggle slider (✕ = false, ✓ = true). */
.ca-field input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none; align-self: start;
  width: 44px; height: 24px; padding: 0; border: none;
  background: #d0524f; border-radius: 999px; cursor: pointer;
  transition: background 0.25s ease;
}
.ca-field input[type="checkbox"]::before {
  content: "✕";
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #d0524f; font-size: 12px; line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: left 0.25s ease, color 0.25s ease;
}
.ca-field input[type="checkbox"]:checked { background: var(--ca-teal); }
.ca-field input[type="checkbox"]:checked::before {
  content: "✓"; left: 22px; color: var(--ca-teal);
}
.ca-field input[type="checkbox"]:focus-visible { outline: 2px solid var(--ca-teal); outline-offset: 2px; }
/* FLINTA toggle "on" wears the FLINTA pill colours instead of teal. */
.ca-field[data-field="is_flinta"] input[type="checkbox"]:checked { background: #5b3a8a; }
.ca-field[data-field="is_flinta"] input[type="checkbox"]:checked::before { color: #5b3a8a; }
.ca-field textarea { resize: vertical; min-height: 90px; }
.ca-field:has(textarea) { grid-column: 1 / -1; }  /* long text spans the full row */
.ca-input:focus, .ca-textarea:focus {
  border-color: var(--ca-teal); outline: none;
  box-shadow: 0 0 0 2px rgba(53,173,164,0.15);
}

/* ── Room assignment rows (read-only until "Bearbeiten") ── */
.ca-room-assignment {
  border: 1px solid #ececec; border-radius: 6px;
  padding: 0.5rem 0.7rem; margin: 0.4rem 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ca-room-assignment:hover { background: #faf8f3; border-color: #dcdcdc; }
.ca-room-display { display: flex; align-items: center; gap: 0.75rem; }
.ca-room-main { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ca-room-name { font-weight: 600; }
.ca-room-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem;
  font-size: 0.85rem; color: #6a6a6a;
}
.ca-room-badge {
  font-size: 0.75rem; font-weight: 600; color: var(--ca-teal-dark);
  background: rgba(53,173,164,0.12); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.ca-room-edit-btn {
  flex-shrink: 0; padding: 0.05rem 0.3rem; font-size: 0.72rem;
  border: none; background: none; color: #9a9a9a; cursor: pointer;
  opacity: 0; transition: opacity 0.15s ease, color 0.15s ease;
}
.ca-room-edit-btn:hover { color: var(--ca-teal); text-decoration: underline; }
.ca-room-assignment:hover .ca-room-edit-btn,
.ca-room-assignment:focus-within .ca-room-edit-btn { opacity: 1; }
@media (hover: none) { .ca-room-edit-btn { opacity: 1; } }  /* touch: no hover to reveal */

/* Save/Revert sit top-right of the edit area, revealed only once the card is dirty. */
.ca-room-actions {
  display: none; justify-content: flex-end; gap: 0.4rem; margin-bottom: 0.5rem;
}
.ca-room-assignment.is-dirty .ca-room-actions { display: flex; }
.ca-room-assignment.is-dirty {
  border-color: #f5c518;
  box-shadow: inset 0 0 0 1px #f5c518, 0 0 0 3px rgba(245,197,24,0.35);
}

/* ── Untermiete: visually distinct from normal renters ── */
.ca-room-assignment--sublet {
  border-left: 4px solid #d98324; background: #fdf6ec;
}
.ca-room-assignment--sublet:hover { background: #fbeed7; }
.ca-room-badge--sublet {
  color: #9a5a10; background: rgba(217,131,36,0.16);
}
.ca-sublet-line { border-left: 3px solid #d98324; padding-left: 0.5rem; }

/* ── Per-assignment documents ── */
/* Cards matching the Rechtsdokumente section (see tenant_detail.html). */
.ca-doc-card {
  margin-top: 0.75rem; border: 1px solid #e2e2e2; border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
.ca-doc-card-head { display: flex; align-items: center; gap: 0.5rem; }
.ca-doc-status { font-size: 0.8rem; }
.ca-doc-status--active { color: #0a0; }
.ca-doc-status--missing { color: #b26a00; }
.ca-doc-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-top: 0.4rem; font-size: 0.9rem;
}
.ca-doc-row--revoked { opacity: 0.6; }
.ca-doc-upload { margin-top: 0.6rem; }

/* ── Dirty-section highlight ── */
details.is-dirty {
  border: 2px solid #f5c518 !important;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 3px rgba(245,197,24,0.35);
}
details.is-dirty > summary { border-radius: 6px 6px 0 0; }
.ca-card.is-dirty {
  border: 2px solid #f5c518;
  box-shadow: 0 0 0 3px rgba(245,197,24,0.35);
}

/* ── Buttons ── */
.ca-button {
  background: var(--ca-teal); color: white; border: none; border-radius: 4px;
  padding: 0.65rem 1.5rem; font-family: inherit; font-size: 1rem;
  font-weight: 600; cursor: pointer;
}
.ca-button:hover { background: var(--ca-teal-dark); }
.ca-button-outline {
  background: white; color: var(--ca-teal); border: 1px solid var(--ca-teal);
  border-radius: 4px; padding: 0.65rem 1.5rem; font-family: inherit;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
.ca-button-outline:hover { background: #f0faf9; }
.ca-button-sm { padding: 0.3rem 0.75rem; font-size: 0.85rem; }
.ca-notes-toggle {
  background: white; color: #555; border: 1px solid #ddd; border-radius: 999px;
  padding: 0.15rem 0.6rem; font-family: inherit; font-size: 0.8rem;
  font-weight: 500; cursor: pointer; white-space: nowrap;
}
.ca-notes-toggle:hover { background: #f5f5f5; }
.ca-notes-toggle.open { background: var(--ca-teal); color: white; border-color: var(--ca-teal); }
.ca-notes-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.ca-notes-panel.open { grid-template-rows: 1fr; }
.ca-notes-inner {
  overflow: hidden; min-height: 0;
  background: #faf6ec; border: 1px solid #ece3cf; border-radius: 6px;
  padding: 0.25rem 0.75rem 0.6rem; margin-bottom: 0.25rem;
}
.ca-notes-panel:not(.open) .ca-notes-inner { margin-bottom: 0; background: none; border-color: transparent; }

/* Animate native <details> expansion. Progressive enhancement: browsers
   without ::details-content / interpolate-size just toggle instantly.
   ponytail: needs Chrome 129+/modern browsers; older ones fall back to no animation. */
.ca-collapse { interpolate-size: allow-keywords; }
.ca-collapse::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}
.ca-collapse[open]::details-content { block-size: auto; }
.ca-collapse > summary { list-style: none; }
.ca-collapse > summary::-webkit-details-marker { display: none; }

/* ── Messages (Django flash messages) ── */
.ca-messages { margin: 1rem auto 0; }
.ca-message {
  padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 0.5rem;
  font-size: 0.9rem; font-weight: 600;
}
.ca-message.error { background: #fdecea; color: #B61B29; border: 1px solid #f5c6cb; }
.ca-message.warning { background: #fff8e1; color: #7a5c00; border: 1px solid #ffe082; }
.ca-message.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.ca-message.info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

/* ── Divider ── */
.ca-divider { border: none; border-top: 1px solid #efefef; margin: 1.5rem 0; }

/* ── Status badges ── */
.badge { padding: 2px 8px; border-radius: 3px; font-size: 0.82em; font-weight: 700; }
.badge-open   { background: #d4edda; color: #155724; }
.badge-grace  { background: #fff3cd; color: #856404; }
.badge-closed { background: #f8d7da; color: #721c24; }

/* Engagement status */
.badge-ZU_AKTIV          { background: #fff; color: #363636; border: 1px solid #ccc; }
.badge-AKTIV             { background: #155724; color: #fff; }
.badge-NICHT_AUSREICHEND { background: #c3e6cb; color: #155724; }
.badge-IM_GESPRAECH      { background: #fff3cd; color: #856404; }
.badge-INAKTIV           { background: #B61B29; color: #fff; }

/* AG health (green → black) */
.badge-GESUND       { background: #2e7d32; color: #fff; }
.badge-KERNAUFGABEN { background: #c9a400; color: #3a2f00; }
.badge-KRITISCH     { background: #c62828; color: #fff; }
.badge-TOT          { background: #111;    color: #fff; }

/* ── Slider (engagement + AG health) ── */
.ca-slider { display: flex; align-items: center; gap: 0.6rem; }
.ca-slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px; background: #ddd; outline: none;
  flex: 1; min-width: 90px; max-width: 220px;
}
.ca-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--thumb, #555); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}
.ca-slider input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--thumb, #555); cursor: pointer; border: 2px solid #fff;
}
.ca-slider-out { font-weight: 700; font-size: 0.85em; white-space: nowrap; min-width: 8.5rem; }

/* ── Login page ── */
.ca-login-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; padding: 2rem 1.5rem;
}
.ca-login-logo { margin-bottom: 1.5rem; }
.ca-login-logo img { height: 60px; }
.ca-login-card { background: white; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 2rem; width: 100%; max-width: 380px; }
.ca-login-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; color: var(--ca-teal); }
.ca-field { margin-bottom: 1rem; }
.ca-login-card .ca-button { width: 100%; margin-top: 0.5rem; }

/* ── Footer ── */
.ca-footer {
  background: white; border-top: 3px solid var(--ca-teal);
  padding: 1.25rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
.ca-footer-logo img { height: 28px; opacity: 0.7; }
.ca-footer-links { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.ca-footer-links a {
  font-size: 0.82rem; color: white; background: var(--ca-teal);
  border-radius: 4px; padding: 3px 10px; text-decoration: none; font-weight: 600;
}
.ca-footer-links a:hover { background: var(--ca-teal-dark); }
.ca-footer-email { font-size: 0.82rem; color: #7a7a7a; }

/* ── Stat cards ── */
.ca-stat-card {
  background: #f5fffe;
  border: 1px solid var(--ca-teal);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  min-width: 0;
  text-align: center;
}
.ca-stat-value { font-size: 1.15rem; font-weight: 700; color: var(--ca-teal); }
.ca-stat-label { font-size: 0.7rem; color: #555; margin-top: 0.1rem; }

/* ── Cluster row colors (Belegium) ── */
.cluster-row-0A { background: hsl(0,   55%, 94%) !important; }
.cluster-row-0B { background: hsl(26,  55%, 94%) !important; }
.cluster-row-1A { background: hsl(51,  55%, 94%) !important; }
.cluster-row-1B { background: hsl(77,  55%, 94%) !important; }
.cluster-row-1C { background: hsl(103, 55%, 94%) !important; }
.cluster-row-1D { background: hsl(128, 55%, 94%) !important; }
.cluster-row-2A { background: hsl(154, 55%, 94%) !important; }
.cluster-row-2B { background: hsl(180, 55%, 94%) !important; }
.cluster-row-2C { background: hsl(205, 55%, 94%) !important; }
.cluster-row-2D { background: hsl(231, 55%, 94%) !important; }
.cluster-row-3A { background: hsl(257, 55%, 94%) !important; }
.cluster-row-3B { background: hsl(282, 55%, 94%) !important; }
.cluster-row-3C { background: hsl(308, 55%, 94%) !important; }
.cluster-row-3D { background: hsl(334, 55%, 94%) !important; }
.cluster-chip {
  display: inline-block; padding: 1px 7px; border-radius: 3px;
  font-size: 0.82em; font-weight: 700;
}
.sort-btn {
  background: none; border: none; cursor: pointer; font-weight: 700;
  font-family: inherit; font-size: inherit; padding: 0; color: inherit;
}
.sort-btn:hover { color: var(--ca-teal); }

/* ── Landing / info page ── */
.lp { max-width: 1000px; margin: 0 auto; }
.lp-section { margin: 3.5rem auto 0; }
.lp-section:first-child { margin-top: 2rem; }

/* Hero */
.lp-hero {
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(53,173,164,0.12), rgba(53,173,164,0) 70%),
    linear-gradient(180deg, #f5fffe 0%, #fcfcfc 100%);
  border-radius: 14px;
  border: 1px solid #e3f3f1;
}
.lp-hero-logo img { height: 64px; margin-bottom: 1.25rem; }
.lp-hero h1 {
  font-size: 3rem; font-weight: 700; color: var(--ca-teal);
  letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 0.5rem;
}
.lp-hero .lp-tagline { font-size: 1.25rem; color: #4a4a4a; font-weight: 600; margin-bottom: 1.25rem; }
.lp-hero p { max-width: 620px; margin: 0 auto 1.75rem; font-size: 1.05rem; line-height: 1.6; color: #555; }
.lp-cta { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.lp-cta .ca-button, .lp-cta .ca-button-outline { text-decoration: none; display: inline-block; }

/* Section headings */
.lp-h2 {
  font-size: 1.6rem; font-weight: 700; color: var(--ca-text);
  text-align: center; margin-bottom: 0.4rem;
}
.lp-h2::after {
  content: ""; display: block; width: 48px; height: 3px;
  background: var(--ca-teal); border-radius: 2px; margin: 0.6rem auto 0;
}
.lp-sub { text-align: center; color: #7a7a7a; margin-bottom: 2rem; }

/* Feature cards */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.lp-feature {
  background: white; border: 1px solid #eee; border-radius: 10px;
  padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lp-feature:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(53,173,164,0.15); }
.lp-feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: #eafaf8; color: var(--ca-teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem;
}
.lp-feature-icon svg { width: 24px; height: 24px; }
.lp-feature h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.lp-feature p { font-size: 0.92rem; color: #666; line-height: 1.5; }

/* Tech toggles (native <details>) */
.lp-toggle {
  background: white; border: 1px solid #eee; border-radius: 10px;
  margin-bottom: 0.85rem; overflow: hidden;
}
.lp-toggle[open] { border-color: var(--ca-teal); box-shadow: 0 2px 10px rgba(53,173,164,0.1); }
.lp-toggle > summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.35rem;
  font-weight: 700; font-size: 1.02rem; color: var(--ca-text);
  display: flex; align-items: center; gap: 0.75rem;
}
.lp-toggle > summary::-webkit-details-marker { display: none; }
.lp-toggle > summary::after {
  content: "＋"; margin-left: auto; color: var(--ca-teal);
  font-weight: 700; font-size: 1.2rem; transition: transform 0.2s ease;
}
.lp-toggle[open] > summary::after { content: "－"; }
.lp-toggle > summary .lp-chip { margin-left: 0; }
.lp-toggle-body { padding: 0 1.35rem 1.35rem; color: #555; line-height: 1.6; font-size: 0.95rem; }
.lp-toggle-body p { margin-bottom: 0.75rem; }
.lp-toggle-body ul { margin: 0.5rem 0 0.75rem 1.1rem; list-style: disc; }
.lp-toggle-body li { margin-bottom: 0.35rem; }
.lp-toggle-body code {
  background: #f2f4f4; border-radius: 3px; padding: 0.1em 0.4em;
  font-size: 0.88em; color: #2f5f5b;
}
.lp-toggle-body table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.lp-toggle-body th, .lp-toggle-body td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.lp-toggle-body th { color: #7a7a7a; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; }

.lp-chip {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 20px; background: #eafaf8; color: var(--ca-teal);
}

/* Roadmap timeline */
.lp-timeline { position: relative; margin: 0 auto; padding-left: 2rem; }
.lp-timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--ca-teal), #cfeeeb);
}
.lp-phase { position: relative; margin-bottom: 1.5rem; }
.lp-phase::before {
  content: "✓"; position: absolute; left: -2rem; top: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ca-teal); color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px #eafaf8;
}
.lp-phase h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.15rem; }
.lp-phase h3 .lp-phase-tag { font-size: 0.72rem; color: #7a7a7a; font-weight: 600; }
.lp-phase p { font-size: 0.92rem; color: #666; line-height: 1.5; }

/* Backlog */
.lp-tier { margin-bottom: 1.75rem; }
.lp-tier-head { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7a7a7a; margin-bottom: 0.75rem; }
.lp-backlog-item {
  background: white; border: 1px solid #eee; border-left: 3px solid var(--ca-teal);
  border-radius: 8px; padding: 0.9rem 1.1rem; margin-bottom: 0.6rem;
}
.lp-backlog-item.is-blocked { border-left-color: #d8b23a; }
.lp-backlog-item h4 { font-size: 0.98rem; font-weight: 700; margin-bottom: 0.2rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lp-backlog-item p { font-size: 0.88rem; color: #666; line-height: 1.45; }
.lp-tag { display: inline-block; font-size: 0.66rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.lp-tag-nc { background: #e3f2fd; color: #0d47a1; }
.lp-tag-spec { background: #f3e5f5; color: #6a1b9a; }
.lp-pts { display: inline-block; margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--ca-teal); background: #eafaf8; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }

.lp-note { text-align: center; color: #9a9a9a; font-size: 0.82rem; margin-top: 2rem; }

@media (max-width: 600px) {
  .lp-hero h1 { font-size: 2.2rem; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .ca-navbar { height: auto; flex-wrap: wrap; padding: 0.5rem 1rem; gap: 0.5rem; }
  .ca-navbar-right { flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; }
  .ca-main { padding: 0 0.75rem 2rem; }
  .ca-card { padding: 1rem; }
  .ca-card .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Tenant list interactive table */
.ca-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.ca-sortable:hover { color: var(--ca-teal); }
.ca-filter-row th { padding-top: 0.2rem; padding-bottom: 0.5rem; vertical-align: top; }
.ca-filter-row .col-filter { max-width: 11rem; }
.ca-filter-row input[type="date"] { max-width: 8.5rem; margin-bottom: 2px; }

/* ── Tenant overview: rail + table ── */
.ca-tl-layout { display: flex; gap: 1rem; align-items: flex-start; }
.ca-tl-rail { width: 190px; flex-shrink: 0; }
.ca-tl-main { flex: 1; min-width: 0; }
.ca-facet { border: 1px solid #ece7dc; border-radius: 8px; padding: 0.6rem 0.75rem; margin-bottom: 0.75rem; background: #fff; }
.ca-facet h5 { margin: 0 0 0.4rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: #999; }
.ca-facet-line { display: block; margin: 0.2rem 0; font-size: 0.85rem; color: #444; }
.ca-tl-name { color: var(--ca-teal); font-weight: 600; }
/* Document-list expandable detail: animate an inner div (table rows won't animate height). */
.detail-body { max-height: 0; opacity: 0; overflow: hidden; padding: 0 0.2rem;
  transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease; }
.detail-row.open .detail-body { max-height: 400px; opacity: 1; padding: 0.4rem 0.2rem; }
/* ponytail: fixed max-height cap for the transition; raise if a detail block grows past it. */
.ca-tl-muted { color: #7a7a7a; }
.ca-sublet-sub { font-size: 0.78rem; color: #9a5a10; margin-top: 2px; }
.cluster-group-header td { background: #efeae0; font-weight: 700; padding: 0.35rem 0.6rem; }
.ca-grp-tally { font-weight: 400; color: #777; font-size: 0.85rem; }

@media (max-width: 780px) {
  .ca-tl-layout { flex-direction: column; }
  .ca-tl-rail { width: 100%; }
}

/* Overview status pills */
.ca-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.ca-pill-green  { background: #d9f0e0; color: #1c6b3a; }
.ca-pill-amber  { background: #fdecc8; color: #8a5a00; }
.ca-pill-red    { background: #f7d4d4; color: #a11111; }
.ca-pill-yes    { background: #d9f0e0; color: #1c6b3a; }
.ca-pill-no     { background: #e7e7e7; color: #555; }
.ca-pill-flinta { background: #e7ddf3; color: #5b3a8a; }
.ca-pill-bf     { background: #d7eaf7; color: #1c5a80; }

/* Drag-and-drop file upload feedback (dragdrop.js) */
.ca-dragover { outline: 2px dashed var(--ca-teal); outline-offset: 3px; background: #eef7f5; }
