:root {
  --navy: #12223b;
  --navy-deep: #12223b;
  --navy-soft: #12223b;
  --accent: #c2c15c;
  --accent-light: #dcdb88;
  --ink: #152238;
  --muted: #687387;
  --line: #dfe4ea;
  --canvas: #f3f5f7;
  --white: #fff;
  --success: #31a56f;
  --danger: #c84f5c;
  --shadow: 0 24px 70px rgba(13, 31, 53, .14);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.login-page { background: var(--navy); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.08fr) minmax(480px, .92fr); }
.brand-panel { min-height: 100vh; position: relative; overflow: hidden; padding: 54px clamp(48px, 6vw, 92px) 38px; color: var(--white); background: radial-gradient(circle at 78% 15%, rgba(194,193,92,.14), transparent 27%), linear-gradient(145deg, var(--navy-soft), var(--navy-deep) 72%); display: flex; flex-direction: column; justify-content: center; }
.brand-panel::before { content: ""; position: absolute; width: 350px; height: 350px; border: 1px solid rgba(194,193,92,.2); border-radius: 50%; right: -155px; top: -140px; box-shadow: 0 0 0 54px rgba(194,193,92,.025), 0 0 0 108px rgba(194,193,92,.02); }
.brand-panel::after { content: ""; position: absolute; width: 5px; height: 130px; background: var(--accent); left: 0; top: calc(50% - 65px); }
.brand-grid { position: absolute; inset: 0; opacity: .055; background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, #000, transparent 82%); }
.brand-panel__content { position: relative; z-index: 1; max-width: 670px; }
.eyebrow, .section-kicker { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 27px; }
.eyebrow span { width: 28px; height: 2px; background: var(--accent); }
.brand-panel h1 { margin: 0; max-width: 690px; font-size: clamp(42px, 5vw, 70px); line-height: 1.04; letter-spacing: -.045em; font-weight: 650; }
.brand-panel h1 em { color: var(--accent-light); font-family: Georgia, serif; font-weight: 400; }
.brand-panel__content > p { max-width: 600px; margin: 28px 0 40px; color: #bdc7d5; font-size: 17px; line-height: 1.7; }
.trust-list { display: grid; gap: 19px; max-width: 570px; }
.trust-list > div { display: flex; align-items: flex-start; gap: 15px; }
.trust-list p { margin: 0; color: #aeb9c8; font-size: 13px; line-height: 1.45; }
.trust-list strong { display: block; color: #f7f9fb; font-size: 14px; margin-bottom: 2px; }
.trust-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border: 1px solid rgba(194,193,92,.38); border-radius: 9px; color: var(--accent-light); font-size: 9px; font-weight: 800; }
.brand-panel__footer { position: absolute; z-index: 1; bottom: 32px; left: clamp(48px, 6vw, 92px); right: clamp(48px, 6vw, 92px); display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #7e8da0; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }

.login-panel { min-height: 100vh; padding: 55px clamp(40px, 6vw, 105px); display: grid; place-items: center; background: #f7f8f9; position: relative; }
.login-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--accent); }
.login-card { width: 100%; max-width: 455px; }
.logo { display: block; object-fit: contain; margin: 0 0 50px; width: 216px; height: 69px; }
.login-heading { margin-bottom: 28px; }
.login-heading h2 { margin: 10px 0 9px; color: var(--navy); font-size: 38px; line-height: 1.12; letter-spacing: -.035em; }
.login-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.form-alert { margin: 0 0 20px; padding: 13px 15px; border: 1px solid #efc9ce; border-radius: 10px; background: #fff1f3; color: #9c3542; font-size: 13px; line-height: 1.4; }
.login-form { display: grid; gap: 10px; }
.login-form label { color: var(--ink); font-size: 12px; font-weight: 750; }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.label-row span { color: #98a1ad; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.input-wrap { position: relative; }
.input-wrap > svg { width: 18px; height: 18px; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); fill: none; stroke: #8590a0; stroke-width: 1.7; }
.input-wrap input { width: 100%; height: 54px; border: 1px solid #d5dbe2; border-radius: 11px; background: var(--white); padding: 0 48px; color: var(--navy); outline: none; transition: border .18s, box-shadow .18s; }
.input-wrap input::placeholder { color: #a7afba; }
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194,193,92,.18); }
.password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; }
.password-toggle:hover { background: #f3f4ed; }
.password-toggle svg { width: 19px; fill: none; stroke: #7b8796; stroke-width: 1.7; }
.primary-button { min-height: 54px; border: 0; border-radius: 11px; padding: 0 18px; margin-top: 17px; display: flex; justify-content: space-between; align-items: center; color: var(--navy-deep); background: var(--accent); font-weight: 800; box-shadow: 0 10px 22px rgba(104,104,44,.18); transition: transform .17s, background .17s, box-shadow .17s; text-decoration: none; }
.primary-button:hover { background: #cfce6a; transform: translateY(-1px); box-shadow: 0 13px 27px rgba(104,104,44,.24); }
.primary-button:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(194,193,92,.46); outline-offset: 3px; }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.security-note { margin: 25px 0 0; color: #8d97a4; font-size: 11px; text-align: center; }
.security-note span { color: var(--accent); margin-right: 5px; }

.dashboard-page { min-height: 100vh; background: var(--canvas); }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(25px, 5vw, 72px); background: var(--navy); color: var(--white); border-bottom: 3px solid var(--accent); }
.topbar__brand { height: 100%; display: flex; align-items: center; color: inherit; text-decoration: none; }
.topbar__brand img { width: 172px; height: auto; }
.topbar__brand > span { width: 1px; height: 28px; background: rgba(255,255,255,.22); margin: 0 22px; }
.topbar__brand b { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #c4ccd7; }
.topbar__actions { display: flex; align-items: center; gap: 25px; }
.environment-pill { display: flex; align-items: center; gap: 8px; color: #bdc7d4; font-size: 12px; }
.environment-pill i, .metric-card small i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(49,165,111,.15); }
.logout-button { border: 0; padding: 9px 0 9px 18px; border-left: 1px solid rgba(255,255,255,.15); color: #e6ebf1; background: transparent; font-size: 12px; }
.logout-button span { margin-left: 7px; color: var(--accent); }
.dashboard-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 55px 0 28px; }
.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 32px; }
.welcome-row h1 { margin: 8px 0 7px; color: var(--navy); font-size: clamp(32px, 4vw, 46px); letter-spacing: -.04em; line-height: 1.05; }
.welcome-row p { margin: 0; color: var(--muted); font-size: 14px; }
.primary-button.compact { min-width: 215px; min-height: 45px; justify-content: center; gap: 10px; margin: 0; font-size: 12px; }
.button-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }
.loading .button-dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; transform: scale(.65); } }
.connection-message { margin: -13px 0 25px; padding: 13px 16px; border-radius: 9px; font-size: 13px; }
.connection-message.success { color: #187349; border: 1px solid #b9e2cd; background: #eaf8f1; }
.connection-message.error { color: #973541; border: 1px solid #edc4c9; background: #fff0f2; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card { min-height: 157px; padding: 22px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 6px 19px rgba(24,38,56,.035); }
.metric-card > span { display: block; color: #8490a0; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.metric-card strong { display: block; margin: 10px 0 16px; color: var(--navy); font-size: 26px; letter-spacing: -.025em; }
.metric-card small { display: flex; align-items: center; gap: 8px; color: #778394; font-size: 11px; }
.metric-icon { width: 35px; height: 35px; position: absolute; right: 18px; top: 18px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: #f0f2e0; font-size: 18px; }
.accent-card { color: var(--white); background: var(--navy); border-color: var(--navy); }
.accent-card::after { content: ""; width: 95px; height: 95px; position: absolute; right: -37px; bottom: -40px; border: 17px solid rgba(194,193,92,.1); border-radius: 50%; }
.accent-card > span, .accent-card small { color: #aab7c7; }
.accent-card strong { color: var(--white); }
.accent-card .metric-icon { color: var(--accent); background: rgba(194,193,92,.1); }
.dashboard-grid { display: grid; grid-template-columns: 1.22fr .78fr; gap: 18px; }
.console-card { padding: 29px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 25px rgba(24,38,56,.04); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.card-heading h2 { margin: 7px 0 0; color: var(--navy); font-size: 23px; letter-spacing: -.025em; }
.secure-badge { padding: 7px 9px; border-radius: 7px; color: #626328; background: #f2f2d9; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.card-intro { max-width: 650px; margin: 18px 0 21px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.endpoint-block { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 67px; padding: 13px 13px 13px 17px; border: 1px solid #dce1e7; border-left: 3px solid var(--accent); border-radius: 10px; background: #f8f9fa; }
.endpoint-block > div { min-width: 0; }
.endpoint-block span { display: block; margin-bottom: 5px; color: #8d97a4; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.endpoint-block code { display: block; overflow: hidden; color: var(--navy); font: 600 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-block button { min-width: 62px; height: 35px; border: 1px solid #d6dce3; border-radius: 8px; color: var(--navy); background: var(--white); font-size: 11px; font-weight: 750; }
.endpoint-block button:hover { border-color: var(--accent); background: #fafaea; }
.config-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; border-block: 1px solid #edf0f3; }
.config-list > div { padding: 17px 14px; border-right: 1px solid #edf0f3; }
.config-list > div:first-child { padding-left: 0; }
.config-list > div:last-child { border: 0; }
.config-list span { display: block; margin-bottom: 5px; color: #919aa7; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.config-list strong { color: #3e4c60; font-size: 11px; font-weight: 700; }
.info-banner { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 9px; color: #6c7041; background: #f8f8e9; }
.info-banner > span { width: 17px; height: 17px; flex: 0 0 17px; display: grid; place-items: center; border: 1px solid #a9a959; border-radius: 50%; font: 700 10px Georgia, serif; }
.info-banner p { margin: 0; font-size: 10px; line-height: 1.55; }
.info-banner code { font: inherit; font-weight: 750; }
.neutral-dot, .success-dot, .error-dot { width: 12px; height: 12px; margin-top: 7px; border: 3px solid #d9dee4; border-radius: 50%; background: #9ba4b0; box-shadow: 0 0 0 5px #f0f2f4; }
.success-dot { border-color: #bfe5d1; background: var(--success); box-shadow: 0 0 0 5px #eaf7f0; }
.error-dot { border-color: #efc9ce; background: var(--danger); box-shadow: 0 0 0 5px #fff0f2; }
.odoo-mark { display: flex; align-items: center; gap: 14px; margin: 25px 0; padding: 17px; border-radius: 11px; background: #f7f8f9; }
.odoo-mark > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: var(--white); background: var(--navy); font-family: Georgia, serif; font-size: 23px; }
.odoo-mark strong, .odoo-mark small { display: block; }
.odoo-mark strong { max-width: 240px; overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.odoo-mark small { margin-top: 4px; color: #8e98a5; font-size: 10px; }
.detail-list { margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #edf0f3; font-size: 11px; }
.detail-list dt { color: #8994a2; }
.detail-list dd { margin: 0; color: #37475b; font-weight: 700; text-align: right; }
.privacy-copy { margin: 18px 0 0; color: #8a94a1; font-size: 10px; line-height: 1.55; }
.dashboard-footer { display: flex; justify-content: space-between; padding: 25px 4px 0; color: #8e98a5; font-size: 10px; }
.not-found { min-height: 100vh; display: grid; place-items: center; padding: 30px; color: var(--white); background: var(--navy); text-align: center; }
.not-found main { max-width: 460px; }
.not-found img { margin-bottom: 35px; }
.not-found main > span { display: block; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.not-found h1 { margin: 11px 0; font-size: 37px; }
.not-found p { margin: 0 0 20px; color: #aeb9c8; }
.not-found .primary-button { display: inline-flex; min-height: 46px; margin-top: 10px; padding: 0 25px; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100vh; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-panel { padding: 38px 25px; align-items: start; }
  .login-card { margin-top: 4vh; }
  .logo { margin-bottom: 38px; }
  .topbar { height: 73px; padding: 0 18px; }
  .topbar__brand img { width: 145px; }
  .topbar__brand > span, .topbar__brand b, .environment-pill { display: none; }
  .dashboard-shell { width: min(100% - 28px, 1240px); padding-top: 35px; }
  .welcome-row { align-items: stretch; flex-direction: column; }
  .primary-button.compact { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 140px; }
  .console-card { padding: 22px 18px; }
  .card-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .config-list { grid-template-columns: 1fr; }
  .config-list > div, .config-list > div:first-child { padding: 13px 0; border-right: 0; border-bottom: 1px solid #edf0f3; }
  .config-list > div:last-child { border-bottom: 0; }
  .dashboard-footer { flex-direction: column; gap: 7px; }
}
/* v0.3 role navigation and account management */
.admin-nav { display: flex; align-items: stretch; align-self: stretch; gap: 5px; margin-left: auto; margin-right: 30px; }
.admin-nav a { display: flex; align-items: center; position: relative; padding: 0 14px; color: #9fadc0; text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.admin-nav a:hover, .admin-nav a.active { color: #fff; }
.admin-nav a.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; background: var(--accent); }
.back-link { color: #cbd3de; text-decoration: none; font-size: 11px; }
.user-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.user-stats article { padding: 20px 24px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.user-stats span { color: #8994a2; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.user-stats strong { display: block; margin-top: 8px; color: var(--navy); font-size: 25px; }
.users-card { padding: 0; overflow: hidden; }
.users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 28px; border-bottom: 1px solid var(--line); }
.users-toolbar h2 { margin: 0 0 5px; color: var(--navy); font-size: 21px; }
.users-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.search-users { min-width: 245px; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #d8dee5; border-radius: 9px; background: #f8f9fa; }
.search-users span { color: #8792a0; font-size: 19px; }
.search-users input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--navy); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th { padding: 13px 24px; color: #8792a0; background: #f7f8fa; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.users-table td { padding: 17px 24px; border-top: 1px solid #edf0f3; color: #4c5a6b; font-size: 11px; }
.users-table tbody tr:hover { background: #fcfcf7; }
.user-identity { min-width: 190px; display: flex; align-items: center; gap: 12px; }
.table-avatar, .profile-avatar { display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--navy); font-weight: 800; }
.table-avatar { width: 36px; height: 36px; font-size: 10px; }
.user-identity strong, .user-identity small { display: block; }
.user-identity strong { color: var(--navy); font-size: 12px; }
.user-identity small { margin-top: 3px; color: #8b96a4; font-size: 10px; }
.role-badge, .status-badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 100px; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.role-badge { padding: 7px 10px; color: #60652f; background: #f2f2dc; text-transform: uppercase; }
.role-badge.admin { color: #244b72; background: #e8f0f7; }
.status-badge { padding: 6px 9px; color: #24764e; background: #eaf7f0; }
.status-badge.inactive { color: #8c5960; background: #f7ecee; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: #32a66f; }
.status-badge.inactive i { background: #bd6570; }
.date-cell { white-space: nowrap; }
.actions-column { text-align: right !important; }
.table-actions { min-width: 180px; text-align: right; white-space: nowrap; }
.table-action { min-height: 31px; margin-left: 6px; padding: 0 10px; border: 1px solid #dce1e6; border-radius: 7px; color: #445268; background: #fff; font-size: 9px; font-weight: 750; }
.table-action:hover { border-color: var(--accent); background: #fafae9; }
.table-action.toggle { color: #8a3f48; }
.you-marker { color: #9aa3ad; font-size: 10px; }
.empty-cell { padding: 42px !important; text-align: center; color: #8b95a1 !important; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8,19,35,.66); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(450px, 100%); position: relative; padding: 32px; border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.modal-card h2 { margin: 9px 0 8px; color: var(--navy); font-size: 25px; }
.modal-card > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close { position: absolute; right: 16px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 8px; color: #7a8695; background: #f3f5f7; font-size: 21px; }
.settings-shell { width: min(950px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0; }
.settings-heading { margin-bottom: 28px; }
.settings-heading h1 { margin: 8px 0; color: var(--navy); font-size: 39px; letter-spacing: -.04em; }
.settings-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; align-items: start; }
.profile-card { text-align: center; }
.profile-avatar { width: 70px; height: 70px; margin: 0 auto 15px; border-radius: 18px; font-size: 20px; box-shadow: 0 10px 25px rgba(18,34,59,.18); }
.profile-card h2 { margin: 0; color: var(--navy); font-size: 21px; }
.profile-card > p { margin: 5px 0 13px; color: #8792a0; font-size: 11px; }
.profile-card .detail-list { margin-top: 25px; text-align: left; }
.password-card h2 { margin: 8px 0; color: var(--navy); font-size: 25px; }
.password-card > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.settings-form { display: grid; gap: 9px; }
.settings-form label { margin-top: 7px; color: #3b495d; font-size: 11px; font-weight: 750; }
.settings-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d6dce3; border-radius: 9px; outline: 0; color: var(--navy); background: #fff; }
.settings-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194,193,92,.16); }
.settings-form .primary-button { min-height: 48px; }

/* Chat workspace */
.chat-page { height: 100vh; overflow: hidden; background: #fff; }
.chat-app { height: 100vh; display: flex; }
.chat-sidebar { width: 278px; flex: 0 0 278px; display: flex; flex-direction: column; padding: 20px 14px 14px; color: #dfe5ed; background: var(--navy); border-right: 1px solid rgba(255,255,255,.08); }
.sidebar-brand { height: 55px; display: flex; align-items: flex-start; justify-content: space-between; padding: 0 8px; }
.sidebar-brand img { width: 170px; height: auto; }
.sidebar-brand button { display: none; border: 0; color: #fff; background: transparent; font-size: 22px; }
.new-chat-button { width: 100%; min-height: 45px; display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid rgba(194,193,92,.45); border-radius: 10px; color: #f6f7f9; background: rgba(194,193,92,.08); font-size: 12px; font-weight: 700; text-align: left; }
.new-chat-button:hover { background: rgba(194,193,92,.16); }
.new-chat-button span { color: var(--accent); font-size: 19px; }
.history-label { margin: 25px 11px 9px; color: #75849a; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.conversation-list { min-height: 0; flex: 1; overflow-y: auto; }
.conversation-row { display: flex; align-items: center; border-radius: 8px; }
.conversation-row:hover, .conversation-row.active { background: rgba(255,255,255,.075); }
.conversation-open { min-width: 0; flex: 1; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border: 0; color: #c9d1dc; background: transparent; font-size: 11px; text-align: left; }
.conversation-open span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-open span:first-child { color: #7f8da1; }
.conversation-delete { width: 28px; height: 28px; opacity: 0; border: 0; border-radius: 6px; color: #9facbd; background: transparent; }
.conversation-row:hover .conversation-delete { opacity: 1; }
.conversation-delete:hover { color: #fff; background: rgba(255,255,255,.09); }
.history-empty { padding: 12px; color: #718096; font-size: 10px; }
.sidebar-footer { padding-top: 11px; border-top: 1px solid rgba(255,255,255,.09); }
.sidebar-footer > a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 9px; border-radius: 8px; color: #aeb9c8; text-decoration: none; font-size: 11px; }
.sidebar-footer > a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-icon { width: 18px; color: var(--accent); text-align: center; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.07); }
.mini-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: var(--accent); font-size: 9px; font-weight: 900; }
.sidebar-profile > div { min-width: 0; flex: 1; }
.sidebar-profile strong, .sidebar-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { color: #f4f6f8; font-size: 10px; }
.sidebar-profile small { margin-top: 3px; color: #738298; font-size: 9px; }
.sidebar-profile button { border: 0; color: #8c99ab; background: transparent; }
.chat-main { min-width: 0; flex: 1; display: flex; flex-direction: column; background: #fff; }
.chat-header { height: 68px; flex: 0 0 68px; display: flex; align-items: center; gap: 13px; padding: 0 25px; border-bottom: 1px solid #e7eaee; background: rgba(255,255,255,.95); }
.chat-header > div:nth-child(2) { flex: 1; }
.chat-header strong { display: block; color: var(--navy); font-size: 13px; }
.chat-header div > span { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: #8490a0; font-size: 9px; }
.chat-header div > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.menu-button { display: none; border: 0; color: var(--navy); background: transparent; font-size: 20px; }
.model-pill { flex: 0 0 auto !important; display: flex !important; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e0e3c2; border-radius: 100px; color: #747633; background: #fafaea; font-size: 9px; font-weight: 750; }
.model-pill span { margin: 0 !important; color: inherit !important; }
.chat-thread { min-height: 0; flex: 1; overflow-y: auto; scroll-behavior: smooth; position: relative; }
.chat-welcome { width: min(800px, calc(100% - 40px)); min-height: 100%; margin: 0 auto; padding: 8vh 0 130px; display: flex; align-items: center; flex-direction: column; text-align: center; }
.assistant-orb { width: 55px; height: 55px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 17px; color: var(--accent); background: var(--navy); font-size: 24px; box-shadow: 0 14px 32px rgba(18,34,59,.2); }
.chat-welcome h1 { margin: 10px 0 9px; color: var(--navy); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.chat-welcome > p { max-width: 620px; margin: 0; color: #6f7b8b; font-size: 13px; line-height: 1.65; }
.suggestion-grid { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 34px; }
.suggestion-grid button { min-height: 94px; position: relative; padding: 18px 18px 17px 50px; border: 1px solid #e0e4e9; border-radius: 13px; color: var(--navy); background: #fff; text-align: left; box-shadow: 0 6px 18px rgba(21,34,52,.025); transition: transform .15s, border .15s, box-shadow .15s; }
.suggestion-grid button:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 25px rgba(21,34,52,.08); }
.suggestion-grid button > span { position: absolute; left: 17px; top: 18px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #6c702d; background: #f1f1d9; }
.suggestion-grid strong, .suggestion-grid small { display: block; }
.suggestion-grid strong { font-size: 12px; }
.suggestion-grid small { margin-top: 7px; color: #8a95a2; font-size: 10px; font-weight: 400; }
.messages { width: min(850px, calc(100% - 40px)); margin: 0 auto; padding: 35px 0 145px; }
.chat-message { display: grid; grid-template-columns: 34px 1fr; gap: 15px; margin-bottom: 31px; }
.message-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--navy); font-size: 13px; font-weight: 800; }
.chat-message.user .message-avatar { color: var(--navy); background: var(--accent); font-size: 9px; }
.message-label { margin: 1px 0 9px; color: #3e4b5e; font-size: 10px; font-weight: 800; }
.message-content { color: #273649; font-size: 13px; line-height: 1.72; }
.message-content p { margin: 0 0 11px; }
.message-content h2, .message-content h3 { margin: 18px 0 8px; color: var(--navy); }
.message-content h2 { font-size: 17px; }.message-content h3 { font-size: 14px; }
.message-content ul, .message-content ol { margin: 7px 0 13px; padding-left: 21px; }
.message-content li { margin: 4px 0; }
.message-content code { padding: 2px 5px; border-radius: 4px; color: #51582d; background: #f2f2df; font: 11px ui-monospace, monospace; }
.message-content pre { overflow-x: auto; padding: 14px; border-radius: 9px; color: #e5eaf0; background: #111e31; }
.message-content pre code { padding: 0; color: inherit; background: transparent; }
.tool-source { display: inline-flex; margin-top: 7px; padding: 5px 8px; border-radius: 6px; color: #64703c; background: #f5f5e7; font-size: 8px; font-weight: 750; text-transform: capitalize; }
.error-message .message-content { color: #9c3542; }
.typing-dots { height: 32px; display: flex; align-items: center; gap: 5px; color: #8994a1; font-size: 10px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typing 1.1s infinite ease-in-out; }.typing-dots i:nth-child(2){animation-delay:.12s}.typing-dots i:nth-child(3){animation-delay:.24s}.typing-dots span{margin-left:5px}
@keyframes typing { 0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-4px);opacity:1} }
.assistant-notice { width: min(780px, calc(100% - 40px)); margin: 15px auto -65px; padding: 11px 14px; display: flex; justify-content: center; gap: 9px; border: 1px solid #ece3b7; border-radius: 9px; color: #7d6727; background: #fff9dd; font-size: 10px; }
.assistant-notice code { font-weight: 800; }
.composer-area { position: absolute; z-index: 4; left: 278px; right: 0; bottom: 0; padding: 18px 24px 11px; background: linear-gradient(transparent, #fff 22%); }
.chat-composer { width: min(850px, 100%); min-height: 58px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px; padding: 9px 10px 9px 17px; border: 1px solid #d9dee4; border-radius: 15px; background: #fff; box-shadow: 0 11px 35px rgba(19,34,53,.12); }
.chat-composer:focus-within { border-color: var(--accent); box-shadow: 0 11px 35px rgba(19,34,53,.12), 0 0 0 3px rgba(194,193,92,.13); }
.chat-composer textarea { min-height: 38px; max-height: 180px; flex: 1; resize: none; padding: 9px 0; border: 0; outline: 0; color: var(--navy); background: transparent; font-size: 13px; line-height: 1.45; }
.chat-composer textarea::placeholder { color: #9ba4af; }
.chat-composer button { width: 39px; height: 39px; flex: 0 0 39px; border: 0; border-radius: 10px; color: var(--navy); background: var(--accent); font-size: 18px; font-weight: 800; }
.chat-composer button:disabled { opacity: .45; cursor: wait; }
.composer-area > p { margin: 8px 0 0; color: #9aa3ad; font-size: 8px; text-align: center; }
.sidebar-scrim { display: none; }

@media (max-width: 1050px) {
  .admin-nav { display: none; }
  .topbar__brand { flex: 1; }
}
@media (max-width: 760px) {
  .user-stats { grid-template-columns: 1fr; }
  .users-toolbar { align-items: stretch; flex-direction: column; }
  .search-users { min-width: 0; }
  .settings-grid { grid-template-columns: 1fr; }
  .chat-sidebar { position: fixed; z-index: 30; left: -290px; top: 0; bottom: 0; transition: left .2s ease; box-shadow: 20px 0 50px rgba(5,14,28,.28); }
  .chat-sidebar.open { left: 0; }
  .sidebar-brand button, .menu-button { display: block; }
  .sidebar-scrim { display: block; position: fixed; z-index: 29; inset: 0; border: 0; background: rgba(5,14,28,.48); }
  .sidebar-scrim[hidden] { display: none; }
  .composer-area { left: 0; padding-inline: 14px; }
  .chat-header { padding: 0 14px; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .chat-welcome { padding-top: 5vh; }
  .model-pill { max-width: 120px; overflow: hidden; white-space: nowrap; }
}
@media (max-width: 620px) {
  .settings-shell { width: calc(100% - 28px); padding-top: 35px; }
  .topbar .back-link { display: none; }
  .admin-users-shell .welcome-row { gap: 20px; }
}

.sidebar-footer > a[hidden], .admin-nav[hidden] { display: none !important; }


.settings-form select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d6dce3; border-radius: 9px; outline: 0; color: var(--navy); background: #fff; }
.settings-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194,193,92,.16); }

