/* ===================================================================
   dreamAgent — design system (Campsite style, Manrope font)
   =================================================================== */
:root {
  --color-campfire-orange: #ff6b1a;
  --color-ember-brown: #451a03;
  --color-sunlit-cream: #fef3c7;
  --color-forest-pulse: #22c55e;
  --color-ember-alert: #ef4444;
  --color-midnight-ink: #171717;
  --color-paper-white: #ffffff;
  --color-parchment: #fffdf9;
  --color-fog-gray: #f5f5f5;
  --color-linen: #f0f0f0;
  --color-ash-gray: #a3a3a3;
  --color-slate: #737373;
  --color-graphite: #525252;
  --color-stone: #8f7668;

  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 18px;
  --radius-full: 9999px;

  --shadow-sm: rgba(0,0,0,0.05) 0px 3px 6px -3px, rgba(0,0,0,0.05) 0px 2px 4px -2px, rgba(0,0,0,0.05) 0px 1px 2px -1px, rgba(0,0,0,0.05) 0px 1px 1px -1px, rgba(0,0,0,0.05) 0px 1px 0px -1px;
  --shadow-subtle: rgba(0,0,0,0.08) 0px 1px 1px -1px, rgba(0,0,0,0.08) 0px 2px 2px -1px, rgba(0,0,0,0.06) 0px 0px 0px 1px, rgb(255,255,255) 0px 1px 0px 0px inset, rgb(255,255,255) 0px 1px 2px 1px inset, rgba(0,0,0,0.06) 0px 1px 2px 0px inset;
  --shadow-subtle-2: rgba(0,0,0,0.05) 0px 1px 2px 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-parchment);
  color: var(--color-midnight-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }

.icon { width: 18px; height: 18px; stroke-width: 2; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }

/* ---- Brand ---- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-name { font-size: 17px; letter-spacing: -0.3px; }

/* Logo mark from agent.svg, recolourable via mask */
.logo-mark {
  display: inline-block; width: 30px; height: 30px; flex-shrink: 0;
  background: var(--color-campfire-orange);
  -webkit-mask: url('/static/agent.svg') center / contain no-repeat;
  mask: url('/static/agent.svg') center / contain no-repeat;
}
.logo-mark.ink { background: var(--color-midnight-ink); }
.logo-mark.white { background: #fff; }
.logo-mark.sm { width: 22px; height: 22px; }
.logo-mark.lg { width: 40px; height: 40px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-full); padding: 10px 18px;
  background: var(--color-midnight-ink); color: #fff;
  border: none; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-subtle); transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--color-slate);
  border: 1px solid var(--color-linen); box-shadow: none;
}
.btn-ghost:hover { background: var(--color-fog-gray); }
.btn-orange { background: var(--color-campfire-orange); color: #fff; }
.btn-danger { background: var(--color-ember-alert); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

/* ---- Inputs ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 500; color: var(--color-slate); letter-spacing: .2px; }
.input, .textarea, .select {
  width: 100%; background: var(--color-fog-gray); border: 1px solid transparent;
  border-radius: var(--radius-lg); padding: 11px 13px; color: var(--color-midnight-ink);
  outline: none; transition: border-color .12s ease, background .12s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--color-campfire-orange); background: #fff;
}
.textarea { resize: vertical; min-height: 80px; }

/* ---- Cards / pills / tags ---- */
.card {
  background: var(--color-paper-white); border-radius: var(--radius-xl);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12px; font-weight: 500;
  background: var(--color-sunlit-cream); color: var(--color-ember-brown);
}
.pill-orange { background: var(--color-campfire-orange); color: #fff; }
.pill-green { background: var(--color-forest-pulse); color: #fff; }
.pill-red { background: var(--color-ember-alert); color: #fff; }
.pill-gray { background: var(--color-fog-gray); color: var(--color-slate); }

.avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 15px;
  flex-shrink: 0;
}

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--color-linen);
  border-radius: var(--radius-full); transition: .2s;
}
.switch .slider:before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: var(--radius-full); transition: .2s; box-shadow: var(--shadow-subtle-2);
}
.switch input:checked + .slider { background: var(--color-campfire-orange); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* ---- Toast ---- */
#toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--color-midnight-ink); color: #fff; padding: 12px 16px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); font-size: 14px;
  max-width: 340px; animation: slideIn .25s ease;
}
.toast.success { background: var(--color-forest-pulse); }
.toast.error { background: var(--color-ember-alert); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }
.muted { color: var(--color-slate); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
