:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-strong: #f5f5f5;
  --ink: #15284b;
  --muted: #7d8491;
  --line: #e4e3e3;
  --accent: #cd9700;
  --accent-strong: #a97c00;
  --navy: #15284b;
  --gold: #cd9700;
  --warn: #a95322;
  --danger: #b4233a;
  --shadow: 0 18px 55px rgba(21, 40, 75, 0.14);
  font-family:
    Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(21, 40, 75, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(205, 151, 0, 0.08), transparent 42%),
    var(--bg);
  color: var(--ink);
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  gap: 0;
  width: min(1440px, 100%);
  height: 100vh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-shell[hidden],
body.login-mode .app-shell {
  display: none !important;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
  border-right: 1px solid rgba(205, 151, 0, 0.38);
  background: var(--navy);
  color: #ffffff;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

h1,
h2,
p {
  margin: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.brand-name {
  display: block;
  color: #ffffff;
  font-family: Cinzel, Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
}

.brand-bar p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.user-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: -12px 0 24px;
  padding: 10px;
  border: 1px solid rgba(205, 151, 0, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.user-panel[hidden] {
  display: none;
}

.user-panel strong,
.user-panel span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-panel strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.user-panel span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
}

.user-panel button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.user-panel button:hover {
  border-color: rgba(205, 151, 0, 0.7);
  color: var(--gold);
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 5px rgba(205, 151, 0, 0.18);
}

.status-dot.ready {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(205, 151, 0, 0.22);
}

.new-chat-button,
.attach-button,
.web-search-button,
.deep-scan-button,
.send-button,
.chat-open-button,
.microsoft-login-button,
.user-panel button,
.tool-list button,
.message-actions button,
.document-tabs button,
.document-actions button,
.document-actions a,
.document-close,
.remove-button {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-header h2 {
  font-family: Cinzel, Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.new-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
}

.new-chat-button:hover {
  background: #e1c166;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: stretch;
}

.chat-open-button {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-align: left;
}

.chat-row.active .chat-open-button {
  border-color: var(--gold);
  background: rgba(205, 151, 0, 0.14);
}

.chat-row.generating .chat-open-button {
  border-color: rgba(205, 151, 0, 0.48);
}

.chat-row.generating .chat-open-button span {
  color: var(--gold);
}

.chat-open-button strong,
.chat-open-button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-open-button strong {
  font-size: 0.92rem;
}

.chat-open-button span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
}

#fileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  align-self: end;
  cursor: pointer;
  background: var(--panel);
  color: var(--ink);
}

.attach-button:hover {
  border-color: rgba(205, 151, 0, 0.7);
  color: var(--accent);
}

.web-search-button,
.deep-scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  align-self: end;
  cursor: pointer;
  background: var(--panel);
  color: var(--ink);
}

.web-search-button:hover,
.web-search-button.active,
.deep-scan-button:hover,
.deep-scan-button.active {
  border-color: rgba(205, 151, 0, 0.7);
  color: var(--accent);
}

.web-search-button.active,
.deep-scan-button.active {
  background: rgba(205, 151, 0, 0.12);
}

.attach-button svg,
.web-search-button svg,
.deep-scan-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 118px;
  overflow: auto;
  padding-right: 4px;
}

.attachment-list[hidden] {
  display: none;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(205, 151, 0, 0.34);
  border-radius: 8px;
  background: rgba(205, 151, 0, 0.08);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.upload-progress[hidden] {
  display: none;
}

.upload-step-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(205, 151, 0, 0.16);
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-list[hidden] {
  display: none;
}

.tool-list button,
.message-actions button,
.document-tabs button,
.document-actions button,
.document-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  cursor: pointer;
  background: #ffffff;
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 700;
}

.tool-list button:hover,
.message-actions button:hover,
.document-tabs button:hover,
.document-tabs button.active,
.document-actions button:hover,
.document-actions a:hover {
  border-color: rgba(205, 151, 0, 0.65);
  color: var(--accent);
}

.tool-list button:disabled,
.message-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.attachment-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: min(320px, 100%);
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.attachment-open-button {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.attachment-open-button:hover strong {
  color: var(--accent);
}

.attachment-open-button strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.attachment-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ocr-download-button,
.download-file-button {
  min-width: 36px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid rgba(205, 151, 0, 0.35);
  border-radius: 7px;
  background: rgba(205, 151, 0, 0.1);
  color: var(--navy);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
}

.download-file-button {
  min-width: 76px;
}

.ocr-download-button:hover,
.download-file-button:hover {
  border-color: rgba(205, 151, 0, 0.72);
  background: rgba(205, 151, 0, 0.16);
  color: var(--accent);
}

.remove-button {
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.remove-button:hover {
  color: var(--danger);
  border-color: rgba(180, 35, 58, 0.45);
}

.sidebar .remove-button {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.64);
}

.sidebar .remove-button:hover {
  border-color: rgba(205, 151, 0, 0.7);
  color: #ffffff;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--panel);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 28px;
}

.message {
  width: min(780px, 88%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.streaming {
  border-color: rgba(205, 151, 0, 0.45);
}

.assistant-loader {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.assistant-loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.assistant-loader-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
  animation: loader-dot 1s ease-in-out infinite;
}

.assistant-loader-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.assistant-loader-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.markdown-body {
  white-space: normal;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body table,
.markdown-body pre {
  margin: 0 0 10px;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 12px 0 7px;
  font-size: 0.98rem;
  line-height: 1.25;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.markdown-body li + li {
  margin-top: 4px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 0.88rem;
}

.markdown-body th,
.markdown-body td {
  padding: 7px 8px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: rgba(21, 40, 75, 0.06);
}

.markdown-body code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(21, 40, 75, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  position: relative;
  overflow: auto;
  padding: 36px 12px 12px;
  border-radius: 8px;
  background: #101828;
  color: #ffffff;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.copy-button {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.7rem;
}

.source-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.web-search-activity,
.deep-scan-activity {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(21, 40, 75, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.web-search-header,
.deep-scan-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.web-search-dot,
.deep-scan-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(205, 151, 0, 0.14);
}

.message.streaming .web-search-dot,
.message.streaming .deep-scan-dot {
  animation: pulse 1s ease-in-out infinite;
}

.web-search-header strong,
.deep-scan-header strong {
  min-width: 0;
  color: var(--navy);
  font-size: 0.82rem;
}

.web-search-header span:last-child,
.deep-scan-header span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.web-search-query,
.web-search-error,
.deep-scan-activity p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.web-search-error {
  color: var(--danger);
}

.web-search-results {
  display: grid;
  gap: 6px;
}

.web-search-results a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.web-search-results a:hover strong {
  color: var(--accent);
}

.web-search-results span,
.web-search-results strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-search-results span {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.web-search-results strong {
  color: var(--ink);
  font-size: 0.76rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

@keyframes loader-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.message.assistant {
  align-self: flex-start;
  background: var(--panel-strong);
}

.message.user {
  align-self: flex-end;
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.message.attachment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-end;
  width: min(560px, 88%);
  padding: 0;
  border: 0;
  background: transparent;
  white-space: normal;
}

.generated-file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.chat-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(21, 40, 75, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(21, 40, 75, 0.08);
}

.chat-file-card.unavailable {
  opacity: 0.66;
}

.chat-file-open-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.chat-file-open-button:disabled {
  cursor: default;
}

.chat-file-open-button:not(:disabled):hover strong {
  color: var(--accent);
}

.file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
}

.chat-file-detail {
  display: block;
  min-width: 0;
}

.chat-file-detail strong,
.chat-file-detail span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-detail strong {
  font-size: 0.88rem;
}

.chat-file-detail span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.message.system {
  align-self: center;
  width: min(620px, 92%);
  background: #fff8e6;
  color: #745200;
  border-color: rgba(205, 151, 0, 0.38);
  text-align: center;
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 22px 22px;
  border-top: 2px solid rgba(205, 151, 0, 0.34);
  background: #fbfbfa;
}

.composer-row {
  display: grid;
  grid-template-columns: 52px 52px 52px minmax(0, 1fr) 52px;
  gap: 12px;
  align-items: end;
}

textarea {
  width: 100%;
  min-height: 58px;
  max-height: 190px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  line-height: 1.4;
}

textarea:focus,
.new-chat-button:focus-visible,
.chat-open-button:focus-visible,
.chat-file-open-button:focus-visible,
.attach-button:focus-visible,
.web-search-button:focus-visible,
.deep-scan-button:focus-visible,
.send-button:focus-visible,
.microsoft-login-button:focus-visible,
.user-panel button:focus-visible,
.tool-list button:focus-visible,
.message-actions button:focus-visible,
.document-tabs button:focus-visible,
.document-actions button:focus-visible,
.document-actions a:focus-visible,
.document-close:focus-visible,
.ocr-download-button:focus-visible,
.download-file-button:focus-visible,
.remove-button:focus-visible {
  outline: 3px solid rgba(205, 151, 0, 0.25);
  outline-offset: 2px;
}

.send-button {
  width: 52px;
  height: 52px;
  align-self: end;
  cursor: pointer;
  background: var(--navy);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
}

.send-button:hover {
  background: #0f1e3a;
}

.send-button.generating {
  background: var(--danger);
}

.send-button.generating:hover {
  background: #8f1d30;
}

.send-button:disabled,
.new-chat-button:disabled,
.web-search-button:disabled,
.deep-scan-button:disabled,
.attach-button.disabled {
  cursor: default;
  opacity: 0.62;
}

.attach-button.disabled {
  pointer-events: none;
}

.document-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(21, 40, 75, 0.42);
}

.document-panel {
  width: min(1040px, 100%);
  height: min(820px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.document-panel header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.document-panel header strong,
.document-panel header span {
  display: block;
}

.document-panel header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.document-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
}

.document-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.document-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #ffffff;
}

.document-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #ffffff;
}

.document-loading {
  padding: 16px;
  color: var(--muted);
}

.document-text {
  min-height: 100%;
  margin: 0;
  padding: 16px;
  color: var(--ink);
  background: #fbfbfa;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.document-text mark {
  display: inline;
  padding: 1px 2px;
  border-radius: 3px;
  background: rgba(205, 151, 0, 0.32);
  color: inherit;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.login-mode {
  overflow: hidden;
}

.login-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(21, 40, 75, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(205, 151, 0, 0.11), transparent 42%),
    var(--bg);
}

.login-panel {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(205, 151, 0, 0.34);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border: 1px solid rgba(205, 151, 0, 0.42);
  border-radius: 8px;
  background: var(--navy);
  box-shadow: 0 12px 28px rgba(21, 40, 75, 0.18);
}

.login-logo {
  width: 68px;
  height: 68px;
}

.login-panel h1 {
  color: var(--navy);
  font-family: Cinzel, Georgia, serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
}

.login-panel p {
  margin: 14px 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.microsoft-login-button {
  min-height: 44px;
  padding: 0 16px;
  background: var(--navy);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.microsoft-login-button:hover {
  background: #0f1e3a;
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    min-height: 0;
    box-shadow: none;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-panel {
    min-height: 0;
    height: 100%;
  }

  .messages {
    padding: 18px;
  }

  .message {
    width: 100%;
  }

  .composer {
    padding: 14px;
  }

  .composer-row {
    grid-template-columns: 48px 48px 48px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .attach-button,
  .web-search-button,
  .deep-scan-button,
  .send-button {
    width: 48px;
    height: 48px;
  }
}
