:root {
  --bg: #ffffff;
  --panel: #f7f7f8;
  --panel-strong: #ececf1;
  --sidebar: #f4f4f5;
  --text: #202123;
  --muted: #6b6c70;
  --border: #dedee3;
  --accent: #6d4aff;
  --accent-strong: #5d3be8;
  --accent-soft: rgba(109, 74, 255, .10);
  --assistant: #ffffff;
  --user: #f1eefc;
  --danger: #c63737;
  --shadow: 0 14px 38px rgba(33, 35, 45, .10);
  --code-bg: #17181c;
  --code-text: #f6f6f7;
  --radius: 16px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #202123;
  --panel: #27282d;
  --panel-strong: #34353b;
  --sidebar: #17181c;
  --text: #ececf1;
  --muted: #a8a8b0;
  --border: #3d3e45;
  --accent: #9a83ff;
  --accent-strong: #aa98ff;
  --accent-soft: rgba(154, 131, 255, .14);
  --assistant: #202123;
  --user: #30303a;
  --danger: #ff8a8a;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
  --code-bg: #101114;
  --code-text: #f7f7f8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  z-index: 30;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 5px 15px; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark, .hero-mark {
  display: grid; place-items: center;
  background: linear-gradient(145deg, #7657ff, #5430dc);
  color: #fff; font-weight: 800;
  box-shadow: 0 8px 22px rgba(91, 59, 226, .28);
}
.brand-mark { width: 35px; height: 35px; border-radius: 11px; font-size: 18px; flex: 0 0 auto; }
.brand strong, .brand small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }

.icon-button {
  width: 38px; height: 38px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; display: grid; place-items: center; cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.icon-button:hover { background: var(--panel-strong); border-color: var(--border); }
.icon-button:active { transform: scale(.96); }
.icon-button svg { width: 20px; height: 20px; }

.new-chat-button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--bg); border-radius: 12px;
  padding: 11px 13px; cursor: pointer; font-weight: 650;
  box-shadow: 0 2px 8px rgba(20, 20, 30, .035);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.new-chat-button:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(61, 44, 140, .09); }
.new-chat-button:active { transform: translateY(1px); }
.new-chat-button svg { width: 18px; height: 18px; }
.sidebar-section-title { padding: 22px 9px 8px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.conversation-list { flex: 1; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.conversation-item {
  position: relative; width: 100%; border: 0; background: transparent; cursor: pointer;
  padding: 10px 39px 10px 11px; border-radius: 10px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px;
}
.conversation-item:hover, .conversation-item.active { background: var(--panel-strong); }
.conversation-item.active { font-weight: 650; }
.conversation-delete {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 29px; height: 29px; border: 0; border-radius: 8px; display: none; place-items: center;
  background: transparent; cursor: pointer; color: var(--muted);
}
.conversation-item:hover .conversation-delete, .conversation-item.active .conversation-delete { display: grid; }
.conversation-delete:hover { background: var(--bg); color: var(--danger); }
.conversation-delete svg { width: 15px; height: 15px; }
.empty-history { color: var(--muted); font-size: 12px; line-height: 1.5; padding: 11px; }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 9px; display: grid; gap: 3px; }
.sidebar-action {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent;
  border-radius: 9px; padding: 9px 10px; cursor: pointer; font-size: 13px; color: var(--muted);
}
.sidebar-action:hover { background: var(--panel-strong); color: var(--text); }
.sidebar-action.danger:hover { color: var(--danger); }
.sidebar-action svg { width: 17px; height: 17px; }
html[data-theme="light"] .theme-icon-sun, html[data-theme="dark"] .theme-icon-moon { display: none; }
.sidebar-backdrop { display: none; }

.main-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
}
.topbar {
  min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 9px 18px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); z-index: 10;
}
.topbar-title { min-width: 0; flex: 1; text-align: center; }
.topbar-title strong, .topbar-title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title strong { font-size: 14px; }
.topbar-title span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #2daf67; box-shadow: 0 0 0 3px rgba(45, 175, 103, .12); vertical-align: 1px; }

.chat-scroll {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.welcome { max-width: 860px; min-height: calc(100% - 30px); margin: 0 auto; padding: clamp(58px, 11vh, 126px) 24px 52px; text-align: center; }
.hero-mark { width: 60px; height: 60px; margin: 0 auto 21px; border-radius: 19px; font-size: 29px; }
.welcome h1 { margin: 0; font-size: clamp(27px, 4vw, 40px); line-height: 1.12; letter-spacing: -.035em; }
.welcome > p { max-width: 650px; margin: 15px auto 31px; color: var(--muted); line-height: 1.65; font-size: 15px; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 730px; margin: 0 auto; }
.suggestion {
  border: 1px solid var(--border); background: var(--assistant); border-radius: 15px; padding: 15px 16px;
  text-align: left; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.suggestion:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.suggestion span, .suggestion small { display: block; }
.suggestion span { font-weight: 700; font-size: 13px; margin-bottom: 5px; }
.suggestion small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.messages { display: none; width: 100%; padding: 18px 0 46px; }
.messages.visible { display: block; }
.message-row { padding: 25px clamp(20px, 7vw, 92px); display: grid; grid-template-columns: 34px minmax(0, 760px); justify-content: center; gap: 15px; }
.message-row.user { background: transparent; }
.message-row.assistant { background: color-mix(in srgb, var(--panel) 48%, transparent); border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent); }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.user .avatar { background: var(--panel-strong); }
.assistant .avatar { background: linear-gradient(145deg, #7657ff, #5430dc); color: #fff; }
.message-meta { font-size: 13px; font-weight: 750; margin: 5px 0 9px; }
.message-body { font-size: 15px; line-height: 1.72; overflow-wrap: anywhere; }
.message-body > :first-child { margin-top: 0; }
.message-body > :last-child { margin-bottom: 0; }
.message-body p { margin: .75em 0; }
.message-body h1, .message-body h2, .message-body h3, .message-body h4 { line-height: 1.3; margin: 1.35em 0 .55em; letter-spacing: -.015em; }
.message-body h1 { font-size: 1.55em; }
.message-body h2 { font-size: 1.33em; }
.message-body h3 { font-size: 1.16em; }
.message-body ul, .message-body ol { margin: .7em 0; padding-left: 1.55em; }
.message-body li { margin: .28em 0; }
.message-body a { color: var(--accent-strong); text-underline-offset: 3px; }
.message-body blockquote { margin: 1em 0; padding: .1em 1em; border-left: 3px solid var(--accent); color: var(--muted); }
.message-body hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
.message-body code:not(pre code) { background: var(--accent-soft); color: var(--accent-strong); border-radius: 6px; padding: .15em .38em; font-size: .9em; }
.code-block { position: relative; margin: 1.1em 0; overflow: hidden; background: var(--code-bg); border-radius: 12px; box-shadow: 0 6px 22px rgba(0,0,0,.12); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 14px; background: rgba(255,255,255,.07); color: #bdbec7; font-size: 11px; }
.copy-code { border: 0; background: transparent; color: inherit; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.copy-code:hover { background: rgba(255,255,255,.08); color: #fff; }
.code-block pre { margin: 0; padding: 15px; overflow-x: auto; }
.code-block code { color: var(--code-text); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px; line-height: 1.58; white-space: pre; }
.table-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--border); border-radius: 10px; }
.message-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.message-body th, .message-body td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.message-body th { background: var(--panel); font-weight: 750; }
.message-body tr:last-child td { border-bottom: 0; }
.message-actions { display: flex; gap: 6px; margin-top: 12px; }
.message-action { border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 5px 7px; cursor: pointer; font-size: 11px; }
.message-action:hover { background: var(--panel-strong); color: var(--text); }
.sources-card { margin-top: 18px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sources-title { padding: 10px 12px; background: var(--panel); font-size: 12px; font-weight: 750; }
.source-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: inherit; text-decoration: none; border-top: 1px solid var(--border); font-size: 12px; }
.source-link:hover { background: var(--accent-soft); color: var(--accent-strong); }
.source-link svg { width: 15px; height: 15px; flex: 0 0 auto; }

.typing { display: inline-flex; align-items: center; gap: 5px; height: 24px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes pulse { 0%, 60%, 100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.error-box { border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--bg)); color: var(--danger); padding: 12px 14px; border-radius: 10px; }

.composer-wrap { padding: 10px max(18px, calc((100% - 820px) / 2)) max(10px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 24%); }
.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--bg); box-shadow: var(--shadow);
}
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.composer textarea { flex: 1; min-height: 31px; max-height: 180px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); padding: 6px 0; line-height: 1.5; }
.composer textarea::placeholder { color: var(--muted); }
.send-button {
  width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: #fff; cursor: pointer; transition: transform .18s, background .18s, opacity .18s;
}
.send-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.send-button:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.send-button svg { width: 20px; height: 20px; stroke-width: 2.2; }
.disclaimer { margin: 8px 10px 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.4; }
.mobile-only, .desktop-hidden { display: none; }

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .main-panel { width: 100%; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(88vw, 315px); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 25; opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; display: block; }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .mobile-only, .desktop-hidden { display: grid; }
  .topbar { padding-inline: 11px; }
  .topbar-title { text-align: left; }
  .welcome { padding: 66px 18px 42px; }
  .suggestions { grid-template-columns: 1fr; }
  .message-row { grid-template-columns: 29px minmax(0, 1fr); gap: 11px; padding: 20px 16px; }
  .avatar { width: 29px; height: 29px; border-radius: 9px; }
  .composer-wrap { padding-inline: 10px; }
  .disclaimer { font-size: 9px; }
}

@media (max-width: 480px) {
  .welcome h1 { font-size: 28px; }
  .suggestion:nth-child(n+4) { display: none; }
  .message-body { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Assistant API 2.0 — authentification, administration et sélection documentaire */
.auth-page, .admin-page { overflow: auto; min-height: 100%; height: auto; background: radial-gradient(circle at top, var(--accent-soft), transparent 42%), var(--panel); }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: min(100%, 470px); background: var(--bg); border: 1px solid var(--border); border-radius: 22px; padding: clamp(24px, 5vw, 38px); box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 16px; }
.auth-brand small { color: var(--muted); margin-top: 3px; font-size: 12px; }
.auth-card h1 { margin: 0 0 10px; font-size: 29px; letter-spacing: -.035em; }
.auth-card > div > p, .auth-card > p { color: var(--muted); line-height: 1.6; font-size: 14px; }
.auth-form { display: grid; gap: 15px; margin-top: 24px; }
.auth-form label, .admin-user-form label, .create-user-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-form input, .admin-user-form input, .admin-user-form select, .create-user-form input, .create-user-form select {
  width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 11px; padding: 12px 13px; outline: 0; font: inherit;
}
.auth-form input:focus, .admin-user-form input:focus, .admin-user-form select:focus, .create-user-form input:focus, .create-user-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.code-input { text-align: center; letter-spacing: .42em; font-size: 25px !important; font-weight: 800; }
.auth-submit, .primary-link { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: var(--accent); color: #fff; padding: 12px 16px; font-weight: 750; text-decoration: none; cursor: pointer; }
.auth-submit:hover, .primary-link:hover { background: var(--accent-strong); }
.auth-submit:disabled { opacity: .55; cursor: wait; }
.auth-secondary-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 17px; }
.text-button { border: 0; background: transparent; color: var(--accent-strong); padding: 5px 0; cursor: pointer; font-weight: 650; }
.text-button:disabled { color: var(--muted); cursor: default; }
.auth-privacy { margin: 25px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 11px !important; }
.notice { margin: 17px 0; padding: 12px 14px; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.notice.success { border: 1px solid rgba(30, 155, 86, .35); background: rgba(30, 155, 86, .08); color: #167844; }
.notice.error { border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--bg)); color: var(--danger); }

.signed-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px 13px; border-bottom: 1px solid var(--border); margin-bottom: 6px; min-width: 0; }
.signed-user > span:last-child { min-width: 0; }
.signed-user strong, .signed-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signed-user strong { font-size: 12px; }
.signed-user small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.user-avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
a.sidebar-action { text-decoration: none; }

.documentation-picker { position: relative; width: min(100%, 820px); margin: 0 auto 7px; }
.doc-selector-button { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 11px; font-weight: 700; }
.doc-selector-button svg { width: 15px; height: 15px; }
.doc-selector-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-popover { position: absolute; z-index: 50; bottom: calc(100% + 8px); left: 0; width: min(390px, calc(100vw - 24px)); background: var(--bg); border: 1px solid var(--border); border-radius: 15px; padding: 14px; box-shadow: var(--shadow); }
.doc-popover > strong { font-size: 13px; }
.doc-popover > p { color: var(--muted); font-size: 11px; margin: 5px 0 11px; }
.doc-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.doc-option:hover { background: var(--panel); }
.doc-option.disabled { opacity: .48; cursor: not-allowed; }
.doc-option input { margin-top: 3px; accent-color: var(--accent); }
.doc-option b, .doc-option small { display: block; }
.doc-option b { font-size: 12px; }
.doc-option small { color: var(--muted); font-size: 10px; margin-top: 3px; line-height: 1.4; }
.message-docs { display: flex; flex-wrap: wrap; gap: 5px; margin: -3px 0 9px; }
.doc-badge { display: inline-flex; border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 700; }
.source-link span { min-width: 0; }
.source-link span small { display: block; color: var(--muted); font-size: 9px; margin-bottom: 2px; }

.admin-page { color: var(--text); }
.admin-topbar { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px max(18px, calc((100% - 1180px) / 2)); background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.secondary-link { color: var(--accent-strong); text-decoration: none; font-weight: 700; font-size: 13px; }
.admin-shell { width: min(1180px, calc(100% - 28px)); margin: 28px auto 70px; display: grid; gap: 22px; }
.admin-card { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: clamp(18px, 3vw, 27px); box-shadow: 0 8px 28px rgba(20,20,30,.05); }
.admin-card.compact { max-width: 900px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.admin-card h1, .admin-card h2 { margin: 0; }
.admin-card h1 { font-size: 26px; }
.admin-card h2 { font-size: 19px; margin-bottom: 18px; }
.section-head p { color: var(--muted); margin: 7px 0 0; line-height: 1.5; font-size: 13px; }
.count-badge { white-space: nowrap; background: var(--accent-soft); color: var(--accent-strong); border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.users-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.user-admin-card { border: 1px solid var(--border); border-radius: 15px; padding: 16px; background: var(--assistant); }
.user-admin-card.inactive { opacity: .62; }
.user-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.user-card-head strong, .user-card-head small { display: block; }
.user-card-head small { color: var(--muted); font-size: 10px; margin-top: 3px; text-transform: capitalize; }
.admin-user-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.admin-user-form .user-card-head, .admin-user-form .admin-actions { grid-column: 1 / -1; }
.admin-secondary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.small-button { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 9px; padding: 8px 10px; font-size: 11px; font-weight: 700; cursor: pointer; }
.small-button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.small-button.danger { color: var(--danger); }
.user-dates { color: var(--muted); font-size: 9px; margin: 12px 0 0; }
.create-user-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.create-user-form .auth-submit { min-height: 43px; }

@media (max-width: 820px) {
  .users-grid { grid-template-columns: 1fr; }
  .create-user-form { grid-template-columns: 1fr 1fr; }
  .admin-topbar .brand small { display: none; }
}
@media (max-width: 560px) {
  .auth-card { padding: 24px 19px; }
  .create-user-form, .admin-user-form { grid-template-columns: 1fr; }
  .admin-user-form .user-card-head, .admin-user-form .admin-actions { grid-column: auto; }
  .admin-topbar { padding-inline: 14px; }
  .admin-topbar .brand span:last-child { display: none; }
  .documentation-picker { padding-inline: 1px; }
}
