:root {
  --bg: #0e1420;
  --panel: #161f30;
  --panel-2: #1c2740;
  --text: #e8edf6;
  --muted: #93a1b8;
  --accent: #4f8cff;
  --accent-2: #22c39a;
  --warn: #f0a54b;
  --danger: #e5685e;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid #232f47;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.brand h1 { font-size: 20px; }
.brand p { color: var(--muted); font-size: 13px; }
.pill {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.pill.sandbox { color: var(--accent-2); }
.layout {
  display: grid; grid-template-columns: minmax(340px, 460px) 1fr;
  gap: 20px; padding: 24px 28px; max-width: 1200px; margin: 0 auto;
}
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.chat-panel, .board-panel {
  background: var(--panel); border: 1px solid #232f47;
  border-radius: var(--radius); padding: 18px;
}
.chat-log {
  height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 12px;
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input {
  flex: 1; background: var(--bg); border: 1px solid #2a3a5c; color: var(--text);
  border-radius: 10px; padding: 11px 12px; font-size: 14px;
}
.chat-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.chat-form button {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.quick-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  background: var(--panel-2); color: var(--muted); border: 1px solid #2a3a5c;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.board-head h2 { font-size: 16px; }
.outstanding { color: var(--muted); font-size: 13px; }
.invoice-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--panel-2); border: 1px solid #2a3a5c; border-radius: 12px;
  padding: 14px 16px; display: grid;
  grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.card .num { font-weight: 700; font-size: 14px; }
.card .to { color: var(--text); font-size: 14px; }
.card .meta { color: var(--muted); font-size: 12.5px; grid-column: 1; }
.card .amount { font-size: 17px; font-weight: 700; text-align: right; }
.status { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; }
.status.DRAFT { background: #2a3a5c; color: var(--muted); }
.status.SENT { background: #1d3a63; color: #7db4ff; }
.status.PAID { background: #123f33; color: var(--accent-2); }
.status.OVERDUE { background: #44231f; color: var(--danger); }
.status.PARTIALLY_PAID { background: #3f3512; color: var(--warn); }
.card .actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; }
.card .actions button, .card .actions a {
  font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid #2a3a5c;
  background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.card .actions button:hover, .card .actions a:hover { color: var(--text); border-color: var(--accent); }
.card .actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty { color: var(--muted); font-size: 14px; padding: 30px 0; text-align: center; }

