/* dashboard.css — r2 Education admin dashboard, zine-utilitarian */
@import url('r2-tokens.css');

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); }
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Generic primitives ---------- */
.eyebrow {
  font-family: var(--type); font-size: 11px; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--magenta);
}
.kicker {
  font-family: var(--type); font-size: 11px;
  letter-spacing: 0.14em; color: var(--fg-subtle); text-transform: uppercase;
}
.rule { border: 0; border-top: 2px solid var(--fg); margin: 0; }
.rule-soft { border: 0; border-top: 1px solid var(--border-soft); margin: 0; }

.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 16px; border: 2px solid var(--fg); background: var(--fg); color: var(--bg);
  border-radius: 0; transition: all 200ms var(--ease-out); display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--fg); background: var(--bg); color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); transform: none; box-shadow: none; }
.btn.stamp { background: var(--bg); color: var(--fg); box-shadow: 4px 4px 0 var(--fg); }
.btn.stamp:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--fg); background: var(--fg); color: var(--bg); }
.btn.sm { padding: 7px 12px; font-size: 10.5px; }
.btn.xs { padding: 4px 8px; font-size: 10px; gap: 4px; }
.btn.icon { padding: 8px; gap: 0; }

/* ---------- Button hierarchy (hyphenated variants) ----------
   The redesigned views (Today, Time, Invoices, P&L, Clients, Notes) use
   .btn-primary / .btn-outline / .btn-ghost. dashboard.css only defined the
   solid base .btn above, so every one of those rendered as a solid black
   slab and the screens had no visual hierarchy — multiple equal-weight CTAs.
   These keep the bold uppercase editorial styling but let secondary actions
   recede, so each screen has one clear primary:
     primary  → solid fill        (the single clear action)
     outline  → bordered, no fill  (secondary)
     ghost    → text only          (tertiary / inline) */
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: transparent; }
.btn-ghost:hover { background: transparent; color: var(--fg); transform: none; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }

.iconbtn {
  width: 32px; height: 32px; border: 1.5px solid var(--fg); background: transparent;
  display: inline-grid; place-items: center; border-radius: 0; transition: all 140ms var(--ease-out);
}
.iconbtn:hover { background: var(--fg); color: var(--bg); }
.iconbtn svg { width: 16px; height: 16px; stroke-width: 1.5; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg);
}
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 14px; font-weight: 300;
  background: transparent; border: 0; border-bottom: 2px solid var(--fg);
  padding: 8px 0; outline: none; border-radius: 0; color: var(--fg);
}
.field textarea {
  border: 2px solid var(--fg); padding: 12px; resize: vertical; min-height: 84px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }

/* status pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1.5px solid var(--fg); background: var(--bg);
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2;
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); }
.pill.done { background: var(--fg); color: var(--bg); }
.pill.done .dot { background: var(--bg); }
.pill.review { background: var(--botf-toast); border-color: var(--fg); }
.pill.doing  { background: var(--botf-sand); }
.pill.todo   { background: var(--bg); }
.pill.overdue { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.pill.overdue .dot { background: var(--bg); }

.priority {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted);
}
.priority.high { color: var(--accent); font-weight: 600; }

/* avatar / monogram */
.mono-avatar {
  width: 36px; height: 36px; border: 2px solid var(--fg);
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: -0.02em; background: var(--bg);
}
.mono-avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.mono-avatar.sm { width: 26px; height: 26px; font-size: 11px; border-width: 1.5px; }

/* ---------- Modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(26,26,26,0.7);
  display: grid; place-items: center; z-index: 100;
  animation: fadeIn 180ms var(--ease-out);
}
.modal {
  background: var(--bg); border: 2px solid var(--fg); box-shadow: 8px 8px 0 var(--fg);
  width: min(640px, 92vw); max-height: 88vh; overflow: auto;
  animation: pop 220ms var(--ease-out);
}
.modal header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 24px 28px 16px; border-bottom: 2px solid var(--fg);
}
.modal header h2 { margin: 0; font-size: 32px; line-height: 1; }
.modal .body { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.modal footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 16px 28px 24px; border-top: 1px solid var(--border-soft);
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { transform: translateY(8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* ---------- File list ---------- */
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1.5px solid var(--fg);
  background: var(--bg); transition: all 140ms var(--ease-out);
}
.file-row:hover { background: var(--botf-sand); }
.file-row .name { font-size: 13px; font-weight: 500; flex: 1; }
.file-row .size { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-subtle); }

.dropzone {
  border: 2px dashed var(--fg); padding: 18px; text-align: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted);
  cursor: pointer; transition: all 140ms var(--ease-out);
}
.dropzone:hover, .dropzone.over { background: var(--botf-sand); color: var(--fg); }

/* ---------- Quick-add chip (floating, used everywhere) ---------- */
.quick-add {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px; border: 2px solid var(--fg); background: var(--fg); color: var(--bg);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  box-shadow: 4px 4px 0 var(--accent);
  transition: all 220ms var(--ease-out);
}
.quick-add:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.quick-add svg { width: 14px; height: 14px; stroke-width: 2; }
