/* MY GENIE — Agent workspace (#/agent) · v1
 * Same visual language as the other workspaces (warm paper, ink text,
 * amber accents) with a chat-first two-column layout.
 */

.agw-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 30px 22px;
  min-width: 0;
  overflow: hidden;
}

.agw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.agw-header .greeting { margin: 0 0 6px; }
.agw-header .date-line { font-size: 12.5px; color: var(--text-tertiary); }
.agw-reset {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: 600 11.5px/1.4 inherit;
  color: var(--text-secondary);
  background: var(--bg-app);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agw-reset:hover { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--line-strong, var(--line)); }

.agw-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 18px;
}

/* — chat column — */
.agw-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 16px;
  background: var(--bg-card, #fff);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.agw-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agw-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  animation: agw-in 220ms ease both;
}
.agw-msg.me {
  align-self: flex-end;
  color: #241a08;
  background: var(--accent-soft, #FFEFC9);
  border-bottom-right-radius: 5px;
}
.agw-msg.ai {
  align-self: flex-start;
  color: var(--text-primary);
  background: var(--bg-app);
  box-shadow: inset 0 0 0 1px var(--line);
  border-bottom-left-radius: 5px;
}
.agw-msg.err .agw-msg-text { color: #B4452C; }
.agw-msg-text { white-space: pre-wrap; word-break: break-word; }
.agw-busy { color: var(--text-tertiary); }
@keyframes agw-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* — action receipts — */
.agw-msg-receipts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 9px;
}
.agw-receipt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.45;
}
.agw-receipt.ok {
  background: rgba(90, 158, 104, 0.10);
  box-shadow: inset 0 0 0 1px rgba(90, 158, 104, 0.30);
}
.agw-receipt.bad {
  background: rgba(180, 69, 44, 0.08);
  box-shadow: inset 0 0 0 1px rgba(180, 69, 44, 0.28);
}
.agw-receipt-label { font-weight: 700; letter-spacing: -0.005em; }
.agw-receipt.ok .agw-receipt-label { color: #2E7D46; }
.agw-receipt.bad .agw-receipt-label { color: #B4452C; }
.agw-receipt-detail { color: var(--text-secondary); }

/* — suggestions — */
.agw-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 22px 4px;
}
.agw-suggestion {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: 500 11.5px/1.4 inherit;
  color: var(--text-secondary);
  background: var(--bg-app);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agw-suggestion:hover { color: var(--text-primary); }

/* — composer — */
.agw-composer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px 14px;
}
.agw-input {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  border-radius: 12px;
  border: none;
  outline: none;
  font: 500 13.5px/1.45 inherit;
  color: var(--text-primary);
  background: var(--bg-app);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agw-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent, #E0A94A); }
.agw-input::placeholder { color: var(--text-tertiary); }
.agw-send {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #241a08;
  background: var(--accent, #E0A94A);
}
.agw-send:hover:not(:disabled) { filter: brightness(1.06); }
.agw-send:disabled { opacity: 0.45; cursor: default; }

/* — side column — */
.agw-side {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-card, #fff);
  box-shadow: inset 0 0 0 1px var(--line);
}
.agw-side-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 9px;
}
.agw-side-empty {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.agw-side .agw-receipt { margin-bottom: 6px; }

/* — narrow screens: side panel drops below — */
@media (max-width: 1080px) {
  .agw-grid { grid-template-columns: 1fr; }
  .agw-side { max-height: 200px; }
}
