.ai-center-view { min-width: 0; }
.ai-center-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  min-height: min(680px, calc(100vh - 190px));
  max-height: calc(100vh - 190px);
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.ai-center-sessions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-right: 1px solid #d7e1ee;
  overflow-y: auto;
  background: #f5f8fc;
}
.ai-center-session-list { display: grid; align-content: start; gap: 4px; }
.ai-center-session {
  width: 100%; padding: 10px 12px; border: 0; border-radius: 5px;
  text-align: left; background: transparent; color: #26364b; cursor: pointer;
  overflow-wrap: anywhere;
}
.ai-center-session:hover, .ai-center-session.active { background: #dfeaf9; }
.ai-center-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ai-center-messages { flex: 1; min-height: 110px; padding: 18px 22px; overflow-y: auto; }
.ai-center-message { max-width: 80ch; margin: 0 0 18px; }
.ai-center-message span { font-size: 12px; font-weight: 700; color: #54708e; }
.ai-center-message p { margin: 5px 0 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-center-message.user { margin-left: auto; padding: 10px 14px; border-radius: 7px; background: #edf4ff; }
.ai-center-empty { margin: 0; color: #697b8f; }
.ai-center-files { max-height: 33%; padding: 8px 18px; overflow-y: auto; border-top: 1px solid #d7e1ee; }
.ai-center-files[hidden] { display: none; }
.ai-center-files-title { margin: 5px 0 9px; font-size: 13px; font-weight: 700; }
.ai-center-file {
  display: grid; grid-template-columns: minmax(140px, 1fr) minmax(130px, 180px) minmax(130px, 180px) auto;
  align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #edf1f6;
}
.ai-center-file-name { display: flex; flex-direction: column; min-width: 0; }
.ai-center-file-name strong { overflow-wrap: anywhere; }
.ai-center-file-name small { color: #687b8d; }
.ai-center-file select { width: 100%; min-width: 0; }
.ai-center-file-reason { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #64758a; }
.ai-center-composer { display: flex; gap: 8px; align-items: end; padding: 12px 18px; border-top: 1px solid #d7e1ee; }
.ai-center-composer textarea { flex: 1; min-width: 0; resize: vertical; }
.ai-center-attach { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border: 1px solid #cbd8e9; border-radius: 5px; cursor: pointer; font-size: 24px; }
.ai-center-attach:hover { background: #edf4ff; }
.ai-center-disclosure { margin: 0; padding: 0 18px 7px; font-size: 11px; color: #65778c; }
#aiCenterStatus { min-height: 20px; padding: 0 18px 8px; }
#aiCenterStatus.error { color: #a52a2a; }
@media (max-width: 900px) {
  .ai-center-view .hero { padding-top: 44px; }
  .ai-center-layout { grid-template-columns: minmax(0, 1fr); max-height: none; min-height: 650px; }
  .ai-center-sessions { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #d7e1ee; }
  .ai-center-session-list { display: flex; }
  .ai-center-session { min-width: 140px; }
  .ai-center-main { min-height: 550px; }
  .ai-center-file { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ai-center-file-name { grid-column: 1 / -1; }
  .ai-center-apply { grid-column: 1 / -1; }
}
