/* Netrep PA — Operator console design system
   Color tokens and layout from §16 of the execution plan.
   M10 adds: self-hosted fonts, grain overlay, staggered motion, full responsive. */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --ink:        #12141a;
  --panel:      #1a1d26;
  --panel-2:    #212530;
  --line:       #2b3040;
  --text:       #e8e6df;
  --muted:      #8b8f9a;
  --accent:     #e0a44c;
  --accent-ink: #12141a;
  --ok:         #5fb98f;
  --warn:       #e0b15f;
  --alert:      #e0685f;
  --uk:         #5b8def;
  --sa:         #4fb87a;
  --radius:     10px;
  --shadow:     0 8px 30px rgba(0,0,0,.35);

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --nav-w: 72px;
  --status-h: 48px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Nav rail ────────────────────────────────────────────────────────────── */
.nav-rail {
  width: var(--nav-w);
  min-width: var(--nav-w);
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  z-index: 10;
}

.nav-brand {
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: .04em;
}

.nav-items {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 4px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  transition: color .15s, background .15s;
}

.nav-item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--panel-2);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--alert);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-footer {
  padding: 8px;
  border-top: 1px solid var(--line);
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.nav-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.nav-logout:hover { background: var(--panel-2); color: var(--alert); }
.nav-logout svg { width: 18px; height: 18px; }

/* ── Main area ───────────────────────────────────────────────────────────── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Status bar ──────────────────────────────────────────────────────────── */
.status-bar {
  height: var(--status-h);
  min-height: var(--status-h);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.status-services {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ok   { background: var(--ok);   box-shadow: 0 0 6px var(--ok); }
.dot-warn { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.dot-err  { background: var(--alert);box-shadow: 0 0 6px var(--alert); }

.status-center {
  flex: 1;
  text-align: center;
}

.status-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--text);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.market-filter {
  display: flex;
  gap: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.mf-btn {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.mf-btn:hover { color: var(--text); }
.mf-btn.active { background: var(--panel); color: var(--text); }

.market-tag {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.market-uk { color: var(--uk); }
.market-sa { color: var(--sa); }

.status-filter {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 3px 8px;
  cursor: pointer;
  transition: border-color .15s;
}
.status-filter:focus { outline: none; border-color: var(--accent); }
.status-filter option { background: var(--panel-2); }

.btn-refresh {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.btn-refresh:hover { color: var(--accent); border-color: var(--accent); }
.btn-refresh:disabled { opacity: .4; cursor: default; }

.status-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  min-width: 72px;
  text-align: right;
}

/* ── Panels ──────────────────────────────────────────────────────────────── */
.panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.panel {
  display: none;
  height: 100%;
  overflow: hidden;
  animation: panel-in .15s ease;
}

.panel.active { display: flex; flex-direction: column; }

/* ── Inbox two-pane ──────────────────────────────────────────────────────── */
.inbox-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.inbox-list-pane {
  width: 300px;
  min-width: 220px;
  max-width: 600px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.inbox-list-resize {
  position: absolute;
  top: 0; right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
}
.inbox-list-resize:hover,
.inbox-list-resize.dragging { background: var(--accent); opacity: .5; }

.inbox-filters {
  display: flex;
  gap: 2px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.ifilter {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .03em;
  transition: color .12s, background .12s;
}
.ifilter:hover { color: var(--text); }
.ifilter.active { background: var(--panel-2); color: var(--accent); }
.ifilter-hidden { border-left: 2px solid var(--line); margin-left: 4px; }

/* Inline label buttons on email list items */
.email-item-labels {
  display: flex;
  gap: 4px;
  padding: 5px 12px 7px;
}
.btn-item-label {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background .1s, color .1s, border-color .1s;
  line-height: 1.4;
}
.btn-item-label:hover { background: var(--panel); color: var(--text); border-color: var(--accent); }
.btn-item-label.lbl-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-item-hide { border-color: rgba(239,68,68,.35); color: var(--alert); }
.btn-item-hide:hover { background: rgba(239,68,68,.1); border-color: var(--alert); }
.btn-item-restore { border-color: var(--ok); color: var(--ok); }
.btn-item-restore:hover { background: rgba(34,197,94,.1); }

/* Label bar */
.label-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  flex-wrap: wrap;
}
.label-bar-title { color: var(--muted); margin-right: 4px; }
.label-ai-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.label-cur { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em; }
.label-action_needed { background: rgba(99,102,241,.18); color: var(--accent); }
.label-fyi { background: rgba(148,163,184,.15); color: var(--text); }
.label-noise { background: rgba(100,116,139,.12); color: var(--muted); }
.label-hidden { background: rgba(239,68,68,.12); color: var(--alert); }
.label-confirm { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-label {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.btn-label:hover { background: var(--panel); color: var(--text); }
.btn-label.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-label-hide { border-color: rgba(239,68,68,.4); color: var(--alert); }
.btn-label-hide:hover { background: rgba(239,68,68,.12); }
.btn-label-restore { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--ok); color: var(--ok); background: transparent; cursor: pointer; }
.btn-label-confirm-yes { padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; background: var(--alert); color: #fff; border: none; cursor: pointer; }

/* Label pills in list */
.label-pill { background: rgba(99,102,241,.15); color: var(--accent); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }
.label-hidden-pill { background: rgba(239,68,68,.12); color: var(--alert); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }

.inbox-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inbox-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.email-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.email-item:hover { background: var(--panel-2); }
.email-item.active { background: var(--panel-2); border-color: var(--line); }

.email-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.email-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-action { background: var(--accent); }
.dot-fyi    { background: var(--muted); }
.dot-noise  { background: var(--line); }
.dot-ok     { background: var(--ok); }

.inbox-day-header {
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-top: 4px;
}

.email-from {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.email-time {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}

.email-subject {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.email-meta-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.email-account-tag {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
}

.priority-pill {
  font-size: 15px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.priority-high   { background: rgba(224,104,95,.15); color: var(--alert); }
.priority-normal { color: var(--muted); }
.priority-low    { color: var(--line); }

/* ── Inbox detail pane ───────────────────────────────────────────────────── */
.inbox-detail-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
}

.email-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.email-detail-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.email-detail-subject {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.email-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}
.email-detail-meta span { font-family: var(--font-mono); font-size: 11px; }

.email-body-cols {
  flex: 1;
  display: flex;
  overflow: hidden;
  gap: 0;
}

.email-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.email-col:last-child { border-right: none; }

.email-col-label {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.email-original-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.draft-col {
  display: flex;
  flex-direction: column;
}

.draft-textarea {
  flex: 1;
  background: var(--ink);
  border: none;
  outline: none;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  resize: none;
  white-space: pre-wrap;
}
.draft-textarea:focus { background: rgba(224,164,76,.03); }

.inbox-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  align-items: center;
  position: relative;
  z-index: 2;
}
.mood-input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 6px 10px;
  min-width: 0;
}
.mood-input::placeholder { color: var(--muted); }
.mood-input:focus { outline: none; border-color: var(--accent); }
.cc-input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 10px;
  width: 180px;
  min-width: 0;
}
.cc-input::placeholder { color: var(--muted); }
.cc-input:focus { outline: none; border-color: var(--accent); }
.btn-dismiss { margin-left: auto; }

.btn-send {
  background: var(--ok);
  color: #12141a;
  border-radius: 7px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 15px;
  min-width: 64px;
  transition: opacity .12s;
}
.btn-send:hover { opacity: .88; }
.btn-send:disabled { opacity: .4; cursor: not-allowed; }

.btn-ghost {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 15px;
  min-width: max-content;
  transition: color .12s, border-color .12s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-ghost:disabled { opacity: .4; cursor: not-allowed; }

.btn-dismiss {
  margin-left: auto;
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 7px;
  transition: color .12s;
}
.btn-dismiss:hover { color: var(--alert); }

.action-status {
  font-size: 14px;
  color: var(--ok);
  margin-left: 8px;
}
.action-status.err { color: var(--alert); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Placeholder (empty panel state) ────────────────────────────────────── */
.panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  color: var(--muted);
  text-align: center;
  padding: 48px;
}

.placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.placeholder-icon svg { width: 28px; height: 28px; }

.panel-placeholder h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}

.panel-placeholder p {
  font-size: 15px;
  color: var(--muted);
  max-width: 280px;
}

/* ── Tasks panel ─────────────────────────────────────────────────────────── */
.tasks-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

.tasks-list-pane {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.tasks-detail-pane {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 28px;
}

.tasks-toolbar {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks-filters { display: flex; gap: 2px; flex: 1; }

.tasks-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Task form */
.task-form { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.task-form-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.task-form-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.task-form-input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 7px 10px;
  width: 100%;
}
.task-form-input:focus { outline: none; border-color: var(--accent); }
.task-form-textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 7px 10px;
  width: 100%;
  resize: vertical;
  min-height: 100px;
}
.task-form-textarea:focus { outline: none; border-color: var(--accent); }
.task-form-row { display: flex; gap: 12px; }
.task-form-col { display: flex; flex-direction: column; flex: 1; }
.task-form-notes { display: flex; flex-direction: column; gap: 4px; }
.task-form-note-row { display: flex; gap: 8px; }
.task-form-note-row .task-form-input { flex: 1; }
.task-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.task-due { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.task-due.overdue { color: var(--alert); font-weight: 600; }

.task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.task-card:hover { border-color: var(--muted); }
.task-card.priority-high { border-left: 3px solid var(--alert); }

.task-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.task-body-clickable { cursor: pointer; }
.task-body-clickable:hover .task-title { color: var(--accent); }

.task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expand panels — shared by tasks and fallback cards */
.task-expand,
.fallback-expand {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.expand-detail {
  font-size: 14px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.expand-row {
  display: flex;
  gap: 10px;
  font-size: 14px;
}
.expand-label { color: var(--muted); min-width: 80px; flex-shrink: 0; }
.expand-message {
  font-size: 14px;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: 5px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 4px;
}
.expand-row-col { flex-direction: column; gap: 4px; }
.expand-error {
  font-size: 15px;
  color: var(--alert);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.expand-input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 5px 8px;
  min-width: 0;
}
.expand-input:focus { outline: none; border-color: var(--accent); }
.expand-select { cursor: pointer; }
.expand-textarea {
  min-height: 80px;
  resize: vertical;
  width: 100%;
  white-space: pre-wrap;
}
.expand-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.btn-raise {
  background: var(--accent);
  color: #12141a;
  border-radius: 7px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 14px;
  transition: opacity .12s;
}
.btn-raise:hover { opacity: .85; }
.btn-raise:disabled { opacity: .5; cursor: default; }
.raise-status { font-size: 12px; color: var(--muted); }

.task-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.task-source {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
}

.task-actions { display: flex; gap: 4px; flex-shrink: 0; align-self: center; }

.btn-task {
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel-2);
  transition: color .12s, border-color .12s;
}
.btn-task:hover { color: var(--text); border-color: var(--muted); }
.btn-task.done-btn:hover { color: var(--ok); border-color: var(--ok); }

/* ── Tickets panel ───────────────────────────────────────────────────────── */
.tickets-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  gap: 24px;
}

.tickets-section { display: flex; flex-direction: column; gap: 10px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tickets-search {
  margin-left: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 4px 10px;
  width: 200px;
}
.tickets-search:focus { outline: none; border-color: var(--accent); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.section-sub, .section-updated {
  font-size: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.section-error {
  font-size: 15px;
  color: var(--alert);
  font-family: var(--font-mono);
}

.tickets-table-wrap { overflow-x: auto; }

.tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tickets-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
.tickets-table th[data-sort] { cursor: pointer; }
.tickets-table th[data-sort]:hover { color: var(--text); }
.tickets-table th[data-sort]::after { content: ''; margin-left: 4px; opacity: .3; }
.tickets-table th.sort-asc::after  { content: '↑'; opacity: 1; color: var(--accent); }
.tickets-table th.sort-desc::after { content: '↓'; opacity: 1; color: var(--accent); }

.tickets-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}

.tickets-table tr:last-child td { border-bottom: none; }
.tickets-table tbody tr:hover td { background: var(--panel-2); }
.tickets-table tr.needs-attention td:first-child { border-left: 3px solid var(--alert); }

.tbl-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px !important;
}

.ticket-num {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
}

.ticket-subject { max-width: 260px; }
.ticket-subject-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 260px;
}

.ticket-age {
  font-family: var(--font-mono);
  font-size: 15px;
  white-space: nowrap;
}
.age-overdue { color: var(--alert); }
.age-warn    { color: var(--warn); }

/* ── Ticket thread expand ─────────────────────────────────────────────── */
.ticket-row { cursor: pointer; }
.ticket-row:hover td { background: rgba(255,255,255,.025); }
.ticket-thread-row td { padding: 0; border-bottom: 2px solid var(--accent); }
.thread-panel { padding: 14px 16px; background: var(--panel-2); }
.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.thread-title { font-size: 12px; font-weight: 600; color: var(--text); }
.btn-thread-refresh {
  font-size: 15px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color .1s, color .1s;
}
.btn-thread-refresh:hover { color: var(--text); border-color: var(--muted); }
.btn-thread-refresh:disabled { opacity: .5; cursor: default; }
.thread-entries { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.thread-entry {
  border-left: 3px solid var(--line);
  border-radius: 0 5px 5px 0;
  padding: 8px 12px;
  background: var(--panel);
}
.thread-M { border-left-color: var(--accent); }
.thread-R { border-left-color: var(--ok); }
.thread-N { border-left-color: var(--warn); }
.thread-entry-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.thread-poster { font-size: 12px; font-weight: 600; color: var(--text); }
.thread-type-badge {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.thread-time { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-left: auto; }
.thread-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: break-word;
}
.thread-body p { margin: 0 0 6px; }
.thread-body img { max-width: 100%; height: auto; }
.thread-loading, .thread-empty { font-size: 12px; color: var(--muted); padding: 6px 0; }
.thread-error { font-size: 12px; color: var(--alert); padding: 6px 0; }

.fallback-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fallback-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--alert);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.fallback-header-clickable { cursor: pointer; }
.fallback-header-clickable:hover .fallback-title { color: var(--accent); }
.fallback-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.fallback-meta {
  font-size: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ── System panel ────────────────────────────────────────────────────────── */
.system-layout {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  height: 100%;
}

.sys-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sys-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 200px;
  flex: 1;
}

.sys-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sys-service-list { display: flex; flex-direction: column; gap: 8px; }

.sys-service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.sys-svc-name { flex: 1; color: var(--text); font-family: var(--font-mono); font-size: 11px; }
.sys-svc-state { font-size: 11px; }
.sys-svc-state.ok   { color: var(--ok); }
.sys-svc-state.warn { color: var(--warn); }
.sys-svc-state.err  { color: var(--alert); }

.sys-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.sys-metric-row:last-child { border-bottom: none; }
.sys-metric-label { color: var(--muted); }
.sys-metric-value { font-family: var(--font-mono); color: var(--text); }
.sys-metric-value.warn { color: var(--warn); }
.sys-metric-value.err  { color: var(--alert); }

.sys-spend-body { font-size: 12px; color: var(--muted); }

.sys-big-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 500;
  color: var(--text);
}
.sys-big-num.alert { color: var(--alert); }

.sys-mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ── Classic Mail panel ──────────────────────────────────────────────────── */
.mail-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.mail-sidebar {
  width: 190px;
  flex-shrink: 0;
  position: relative;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}
.btn-mail-compose {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 0 8px 14px;
  width: calc(100% - 16px);
  text-align: center;
}
.btn-mail-compose:hover { filter: brightness(1.1); }
.mail-folder-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 4px;
}
.mail-folder {
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  margin: 0 6px 1px;
}
.mail-folder:hover { background: var(--panel-2); }
.mail-folder.active { background: var(--panel-2); color: var(--accent); font-weight: 600; }
.mail-account {
  padding: 5px 16px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  margin: 0 6px 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-account:hover { background: var(--panel-2); color: var(--text); }
.mail-account.active { background: var(--panel-2); color: var(--text); }
.mail-list-pane {
  width: 300px;
  flex-shrink: 0;
  position: relative;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.mail-list-resize,
.mail-sidebar-resize,
.tasks-list-resize {
  position: absolute;
  top: 0; right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
}
.mail-list-resize:hover,
.mail-list-resize.dragging,
.mail-sidebar-resize:hover,
.mail-sidebar-resize.dragging,
.tasks-list-resize:hover,
.tasks-list-resize.dragging { background: var(--accent); opacity: .5; }
.mail-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.mail-item:hover, .mail-item.active { background: var(--panel-2); }
.mail-item-header { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.mail-item-from { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.mail-item-subject { font-size: 12px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-preview { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-meta { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.mail-detail-pane { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.mail-detail-pane .email-detail { flex: 1; min-width: 0; width: 100%; }
.mail-detail-view { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.mail-body { white-space: pre-wrap; font-size: 13px; line-height: 1.6; flex: 1; padding: 16px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.mail-detail-actions { display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: auto; }
.mail-sent-confirm { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; padding: 40px; text-align: center; }
.mail-sent-check { font-size: 48px; color: var(--ok); line-height: 1; }
.mail-sent-label { font-size: 20px; font-weight: 600; }
.mail-sent-to { font-size: 13px; color: var(--muted); }
.mail-sent-btns { display: flex; gap: 10px; margin-top: 8px; }

/* Compose button */
.btn-compose {
  margin-left: auto;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.btn-compose:hover { filter: brightness(1.1); }

/* Compose form */
.compose-fields { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.compose-row { display: flex; align-items: center; gap: 10px; }
.compose-label { font-size: 12px; color: var(--muted); width: 52px; flex-shrink: 0; text-align: right; }
.compose-input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; padding: 5px 10px; }
.compose-input:focus { outline: none; border-color: var(--accent); }

/* Floating task-from-selection button */
.sel-task-float {
  position: fixed;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1000;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  white-space: nowrap;
}
.sel-task-float:hover { filter: brightness(1.1); }
.sel-task-done { background: var(--ok); color: #fff; }

.sys-admin-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sys-admin-label { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.sys-admin-input { width: 90px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; padding: 4px 8px; }
.sys-admin-status { font-size: 12px; color: var(--muted); }
.sys-admin-status.ok { color: var(--ok); }
.sys-admin-status.err { color: var(--alert); }

/* ── Status bar dots — live update via JS ────────────────────────────────── */
.dot[data-svc] { cursor: default; }

/* ── Calendar panel ──────────────────────────────────────────────────────── */
.cal-layout {
  display: flex;
  gap: 16px;
  padding: 16px;
  height: 100%;
  overflow: hidden;
}
.cal-left {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.cal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.cal-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cal-date-group { margin-bottom: 12px; }
.cal-date-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.cal-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-slot {
  padding: 5px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  transition: background .15s;
}
.cal-slot:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.cal-slot.selected { background: var(--accent); color: #000; border-color: var(--accent); }
.cal-booking-form {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-form-title { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.cal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 7px 10px;
  font-size: 14px;
  font-family: var(--font-body);
  box-sizing: border-box;
}
.cal-input:focus { outline: none; border-color: var(--accent); }
.cal-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.cal-form-msg { font-size: 11px; color: var(--muted); }
.cal-form-msg.err { color: var(--alert); }
.cal-booking-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 14px;
}
.cal-bk-who { font-weight: 600; color: var(--text); }
.cal-bk-time { font-family: var(--font-mono); color: var(--muted); font-size: 11px; }
.cal-bk-kind { color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.cal-win-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.cal-win-row:last-child { border-bottom: none; }
.cal-win-day { flex: 1; color: var(--text); }
.cal-win-time { font-family: var(--font-mono); color: var(--muted); }
.cal-win-del {
  background: none; border: none; color: var(--alert);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px;
}
.cal-window-add {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cal-input-sm {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 5px 8px;
  font-size: 14px;
  font-family: var(--font-body);
}
.cal-sep { color: var(--muted); font-size: 12px; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

/* ── M10: Grain noise overlay ────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── M10: Staggered entrance animations ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inbox-row,
.task-card,
.ticket-row,
.cal-date-group,
.cal-booking-row,
.sys-card {
  animation: fadeUp .18s ease both;
}

.inbox-row:nth-child(1)  { animation-delay: .02s; }
.inbox-row:nth-child(2)  { animation-delay: .04s; }
.inbox-row:nth-child(3)  { animation-delay: .06s; }
.inbox-row:nth-child(4)  { animation-delay: .08s; }
.inbox-row:nth-child(5)  { animation-delay: .10s; }
.inbox-row:nth-child(n+6){ animation-delay: .12s; }

.task-card:nth-child(1)  { animation-delay: .02s; }
.task-card:nth-child(2)  { animation-delay: .04s; }
.task-card:nth-child(3)  { animation-delay: .06s; }
.task-card:nth-child(n+4){ animation-delay: .08s; }

.sys-card:nth-child(1) { animation-delay: .03s; }
.sys-card:nth-child(2) { animation-delay: .06s; }
.sys-card:nth-child(3) { animation-delay: .09s; }

/* ── M10: Responsive — ≤820px bottom tab bar ─────────────────────────────── */
@media (max-width: 820px) {
  .app-shell {
    flex-direction: column;
  }

  .nav-rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    border-right: none;
    border-top: 1px solid var(--line);
    padding: 0;
    z-index: 100;
  }

  .nav-brand { display: none; }

  .nav-items {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    padding: 0;
    gap: 0;
  }

  .nav-item {
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    min-width: 56px;
    align-items: center;
  }

  .nav-icon { width: 20px; height: 20px; }

  .nav-label {
    font-size: 15px;
    display: block;
    opacity: 1;
  }

  .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 14px;
    height: 14px;
    font-size: 15px;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 64px;
    height: calc(100vh - 64px);
  }

  .status-bar {
    left: 0;
    right: 0;
  }

  /* Inbox: stack two-pane on mobile */
  .inbox-pane {
    flex-direction: column;
  }

  .inbox-list-pane {
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 45vh;
  }

  .inbox-detail-pane {
    height: auto;
  }

  /* Calendar: stack on mobile */
  .cal-layout {
    flex-direction: column;
  }

  .cal-right {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 32px;
}

.login-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: .02em;
}

.login-sub {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}

.login-error {
  background: rgba(224, 104, 95, .12);
  border: 1px solid rgba(224, 104, 95, .3);
  color: var(--alert);
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
}

.login-input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  margin-bottom: 8px;
}
.login-input::placeholder { color: var(--muted); }
.login-input:focus { border-color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 16px;
  transition: opacity .15s, transform .1s;
}
.btn-primary:hover  { opacity: .92; transform: translateY(-1px); }
.btn-primary:active { opacity: 1;   transform: translateY(0); }

.login-btn { width: 100%; margin-top: 4px; }


/* ── Toast notification ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-ok   { border-color: var(--ok);    color: var(--ok); }
.toast.toast-warn { border-color: var(--warn);  color: var(--warn); }
.toast.toast-err  { border-color: var(--alert); color: var(--alert); }
