/* IEXE adaptation of Template Redisoft 1.1.0; see template-LICENSE.txt. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: #f3f6fa;
  --surface: #ffffff;
  --text: #17253a;
  --muted: #657386;
  --line: #dce3eb;
  --navy-deep: #052a4f;
  --blue: #0969c3;
}
[hidden] { display: none !important; }
button, input, select, textarea, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px; background: #fff; color: var(--text); }
.skip-link:focus { top: 12px; }
.app-shell { grid-template-columns: var(--sidebar-width, 250px) minmax(0, 1fr); transition: grid-template-columns .18s ease; }
.sidebar { height: 100dvh; padding: 24px 16px; z-index: 40; border-right: 0; color: #fff; }
.brand { gap: 12px; flex-shrink: 0; min-width: 0; padding: 0 0 26px; }
.brand-logo { display: block; width: 190px; max-width: 100%; height: auto; aspect-ratio: 308 / 80; filter: none; object-fit: contain; }
.brand-product { color: #c0d3e5; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: normal; }
.brand-mark { display: none; width: 50px; height: 36px; place-items: center; border-radius: 6px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 800; }
.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px; margin: 0 -4px; overscroll-behavior: contain; }
.nav-item, .nav-admin { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; min-height: 44px; gap: 12px; padding: 10px 12px; margin: 0; border: 0; border-radius: 8px; color: #fff; font-size: 16px; text-align: left; }
.nav-item:hover { background: #124877; }
.nav-item.is-active { background: var(--blue); color: #fff; }
.nav-label { min-width: 0; overflow-wrap: anywhere; }
.nav-icon { display: inline-flex; width: 20px; height: 20px; color: currentColor; align-items: center; justify-content: center; }
[data-icon] { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; }
[data-icon] svg, .sidebar-toggle svg { width: 20px; height: 20px; display: block; }
.nav-count { min-width: 24px; max-width: 50px; overflow: hidden; text-overflow: ellipsis; color: #fff; background: #194f7e; font-size: 11px; }
.sidebar-foot { margin-top: 20px; padding: 18px 0 0; color: #c0d3e5; }
.environment > .environment-label { width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; }
.sidebar-toggle { position: absolute; right: -20px; top: 92px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 4px 14px #0002; }
.sidebar-resize { position: absolute; right: -4px; top: 150px; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
.sidebar-resize:hover, .is-resizing .sidebar-resize { background: #1697e850; }
.is-resizing { user-select: none; cursor: col-resize; transition: none; }
.sidebar-backdrop, .sidebar-mobile-close, #sidebar-mobile-toggle, .mobile-brand { display: none; }
.app-shell.is-collapsed { grid-template-columns: 82px minmax(0, 1fr); }
.is-collapsed .sidebar { padding-inline: 13px; }
.is-collapsed .brand { align-items: center; min-height: 75px; }
.is-collapsed .brand-mark { display: grid; }
.is-collapsed .brand-logo, .is-collapsed .brand-product, .is-collapsed .nav-label, .is-collapsed .nav-count, .is-collapsed .sidebar-foot p, .is-collapsed .environment-label, .is-collapsed .sidebar-resize { display: none; }
.is-collapsed .nav-item { grid-template-columns: 20px; justify-content: center; padding-inline: 8px; }
.is-collapsed .environment { justify-content: center; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 72px; padding: 12px 36px; justify-content: flex-end; }
.user-menu { margin-left: auto; gap: 16px; min-width: 0; }
.user-copy { min-width: 0; overflow-wrap: anywhere; }
.user-copy strong { font-size: 14px; }
.user-copy span { font-size: 13px; }
.user-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.logout-button { gap: 7px; }
.page-heading { padding: 30px 36px 24px; }
.page-heading .eyebrow { font-size: 13px; margin-bottom: 6px; }
.page-heading h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 750; letter-spacing: 0; overflow-wrap: anywhere; }
.view, .view.admin-only { margin: 0; border: 0; padding: 0 36px 36px; container-type: inline-size; }
.notice { margin: 0 36px 20px; }
.button, .icon-button { min-height: 44px; }
.button { font-size: 14px; gap: 8px; }
.icon-button { width: 44px; height: 44px; flex-shrink: 0; }
.sidebar-toggle { width: 40px; height: 40px; min-height: 40px; }
.metrics-grid { gap: 18px; margin-bottom: 24px; }
.metric { padding: 20px; min-height: 136px; }
.metric span { font-size: 13px; font-weight: 500; }
.metric strong { font-size: 34px; margin-block: 12px 7px; }
.metric small { font-size: 12px; }
.section-block { min-width: 0; border-radius: 8px; }
.section-heading { padding: 20px 22px; gap: 16px; flex-wrap: wrap; }
.section-heading > div { min-width: 0; }
.section-heading h2 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.section-heading p { font-size: 13px; line-height: 1.5; }
.table-scroll { min-width: 0; max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
table { min-width: 960px; font-size: 14px; }
th { height: 48px; padding-inline: 16px; font-size: 12px; letter-spacing: 0; }
td { padding: 16px; line-height: 1.45; }
.adviser-name strong { font-size: 14px; }
.adviser-name span, .port-cell span, .summary-copy small, .table-subline { font-size: 12px; }
.status-badge { font-size: 11px; min-height: 28px; }
.row-action { min-height: 36px; }
.field-label { min-width: 0; font-size: 13px; }
.field-label input, .field-label select, .search-field input { max-width: 100%; min-width: 0; height: 44px; font-size: 16px; }
.conversation-toolbar, .summary-toolbar { flex-wrap: wrap; padding: 18px; gap: 14px; margin-bottom: 22px; }
.conversation-toolbar .field-label, .summary-toolbar .field-label { flex: 1 1 160px; }
.conversation-toolbar .field-grow, .summary-toolbar .field-grow { flex: 2 1 240px; }
.conversation-toolbar .field-label:first-child { flex-basis: 320px; }
.conversation-layout { grid-template-columns: minmax(260px, .85fr) minmax(0, 1.6fr); min-height: 560px; }
.conversation-list-block, .conversation-thread-block { min-height: 560px; }
.conversation-list { max-height: max(420px, calc(100dvh - 380px)); }
.conversation-row { grid-template-columns: 40px minmax(0, 1fr); }
.conversation-row time { grid-column: 2; font-size: 11px; }
.conversation-copy strong { font-size: 14px; }
.conversation-copy small, .conversation-copy span { font-size: 12px; }
.thread-messages { min-height: 380px; max-height: max(380px, calc(100dvh - 430px)); }
.message-bubble { min-width: 0; }
.message-bubble p { font-size: 15px; }
.message-bubble time { font-size: 11px; }
.summary-table-scroll { height: max(360px, min(64dvh, 720px)); }
.summary-table { min-width: 1750px; }
.pagination { font-size: 13px; }
.docs-layout { grid-template-columns: 200px minmax(0, 1fr); }
.docs-nav { top: 96px; }
.docs-content section { scroll-margin-top: 96px; }
.docs-content h2 { font-size: 24px; }
.docs-content p, .docs-nav a { font-size: 14px; }
.docs-content pre { font-size: 12px; }
.modal { background: #fff; max-height: calc(100dvh - 32px); }
.modal-header > div { min-width: 0; overflow-wrap: anywhere; }
.modal-actions { flex-wrap: wrap; }
.summary-chat-modal .thread-messages { min-height: 180px; max-height: 65dvh; }

.login-page { background: var(--page); padding: 24px; }
.login-shell { width: min(460px, 100%); min-height: 0; display: block; padding: 36px; border-radius: 8px; box-shadow: 0 12px 36px #052a4f0d; }
.login-copy { min-height: 0; display: block; padding: 0; background: none; }
.login-copy .brand-logo { width: 220px; height: auto; max-width: 100%; aspect-ratio: 308 / 112; margin: 0 0 26px; padding: 16px; background: var(--navy-deep); border-radius: 6px; }
.login-panel { display: grid; gap: 24px; padding: 0; }
.login-panel h1 { margin: 8px 0 12px; font-size: 34px; line-height: 1.2; letter-spacing: 0; overflow-wrap: anywhere; }
.login-panel .eyebrow { font-size: 12px; }
.login-panel .muted { font-size: 14px; line-height: 1.5; }
.login-domain { font-size: 12px; line-height: 1.5; }
.login-panel .notice { margin: 0; }

@container (max-width: 960px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .conversation-layout { grid-template-columns: 1fr; }
  .conversation-list-block { min-height: 0; }
  .conversation-list { max-height: 380px; }
}
@container (max-width: 650px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conversation-toolbar, .summary-toolbar { align-items: stretch; flex-direction: column; }
  .conversation-toolbar .field-label, .summary-toolbar .field-label { flex: 0 1 auto; }
  .conversation-toolbar .field-label:first-child { flex: 0 1 auto; }
  .section-heading-row { align-items: stretch; flex-direction: column; }
  .search-field input { width: 100%; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-actions { justify-content: space-between; flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .app-shell, .app-shell.is-collapsed { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 85vw); height: 100dvh; padding: 24px 16px; visibility: hidden; transform: translateX(-100%); transition: transform .18s ease; }
  .is-mobile-open .sidebar { visibility: visible; transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 35; border: 0; background: #001b3f88; }
  .sidebar-mobile-close { position: absolute; top: 14px; right: 12px; display: grid; width: 32px; height: 32px; min-height: 32px; background: #124877; color: #fff; border-color: #315b80; }
  .sidebar .brand-logo { width: 175px; }
  .sidebar .brand { padding-right: 32px; }
  .sidebar-toggle, .sidebar-resize { display: none; }
  #sidebar-mobile-toggle { display: grid; }
  .mobile-brand { display: block; width: 94px; height: 40px; object-fit: contain; padding: 7px; background: var(--navy-deep); border-radius: 6px; }
  .menu-open { overflow: hidden; }
  .nav-item { grid-template-columns: 20px minmax(0, 1fr) auto; text-align: left; }
  .nav-icon { display: inline-flex; }
  .nav-count { display: block; }
  .sidebar-foot { display: block; }
  .topbar { min-height: 68px; padding: 10px 16px; justify-content: space-between; gap: 12px; }
  .user-copy { display: none; }
  .user-menu { gap: 10px; }
  .page-heading { padding: 24px 16px; }
  .page-heading h1 { font-size: 28px; }
  .view, .view.admin-only { padding: 0 16px 28px; }
  .notice { margin: 0 16px 18px; }
  .section-heading { padding: 18px; }
  .metric { padding: 18px; }
  .metrics-grid { gap: 12px; }
  .conversation-toolbar, .summary-toolbar { padding: 16px; }
  .conversation-thread-block { min-height: 500px; }
  .message-bubble { max-width: 90%; }
  .docs-content section { padding: 18px; }
  .login-shell { padding: 24px; }
}
@media (max-width: 400px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .user-avatar { display: none; }
  .pagination-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
