/* ============================================================
   Mira — gedeelde basis: tokens, top-nav, knoppen
   (preview-versie; in Flask = static/css/mira.css + mira-app.css)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Spectral:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400&family=IBM+Plex+Mono:wght@300;400;500&display=swap');
:root {
  --parchment: #F4F0E4; --parchment-deep: #ECE5D2; --sand: #E2D4BD; --sand-deep: #D5C5A8;
  --char: #241C14; --char-soft: #3A2E22;
  --terracotta: #B9532C; --terracotta-deep: #9F4421; --terracotta-wash: rgba(185, 83, 44, 0.08);
  --bronze: #7C6A4E; --bronze-soft: #9A8767; --bronze-wash: rgba(124, 106, 78, 0.10);
  --shell: #1a1612;
  --rule: rgba(36, 28, 20, 0.14); --rule-soft: rgba(36, 28, 20, 0.08); --rule-strong: rgba(36, 28, 20, 0.28);
  --status-success: #5A7A4A; --status-success-wash: rgba(90, 122, 74, 0.08);
  --cta-shadow: 0 1px 0 rgba(36, 28, 20, 0.18), 0 0 0 1px rgba(36, 28, 20, 0.04);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; background: none; border: 0; outline: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
html, body {
  font-family: 'Spectral', Georgia, serif; font-weight: 300; font-size: 15px; line-height: 1.55;
  color: var(--char); background: var(--parchment);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1; font-variant-numeric: oldstyle-nums proportional-nums;
}
.tab-fig, table { font-variant-numeric: tabular-nums lining-nums; }
.wordmark { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400; color: var(--char); }
::selection { background: var(--terracotta); color: var(--parchment); }

/* ===== App body + top nav ===== */
body.app { display: flex; flex-direction: column; min-height: 100vh; }
.topnav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding: 16px 32px; border-bottom: 1px solid var(--rule); background: var(--parchment); position: sticky; top: 0; z-index: 20; }
.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-row .wordmark { font-size: 30px; line-height: 1; }
.brand-row .badge-conn { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border: 1px solid var(--rule-strong); border-radius: 999px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--char-soft); }
.brand-row .badge-conn::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--status-success); }
.tabs { display: flex; gap: 2px; justify-self: center; }
.tab { padding: 9px 18px; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 16px; color: var(--bronze); border: 1px solid transparent; border-radius: 2px; transition: color 160ms, background 160ms; cursor: pointer; }
.tab:hover { color: var(--char); background: var(--bronze-wash); }
.tab.is-active { color: var(--char); background: var(--sand); border-color: var(--rule); }
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row .user-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.user-row .user-meta .name { font-family: 'Spectral', serif; font-weight: 400; font-size: 13px; }
.user-row .user-meta .ten { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze); }
.user-row .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--terracotta); color: var(--parchment); display: grid; place-items: center; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 14px; }

/* ===== Main + folio ===== */
.main { flex: 1; padding: 30px 40px 56px; max-width: 1320px; width: 100%; margin: 0 auto; }
.page-folio { display: flex; justify-content: space-between; align-items: center; font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bronze); }
.page-folio a { color: var(--bronze); }
.page-folio a:hover { color: var(--terracotta); }
.page-folio .sep { color: rgba(124,106,78,0.5); margin: 0 10px; }
.page-folio .live { color: var(--char-soft); }
.page-folio .live .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--status-success); margin-right: 8px; vertical-align: middle; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 16px; letter-spacing: 0.005em; color: var(--parchment); background: var(--terracotta); border-radius: 1px; box-shadow: var(--cta-shadow); transition: background 160ms ease, transform 80ms ease; cursor: pointer; border: 0; }
.btn:hover { background: var(--terracotta-deep); }
.btn:active { transform: translateY(1px); }
.btn--block { width: 100%; }
.btn--primary { padding: 15px 26px; }
.btn--primary .arr { margin-left: 6px; opacity: 0.7; }
.btn--ghost { color: var(--char); background: transparent; border: 1px solid var(--rule-strong); box-shadow: none; }
.btn--ghost:hover { background: var(--bronze-wash); }

/* ===== Reject button ===== */
.btn--reject {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 16px;
  color: var(--terracotta); background: var(--terracotta-wash);
  border: 1px solid rgba(185,83,44,.35); border-radius: 1px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.btn--reject:hover { background: rgba(185,83,44,.15); border-color: var(--terracotta); }
.btn--reject:focus-visible { outline: 1px dashed var(--terracotta); outline-offset: 2px; }

/* ===== Badge connection offline ===== */
.badge-conn--off { color: var(--terracotta); border-color: rgba(185,83,44,0.4); }
.badge-conn--off::before { background: var(--terracotta); }

/* ===== Status pills (inbox/logboek) ===== */
.status { display: inline-flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status--new { color: var(--terracotta); }
.status--review { color: var(--bronze); }
.status--review::before { background: transparent; border: 1px solid currentColor; }
.status--done { color: var(--char-soft); }
.status--done::before { background: transparent; border: 1px solid currentColor; }
