:root {
  --bg: #08090e;
  --sidebar: #0c0e15;
  --surface: #11141d;
  --surface-2: #151823;
  --surface-3: #191d29;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #f6f7fb;
  --muted: #979fb2;
  --muted-2: #687084;

  --purple: #7857ff;
  --purple-light: #a08cff;
  --purple-soft: rgba(120, 87, 255, 0.12);

  --green: #54dfa2;
  --red: #ff7777;

  --sidebar-width: 330px;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --transition: 0.22s ease;
}


* {
  box-sizing: border-box;
}


html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}


body {
  overflow: hidden;

  color: var(--text);

  background:
    radial-gradient(
      circle at 65% -15%,
      rgba(120, 87, 255, 0.12),
      transparent 35%
    ),
    var(--bg);

  font-family: "DM Sans", sans-serif;
}


button,
input,
select {
  font: inherit;
}


button {
  -webkit-tap-highlight-color: transparent;
}


.hidden {
  display: none !important;
}


/* =========================================================
   APP
========================================================= */

.app {
  display: grid;

  grid-template-columns:
    var(--sidebar-width)
    minmax(0, 1fr);

  width: 100%;
  height: 100vh;
}


/* =========================================================
   SIDEBAR
========================================================= */

.catalog {
  min-width: 0;

  display: flex;
  flex-direction: column;

  padding: 24px 22px 18px;

  border-right: 1px solid var(--border);

  background:
    linear-gradient(
      180deg,
      rgba(15, 17, 26, 0.98),
      rgba(10, 12, 18, 0.98)
    );

  overflow-y: auto;
}


.catalog__brand {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 20px;
}


.catalog__mark {
  width: 44px;
  height: 44px;

  flex: 0 0 44px;

  display: grid;
  place-items: center;

  border-radius: 13px;

  color: white;

  font-size: 18px;

  background:
    linear-gradient(
      135deg,
      #957fff,
      #6541ed
    );

  box-shadow:
    0 10px 35px
    rgba(120, 87, 255, 0.28);
}


.catalog__title {
  font-family: "Manrope", sans-serif;

  font-size: 18px;
  font-weight: 800;

  letter-spacing: -0.02em;
}


.catalog__title span {
  color: var(--purple-light);
}


.catalog__subtitle {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
}


.workspace-status {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-bottom: 25px;

  padding: 11px 12px;

  border: 1px solid var(--border);

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.02);
}


.workspace-status__dot {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px
    rgba(84, 223, 162, 0.65);
}


.workspace-status__copy {
  min-width: 0;
  flex: 1;
}


.workspace-status__copy strong,
.workspace-status__copy span {
  display: block;
}


.workspace-status__copy strong {
  font-size: 10px;
  font-weight: 600;
}


.workspace-status__copy span {
  margin-top: 2px;

  color: var(--muted);

  font-size: 9px;
}


.workspace-status__badge {
  padding: 4px 7px;

  border-radius: 999px;

  color: var(--green);

  background:
    rgba(84, 223, 162, 0.08);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: 0.08em;
}


.catalog__section {
  margin-bottom: 26px;
}


.catalog__section--status {
  margin: 0;
}


.catalog__section--grow {
  min-height: 160px;
  flex: 1;
}


.catalog__heading {
  margin-bottom: 11px;
}


.catalog__eyebrow {
  display: block;

  margin-bottom: 4px;

  color: var(--muted-2);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: 0.16em;
}


.catalog__heading h3,
.catalog__label-row h3 {
  margin: 0;

  font-family: "Manrope", sans-serif;

  font-size: 13px;
  font-weight: 700;
}


/* =========================================================
   API KEY STATUS
========================================================= */

.key-status {
  min-height: 0;

  margin-bottom: 0;

  color: var(--muted);

  font-size: 9px;

  line-height: 1.5;
}


.key-status.ok {
  margin-bottom: 12px;

  padding: 8px 10px;

  border: 1px solid
    rgba(84, 223, 162, 0.15);

  border-radius: 9px;

  color: var(--green);

  background:
    rgba(84, 223, 162, 0.05);
}


.key-status.err {
  margin-bottom: 12px;

  padding: 8px 10px;

  border: 1px solid
    rgba(255, 119, 119, 0.2);

  border-radius: 9px;

  color: var(--red);

  background:
    rgba(255, 119, 119, 0.06);
}


/* =========================================================
   DROPZONE
========================================================= */

.dropzone {
  min-height: 166px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 20px 16px;

  border: 1px dashed
    rgba(120, 87, 255, 0.4);

  border-radius: var(--radius);

  text-align: center;

  cursor: pointer;

  background:
    linear-gradient(
      180deg,
      rgba(120, 87, 255, 0.055),
      rgba(120, 87, 255, 0.012)
    );

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}


.dropzone:hover,
.dropzone.dragover {
  border-color:
    rgba(160, 140, 255, 0.9);

  background:
    rgba(120, 87, 255, 0.09);

  transform: translateY(-2px);
}


.dropzone__icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  margin-bottom: 12px;

  border-radius: 11px;

  color: var(--purple-light);

  background:
    rgba(120, 87, 255, 0.11);
}


.dropzone__icon svg {
  width: 21px;
  height: 21px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.dropzone strong {
  font-size: 11px;
  font-weight: 600;
}


.dropzone__text {
  margin-top: 6px;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.5;
}


.dropzone__text span {
  color: var(--purple-light);
}


.dropzone__types {
  margin-top: 10px;

  color: var(--muted-2);

  font-size: 8px;

  letter-spacing: 0.06em;
}


/* =========================================================
   UPLOAD PROGRESS
========================================================= */

.upload-progress {
  margin-top: 10px;

  padding: 10px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: var(--surface);
}


.upload-progress__label {
  margin-bottom: 8px;

  overflow: hidden;

  color: var(--muted);

  font-size: 9px;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.upload-progress__bar {
  height: 3px;

  overflow: hidden;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.06);
}


.upload-progress__bar span {
  display: block;

  width: 45%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      var(--purple),
      var(--purple-light)
    );

  animation:
    uploadLoading 1.15s ease-in-out infinite;
}


@keyframes uploadLoading {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(245%);
  }
}


/* =========================================================
   DOCUMENT LIST
========================================================= */

.catalog__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 10px;
}


.doc-count {
  min-width: 25px;
  height: 25px;

  display: grid;
  place-items: center;

  padding: 0 7px;

  border: 1px solid var(--border);

  border-radius: 8px;

  color: var(--muted);

  background:
    rgba(255, 255, 255, 0.02);

  font-size: 9px;
}


.doc-list {
  display: flex;
  flex-direction: column;

  gap: 8px;
}


.doc-list__empty {
  padding: 20px 14px;

  border: 1px solid var(--border);

  border-radius: 12px;

  color: var(--muted);

  text-align: center;

  background:
    rgba(255, 255, 255, 0.015);

  font-size: 9px;

  line-height: 1.55;
}


.doc-card {
  padding: 11px;

  border: 1px solid var(--border);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.025);

  transition:
    border-color var(--transition),
    transform var(--transition),
    background var(--transition);
}


.doc-card:hover {
  border-color:
    rgba(120, 87, 255, 0.35);

  background:
    rgba(120, 87, 255, 0.035);

  transform: translateY(-1px);
}


.doc-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}


.doc-card__filename {
  min-width: 0;
  flex: 1;

  overflow: hidden;

  font-size: 10px;
  font-weight: 600;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.doc-card__delete {
  width: 25px;
  height: 25px;

  flex: 0 0 25px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 1px solid transparent;

  border-radius: 7px;

  color: var(--muted);

  background: transparent;

  cursor: pointer;

  transition: var(--transition);
}


.doc-card__delete:hover {
  border-color:
    rgba(255, 119, 119, 0.18);

  color: var(--red);

  background:
    rgba(255, 119, 119, 0.06);
}


.doc-card__stamp {
  display: inline-block;

  margin: 8px 0 7px;

  padding: 3px 6px;

  border-radius: 5px;

  color: var(--purple-light);

  background:
    rgba(120, 87, 255, 0.09);

  font-size: 7px;
  font-weight: 600;
}


.doc-card__summary {
  display: -webkit-box;

  overflow: hidden;

  color: var(--muted);

  font-size: 8px;

  line-height: 1.45;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


.doc-card__meta {
  display: flex;
  justify-content: space-between;

  gap: 8px;

  margin-top: 9px;

  color: var(--muted-2);

  font-size: 7px;
}


/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.catalog__footer {
  display: flex;
  align-items: flex-start;

  gap: 8px;

  padding-top: 15px;

  border-top: 1px solid var(--border);
}


.catalog__footer-dot {
  width: 6px;
  height: 6px;

  flex: 0 0 6px;

  margin-top: 4px;

  border-radius: 50%;

  background: var(--green);
}


.catalog__footer strong,
.catalog__footer small {
  display: block;
}


.catalog__footer strong {
  font-size: 9px;
  font-weight: 600;
}


.catalog__footer small {
  margin-top: 2px;

  color: var(--muted-2);

  font-size: 7px;

  line-height: 1.4;
}


/* =========================================================
   WORKSPACE
========================================================= */

.workspace {
  min-width: 0;
  min-height: 0;

  position: relative;

  display: flex;
  flex-direction: column;

  height: 100vh;
}


/* =========================================================
   HEADER
========================================================= */

.workspace__header {
  min-height: 124px;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 32px;

  padding: 25px 34px;

  border-bottom: 1px solid var(--border);

  background:
    rgba(8, 9, 14, 0.74);

  backdrop-filter: blur(16px);
}


.workspace__heading {
  min-width: 0;
}


.workspace__eyebrow {
  display: block;

  margin-bottom: 6px;

  color: var(--purple-light);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: 0.15em;
}


.workspace__header h1 {
  margin: 0;

  font-family: "Manrope", sans-serif;

  font-size:
    clamp(24px, 2.2vw, 33px);

  font-weight: 700;

  letter-spacing: -0.035em;
}


.workspace__subtitle {
  max-width: 620px;

  margin: 7px 0 0;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.5;
}


.scope-picker {
  width: 210px;

  flex: 0 0 210px;
}


.scope-picker label {
  display: block;

  margin-bottom: 6px;

  color: var(--muted-2);

  font-size: 8px;
  font-weight: 600;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}


.scope-picker__control {
  display: flex;
  align-items: center;

  gap: 7px;

  padding: 0 10px;

  border: 1px solid var(--border);

  border-radius: 11px;

  background: var(--surface);
}


.scope-picker__control svg {
  width: 15px;
  height: 15px;

  flex: 0 0 15px;

  fill: none;

  stroke: var(--muted);

  stroke-width: 1.7;

  stroke-linecap: round;
}


.scope-picker select {
  min-width: 0;
  width: 100%;

  padding: 11px 0;

  border: 0;
  outline: 0;

  color: var(--text);

  background: transparent;

  font-size: 10px;

  cursor: pointer;
}


.scope-picker option {
  color: var(--text);

  background: var(--surface);
}


/* =========================================================
   CHAT AREA
========================================================= */

.chat-log {
  min-height: 0;
  flex: 1;

  overflow-y: auto;

  padding:
    38px 34px
    145px;
}


.chat-log::-webkit-scrollbar,
.catalog::-webkit-scrollbar {
  width: 6px;
}


.chat-log::-webkit-scrollbar-thumb,
.catalog::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.08);
}


/* =========================================================
   WELCOME
========================================================= */

.chat-welcome {
  width: min(790px, 100%);

  margin: 4.5vh auto 0;

  text-align: center;
}


.chat-welcome__icon {
  width: 68px;
  height: 68px;

  display: grid;
  place-items: center;

  margin: 0 auto 17px;

  border: 1px solid
    rgba(160, 140, 255, 0.2);

  border-radius: 20px;

  color: white;

  font-size: 26px;

  background:
    radial-gradient(
      circle at 35% 30%,
      #a993ff,
      #7451fb 47%,
      #291b62
    );

  box-shadow:
    0 0 52px
    rgba(120, 87, 255, 0.22);

  transform: rotate(-4deg);
}


.chat-welcome__stamp {
  display: inline-flex;

  padding: 5px 8px;

  margin-bottom: 12px;

  border: 1px solid
    rgba(120, 87, 255, 0.22);

  border-radius: 999px;

  color: var(--purple-light);

  background:
    rgba(120, 87, 255, 0.06);

  font-size: 7px;
  font-weight: 700;

  letter-spacing: 0.14em;
}


.chat-welcome h2 {
  margin: 0;

  font-family: "Manrope", sans-serif;

  font-size:
    clamp(30px, 3.7vw, 46px);

  line-height: 1.08;

  letter-spacing: -0.045em;
}


.chat-welcome > p {
  max-width: 590px;

  margin: 13px auto 0;

  color: var(--muted);

  font-size: 11px;

  line-height: 1.65;
}


.chat-welcome__examples {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 9px;

  margin-top: 30px;
}


.example-chip {
  min-width: 0;
  min-height: 78px;

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 12px;

  border: 1px solid var(--border);

  border-radius: 13px;

  color: var(--text);

  text-align: left;

  background:
    rgba(255, 255, 255, 0.02);

  cursor: pointer;

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}


.example-chip:hover {
  border-color:
    rgba(120, 87, 255, 0.42);

  background:
    rgba(120, 87, 255, 0.055);

  transform: translateY(-2px);
}


.example-chip__icon {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  color: var(--purple-light);

  background:
    var(--purple-soft);

  font-size: 13px;
}


.example-chip__content {
  min-width: 0;
  flex: 1;
}


.example-chip__content strong,
.example-chip__content span {
  display: block;
}


.example-chip__content strong {
  font-size: 9px;
  font-weight: 600;
}


.example-chip__content span {
  margin-top: 3px;

  color: var(--muted);

  font-size: 8px;
}


.example-chip__arrow {
  color: var(--muted-2);

  font-size: 13px;
}


.chat-welcome__features {
  display: flex;
  justify-content: center;

  gap: 19px;

  margin-top: 21px;

  color: var(--muted-2);

  font-size: 8px;
}


/* =========================================================
   CHAT MESSAGES
========================================================= */

.msg {
  width: min(870px, 100%);

  margin:
    0 auto 17px;
}


.msg--user {
  display: flex;

  justify-content: flex-end;
}


.msg__bubble {
  max-width: 80%;

  padding: 13px 15px;

  border: 1px solid var(--border);

  border-radius:
    5px 15px 15px 15px;

  color: #dce1ec;

  background: var(--surface);

  font-size: 10px;

  line-height: 1.65;
}


.msg--user .msg__bubble {
  border-color:
    rgba(120, 87, 255, 0.24);

  border-radius:
    15px 15px 5px 15px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #7857ff,
      #5639d0
    );
}


.msg__bubble.error {
  border-color:
    rgba(255, 119, 119, 0.2);

  color: var(--red);

  background:
    rgba(255, 119, 119, 0.05);
}


/* =========================================================
   TYPING DOTS
========================================================= */

.typing-dots {
  display: inline-flex;
  align-items: center;

  gap: 4px;
}


.typing-dots span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--muted);

  animation:
    typingDot 1s ease-in-out infinite;
}


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


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


@keyframes typingDot {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}


/* =========================================================
   SOURCES
========================================================= */

.sources {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;

  max-width: 80%;

  margin-top: 8px;
}


.source-card {
  min-width: 0;

  display: grid;

  grid-template-columns:
    auto minmax(0, 1fr) auto;

  align-items: flex-start;

  gap: 9px;

  padding: 11px;

  border: 1px solid var(--border);

  border-radius: 11px;

  color: var(--text);

  text-align: left;

  background:
    rgba(255, 255, 255, 0.018);

  cursor: pointer;

  transition: var(--transition);
}


.source-card:hover {
  border-color:
    rgba(120, 87, 255, 0.36);

  background:
    rgba(120, 87, 255, 0.04);
}


.source-card__index {
  width: 21px;
  height: 21px;

  display: grid;
  place-items: center;

  border-radius: 6px;

  color: var(--purple-light);

  background:
    rgba(120, 87, 255, 0.1);

  font-size: 7px;
  font-weight: 600;
}


.source-card__body {
  min-width: 0;
}


.source-card__filename {
  overflow: hidden;

  font-size: 8px;
  font-weight: 600;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.source-card__snippet {
  display: -webkit-box;

  overflow: hidden;

  margin-top: 5px;

  color: var(--muted);

  font-size: 7px;

  line-height: 1.4;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


.source-card__score {
  padding: 3px 5px;

  border-radius: 5px;

  color: var(--muted);

  background:
    rgba(255, 255, 255, 0.035);

  font-size: 7px;
}


/* =========================================================
   CHAT COMPOSER
========================================================= */

.chat-composer-wrap {
  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  z-index: 10;

  padding:
    18px 30px 15px;

  background:
    linear-gradient(
      180deg,
      rgba(8, 9, 14, 0),
      rgba(8, 9, 14, 0.92) 26%,
      rgba(8, 9, 14, 1)
    );
}


.chat-input-bar {
  width: min(920px, 100%);

  min-height: 60px;

  display: flex;
  align-items: center;

  gap: 10px;

  margin: 0 auto;

  padding: 8px 8px 8px 15px;

  border: 1px solid
    rgba(255, 255, 255, 0.11);

  border-radius: 17px;

  background:
    rgba(17, 20, 29, 0.97);

  box-shadow:
    0 15px 50px
    rgba(0, 0, 0, 0.25);

  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}


.chat-input-bar:focus-within {
  border-color:
    rgba(120, 87, 255, 0.5);

  box-shadow:
    0 0 0 3px
    rgba(120, 87, 255, 0.07),
    0 15px 50px
    rgba(0, 0, 0, 0.25);
}


.chat-input-bar__icon {
  color: var(--purple-light);

  font-size: 15px;
}


.chat-input-bar input {
  min-width: 0;
  flex: 1;

  padding: 0;

  border: 0;
  outline: 0;

  color: var(--text);

  background: transparent;

  font-size: 10px;
}


.chat-input-bar input::placeholder {
  color: var(--muted-2);
}


.chat-input-bar input:disabled {
  opacity: 0.6;
}


.chat-input-bar button {
  min-width: 92px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding: 0 15px;

  border: 0;

  border-radius: 11px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #8468ff,
      #6848e7
    );

  font-size: 9px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}


.chat-input-bar button:hover:not(:disabled) {
  transform: translateY(-1px);

  box-shadow:
    0 8px 20px
    rgba(120, 87, 255, 0.28);
}


.chat-input-bar button:disabled {
  opacity: 0.5;

  cursor: wait;
}


.chat-input-bar button strong {
  font-size: 13px;
}


.chat-composer-note {
  margin: 7px auto 0;

  color: var(--muted-2);

  text-align: center;

  font-size: 7px;
}


/* =========================================================
   MODALS
========================================================= */

.modal {
  position: fixed;

  inset: 0;

  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 20px;
}


.modal__backdrop {
  position: absolute;

  inset: 0;

  background:
    rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(7px);
}


.modal__panel {
  position: relative;

  z-index: 1;

  width: min(580px, 100%);

  max-height: 80vh;

  overflow-y: auto;

  padding: 25px;

  border: 1px solid var(--border-strong);

  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      180deg,
      #151823,
      #10131b
    );

  box-shadow:
    0 25px 90px
    rgba(0, 0, 0, 0.55);
}


.modal__panel--compact {
  width: min(430px, 100%);
}


.modal__close {
  position: absolute;

  top: 13px;
  right: 14px;

  width: 31px;
  height: 31px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 1px solid transparent;

  border-radius: 8px;

  color: var(--muted);

  background: transparent;

  font-size: 19px;

  cursor: pointer;
}


.modal__close:hover {
  border-color: var(--border);

  color: var(--text);

  background:
    rgba(255, 255, 255, 0.03);
}


.modal__eyebrow {
  margin-bottom: 7px;

  color: var(--purple-light);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: 0.14em;
}


.modal__title {
  padding-right: 30px;

  font-family: "Manrope", sans-serif;

  font-size: 17px;
  font-weight: 700;

  line-height: 1.4;
}


.modal__body {
  margin-top: 13px;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.7;

  white-space: pre-wrap;
}


.modal__body--tight {
  margin-bottom: 13px;
}


.api-key-form {
  margin-top: 14px;
}


.api-key-form input {
  width: 100%;
  height: 46px;

  padding: 0 13px;

  border: 1px solid var(--border);

  border-radius: 10px;

  outline: 0;

  color: var(--text);

  background: var(--surface-3);

  font-size: 10px;

  transition: var(--transition);
}


.api-key-form input:focus {
  border-color:
    rgba(120, 87, 255, 0.6);

  box-shadow:
    0 0 0 3px
    rgba(120, 87, 255, 0.08);
}


.api-key-form input::placeholder {
  color: var(--muted-2);
}


.api-key-form__actions {
  display: flex;
  justify-content: flex-end;

  gap: 9px;

  margin-top: 12px;
}


.secondary-btn,
.primary-btn {
  min-width: 85px;

  height: 38px;

  padding: 0 14px;

  border-radius: 9px;

  font-size: 9px;
  font-weight: 600;

  cursor: pointer;
}


.secondary-btn {
  border: 1px solid var(--border);

  color: var(--text);

  background: var(--surface-3);
}


.secondary-btn:hover {
  border-color: var(--border-strong);
}


.primary-btn {
  border: 0;

  color: white;

  background:
    linear-gradient(
      135deg,
      #8468ff,
      #6848e7
    );
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

  :root {
    --sidebar-width: 285px;
  }

  .catalog {
    padding-left: 18px;
    padding-right: 18px;
  }

  .workspace__header {
    padding-left: 26px;
    padding-right: 26px;
  }

  .chat-log {
    padding-left: 26px;
    padding-right: 26px;
  }

}


@media (max-width: 820px) {

  body {
    overflow: auto;
  }

  .app {
    display: block;

    min-height: 100vh;
    height: auto;
  }

  .catalog {
    width: 100%;

    min-height: auto;
    max-height: none;

    display: block;

    padding: 18px;

    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .catalog__brand {
    margin-bottom: 14px;
  }

  .workspace-status {
    margin-bottom: 18px;
  }

  .catalog__section--grow {
    min-height: auto;
  }

  .catalog__footer {
    margin-top: 20px;
  }

  .workspace {
    min-height: 720px;
    height: auto;
  }

  .workspace__header {
    min-height: auto;

    align-items: flex-end;

    padding: 20px 18px;
  }

  .workspace__header h1 {
    font-size: 22px;
  }

  .workspace__subtitle {
    max-width: 470px;
  }

  .scope-picker {
    width: 175px;

    flex: 0 0 175px;
  }

  .chat-log {
    min-height: 560px;

    padding:
      32px 18px
      140px;
  }

  .chat-composer-wrap {
    position: sticky;

    bottom: 0;

    padding:
      15px 15px 12px;
  }

}


@media (max-width: 620px) {

  .workspace__header {
    align-items: flex-start;

    gap: 14px;

    flex-direction: column;
  }

  .scope-picker {
    width: 100%;

    flex: none;
  }

  .chat-welcome {
    margin-top: 2vh;
  }

  .chat-welcome h2 {
    font-size: 30px;
  }

  .chat-welcome > p {
    font-size: 10px;
  }

  .chat-welcome__examples {
    grid-template-columns: 1fr;
  }

  .chat-welcome__features {
    flex-wrap: wrap;

    gap: 8px 14px;
  }

  .msg__bubble {
    max-width: 92%;
  }

  .sources {
    max-width: 100%;

    grid-template-columns: 1fr;
  }

  .chat-input-bar {
    min-height: 54px;

    padding:
      7px 7px
      7px 12px;
  }

  .chat-input-bar button {
    min-width: 75px;
    height: 40px;

    padding: 0 11px;
  }

  .chat-input-bar__icon {
    display: none;
  }

}


@media (max-width: 420px) {

  .catalog {
    padding: 15px;
  }

  .catalog__mark {
    width: 40px;
    height: 40px;

    flex-basis: 40px;
  }

  .workspace__header {
    padding: 17px 15px;
  }

  .workspace__header h1 {
    font-size: 20px;
  }

  .chat-log {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-welcome__icon {
    width: 58px;
    height: 58px;

    font-size: 22px;
  }

  .chat-welcome h2 {
    font-size: 27px;
  }

  .chat-input-bar input {
    font-size: 9px;
  }

  .chat-input-bar button {
    min-width: 65px;
  }

  .chat-input-bar button span {
    display: none;
  }

}
