/* Compact density: smaller base size, tight navigation, and a content area that uses the screen width.
   Loaded after every other stylesheet; the display-size selector (75-130%) still scales everything. */
:root { --ui-text-scale: .85; }
html, body { line-height: 1.4; }

/* shell */
.app-shell { grid-template-columns: 206px minmax(0, 1fr); }
.topbar { height: 50px; min-height: 50px; padding: 6px 18px; border-top-width: 2px; }
.top-actions { gap: 8px; }
.context-label { display: none; }
.org-select { font-size: calc(14px * var(--ui-text-scale)); font-weight: 650; }
.status-chip, .credit-chip { padding: 4px 8px; border-radius: 8px; }
.user-button #avatar { width: 24px; height: 24px; font-size: 12px; }
.header-language select, .header-display-size, .top-actions select { padding: 3px 5px; border-radius: 6px; }

/* sidebar */
.sidebar { padding: 12px 8px 10px; gap: 2px; }
.sidebar .brand, .sidebar>.brand { padding: 0 8px 10px; gap: 8px; }
.brand-logo { width: 30px; height: 30px; }
.sidebar nav, .sidebar-bottom { gap: 1px; }
.nav-item { padding: 6px 10px; gap: 9px; border-radius: 7px; line-height: 1.25; }
.nav-item span:first-child { width: 16px; text-align: center; }
.nav-group { margin-top: 3px; padding-top: 3px; }
.nav-group>summary { padding: 6px 10px; }
.nav-group .nav-item { padding-left: 20px; }
.sidebar-bottom { padding-top: 6px; }
.new-search, .chat-history { margin: 8px 0; }
.action-button, .chat-history>#newChat { padding: 7px 10px; }

/* content uses the width */
.assistant-view { max-width: 1320px; padding: 22px 26px 24px; min-height: calc(100vh - 50px); }
.assistant-header { margin-bottom: 16px; }
.assistant-header h1 { font-size: calc(30px * var(--ui-text-scale)); margin: 0 0 6px; }
.conversation, .composer-wrap { max-width: 1040px; }
.message { padding: 10px 14px; border-radius: 10px; }
.composer { padding: 10px 12px; border-radius: 12px; }
.composer textarea { min-height: 46px; }
.feature-view { max-width: min(1560px, 100%); margin: 0 auto; padding: 18px 26px 28px; }
.feature-view h1 { font-size: calc(28px * var(--ui-text-scale)); margin: 4px 0 6px; }
.feature-description { margin: 0 0 12px; }
.eyebrow { margin-bottom: 4px; }

/* forms, cards, tables */
.feature-form { gap: 8px 10px; }
.feature-form label, .access-form label { gap: 3px; }
.feature-form input, .feature-form select, .feature-form textarea, .access-form input, .access-form select, .access-form textarea,
.support-controls select, .user-search, .login-card input { padding: 6px 8px; border-radius: 6px; }
button { border-radius: 6px; }
.feature-form button, .action-button, .report-actions button, .history-actions button { padding: 6px 12px; }
.report-actions { gap: 6px; margin: 8px 0; }
.result-grid { gap: 10px; }
.result-card { padding: 10px 12px; border-radius: 9px; }
.result-card small { margin: 0 0 8px; }
.history-table th, .history-table td { padding: 7px 10px; }
.report-table th, .report-table td { padding: 6px 8px; }
.parts-table th, .parts-table td { padding: 5px 8px; }
.info-section { padding-top: 12px; }
.information-page { gap: 12px; }
.workspace-options, .access-management fieldset { padding: 10px; }
.profile-form { gap: 8px 10px; }

/* login keeps its hero but stops dominating the screen */
.auth-panel { min-height: 0; padding: 26px; gap: 22px; }
.auth-copy h1 { font-size: clamp(30px, 4vw, 52px); margin-bottom: 16px; }
.login-card { padding: 20px; gap: 12px; }

@media (max-width: 850px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .feature-view, .assistant-view { padding: 16px 14px; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 48px; }
  .sidebar .nav-item, .sidebar .nav-item.active, .sidebar .nav-item:not(.active) { padding: 8px 10px !important; }
}
