:root {
  --primary: #1B3A6B;
  --primary-hover: #152E56;
  --primary-soft: #EEF3F8;
  --gold: #C4A35A;
  --gold-hover: #B08D3E;
  --navy: #0B1C3A;
  --navy-2: #12284A;
  --bg: #F4F0E8;
  --surface: #FFFcf7;
  --text: #1A1F2E;
  --text-muted: #6B7280;
  --border: #E6DFD2;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --ink: #0B1C3A;
  --font-heading: "Merriweather", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 8px;
  --radius-lg: 14px;
  --sidebar-width: 248px;
  --header-height: 64px;
  --scroll-thumb: #C4A35A;
  --scroll-track: #15243d;
  --scroll-thumb-light: #C4A35A;
  --scroll-track-light: #1B3A6B;
  --content: 1200px;
  --shadow: 0 18px 50px rgba(11, 28, 58, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.02em; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
.logo-mark { height: 40px; width: 40px; display: block; }
.logo-mark--auth { height: 64px; width: 64px; margin-bottom: 1.25rem; }
.logo-mark--footer { height: 40px; width: 40px; }
.logo-mark--sidebar { height: 50px; width: 50px; flex-shrink: 0; }
.logo-link { display: inline-flex; }

.lang-switcher { display: inline-flex; position: relative; }
.flag-icon { display: block; width: 22px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn .bi { font-size: 1.05em; line-height: 1; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--border); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }

.form-group { margin-bottom: 0; }
.form-group label, .field-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; margin-bottom: 6px; }
.field-label .label-text, .field-label label { margin: 0; font-weight: 600; }
.field-label .req { color: var(--danger); }
.field-label .opt { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="search"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9ca3af; }
input:hover, select:hover, textarea:hover { border-color: #d4cbb8; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.14);
}
input[type="checkbox"], input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid #c9c0b0;
  background: #fff;
  vertical-align: middle;
  cursor: pointer;
}
input[type="checkbox"] { border-radius: 4px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--navy);
  border-color: var(--navy);
}
input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23C4A35A' stroke-width='2' d='M2 6.2l2.6 2.6L10 3.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
input[type="radio"]:checked {
  box-shadow: inset 0 0 0 4px var(--navy);
  background: #fff;
  border-color: var(--navy);
}
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.2);
}
.help-text, .muted, .subtitle { color: var(--text-muted); }
.form-error { color: var(--danger); }
.flash { padding: 12px; border-radius: var(--radius); margin-bottom: 1rem; }
.flash-success { background: #ecfdf5; color: var(--success); }
.empty-state { color: var(--text-muted); padding: 2rem 0; }

/* —— Public —— */
.layout-public { background: #fff; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
}
.header-inner {
  width: min(100%, var(--content));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.login-link { color: var(--text); font-weight: 600; text-decoration: none; }
.login-link:hover { color: var(--primary); }

.public-main { overflow-x: hidden; }
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: block;
  padding: 72px 32px 88px;
  color: #fff;
  isolation: isolate;
  width: 100%;
}
.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}
.hero-media {
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.hero-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 28, 58, 0.22) 0%, rgba(11, 28, 58, 0.72) 58%, rgba(11, 28, 58, 0.9) 100%),
    linear-gradient(90deg, rgba(196, 163, 90, 0.28), transparent 55%);
}
.hero-inner {
  width: min(100%, 42rem);
  min-width: 0;
  margin-left: max(0px, calc((100% - var(--content)) / 2));
}
.hero h1, .section h2 { overflow-wrap: break-word; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 4rem);
  line-height: 1.12;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-sub { font-size: 1.12rem; color: rgba(255, 255, 255, 0.86); max-width: 36rem; }
.hero-tagline, .hero-promise, .hero-principle { max-width: 36rem; color: rgba(255, 255, 255, 0.86); margin: 0; }
.hero-tagline { font-weight: 600; }
.hero-principle { font-style: italic; }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 500; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.section { padding: 88px 32px; }
.section-inner { width: min(100%, var(--content)); margin: 0 auto; min-width: 0; }
.section h2 { font-size: clamp(1.35rem, 3vw, 2.4rem); margin-bottom: 0.75rem; }
.section-lead { color: var(--text-muted); max-width: 40rem; margin: 0 0 32px; }
.steps { background: #fff; }
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.step-photo { width: 100%; max-width: 100%; height: 180px; object-fit: cover; }
.step-card h3, .step-card p, .step-num { padding-left: 20px; padding-right: 20px; }
.step-num {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}
.step-card h3 { margin: 8px 0 8px; font-size: 1.15rem; }
.step-card p { color: var(--text-muted); padding-bottom: 24px; margin: 0; }

.product-frame { background: var(--bg); }
.brief-frame {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.brief-frame__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
}
.brief-frame__cite {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.action-card--demo { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

.trust { background: #fff; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 36px 0 8px;
}
.trust-grid article {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
}
.trust-grid h3 { font-size: 1.15rem; }
.trust-grid p { margin: 0; color: var(--text-muted); }

.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 32px 32px; }
.footer-inner { width: min(100%, var(--content)); margin: 0 auto; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; color: var(--text-muted); }
.footer-col li { margin-bottom: 8px; }
.brand-col p { color: var(--text-muted); max-width: 28rem; }
.footer-legal {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* —— Auth —— */
.layout-auth { min-height: 100vh; background: var(--surface); }
.auth-layout { display: flex; min-height: 100vh; }
.auth-brand-panel {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: min(44vw, 520px);
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  padding: 64px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  color: #fff;
}
.auth-brand-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(11, 31, 30, 0.25) 0%, rgba(11, 31, 30, 0.78) 100%);
}
.brand-content { position: relative; z-index: 1; max-width: 22rem; }
.brand-tagline { font-size: 1.15rem; line-height: 1.45; color: rgba(255, 255, 255, 0.92); margin: 0 0 20px; }
.auth-brand-panel .icon-btn { color: #fff; background: rgba(255, 255, 255, 0.1); }
.auth-brand-panel .dropdown-panel { color: var(--text); }
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--surface);
}
.login-form { width: 100%; max-width: 400px; }
.login-form h2 { font-size: 2rem; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 0.9rem; }

/* —— App shell —— */
.layout-app { display: flex; height: 100vh; min-height: 100vh; overflow: hidden; background: var(--bg); }
.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--navy);
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 10px;
  overflow: hidden;
  isolation: isolate;
  flex-shrink: 0;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/sidebar-law.jpg") 62% 100% / cover no-repeat;
  opacity: 0.22;
  mix-blend-mode: lighten;
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px 8px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wordmark {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.wordmark span { color: var(--gold); }
.brand-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
.sidebar-nav::-webkit-scrollbar { width: 12px; }
.sidebar-nav::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 8px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
  border: 2px solid var(--scroll-track);
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--gold-hover); }
.nav-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 8px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-item .bi { width: 1.1rem; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.sidebar-utility {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  font-size: 1.4rem;
  padding: 0;
}
.icon-btn:hover, .icon-btn.is-active, .icon-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.icon-btn[data-tooltip]::after,
.hint .hint-tip {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #0b1c3a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.icon-btn[data-tooltip]::after { content: attr(data-tooltip); }
.icon-btn:hover::after, .icon-btn:focus-visible::after { opacity: 1; visibility: visible; }
.sidebar-bottom { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.account-switcher { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  flex-shrink: 0;
}
.account-name { display: block; font-weight: 600; color: #fff; }
.office-name { display: block; font-size: 0.8rem; color: #9ca3af; }
.sign-out { font-size: 0.85rem; color: var(--gold); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.layout-app .header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.header-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  min-width: 0;
  max-width: 38%;
  flex-shrink: 1;
  overflow: hidden;
}
.crumb-home {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.crumb-home:hover, .crumb-home.is-current { color: var(--navy); background: var(--primary-soft); }
.crumb-trail {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.crumb-trail:not(:has(a, span)) { display: none; }
.header-breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.header-breadcrumbs a:hover { color: var(--navy); }
.separator {
  margin: 0 6px;
  font-size: 0;
  width: 10px;
  display: inline-flex;
  align-items: center;
  color: #c4bba8;
  flex-shrink: 0;
}
.separator::before {
  content: "\F285";
  font-family: "bootstrap-icons";
  font-size: 0.7rem;
}
.crumb-trail a, .crumb-trail > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22ch;
}
.crumb-trail > span:last-child {
  font-weight: 600;
  color: var(--text);
  max-width: 18ch;
}
.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.workspace-search { position: relative; width: 360px; flex: none; }
.top-search {
  position: relative;
  width: 100%;
}
.top-search .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.top-search input {
  min-height: 40px;
  border-radius: 999px;
  background: #F7F4EE;
  border: 1px solid transparent;
  padding-left: 38px;
  box-shadow: none;
}
.top-search input:hover { border-color: transparent; box-shadow: none; }
.top-search:focus-within input {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.35);
}
.dropdown { position: relative; display: inline-flex; }
.header-user { position: relative; flex-shrink: 0; }
.header-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 999px;
}
.header-user-btn:hover, .header-user-btn[aria-expanded="true"] { background: var(--primary-soft); }
.header-user-name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-panel {
  position: absolute;
  top: 100%;
  z-index: 40;
  min-width: 220px;
  margin-top: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.dropdown-panel--end { right: 0; left: auto; }
.dropdown-panel--up {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  margin-top: 0;
}
.lang-switcher .dropdown-panel--up { left: auto; right: 0; }
.sidebar-utility .lang-switcher { position: static; }
.sidebar-utility .lang-switcher .dropdown-panel--up {
  left: 0;
  right: 0;
  min-width: 0;
}
.dropdown-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.dropdown-meta span { color: var(--text-muted); font-size: 0.82rem; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dropdown-item:hover, .dropdown-item.is-active { background: var(--primary-soft); }
.dropdown-item.is-active { font-weight: 600; }
.main-content {
  padding: 16px 24px 40px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb-light) var(--scroll-track-light);
}
.main-content::-webkit-scrollbar { width: 12px; }
.main-content::-webkit-scrollbar-track { background: var(--scroll-track-light); border-radius: 8px; }
.main-content::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb-light);
  border-radius: 8px;
  border: 2px solid var(--scroll-track-light);
}
.main-content::-webkit-scrollbar-thumb:hover { background: var(--gold-hover); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.avatar--header {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.dash-top {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
  align-items: stretch;
}
.dash-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(255, 252, 247, 0.94) 0 55%, rgba(255, 252, 247, 0.28) 78%, transparent 100%),
    linear-gradient(180deg, #d8c9a4 0%, #8a7348 42%, #1b3a6b 100%);
  background-position: left center, right center;
  background-size: cover;
  border-radius: 18px;
  padding: 22px 24px;
  min-height: 0;
  overflow: hidden;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.dash-kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-hover);
}
.dash-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 6px;
  color: var(--navy);
}
.dash-title span { color: var(--gold); }
.dash-tag {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--navy);
}
.dash-lead { margin: 0 0 8px; max-width: 36rem; color: #3b4458; }
.dash-manifesto {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
}
.dash-manifesto span { margin-right: 0.35rem; }
.dash-manifesto strong { color: var(--gold-hover); }

.dash-associates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}
.dash-associates--page { grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; }
.assoc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(11, 28, 58, 0.04);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: start;
}
.assoc-card:hover { border-color: var(--gold); }
.assoc-card h2 { font-size: 0.95rem; margin: 0 0 2px; grid-column: 2; }
.assoc-card p { margin: 0; color: var(--text-muted); font-size: 0.8rem; grid-column: 2; }
.assoc-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  grid-row: 1 / span 2;
}
.assoc-icon--criminal { background: #fde8e8; color: #b42318; }
.assoc-icon--civil { background: #e8eef8; color: var(--primary); }
.assoc-icon--commercial { background: #eaf6ef; color: var(--success); }
.assoc-icon--more { background: #f4eee2; color: var(--gold-hover); }

.dash-boards {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
}
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px 18px;
  min-height: 280px;
}
.dash-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-panel__head h2 { margin: 0; font-size: 1.05rem; }
.case-mini { list-style: none; padding: 0; margin: 0; }
.case-mini li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.case-mini li:last-child { border-bottom: 0; }
.case-mini a { text-decoration: none; color: inherit; min-width: 0; }
.case-mini__title { display: block; font-weight: 600; }
.case-mini__meta { display: block; font-size: 0.78rem; color: var(--text-muted); }
.badge-active { background: #ecfdf5; color: var(--success); }
.dropzone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  min-height: 148px;
  padding: 20px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #FBF8F1;
}
.dropzone-card:hover { border-color: var(--gold); background: #fff; }
.dropzone-card .bi { font-size: 1.8rem; color: var(--gold); }
.dropzone-card strong { font-size: 0.95rem; }
.dropzone-card span { font-size: 0.8rem; color: var(--text-muted); }
.drop-or {
  text-align: center;
  margin: 12px 0 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: lowercase;
}
.describe-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.describe-link:hover { border-color: var(--gold); }
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-feed li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-feed li:last-child { border-bottom: 0; }
.activity-feed a { text-decoration: none; font-weight: 600; }
.activity-feed .muted { display: block; font-size: 0.78rem; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 7px;
  flex-shrink: 0;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.content-header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}
.content-header h1 { font-size: 1.5rem; margin: 0; }
.content-header .subtitle { margin: 0; font-size: 0.92rem; }

.case-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-header, .case-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
}
.list-header { font-weight: 600; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.case-row { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border); }
.case-row:last-child { border-bottom: 0; }
.case-row:hover { background: var(--primary-soft); }
.case-sig { display: block; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.case-name { display: block; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-critical { background: #fef2f2; color: var(--danger); }
.badge-significant { background: #fffbeb; color: var(--warning); }
.badge-minor { background: #f3f4f6; color: var(--text-muted); }

.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}
.panel-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-header h2 { font-size: 1.1rem; margin: 0; }
.panel-body { padding: 16px 20px; }
.doc-list, .member-list { list-style: none; padding: 0; margin: 0; }
.doc-item, .member-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: center; }
.member-list li:last-child { border-bottom: 0; }

.doc-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.doc-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: #fff;
  align-items: center;
}
.doc-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.doc-card__label { font-weight: 700; grid-column: 1; grid-row: 1; }
.doc-card__file { grid-column: 1; grid-row: 2; font-size: 0.85rem; }
.doc-card .badge { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; }

.form-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 16px;
  width: 100%;
  align-items: start;
}
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 0;
}
.form-section--wide,
.form-actions--wide { grid-column: 1 / -1; }
.form-section h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group--full { grid-column: 1 / -1; }
.chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: #fff;
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:hover { border-color: var(--gold); }
.chip:has(input:checked) {
  border-color: var(--navy);
  background: var(--primary-soft);
}
.chip .bi { color: var(--primary); }
.seg-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg-radio label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 4px 4px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
}
.seg-radio label:has(input:checked) {
  font-weight: 700;
}
.hint { position: relative; display: inline-flex; }
.hint-btn {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}
.hint .hint-tip {
  left: 0;
  transform: none;
  white-space: normal;
  width: max-content;
  max-width: 18rem;
  bottom: calc(100% + 6px);
}
.hint:hover .hint-tip, .hint:focus-within .hint-tip { opacity: 1; visibility: visible; }
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start;
}
.upload-grid__file,
.upload-grid .form-actions { grid-column: 1 / -1; }
.rv-file-field { display: grid; gap: 8px; position: relative; }
.rv-field__label { font-weight: 600; }
.rv-file-field__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.rv-file-field__trigger {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
}
.rv-file-field__trigger:hover,
.rv-file-field.is-dragover .rv-file-field__trigger {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.rv-file-field.has-error .rv-file-field__trigger { border-color: var(--danger); }
.rv-file-field__prompt { margin: 0; font-size: 0.95rem; font-weight: 600; }
.rv-file-field__limits { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.rv-file-field__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-file-field.has-file .rv-file-field__trigger { border-style: solid; }
.rv-file-field__errors {
  margin: 0;
  padding: 10px 12px 10px 28px;
  color: var(--danger);
  background: #fef2f2;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.btn .bi { font-size: 1.05em; line-height: 1; }
.doc-inbox .list-header, .doc-inbox .case-row {
  grid-template-columns: 1.4fr 1.6fr 0.8fr;
}
.checkbox-group { display: flex; gap: 10px; align-items: flex-start; }
.stack-form, .form-actions { display: flex; flex-direction: column; gap: 12px; }
.form-catalog .form-actions { max-width: none; }
.form-actions { flex-direction: row; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-form input, .row-form select { width: auto; min-width: 12rem; }
.inline-form { display: inline; }
.text-button {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.code-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}
.brief-frame__bar .code-badge { background: rgba(94, 234, 212, 0.18); color: #99f6e4; }
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.action-header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.action-header h3 { margin: 0; font-size: 1.15rem; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 16px; }
.action-grid dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.action-grid dd { margin: 0; }

.brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 16px; margin-bottom: 24px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr)); gap: 16px; margin-bottom: 24px; }
.brief-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.brief-block h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
  font-family: var(--font-body);
}
.brief-block p { margin: 0 0 0.75rem; }
.brief-block p:last-child { margin-bottom: 0; }
.brief-courses-title { font-size: 1.35rem; margin: 8px 0 16px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.codebook-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }

.empty-plate {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px 40px;
  max-width: 44rem;
  margin: 0 auto;
  width: 100%;
}
.empty-plate img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.empty-plate p { color: var(--text-muted); margin: 0 0 16px; }
.empty-plate--inline { margin: 0; max-width: none; padding: 20px; }
.empty-plate--inline img { max-height: 140px; }

.office-logo { max-height: 72px; width: auto; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.stat-card strong { display: block; font-size: 1.6rem; }
.stat-card span { color: var(--text-muted); font-size: 0.85rem; }
.todo-list, .activity-list { list-style: none; padding: 0; margin: 0; }
.todo-list li, .activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-weekdays span {
  font-size: 0.68rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-align: center;
  padding: 4px 0;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cal-nav h2 { margin: 0; font-size: 1.1rem; text-align: center; flex: 1; }
.cal-nav-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
}
.cal-nav-btn:hover:not(:disabled) { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.cal-nav-btn:disabled { opacity: 0.45; cursor: default; }
.cal-day {
  min-height: 88px;
  border: 1px solid #ddd4c4;
  border-radius: var(--radius);
  padding: 6px;
  background: #FBF8F1;
}
.cal-day.is-out { background: #f3eee4; color: var(--text-muted); }
.cal-day.is-weekend { background: #f4ead6; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-day:hover { border-color: var(--gold); }
.cal-num { display: block; font-weight: 700; font-size: 0.8rem; margin-bottom: 4px; color: var(--navy); }
.cal-event {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 2px 6px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--primary-soft);
  color: var(--primary);
}
.cal-event--hearing { background: #e8eef8; color: var(--primary); }
.cal-event--meeting { background: #eaf6ef; color: var(--success); }
.cal-event--deadline { background: #fde8e8; color: #b42318; }
.compose-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.wa-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  position: relative;
  font-size: 1.25rem;
  padding: 0;
}
.header-icon-btn:hover,
.header-icon-btn[aria-expanded="true"] { background: var(--primary-soft); }
.header-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.notify-panel { min-width: 340px; }
.notify-list { list-style: none; padding: 0; margin: 0; }
.notify-list li {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.notify-list li:last-child { border-bottom: 0; }
.notify-list p { margin: 2px 0 0; color: var(--text-muted); font-size: 0.82rem; }
.notify-list time { font-size: 0.72rem; color: var(--text-muted); }
.notify-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-top: 7px;
  flex-shrink: 0;
}
.notify-dot--gold { background: var(--gold); }
.notify-dot--navy { background: var(--navy); }

.cal-panel { width: 440px; max-width: calc(100vw - 32px); padding: 12px; }
.cal-nav--compact { margin-bottom: 8px; }
.cal-nav--compact h2 { font-size: 0.95rem; }
.cal-grid--mini .cal-day { min-height: 42px; padding: 4px; }
.cal-grid--mini .cal-event { font-size: 0.58rem; padding: 1px 4px; }
.cal-upcoming { list-style: none; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px solid var(--border); }
.cal-upcoming li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.cal-upcoming span { display: block; font-size: 0.78rem; color: var(--text-muted); }
.cal-count {
  flex-shrink: 0;
  min-width: 4.5rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.cal-count--today { background: #fde8e8; color: #b42318; }
.cal-count--later { background: #f4eee2; color: var(--gold-hover); }

.search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 32rem);
  overflow: auto;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb-light) var(--scroll-track-light);
}
.search-panel__hint { margin: 0 8px 8px; font-size: 0.78rem; color: var(--text-muted); }
.search-group { margin-bottom: 8px; }
.search-group h3 {
  margin: 0 8px 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-family: var(--font-body);
}
.search-hit {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.search-hit:hover, .search-hit.is-active { background: var(--primary-soft); }
.search-hit img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}
.search-hit strong { display: block; font-size: 0.92rem; }
.search-hit__quote {
  display: block;
  margin: 4px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
.search-hit__quote mark {
  background: rgba(196, 163, 90, 0.35);
  color: inherit;
  padding: 0 2px;
}
.search-hit__meta { display: flex; gap: 8px; align-items: center; font-size: 0.78rem; color: var(--text-muted); }

.docsgen-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.docsgen-status.is-ready { border-color: #a7f3d0; background: #ecfdf5; }
.docsgen-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}
.docsgen-status.is-ready .docsgen-dot { background: var(--success); }

.agent-console {
  background: #071224;
  color: #d6deea;
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 24rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.agent-playground {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 960px) {
  .agent-playground { grid-template-columns: 1fr 1fr; align-items: start; }
}
.agent-playground__form,
.agent-response {
  border: 1px solid #1d2e4a;
  border-radius: 8px;
  background: #0c1a30;
  padding: 12px;
}
.agent-playground__form .form-group { margin-bottom: 10px; }
.agent-playground label { color: #d6deea; font-family: var(--font-sans); }
.agent-playground select,
.agent-playground textarea {
  background-color: #0f1d33;
  color: #fff;
  border-color: #243552;
  font-family: inherit;
}
.agent-playground select:hover,
.agent-playground textarea:hover { border-color: #3a5478; }
.agent-playground select:focus,
.agent-playground textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.agent-playground textarea[name="context"] { min-height: 10rem; }
.agent-playground textarea[name="prompt"] { min-height: 8rem; }
.agent-playground__hint {
  color: #8ea0bb;
  font-size: 0.75rem;
  margin: 4px 0 0;
  font-weight: 400;
  font-family: var(--font-sans);
}
.agent-playground__error {
  background: #3a1520;
  color: #f3c4ce;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 10px;
  font-family: var(--font-sans);
}
.agent-playground__form h2,
.agent-response h2 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  font-family: var(--font-sans);
  color: #fff;
}
.agent-response pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #06101f;
  padding: 8px;
  border-radius: 6px;
  color: #c9d6e8;
  max-height: 28rem;
  overflow: auto;
  margin: 8px 0 0;
}
.agent-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.agent-toolbar select {
  width: auto;
  min-height: 36px;
  background-color: #0f1d33;
  color: #fff;
  border-color: #243552;
}
.agent-feed { display: flex; flex-direction: column; gap: 8px; }
.agent-row {
  border: 1px solid #1d2e4a;
  border-radius: 8px;
  background: #0c1a30;
  overflow: hidden;
}
.agent-row__head {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.agent-row__role { color: var(--gold); font-weight: 700; }
.agent-row__meta { color: #8ea0bb; }
.agent-row__status { margin-left: auto; }
.agent-row__body {
  display: none;
  padding: 0 10px 10px;
  border-top: 1px solid #1d2e4a;
}
.agent-row.is-open .agent-row__body { display: block; }
.agent-row pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #06101f;
  padding: 8px;
  border-radius: 6px;
  color: #c9d6e8;
}

.doc-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 20rem;
}

@media (max-width: 900px) {
  .site-header { padding: 0 16px; height: auto; min-height: var(--header-height); }
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
  }
  .header-actions .btn,
  .header-actions .login-link { display: none; }
  .header-actions { justify-self: end; margin: 0; gap: 8px; }
  .nav-links { grid-column: 1 / -1; width: 100%; gap: 16px; }
  .hero { padding: 48px 16px 56px; min-height: 70vh; }
  .hero h1 { font-size: 1.65rem; line-height: 1.2; }
  .hero-sub { font-size: 0.98rem; }
  .section h2 { font-size: 1.45rem; }
  .section { padding: 48px 16px; }
  .step-grid, .trust-grid, .footer-cols, .content-grid, .action-grid, .form-catalog, .form-grid, .form-grid--3, .chip-grid, .upload-grid, .stats-grid, .cal-weekdays, .cal-grid, .dash-top, .dash-associates, .dash-associates--page, .dash-boards, .courses-grid { grid-template-columns: 1fr; }
  .header-user-name { display: none; }
  .header-breadcrumbs { max-width: none; }
  .auth-layout { flex-direction: column; }
  .auth-brand-panel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 280px;
    max-height: none;
    padding: 32px;
  }
  .layout-app { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; position: relative; }
  .sidebar-nav { flex-direction: row; flex: 1; overflow-x: auto; overflow-y: hidden; }
  .sidebar-utility { margin-top: 0; }
  .sidebar-bottom { margin-top: 0; flex-direction: row; align-items: center; }
  .workspace-search { width: 220px; }
  .search-panel { width: calc(100vw - 24px); }
  .header-user-name { display: none; }
  .main-content { padding: 20px 16px 32px; }
  .list-header, .case-row, .doc-inbox .list-header, .doc-inbox .case-row { grid-template-columns: 1fr; }
  .list-header { display: none; }
}
