:root {
  --ink: #1c2530;
  --muted: #5b6572;
  --line: #d9dee4;
  --bg: #f7f8fa;
  --accent: #1e4d3b;
  --accent-ink: #ffffff;
  --urgent: #b3261e;
  --notable: #8a5a00;
  --routine: #3a6b3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.site-header {
  padding: 1rem 1.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.firm-name { font-weight: 600; }
.tagline { opacity: 0.85; font-size: 0.9rem; }

.container { max-width: 760px; margin: 0 auto; padding: 1.5rem; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.05rem; margin-top: 1.5rem; }

.chat { margin-bottom: 1rem; }

.bubble {
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
  max-width: 80%;
}
.bubble p { margin: 0.2rem 0 0; white-space: pre-wrap; }
.bubble-label { font-size: 0.75rem; color: var(--muted); }

.bubble-assistant { background: #eef1ee; }
.bubble-client { background: #e6eef7; margin-left: auto; }

label { display: block; font-weight: 600; margin: 0.6rem 0 0.25rem; }

input[type="text"], input[type="password"], textarea, input[type="file"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.btn-primary, .btn-secondary, .link-btn {
  margin-top: 0.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: #fff; border: 1px solid var(--accent); color: var(--accent); }
.link-btn { background: none; color: var(--muted); text-decoration: underline; padding: 0; margin: 0; font-size: 0.9rem; }

.upload-row { border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 0.75rem; }
.inline-form { display: inline; }

.error { color: var(--urgent); font-weight: 600; }

.site-footer { max-width: 760px; margin: 0 auto; padding: 0 1.5rem 2rem; color: var(--muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }

.severity-urgent { color: var(--urgent); font-weight: 600; }
.severity-notable { color: var(--notable); }
.severity-routine { color: var(--routine); }

.staff-nav { margin-bottom: 1rem; font-size: 0.9rem; }
.staff-nav a { color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}
