:root {
  --ink: #18211c;
  --muted: #68736c;
  --paper: #f4f2eb;
  --paper-2: #ebe8de;
  --green: #1e5f48;
  --green-deep: #12392d;
  --lime: #b7d56b;
  --line: rgba(24, 33, 28, .13);
  --white: #fffefa;
  --shadow: 0 22px 65px rgba(24, 33, 28, .13);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button, textarea { font: inherit; }
button { color: inherit; }

body.auth-pending .shell,
body.auth-login .shell { display: none; }
body.authenticated .login-view { display: none; }
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(420px, .9fr);
  background: var(--white);
}
.login-art {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 45px clamp(40px, 6vw, 90px);
  color: #f4f0e7;
  background:
    radial-gradient(circle at 75% 25%, rgba(183,213,107,.14), transparent 27%),
    linear-gradient(145deg, #17271f, #0b1410 72%);
}
.login-brand { display: flex; align-items: center; gap: 12px; font: 22px Georgia, serif; }
.login-brand span, .login-seal {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(183,213,107,.45);
  border-radius: 50%;
  color: var(--lime);
}
.login-copy { margin: auto 0; max-width: 690px; }
.login-copy .eyebrow { color: var(--lime); }
.login-copy h1 { margin: 20px 0; font: 500 clamp(42px, 5.3vw, 76px)/1.02 Georgia, serif; letter-spacing: -.04em; }
.login-copy h1 em { color: var(--lime); font-weight: 500; }
.login-copy p { max-width: 560px; color: #acb6af; line-height: 1.7; }
.login-foot { color: #758078; font-size: 11px; letter-spacing: .08em; }
.login-form-side { display: grid; place-items: center; padding: 35px; background: var(--paper); }
.login-form { width: min(390px, 100%); }
.login-seal { margin-bottom: 30px; border-color: rgba(30,95,72,.3); color: var(--green); font: 22px Georgia, serif; }
.login-form h2 { margin: 8px 0 10px; font: 40px Georgia, serif; letter-spacing: -.025em; }
.login-form > p { margin: 0 0 30px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-form label, .modal-card label, .user-form label {
  display: grid; gap: 8px; margin-bottom: 16px;
  color: #4d5b53; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.login-form input, .modal-card input, .user-form input {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 9px;
  outline: 0; color: var(--ink); background: var(--white);
  font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none;
}
.login-form input:focus, .modal-card input:focus, .user-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,95,72,.08); }
.primary-button { width: 100%; padding: 13px 17px; border: 0; border-radius: 9px; color: white; background: var(--green); font-weight: 700; cursor: pointer; }
.primary-button:disabled { opacity: .55; cursor: default; }
.form-error { min-height: 18px; margin: 5px 0 10px; color: #a33f35; font-size: 12px; line-height: 1.45; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  color: #f6f2e9;
  background:
    radial-gradient(circle at 10% 15%, rgba(183,213,107,.11), transparent 31%),
    linear-gradient(165deg, #17241d, #0d1612);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 13px; }
.mark {
  display: grid; place-items: center;
  width: 43px; height: 43px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 50%;
  color: var(--lime);
  font-family: Georgia, serif;
  font-size: 24px;
}
.brand h1 { margin: 0; font: 600 22px/1 Georgia, serif; letter-spacing: .02em; }
.brand p { margin: 5px 0 0; color: #9faa9f; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.new-chat {
  margin-top: 40px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  color: #f8f5ee;
  background: rgba(255,255,255,.055);
  text-align: left;
  cursor: pointer;
}
.new-chat:hover { background: rgba(255,255,255,.1); }
.new-chat span { margin-right: 9px; color: var(--lime); }
.status-card {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.status-line { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #df9b59; box-shadow: 0 0 0 5px rgba(223,155,89,.12); }
.status-dot.ready { background: var(--lime); box-shadow: 0 0 0 5px rgba(183,213,107,.12); }
.status-dot.error { background: #e37767; box-shadow: 0 0 0 5px rgba(227,119,103,.12); }
.status-card > p { min-height: 34px; margin: 11px 0 18px; color: #a9b2ab; font-size: 12px; line-height: 1.5; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metrics div { display: flex; flex-direction: column; padding: 10px; border-radius: 9px; background: rgba(0,0,0,.14); }
.metrics strong { font: 24px/1 Georgia, serif; color: #fff; }
.metrics span { margin-top: 6px; color: #8f9c93; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.text-button { margin-top: 15px; padding: 0; border: 0; color: var(--lime); background: none; font-size: 12px; cursor: pointer; }
.privacy { display: flex; gap: 12px; margin-top: auto; color: #bdc4bf; }
.privacy .lock { color: var(--lime); font-size: 9px; padding-top: 4px; }
.privacy strong { color: #e9ece9; font-size: 12px; }
.privacy p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }

.main {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(rgba(24,33,28,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,33,28,.025) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 25px 38px 19px;
  border-bottom: 1px solid var(--line);
  background: rgba(244,242,235,.82);
  backdrop-filter: blur(15px);
  z-index: 5;
}
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.topbar h2 { margin: 4px 0 0; font: 500 21px/1.2 Georgia, serif; }
.model-badge { margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.4); font-size: 11px; }
.account-button { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer; font-size: 11px; }
.account-button > span:first-child { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: white; background: var(--green); font: 12px Georgia, serif; }
.account-menu {
  position: absolute; top: 72px; right: 36px;
  display: none; width: 215px; padding: 9px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); box-shadow: var(--shadow); z-index: 30;
}
.account-menu.open { display: block; }
.account-menu > div { display: grid; gap: 3px; padding: 9px 10px 12px; border-bottom: 1px solid var(--line); }
.account-menu small { color: var(--muted); }
.account-menu button { width: 100%; padding: 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; font-size: 12px; }
.account-menu button:hover { background: var(--paper); }
.menu-button { display: none; border: 0; background: transparent; font-size: 20px; }
.messages { min-height: 0; overflow: auto; padding: 42px max(42px, calc((100vw - 300px - 850px)/2)); }
.welcome { max-width: 810px; margin: 5vh auto 0; text-align: center; }
.welcome-orbit {
  position: relative;
  display: grid; place-items: center;
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border: 1px solid rgba(30,95,72,.2);
  border-radius: 50%;
}
.welcome-orbit::before, .welcome-orbit::after {
  content: ""; position: absolute; inset: -9px;
  border: 1px solid rgba(30,95,72,.09); border-radius: 50%;
}
.welcome-orbit::after { inset: 14px; background: var(--green); box-shadow: 0 9px 30px rgba(30,95,72,.2); }
.welcome-orbit span { z-index: 1; color: white; font: 26px Georgia, serif; }
.welcome h3 { margin: 16px 0; font: 500 clamp(34px, 4.3vw, 57px)/1.08 Georgia, serif; letter-spacing: -.035em; }
.welcome h3 em { color: var(--green); font-weight: 500; }
.welcome > p { max-width: 610px; margin: 0 auto; color: var(--muted); line-height: 1.7; font-size: 15px; }
.suggestions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 34px; }
.suggestions button {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.48);
  color: #4e5a53;
  font-size: 12px;
  cursor: pointer;
}
.suggestions button:hover { border-color: rgba(30,95,72,.35); background: var(--white); }
.message { display: flex; gap: 14px; max-width: 850px; margin: 0 auto 26px; }
.message.user { justify-content: flex-end; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: white; font: 15px Georgia, serif; }
.bubble { max-width: min(710px, 82%); padding: 16px 18px; border-radius: 4px 16px 16px 16px; background: var(--white); box-shadow: 0 8px 30px rgba(24,33,28,.06); line-height: 1.65; font-size: 14px; white-space: pre-wrap; }
.user .bubble { border-radius: 16px 16px 4px 16px; color: #f9fbf9; background: var(--green); box-shadow: 0 8px 28px rgba(30,95,72,.15); }
.bubble p:first-child { margin-top: 0; }
.bubble p:last-child { margin-bottom: 0; }
.citation { display: inline-flex; align-items: center; justify-content: center; min-width: 27px; height: 20px; margin: 0 2px; padding: 0 5px; border: 0; border-radius: 5px; background: #dfe9d2; color: var(--green-deep); font-size: 10px; font-weight: 800; cursor: pointer; vertical-align: .08em; }
.sources-button { display: block; margin-top: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); background: #f5f6ef; font-size: 11px; font-weight: 700; cursor: pointer; }
.thinking .bubble { color: var(--muted); }
.thinking-dots span { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: var(--green); animation: pulse 1.1s infinite ease-in-out; }
.thinking-dots span:nth-child(2) { animation-delay: .15s; }
.thinking-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.composer-wrap { padding: 16px max(42px, calc((100vw - 300px - 850px)/2)) 20px; background: linear-gradient(transparent, var(--paper) 22%); }
.composer { display: flex; align-items: flex-end; gap: 12px; max-width: 850px; margin: 0 auto; padding: 10px 10px 10px 18px; border: 1px solid rgba(24,33,28,.19); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
.composer:focus-within { border-color: rgba(30,95,72,.55); box-shadow: 0 22px 65px rgba(24,33,28,.1), 0 0 0 3px rgba(30,95,72,.07); }
.composer textarea { width: 100%; max-height: 160px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); line-height: 1.5; }
.composer textarea::placeholder { color: #909891; }
.composer > button { flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 11px; color: white; background: var(--green); font-size: 22px; cursor: pointer; }
.composer > button:disabled { opacity: .45; cursor: default; }
.hint { margin: 9px auto 0; max-width: 850px; color: #8b938d; text-align: center; font-size: 10px; }

.source-panel { position: fixed; inset: 0 0 0 auto; width: min(470px, 94vw); padding: 28px; background: var(--white); box-shadow: -20px 0 70px rgba(24,33,28,.18); transform: translateX(105%); transition: transform .25s ease; z-index: 50; overflow: auto; }
.source-panel.open { transform: translateX(0); }
.source-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.source-head h3 { margin: 6px 0 0; font: 28px Georgia, serif; }
.source-head button { border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.source-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.source-ref { display: inline-block; padding: 4px 7px; border-radius: 5px; color: var(--green); background: #e2ebd8; font-size: 10px; font-weight: 800; }
.source-item h4 { margin: 10px 0 5px; font-size: 14px; overflow-wrap: anywhere; }
.source-item small { color: var(--green); }
.source-item p { color: var(--muted); font: 13px/1.6 Georgia, serif; }
.scrim { position: fixed; inset: 0; visibility: hidden; opacity: 0; background: rgba(8,14,11,.35); transition: opacity .2s; z-index: 40; }
.scrim.open { visibility: visible; opacity: 1; }
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: none; place-items: center; padding: 20px;
  background: rgba(8,14,11,.55); backdrop-filter: blur(4px);
}
.modal.open { display: grid; }
.modal-card { width: min(440px, 100%); padding: 28px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow); }
.modal-card.wide { width: min(820px, 100%); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.modal-head h3 { margin: 6px 0 0; font: 29px Georgia, serif; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.modal-card > small { display: block; margin: -7px 0 15px; color: var(--muted); }
.user-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 17px; border-radius: 12px; background: var(--paper); }
.user-form .check-label { display: flex; align-items: center; gap: 8px; align-self: center; text-transform: none; letter-spacing: 0; }
.user-form .check-label input { width: auto; }
.user-form .primary-button { align-self: end; margin-bottom: 16px; }
.user-form .form-error { grid-column: 1 / -1; }
.user-list { margin-top: 20px; }
.user-row { display: grid; grid-template-columns: 1.2fr .8fr auto; align-items: center; gap: 15px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.user-row strong { display: block; font-size: 13px; }
.user-row small { color: var(--muted); }
.role-badge { justify-self: start; padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e2ebd8; font-size: 10px; font-weight: 800; }
.state-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); cursor: pointer; font-size: 11px; }
.state-button.off { color: #a33f35; }

.admin-card {
  width: min(1080px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 30px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.admin-tabs {
  display: flex;
  gap: 4px;
  margin: -5px 0 24px;
  padding: 4px;
  border-radius: 10px;
  background: var(--paper);
}
.admin-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.admin-tab.active { color: var(--green-deep); background: var(--white); box-shadow: 0 3px 12px rgba(24,33,28,.07); }
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.index-hero {
  padding: 24px;
  border-radius: 15px;
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(183,213,107,.2), transparent 30%),
    var(--green-deep);
}
.index-hero > div:first-child { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 9px 18px; }
.index-phase { align-self: center; justify-self: start; padding: 5px 8px; border-radius: 999px; color: #dce7d5; background: rgba(255,255,255,.1); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.index-phase.ready { color: #1d4a38; background: var(--lime); }
.index-phase.error { color: white; background: #b85145; }
.index-phase.waiting { color: #312a17; background: #e8c978; }
.index-hero strong { justify-self: end; font: 44px/1 Georgia, serif; }
.index-hero p { grid-column: 1 / -1; margin: 0; color: #b7c5bc; font-size: 12px; }
.index-progress-track { height: 8px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); }
.index-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width .45s ease; }
.index-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.index-stat-grid article { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fafaf7; }
.index-stat-grid span, .index-stat-grid small { display: block; color: var(--muted); font-size: 10px; }
.index-stat-grid span { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.index-stat-grid strong { display: block; margin: 10px 0 6px; color: var(--green-deep); font: 27px/1 Georgia, serif; }
.index-service-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; }
.index-service-row > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; min-width: 0; }
.index-service-row strong { font-size: 11px; }
.index-service-row small { grid-column: 2; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-dot { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; background: #d7a349; box-shadow: 0 0 0 4px rgba(215,163,73,.12); }
.service-dot.online { background: #79a43f; box-shadow: 0 0 0 4px rgba(121,164,63,.12); }
.service-dot.offline { background: #c65d50; box-shadow: 0 0 0 4px rgba(198,93,80,.12); }
.active-document { position: relative; padding: 18px 20px 18px 24px; overflow: hidden; border-radius: 12px; background: #edf1e7; }
.active-document::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--green); }
.active-document strong { display: block; margin: 7px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.active-document small { color: var(--muted); }
.index-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 27px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-title h4 { margin: 4px 0 0; font: 20px Georgia, serif; }
.format-progress-list { display: grid; gap: 9px; }
.format-progress-item { display: grid; grid-template-columns: 45px 1fr 72px; align-items: center; gap: 10px; }
.format-progress-item > span { color: var(--green-deep); font-size: 10px; font-weight: 800; }
.format-progress-item > div { height: 6px; overflow: hidden; border-radius: 999px; background: #eaebe5; }
.format-progress-item i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.format-progress-item small { color: var(--muted); text-align: right; font-size: 10px; }
.recent-index-list { max-height: 250px; overflow: auto; }
.recent-index-item { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recent-check { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: var(--green); background: #e2ebd8; font-size: 10px; font-weight: 900; }
.recent-index-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.recent-index-item small { color: var(--muted); font-size: 9px; }
.index-errors { margin-top: 27px; padding-top: 23px; border-top: 1px solid var(--line); }
.error-count { display: grid; place-items: center; min-width: 29px; height: 29px; padding: 0 7px; border-radius: 999px; color: #963f36; background: #f6dfdb; font-size: 11px; font-weight: 800; }
.index-error-item { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.index-error-item strong { display: block; font-size: 11px; }
.index-error-item small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.index-error-item p { margin: 0; color: #8d4139; font-size: 11px; line-height: 1.45; }
.legal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 14px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fafaf7; }
.legal-toolbar > div { display: grid; gap: 5px; min-width: 0; }
.legal-toolbar a { overflow: hidden; color: var(--green-deep); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.legal-toolbar .primary-button { width: auto; flex: 0 0 auto; }
.legal-hero .index-progress-track span { background: #b9db68; }
.legal-stat-grid strong { font-size: 25px; }
.source-official-link { display: inline-block; margin-top: 8px; color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
.source-official-link:hover { text-decoration: underline; }
.empty-state { margin: 0; padding: 16px; border-radius: 9px; color: var(--muted); background: var(--paper); font-size: 11px; }
.empty-state.success { color: var(--green); background: #edf1e7; }

@media (max-width: 800px) {
  .login-view { display: block; background: var(--paper); }
  .login-art { min-height: 250px; padding: 28px; }
  .login-copy { margin: 55px 0 20px; }
  .login-copy h1 { font-size: 38px; }
  .login-copy p, .login-foot { display: none; }
  .login-form-side { padding: 35px 22px 55px; }
  .shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main { min-height: 100vh; }
  .menu-button { display: block; }
  .topbar { padding: 18px; }
  .model-badge { display: none; }
  .account-button > span:last-child { display: none; }
  .account-menu { top: 64px; right: 12px; }
  .messages { padding: 28px 16px; }
  .welcome { margin-top: 2vh; }
  .suggestions { grid-template-columns: 1fr; }
  .composer-wrap { padding: 14px 14px 18px; }
  .bubble { max-width: 88%; }
  .user-form { grid-template-columns: 1fr; }
  .user-form .form-error { grid-column: 1; }
  .user-row { grid-template-columns: 1fr auto; }
  .role-badge { display: none; }
  .admin-card { max-height: 94vh; padding: 20px 16px; }
  .index-stat-grid { grid-template-columns: 1fr 1fr; }
  .index-service-row, .index-detail-grid { grid-template-columns: 1fr; }
  .index-service-row { gap: 12px; }
  .index-error-item { grid-template-columns: 1fr; gap: 6px; }
  .index-hero strong { font-size: 34px; }
  .legal-toolbar { align-items: stretch; flex-direction: column; }
  .legal-toolbar .primary-button { width: 100%; }
}
