/* Majbyr minimal visual system. app.css owns layout and component mechanics. */
:root {
  --minimalRadius: 14px;
  --minimalLine: color-mix(in srgb, var(--text) 9%, transparent);
  --minimalSoft: color-mix(in srgb, var(--text) 4.5%, transparent);
  --minimalAccent: color-mix(in srgb, var(--accent) 12%, transparent);
  --shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

body { letter-spacing: -.006em; }
.app { padding: 0; gap: 0; background: var(--bg); }
.sidebar,
.workspace {
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}
.sidebar { border-right: 1px solid var(--minimalLine); }
.brandMark,
.welcomeMark,
.bootMark {
  background: var(--minimalAccent);
  color: var(--accent);
  box-shadow: none;
}
.newButton { border-radius: 12px; box-shadow: none; }
.chatCard { border-radius: 12px; }
.chatCard.isActive {
  border-color: transparent;
  background: var(--minimalAccent);
}
.chatAvatar,
.messageAvatar {
  border: 0;
  background: var(--minimalSoft);
  border-radius: 10px;
}
.sidebarFooter,
.topbar,
.composerArea { border-color: var(--minimalLine); }
.topbar { background: var(--surface); }
.iconButton,
.contextChip {
  border-color: transparent;
  background: var(--minimalSoft);
  border-radius: 11px;
}
.iconButton:hover,
.contextChip:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.messageBubble {
  border: 0;
  border-radius: 5px 16px 16px 16px;
  box-shadow: none;
}
.message.user .messageBubble {
  border: 0;
  border-radius: 16px 5px 16px 16px;
  background: var(--minimalAccent);
}
.messageActions button:hover { background: var(--minimalSoft); }
.composerArea { background: var(--surface); }
.composer {
  border-color: var(--minimalLine);
  border-radius: 15px;
  background: var(--surface2);
}
.composer:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}
.sendButton { border-radius: 11px; box-shadow: none; }

.shade { background: rgba(3, 6, 12, .55); backdrop-filter: blur(2px); }
.sheet {
  border-color: var(--minimalLine);
  border-radius: 20px;
  padding: 10px 18px 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.sheetHandle { width: 34px; height: 3px; margin-bottom: 13px; }
.sheetHeader { align-items: center; margin-bottom: 16px; }
.sheetHeader h2 { font-size: 20px; letter-spacing: -.03em; }
.sheetHeader p { max-width: 390px; line-height: 1.45; }
.sheetHeader .iconButton { width: 34px; height: 34px; }
.field > span,
.fieldLabel,
.sheetLabel {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.field input {
  height: 48px;
  border-color: var(--minimalLine);
  border-radius: 12px;
  background: var(--surface2);
}
.field input:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.primaryButton { height: 48px; border-radius: 12px; box-shadow: none; }
.optionList { gap: 5px; }
.optionItem {
  border-color: transparent;
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--minimalSoft);
}
.optionItem:hover,
.optionItem.isSelected {
  border-color: transparent;
  background: var(--minimalAccent);
}
.optionItem .check { border-color: var(--minimalLine); }

.titleAutomation {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0 17px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--minimalAccent);
}
.automationMark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.automationMark svg { width: 16px; height: 16px; }
.titleAutomation b,
.titleAutomation small { display: block; }
.titleAutomation b { font-size: 12px; }
.titleAutomation small { color: var(--muted); font-size: 10.5px; }
.choiceField { display: grid; gap: 7px; margin: 13px 0; }
.modePicker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--minimalSoft);
}
.modePicker button {
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  padding: 7px 5px;
  color: var(--muted);
  background: transparent;
}
.modePicker b,
.modePicker small { display: block; overflow: hidden; text-overflow: ellipsis; }
.modePicker b { color: var(--text); font-size: 12px; }
.modePicker small { margin-top: 1px; font-size: 9.5px; white-space: nowrap; }
.modePicker button.isSelected {
  color: var(--text);
  background: var(--surface2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.modelPickerButton {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--minimalLine);
  border-radius: 13px;
  padding: 9px 12px;
  text-align: left;
  background: var(--surface2);
}
.modelPickerButton:hover { border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.modelPickerButton .visionDot { width: 9px; height: 9px; }
.modelPickerButton > svg { width: 17px; color: var(--muted); }
.pickerCopy { min-width: 0; flex: 1; }
.pickerCopy b,
.pickerCopy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickerCopy b { font-size: 12.5px; }
.pickerCopy small { color: var(--muted); font-size: 10px; }
.backIcon svg { transform: rotate(180deg); }
.sheetSearch { margin: 0 0 10px; }
#newModelList { max-height: min(52dvh, 430px); overflow: auto; }

@media (min-width: 881px) {
  .app { grid-template-columns: 300px minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .sidebar { border: 1px solid var(--minimalLine); border-radius: 18px; }
  .sheet { bottom: max(6px, var(--safeBottom)); border-radius: 18px; }
  .workspace { background: var(--surface); }
}

@media (max-width: 430px) {
  .sheet { padding: 9px 14px 14px; }
  .sheetHeader h2 { font-size: 19px; }
  .modePicker small { font-size: 9px; }
}
