:root {
  --bg: #eef1eb;
  --panel: #f8faf6;
  --panel-strong: #ffffff;
  --ink: #172019;
  --muted: #6b756d;
  --line: #dce2da;
  --line-soft: #e8ece6;
  --accent: #2f6b4f;
  --accent-strong: #24563f;
  --accent-soft: #dcebe2;
  --warm: #e9a85d;
  --danger: #a53f3f;
  --shadow: 0 20px 55px rgba(27, 48, 35, .10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 107, 79, .24);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

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

.mobile-only {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template:
    "top top top" 68px
    "conversations chat tasks" minmax(0, 1fr)
    / 286px minmax(460px, 1fr) 320px;
  width: 100vw;
  height: 100vh;
}

.topbar {
  grid-area: top;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(220, 226, 218, .85);
  background: rgba(248, 250, 246, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: italic;
}

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

.brand strong {
  font-size: 14px;
  letter-spacing: .02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.connection-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  font-size: 11px;
  font-weight: 650;
}

.connection-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b9d68;
  box-shadow: 0 0 0 4px rgba(59, 157, 104, .12);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #d9bd94, #a9825b);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
}

.icon-button:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.icon-button.light {
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.conversation-sidebar {
  grid-area: conversations;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f3f6f1;
}

.sidebar-heading {
  padding: 28px 20px 16px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sidebar-heading h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.22;
}

.primary-button,
.secondary-button,
.quiet-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 79, .16);
}

.primary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.primary-button.compact {
  width: 100%;
}

.secondary-button {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

.secondary-button:hover {
  background: var(--accent-soft);
}

.quiet-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.quiet-button:hover {
  border-color: var(--line);
  background: var(--line-soft);
  color: var(--ink);
}

.quiet-button.danger,
.danger-on-hover:hover {
  color: var(--danger);
}

.conversation-list {
  flex: 1;
  min-height: 0;
  padding: 4px 10px 16px;
  overflow-y: auto;
}

.conversation-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 2px 0;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  text-align: left;
}

.conversation-item:hover {
  background: rgba(255, 255, 255, .65);
}

.conversation-item.active {
  border-color: #d7e1d8;
  background: var(--panel-strong);
  box-shadow: 0 7px 18px rgba(39, 62, 47, .06);
}

.conversation-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-item[data-provider="openai"] .conversation-icon {
  background: #e6e4f2;
  color: #625d8b;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.conversation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy strong {
  margin: 1px 0 5px;
  font-size: 13px;
  font-weight: 680;
}

.conversation-copy small {
  color: var(--muted);
  font-size: 10px;
}

.empty-list {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--line-soft);
}

.security-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dfe7de;
  border-radius: 12px;
  background: rgba(255, 255, 255, .58);
}

.security-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.security-note strong,
.security-note small {
  display: block;
}

.security-note strong {
  font-size: 11px;
}

.security-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.chat-panel {
  position: relative;
  grid-area: chat;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, .95), transparent 42%),
    var(--panel);
}

.empty-state {
  display: flex;
  max-width: 650px;
  margin: auto;
  padding: 34px 34px 150px;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  width: 106px;
  height: 106px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid #d7e3d9;
  border-radius: 50%;
}

.empty-orbit::before {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px dashed #cbdacf;
  border-radius: 50%;
  content: "";
}

.empty-orbit i {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
}

.empty-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warm);
}

.empty-orbit span:first-child {
  top: 7px;
  left: 70px;
}

.empty-orbit span:nth-child(2) {
  right: 1px;
  bottom: 32px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.empty-state h2 {
  margin: 2px 0 10px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -.025em;
}

.empty-state > p:not(.eyebrow) {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 28px;
}

.prompt-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .72);
  text-align: left;
}

.prompt-card:hover {
  border-color: #bccdbf;
  background: #fff;
  transform: translateY(-1px);
}

.prompt-card span,
.prompt-card small {
  display: block;
}

.prompt-card span {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 750;
}

.prompt-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.chat-view {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.chat-heading {
  display: flex;
  height: 76px;
  padding: 15px 25px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.chat-heading h2 {
  max-width: min(52vw, 680px);
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-badge {
  display: inline-block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.message-list {
  flex: 1;
  padding: 28px max(24px, calc((100% - 760px) / 2)) 180px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 24px;
  animation: enter .24s ease-out;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.message-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 13px;
}

.message.user .message-avatar {
  grid-column: 2;
  background: #c9a778;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
}

.message-body {
  min-width: 0;
}

.message.user .message-body {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.message-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.message.user .message-meta {
  text-align: right;
}

.message-content {
  max-width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px;
  background: #fff;
  font-size: 13px;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.user .message-content {
  max-width: 630px;
  border-color: #d7e5da;
  border-radius: 16px 4px 16px 16px;
  background: var(--accent-soft);
}

.message.pending .message-content {
  display: flex;
  width: 72px;
  gap: 5px;
  align-items: center;
}

.message.pending .message-content i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.1s infinite ease-in-out;
}

.message.pending .message-content i:nth-child(2) {
  animation-delay: .15s;
}

.message.pending .message-content i:nth-child(3) {
  animation-delay: .3s;
}

.composer-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 20px max(24px, calc((100% - 780px) / 2)) 24px;
  background: linear-gradient(transparent, var(--panel) 34%);
}

.composer {
  padding: 12px 13px 10px 16px;
  border: 1px solid #cfd9d0;
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 40px rgba(30, 56, 39, .11);
}

.composer:focus-within {
  border-color: #9ab4a0;
  box-shadow: 0 14px 42px rgba(30, 56, 39, .13), 0 0 0 3px rgba(47, 107, 79, .06);
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 170px;
  padding: 2px 1px 8px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: #909a92;
}

.composer-actions {
  display: flex;
  min-height: 31px;
  gap: 9px;
  align-items: center;
}

.permission-control select {
  height: 29px;
  padding: 0 26px 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.composer-hint {
  flex: 1;
  color: #8b958d;
  font-size: 9px;
}

.send-button {
  display: grid;
  width: 31px;
  height: 31px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: .36;
}

.task-sidebar {
  grid-area: tasks;
  min-width: 0;
  min-height: 0;
  padding: 25px 18px 20px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #f3f6f1;
}

.task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 23px;
  font-weight: 500;
}

.task-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 21px 0 16px;
  padding: 13px 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .65);
}

.task-summary span {
  text-align: center;
}

.task-summary span + span {
  border-left: 1px solid var(--line);
}

.task-summary strong,
.task-summary small {
  display: block;
}

.task-summary strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.task-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.task-filter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #e5eae3;
}

.task-filter button {
  height: 29px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.task-filter button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 7px rgba(30, 50, 36, .08);
}

.task-list {
  margin-top: 13px;
}

.task-card {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) 7px;
  gap: 9px;
  width: 100%;
  margin-bottom: 8px;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  text-align: left;
}

.task-card:hover {
  border-color: #c5d2c7;
  background: #fff;
}

.task-check {
  display: grid;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid #b9c5ba;
  border-radius: 7px;
  color: transparent;
  font-size: 11px;
}

.task-card.done .task-check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.task-copy {
  min-width: 0;
}

.task-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.task-card.done .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.priority-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #a8b0a9;
}

.task-card[data-priority="high"] .priority-dot {
  background: #d56555;
}

.task-card[data-priority="low"] .priority-dot {
  background: #6f9bc7;
}

dialog {
  width: min(520px, calc(100vw - 30px));
  max-height: min(760px, calc(100vh - 30px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(20, 28, 22, .48);
  backdrop-filter: blur(5px);
}

.dialog-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 500;
}

.dialog-card > label,
.form-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dialog-card input,
.dialog-card textarea,
.dialog-card select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.dialog-card textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.dialog-actions.split {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

.provider-options {
  display: grid;
  gap: 9px;
}

.provider-option {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  cursor: pointer;
}

.provider-option:hover {
  border-color: #b9cabb;
}

.provider-option.selected {
  border-color: var(--accent);
  background: #f1f8f3;
  box-shadow: 0 0 0 2px rgba(47, 107, 79, .08);
}

.provider-option.unavailable {
  cursor: not-allowed;
  opacity: .55;
}

.provider-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.provider-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 15px;
}

.provider-option strong,
.provider-option small {
  display: block;
}

.provider-option strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.provider-option small {
  color: var(--muted);
  font-size: 10px;
}

.provider-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.unavailable .provider-state {
  background: #ececea;
  color: var(--muted);
}

.settings-card {
  gap: 13px;
}

.settings-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.settings-row {
  display: flex;
  min-height: 45px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.settings-row + .settings-row {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.settings-row strong,
.settings-row small {
  display: block;
}

.settings-row strong,
.settings-section > strong {
  font-size: 12px;
}

.settings-row small {
  max-width: 300px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.status-tag {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.status-tag.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.settings-section ul {
  margin: 11px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.settings-help {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.settings-help a {
  color: var(--accent);
  font-weight: 750;
}

.device-login {
  margin-top: 13px;
  padding: 12px;
  border-radius: 11px;
  background: var(--accent-soft);
}

.device-login p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 10px;
}

.device-login > div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.device-login code {
  flex: 1;
  padding: 9px;
  border: 1px dashed #a8bcae;
  border-radius: 9px;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
}

.device-login button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
}

.device-login a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(390px, calc(100vw - 44px));
  padding: 11px 14px;
  transform: translateY(18px);
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #7d3030;
}

@keyframes enter {
  from { transform: translateY(5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 70%, 100% { transform: translateY(0); opacity: .35; }
  35% { transform: translateY(-3px); opacity: 1; }
}

.login-page {
  overflow: auto;
  background:
    radial-gradient(circle at 14% 12%, rgba(93, 151, 116, .20), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(233, 168, 93, .17), transparent 28%),
    #e9eee7;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
  min-height: 100vh;
}

.login-intro {
  display: flex;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 68px);
  flex-direction: column;
  justify-content: space-between;
  background: #111814;
  color: #f5f7f2;
}

.login-brand {
  width: fit-content;
}

.login-brand .brand-mark {
  background: #eef3ec;
  color: #152019;
}

.login-brand small {
  color: #aeb9b0;
}

.login-copy {
  max-width: 620px;
  margin: 80px 0;
}

.login-copy .eyebrow {
  color: #8bc29f;
}

.login-copy h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.login-copy > p:last-child {
  max-width: 510px;
  margin: 26px 0 0;
  color: #aeb9b0;
  font-size: 14px;
  line-height: 1.8;
}

.login-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: #aeb9b0;
  font-size: 11px;
  font-weight: 650;
}

.login-trust span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.login-trust i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78bd91;
  box-shadow: 0 0 0 4px rgba(120, 189, 145, .12);
}

.login-panel {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.login-card {
  width: min(410px, 100%);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 30px 80px rgba(24, 43, 31, .13);
  backdrop-filter: blur(18px);
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 30px;
  font-weight: 500;
}

.login-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.login-card > label {
  display: block;
  margin-top: 16px;
  color: #475149;
  font-size: 11px;
  font-weight: 750;
}

.login-card > label input {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  padding: 0 13px;
  border: 1px solid #d5ddd4;
  border-radius: 11px;
  background: rgba(255, 255, 255, .92);
  font-size: 14px;
}

.login-card > label input:focus {
  border-color: #7ca68d;
  box-shadow: 0 0 0 4px rgba(47, 107, 79, .09);
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: .66;
}

.login-error {
  margin: 14px 0 -8px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f7e8e6;
  color: #8b3434;
  font-size: 11px;
  line-height: 1.5;
}

.login-footnote {
  margin: 15px 0 0;
  color: #7c857e;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template:
      "top top" 68px
      "conversations chat" minmax(0, 1fr)
      / 270px minmax(0, 1fr);
  }

  .task-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .mobile-only {
    display: grid !important;
  }

  .app-shell {
    grid-template:
      "top" 60px
      "chat" minmax(0, 1fr)
      / 1fr;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar .brand {
    margin-right: auto;
  }

  .topbar .brand-mark {
    display: none;
  }

  .connection-pill {
    display: none;
  }

  .conversation-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(310px, 88vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    transition: transform .22s ease;
  }

  .conversation-sidebar.open {
    transform: translateX(0);
  }

  .empty-state {
    padding: 28px 20px 150px;
  }

  .empty-orbit {
    width: 90px;
    height: 90px;
  }

  .empty-state h2 {
    font-size: 28px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card:nth-child(n+3) {
    display: none;
  }

  .chat-heading {
    height: 68px;
    padding: 12px 16px;
  }

  .message-list {
    padding: 20px 14px 170px;
  }

  .message {
    grid-template-columns: 29px minmax(0, 1fr);
    gap: 9px;
  }

  .message.user {
    grid-template-columns: minmax(0, 1fr) 29px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
  }

  .message-content {
    padding: 11px 13px;
    font-size: 12px;
  }

  .composer-wrap {
    padding: 18px 12px 14px;
  }

  .composer-hint {
    display: none;
  }

  .permission-control {
    flex: 1;
  }

  dialog {
    width: calc(100vw - 20px);
  }

  .dialog-card {
    padding: 19px;
  }

  .login-shell {
    display: block;
  }

  .login-intro {
    min-height: 260px;
    padding: 24px;
  }

  .login-copy {
    margin: 52px 0 20px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-copy > p:last-child,
  .login-trust {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 22px 14px 36px;
    background: #e9eee7;
  }

  .login-card {
    margin-top: -48px;
    padding: 27px 23px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
