:root {
  --col-panorama-accent: #31ff8a;
  --col-panorama-alt: #00c1fe;
  --col-panorama-alt-hover: #00a0c2;
  --col-panorama-bg-dark: #201F43;
  --col-panorama-dark-hover: #2c2b5a;
  --col-panorama-bg-light: #F2F6F9;
  --col-panorama-text-dark: #201F43;
  --col-panorama-text-light: #ffffff;

  --col-surface: #ffffff;
  --col-border: #e2e8f0;
  --col-muted: #6b7280;
  --col-danger: #b42318;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(32, 31, 67, 0.06);
  --shadow-md: 0 8px 24px rgba(32, 31, 67, 0.08);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --max-width: 780px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--col-panorama-text-dark);
  background: var(--col-panorama-bg-light);
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  height: 100dvh;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Sidebar ---------- */

.sidebar {
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: var(--col-panorama-bg-dark);
  color: var(--col-panorama-text-light);
}

.sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 6px;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  align-self: flex-start;
}

.btn-new {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--col-panorama-text-dark);
  background: var(--col-panorama-accent);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-new:hover {
  filter: brightness(0.92);
}

.conversations {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-label {
  margin: 0 6px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.conversations ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conversations li {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  background: var(--col-panorama-alt);
  font-size: 17px;
  cursor: pointer;
}

.conversations li:hover {
  background: var(--col-panorama-alt-hover);
}

.conversation {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.85);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation.active {
  color: var(--col-panorama-text-dark);
  font-weight: 600;
}

.conversations li:has(.conversation.active) {
  background: var(--col-panorama-accent);
  color: var(--col-panorama-text-dark);
}

.conversation-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0;
}

.conversations li:hover .conversation-delete,
.conversation-delete:focus-visible {
  opacity: 1;
}

.conversation-delete:hover {
  color: var(--col-panorama-text-light);
}

.sidebar-empty {
  margin: 4px 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--col-panorama-text-light);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.95;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.account {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.account-link {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.account-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.account-avatar {
  flex: 0 0 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--col-panorama-alt);
  color: var(--col-panorama-bg-dark);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.account-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--col-border);
  background: var(--col-surface);
}

.assistant-tag {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--col-muted);
}

.mode-switch {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  background: #f6f8fb;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
}

.mode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--col-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-link:hover {
  color: var(--col-panorama-text-light);
  background-color: var(--col-panorama-alt);
}

.mode-link.active {
  background: var(--col-panorama-bg-dark);
  color: var(--col-panorama-text-light);
}

.btn-icon {
  display: none;
  place-items: center;
  height: 36px;
  width: 36px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  background: var(--col-surface);
  cursor: pointer;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--col-panorama-text-dark);
  stroke-width: 2;
  stroke-linecap: round;
}

.btn-ghost {
  font: inherit;
  font-size: 13px;
  color: var(--col-panorama-text-light);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(49, 255, 138, 0.16);
  border-color: var(--col-panorama-accent);
}

/* ---------- Chat area ---------- */

.chat {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.database-main {
  overflow: hidden;
}

.database {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px 18px;
}

.database-hero {
  max-width: 1180px;
  margin: 0 auto 18px;
  display: flex;
  gap: 16px;
  align-items: stretch;
  justify-content: center;
}

.database-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.database-hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--col-muted);
}

.eyebrow {
  margin-bottom: 10px !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--col-panorama-alt) !important;
}

.database-count {
  font-size: 20px;
  font-weight: 700;
}

.database-help {
  font-size: 13px;
  color: var(--col-muted);
}

.database-status {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  min-height: 0;
}

.database-status[data-kind="success"] {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.database-status[data-kind="error"] {
  background: #fef3f2;
  border-color: #fda29b;
  color: var(--col-danger);
}

.database-grid {
  max-width: 1180px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.empty-state,
.table-card {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  padding: 22px;
}

.table-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.table-card-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.table-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.table-meta,
.table-hint,
.table-status {
  margin: 0;
  font-size: 13px;
  color: var(--col-muted);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-secondary, .btn-upload, .btn-secondary-dark, .btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--col-border);
  background: var(--col-panorama-bg-light);
  color: var(--col-panorama-text-dark);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-download {
  color: var(--col-panorama-text-light);
  background: var(--col-panorama-alt);
  border-color: var(--col-panorama-alt);
}

.btn-download:hover {
  color: var(--col-panorama-text-light);
  background: var(--col-panorama-alt-hover);
  border-color: var(--col-panorama-alt);
}

.btn-secondary:hover,
.btn-upload:hover:not(:disabled) {
  color: var(--col-panorama-text-dark);
  background: var(--col-panorama-accent);
}

.btn-secondary-dark {
  color: var(--col-panorama-text-light);
  background: var(--col-panorama-bg-dark);
}

.btn-secondary-dark:hover {
  border-color: var(--col-panorama-alt);
  color: var(--col-panorama-text-light);
  background: var(--col-panorama-dark-hover);
}

.btn-upload:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.table-columns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--col-muted);
}

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

.column-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: #eef2f7;
  font-size: 12px;
  color: var(--col-panorama-text-dark);
}

.column-pill.muted {
  background: #f6f8fb;
  color: var(--col-muted);
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.placements-reader {
  max-width: 1180px;
  margin: 0 auto 18px;
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.placements-controls {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-field,
.sort-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--col-muted);
  font-size: 13px;
}

.search-field input,
.sort-field select {
  min-height: 38px;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: inherit;
}

.placement-sort-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.placements-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--col-border);
}

.filter-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--col-muted);
  font-size: 13px;
}

.filter-dropdown-toggle {
  min-height: 38px;
  min-width: 160px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%23667085' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.filter-dropdown-toggle.has-selection {
  border-color: var(--col-primary, #2f6fed);
  color: var(--col-panorama-text-dark);
  font-weight: 600;
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 5;
  min-width: 220px;
  max-height: 260px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 8px;
}

.filter-option-search {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 7px 9px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm, 6px);
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--col-panorama-text-dark);
}

.filter-options-list {
  max-height: 202px;
  overflow-y: auto;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  color: inherit;
  cursor: pointer;
}

.filter-option[hidden] {
  display: none;
}

.filter-option:hover {
  background: #f3f6ff;
}

.filter-empty {
  padding: 6px 8px;
  font-size: 13px;
  color: var(--col-muted);
}

.filter-field-range {
  min-width: 200px;
}

.filter-range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-range-inputs input {
  min-height: 38px;
  width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: inherit;
}

.filter-range-sep {
  color: var(--col-muted);
}

.placements-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--col-muted);
}

.placements-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-size-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-size-field select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: inherit;
}

.placements-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--col-muted);
}

.placements-pagination .btn-icon {
  min-width: 34px;
  min-height: 34px;
}

.placements-pagination .btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.placements-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
}

.placements-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.placements-table th,
.placements-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--col-border);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.placements-table th {
  background: #f8fafc;
  color: var(--col-panorama-text-dark);
  position: sticky;
  top: 0;
  z-index: 1;
}

.placements-table tbody tr:hover {
  background: #fafcff;
}

.placements-actions-col {
  width: 1%;
  white-space: nowrap;
}

.placements-action-cell {
  text-align: center;
  white-space: nowrap;
}

.btn-row-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #fbd4cf;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--col-danger);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-row-delete:hover:not(:disabled),
.btn-row-delete:focus-visible {
  border-color: #fda29b;
  background: #fef3f2;
  color: #912018;
}

.btn-row-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.empty-cell {
  color: var(--col-muted);
  text-align: center;
  padding: 20px 12px;
}

.upload-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border: 1.5px dashed var(--col-panorama-alt);
  border-radius: var(--radius-md);
  background: #f4fbff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--col-panorama-accent);
  background: #e6fff5;
  transform: translateY(-1px);
}

.upload-dropzone.disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
}

.dropzone-copy,
.dropzone-file {
  font-size: 13px;
  color: var(--col-muted);
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: #e8f3ff;
  color: var(--col-panorama-alt-hover);
  font-size: 18px;
}

.upload-progress {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: #e2e8f0;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--col-panorama-accent);
  transition: width 0.2s ease;
}

.upload-progress-bar.indeterminate {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  animation: upload-progress-indeterminate 1.1s ease-in-out infinite;
}

@keyframes upload-progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}


.dropzone-file {
  color: var(--col-panorama-text-dark);
  font-weight: 600;
}

.record-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--col-surface);
  color: inherit;
}

.record-dialog::backdrop {
  background: rgba(15, 26, 42, 0.45);
}

.record-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.record-form h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.record-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.record-field.wide {
  grid-column: 1 / -1;
}

.record-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--col-panorama-text-dark);
}

.record-field input,
.record-field select,
.record-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: inherit;
}

.record-field textarea {
  resize: vertical;
}

.record-field input:focus,
.record-field select:focus,
.record-field textarea:focus {
  outline: none;
  border-color: var(--col-panorama-alt);
}

.record-field input[readonly] {
  background: #f4f6fa;
  color: var(--col-muted);
}

.record-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 16px;
  align-items: start;
}

.account-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.account-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
  background: linear-gradient(to bottom, rgba(242, 246, 249, 0), var(--col-panorama-bg-light) 45%);
}

.btn-primary.btn-save {
  width: auto;
  min-width: 320px;
  font-size: 17px;
  padding: 16px 40px;
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: #fcfdff;
}

.member-summary {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.member-summary-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.member-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--col-panorama-alt);
  color: var(--col-panorama-bg-dark);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.member-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--col-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-profile-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 2px;
}

.member-detail {
  margin: 0;
  font-size: 14px;
}

.member-detail .field-label {
  margin-right: 6px;
}

.member-actions {
  margin-top: 4px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--col-muted);
}

.firm-locations {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.firm-members {
  margin-top: 16px;
}

.firm-locations h2,
.firm-locations .card-copy {
  margin-bottom: 0;
}

.location-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: #fcfdff;
}

.location-new {
  border-style: dashed;
  background: #fbfdff;
}

.location-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.collapsible-summary:focus-visible {
  outline: 2px solid var(--col-panorama-alt);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.collapsible-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.collapsible-title {
  font-weight: 600;
}

.collapsible-meta {
  font-size: 13px;
  color: var(--col-muted);
}

.collapsible-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 18px;
  color: var(--col-muted);
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.collapsible-card.is-open .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  margin-top: 4px;
}

.collapsible-body[hidden] {
  display: none;
}

.btn-secondary.danger {
  color: var(--col-danger);
}

.btn-secondary.danger:hover {
  border-color: #fda29b;
  background: #fef3f2;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.checkbox-field input {
  margin: 0;
}

.field-note {
  margin: 0;
  font-size: 12px;
  color: var(--col-muted);
}

.field-note.error,
.form-status.error {
  color: var(--col-danger);
}

.form-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #eff8ff;
  color: #175cd3;
}

.form-status.success {
  background: #ecfdf3;
  color: #067647;
}

.table-filters,
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-filters input[type="search"] {
  flex: 1 1 260px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  font: inherit;
}

.table-filters input[type="search"]:focus {
  outline: none;
  border-color: var(--col-panorama-alt);
}

.upload-form input[type="file"] {
  font: inherit;
}

.table-hint.warning {
  color: #8a4b00;
}

.table-status[data-kind="success"] {
  color: #067647;
}

.table-status[data-kind="error"] {
  color: var(--col-danger);
}

.developer-console {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 18px 20px;
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.developer-console-head h2 {
  margin: 0;
  font-size: 20px;
}

.developer-console-head p {
  margin: 6px 0 0;
  color: var(--col-muted);
  font-size: 14px;
}

.readonly-note p {
  margin: 8px 0 0;
  color: var(--col-muted);
}

.sql-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sql-form label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--col-muted);
}

.sql-form textarea {
  width: 100%;
  resize: vertical;
  font: inherit;
  color: inherit;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 96px;
}

.sql-form textarea:focus {
  outline: none;
  border-color: var(--col-panorama-alt);
}

.sql-actions {
  display: flex;
  justify-content: flex-end;
}

.sql-result,
.table-preview {
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: #fcfdff;
  padding: 10px;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 360px;
}

.result-table th,
.result-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--col-border);
  font-size: 13px;
  vertical-align: top;
}

.result-table th {
  background: #eef2f7;
  font-weight: 700;
}

.audit-log-block {
  margin-top: 22px;
  border-top: 1px solid var(--col-border);
  padding-top: 16px;
}

.developer-console-head.compact h2 {
  font-size: 17px;
}

.audit-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-log-item {
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  background: #fcfdff;
  padding: 10px 12px;
}

.audit-log-item header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.audit-log-item header span,
.audit-log-item p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--col-muted);
}

.audit-log-item pre {
  margin: 8px 0 0;
  padding: 8px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f8fb;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.audit-log-item.error {
  border-color: #fda29b;
  background: #fef3f2;
}

.page-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero {
  margin-bottom: 18px;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.info-card-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.firms-grid-section {
  margin-top: 24px;
}

.firm-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--col-muted);
  font-size: 13px;
  align-self: flex-start;
}

.firm-switcher select {
  min-height: 38px;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: inherit;
}

.firms-grid-section h2 {
  margin-bottom: 14px;
}

.firms-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .firms-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.firm-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.firm-card-heading {
  min-width: 0;
}

.firm-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
  font-size: 13px;
  color: var(--col-muted);
  text-align: right;
  white-space: nowrap;
}

.firm-card-meta-item i {
  color: var(--col-panorama-alt);
  margin-right: 4px;
}

.firm-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--col-panorama-alt);
  color: var(--col-panorama-bg-dark);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.firm-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.firm-card h3 {
  margin: 0 0 6px;
}

.info-card {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.info-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.info-card-head h2 {
  margin-bottom: 4px;
}

.info-card-head .card-copy {
  margin-bottom: 0;
}

.info-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.media-upload-status {
  display: flex;
  justify-content: center;
  margin: 0;
  font-size: 13px;
  color: var(--col-muted);
}

.media-upload-status[data-kind="error"] {
  color: var(--col-danger, #c0392b);
}

.media-upload-status[data-kind="success"] {
  color: var(--col-success, #2e7d32);
}

.logo-upload {
  position: relative;
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: block;
}

.logo-upload-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--col-panorama-alt);
  color: var(--col-panorama-bg-dark);
  font-size: 20px;
  font-weight: 700;
}

.logo-upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-upload-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  align-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: var(--col-panorama-text-light);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.logo-upload:hover .logo-upload-overlay,
.logo-upload:focus-within .logo-upload-overlay {
  opacity: 1;
}

.firm-identity {
  display: flex;
  align-items: center;
  gap: 24px;
}

.firm-identity-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.info-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.card-copy {
  margin: 0 0 14px;
  color: var(--col-muted);
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.detail-list div {
  display: grid;
  gap: 4px;
}

.detail-list dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--col-muted);
}

.detail-list dd,
.page-list {
  margin: 0;
}

.page-list {
  padding-left: 18px;
}

.chat-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.welcome {
  text-align: center;
  padding: 6vh 0 0;
}

.welcome h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.welcome p {
  margin: 0 auto 28px;
  max-width: 46ch;
  color: var(--col-muted);
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.suggestion {
  font: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--col-panorama-text-dark);
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.suggestion:hover {
  transform: translateY(-2px);
  border-color: var(--col-panorama-alt);
  box-shadow: var(--shadow-md);
}

/* ---------- Messages ---------- */

.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.msg.user {
  justify-content: flex-end;
}

.avatar {
  flex: 0 0 32px;
  height: 32px;
  width: 32px;
  overflow: hidden;
  margin-top: 2px;
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 82%;
}

.msg.user .msg-body {
  align-items: flex-end;
}

.tool-activity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 12px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  background: var(--col-surface);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--col-muted);
}

.tool-label {
  color: var(--col-panorama-text-dark);
}

.tool-detail:not(:empty)::before {
  content: "· ";
}

.tool-spinner {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(0, 193, 254, 0.25);
  border-top-color: var(--col-panorama-alt);
  animation: tool-spin 0.7s linear infinite;
}

.tool-chip[data-status="complete"] .tool-spinner {
  border: 0;
  background: var(--col-panorama-accent);
  animation: none;
}

.tool-chip[data-status="error"] {
  border-color: #fda29b;
  background: #fef3f2;
  color: var(--col-danger);
}

.tool-chip[data-status="error"] .tool-spinner {
  border: 0;
  background: var(--col-danger);
  animation: none;
}

@keyframes tool-spin {
  to { transform: rotate(360deg); }
}

.bubble {
  max-width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg.assistant .bubble {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-top-left-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.msg.user .bubble {
  background: var(--col-panorama-bg-dark);
  color: var(--col-panorama-text-light);
  border-top-right-radius: var(--radius-sm);
}

.msg.error .bubble {
  background: #fef3f2;
  border: 1px solid #fda29b;
  color: var(--col-danger);
}

/* Rendered markdown */

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

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

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

.bubble.markdown p {
  margin: 0 0 10px;
}

.bubble.markdown h1,
.bubble.markdown h2,
.bubble.markdown h3,
.bubble.markdown h4,
.bubble.markdown h5,
.bubble.markdown h6 {
  margin: 16px 0 8px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--col-panorama-text-dark);
}

.bubble.markdown h1 { font-size: 1.35em; }
.bubble.markdown h2 { font-size: 1.22em; }
.bubble.markdown h3 { font-size: 1.12em; }
.bubble.markdown h4,
.bubble.markdown h5,
.bubble.markdown h6 { font-size: 1em; }

.bubble.markdown ul,
.bubble.markdown ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.bubble.markdown li {
  margin: 4px 0;
}

.bubble.markdown li > ul,
.bubble.markdown li > ol {
  margin: 4px 0 0;
}

.bubble.markdown a {
  color: var(--col-panorama-alt);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bubble.markdown code {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: rgba(15, 39, 61, 0.06);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
}

.bubble.markdown pre {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  background: rgba(15, 39, 61, 0.05);
  overflow-x: auto;
}

.bubble.markdown pre code {
  display: block;
  padding: 0;
  background: none;
  white-space: pre;
  overflow-wrap: normal;
}

.bubble.markdown blockquote {
  margin: 0 0 10px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--col-panorama-alt);
  color: var(--col-muted);
}

.bubble.markdown hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid var(--col-border);
}

.bubble.markdown .md-table {
  margin: 0 0 10px;
  overflow-x: auto;
}

.bubble.markdown table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94em;
}

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

.bubble.markdown th {
  background: rgba(15, 39, 61, 0.04);
  font-weight: 600;
}

.msg.user .bubble.markdown a {
  color: inherit;
}

.msg.user .bubble.markdown code,
.msg.user .bubble.markdown pre,
.msg.user .bubble.markdown th {
  background: rgba(255, 255, 255, 0.14);
}

.md-table-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 6px;
}

.md-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 12px;
  color: var(--col-muted);
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.md-table-btn:hover {
  color: var(--col-panorama-text-dark);
  border-color: var(--col-panorama-alt);
}

.msg.user .bubble.markdown .md-table-btn {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.24);
}

/* Message actions */

.msg-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.msg:hover .msg-actions,
.msg-actions:focus-within {
  opacity: 1;
}

.msg.error .msg-actions {
  display: none;
}

.msg-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--col-muted);
  background: none;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  cursor: pointer;
}

.msg-copy:hover {
  color: var(--col-panorama-text-dark);
  border-color: var(--col-panorama-alt);
}

.msg-copy.copied {
  color: var(--col-panorama-accent);
  border-color: var(--col-panorama-accent);
}

/* Typing indicator */

.dots {
  display: inline-flex;
  gap: 5px;
  padding: 4px 0;
}

.dots span {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--col-panorama-alt);
  animation: blink 1.2s infinite ease-in-out;
}

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

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

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* ---------- Composer ---------- */

.composer-wrap {
  padding: 12px 20px 18px;
  background: linear-gradient(to bottom, rgba(242, 246, 249, 0), var(--col-panorama-bg-light) 40%);
}

.composer {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s ease;
}

.composer:focus-within {
  border-color: var(--col-panorama-alt);
}

.composer textarea {
  flex: 1;
  font: inherit;
  color: inherit;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  max-height: 180px;
  padding: 8px 0;
}

.btn-send {
  flex: 0 0 auto;
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--col-panorama-bg-dark);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-send svg {
  width: 20px;
  height: 20px;
  fill: var(--col-panorama-accent);
}

.btn-send:hover:not(:disabled) {
  background: #2c2b5a;
}

.btn-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.disclaimer {
  max-width: var(--max-width);
  margin: 8px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--col-muted);
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: 264px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }

  .sidebar.open {
    transform: none;
  }

  .btn-icon {
    display: grid;
  }
}

@media (max-width: 600px) {
  .chat-inner {
    padding-top: 20px;
  }

  .bubble {
    max-width: 88%;
  }
}

/* ---------- Login ---------- */

.login-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: var(--col-panorama-bg-dark);
}

.login-shell {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--col-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  height: 34px;
  width: auto;
  display: block;
  margin: 0 auto 26px;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.login-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--col-muted);
}

.login-error {
  margin: 0 0 18px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--col-danger);
  background: #fef3f2;
  border: 1px solid #fda29b;
  border-radius: var(--radius-sm);
}

.login-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  font: inherit;
  color: inherit;
  margin-bottom: 16px;
  padding: 11px 16px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.15s ease;
}

.login-card input:focus {
  border-color: var(--col-panorama-alt);
}

.btn-primary {
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: var(--col-panorama-text-light);
  background: var(--col-panorama-bg-dark);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--col-panorama-dark-hover);
}

.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: var(--col-text, #1a1a1a);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-microsoft:hover {
  background: #f5f5f7;
  border-color: var(--col-panorama-alt);
}

.role-badge,
.role-badge--developer,
.role-badge--admin,
.role-badge--user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 7px 12px;
    border: 1px solid var(--col-border);
    border-radius: var(--radius-pill);
    background-color: var(--col-surface);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
    color: var(--col-muted);
}

.role-badge--developer {
    color: var(--col-panorama-text-light);
    background-color: var(--col-panorama-bg-dark);
}

.role-badge--admin { 
    color: var(--col-panorama-text-dark);
    background-color: var(--col-panorama-accent);
}

.role-badge--user { 
    color: var(--col-panorama-text-light);
    background-color: var(--col-panorama-alt);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--col-muted);
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--col-border);
}

.login-note,
.login-note a {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
