:root {
  --bg: #dbe3ec;
  --paper: #f8fafc;
  --ink: #202836;
  --ink-soft: #5c6b7d;
  --ink-faint: #93a1b0;
  --line: #c3ced9;
  --line-soft: #dbe3ea;
  --accent: #c1503a;
  --accent-soft: #f3d9d0;
  --today-ring: #c1503a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(24, 32, 46, 0.05), 0 10px 26px -14px rgba(24, 32, 46, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: radial-gradient(circle at 1px 1px, rgba(32, 40, 54, 0.06) 1px, transparent 0);
  background-size: 22px 22px;
}

h1, h2, h3 { font-family: 'Fraunces', serif; margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--accent); font-size: 20px; }
.brand h1 { font-size: 25px; font-weight: 600; letter-spacing: -0.01em; font-style: italic; }
.brand-sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary span:first-child { font-size: 14px; font-weight: 500; }
.btn-primary-hint { font-size: 11px; color: rgba(255, 255, 255, 0.55); font-family: 'IBM Plex Mono', monospace; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }

.side-section { display: flex; flex-direction: column; gap: 10px; }
.side-section-head { display: flex; align-items: center; justify-content: space-between; }
.side-section h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-family: 'IBM Plex Sans', sans-serif; }

.link-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.link-btn:hover { color: var(--accent); }

/* ---------- Filter chips ---------- */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  color: var(--ink-soft);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); }
.chip.selected { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 3px 8px -2px rgba(24, 32, 46, 0.4); }

.chip-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

.chip-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
}

.filter-empty { font-size: 12px; color: var(--ink-faint); font-style: italic; }

.webhook-box {
  margin-top: auto;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.webhook-label { margin: 0; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.webhook-box code { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); word-break: break-all; }

/* ---------- Calendar header ---------- */

.calendar-wrap { padding: 28px 34px 40px; }

.cal-header { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 18px; flex-wrap: wrap; gap: 12px; }
.cal-title-group { display: flex; align-items: baseline; gap: 12px; }
#monthTitle { font-size: 28px; font-weight: 500; font-style: italic; letter-spacing: -0.01em; }
.event-count { font-size: 12px; color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; }

.cal-controls { display: flex; align-items: center; gap: 12px; }

.view-switch { display: flex; background: var(--line-soft); border-radius: 999px; padding: 3px; gap: 2px; }
.view-switch button {
  border: none;
  background: none;
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background 0.12s ease, color 0.12s ease;
}
.view-switch button.active { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(24, 32, 46, 0.2); }
.view-switch button:not(.active):hover { color: var(--ink); }

.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.cal-nav button:hover { border-color: var(--accent); transform: translateY(-1px); }
#btnPrev, #btnNext { padding: 7px 12px; font-size: 15px; }

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px;
  margin-bottom: 6px;
}
.weekday-row span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding-left: 4px; }
.weekday-row .wk-date { font-family: 'IBM Plex Mono', monospace; font-weight: 500; color: var(--ink); margin-left: 6px; }
.weekday-row .wk-today { color: var(--accent); }

/* ---------- Month / week grid ---------- */

.cal-grid {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: fadeGrid 0.28s ease;
}
.cal-grid.mode-day { background: transparent; border: none; box-shadow: none; }

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

.week-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 24px repeat(3, 22px) 16px;
  row-gap: 3px;
  column-gap: 5px;
  padding: 6px 6px 8px;
  border-top: 1px solid var(--line-soft);
}
.week-row:first-child { border-top: none; }

.week-row.week-solo {
  grid-template-rows: 30px repeat(9, 25px);
  row-gap: 4px;
  padding: 12px 10px 16px;
  min-height: 420px;
}

.day-cell { grid-row: 1; display: flex; align-items: flex-start; padding-left: 4px; }
.day-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.week-solo .day-num { font-size: 14px; min-width: 24px; height: 24px; }

.day-cell.out .day-num { color: var(--ink-faint); }
.day-cell.today .day-num { background: var(--today-ring); color: #fff; font-weight: 500; }

.event-bar {
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11.5px;
  line-height: 22px;
  height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.12s ease, transform 0.12s ease;
  position: relative;
}
.week-solo .event-bar { font-size: 12.5px; line-height: 25px; height: 25px; }
.event-bar:hover { filter: brightness(0.95); transform: translateY(-1px); }

.event-bar.uncertain { border-style: dashed; border-color: rgba(32, 40, 54, 0.35); }

.event-bar.cap-start { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.event-bar.cap-end { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.event-bar.cont-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.event-bar.cont-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }


/* ---------- Day view agenda ---------- */

.agenda { display: flex; flex-direction: column; gap: 10px; animation: fadeGrid 0.28s ease; }

.agenda-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.agenda-card {
  display: flex;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  align-items: stretch;
}
.agenda-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.agenda-card.uncertain { border-style: dashed; }

.agenda-accent { width: 4px; border-radius: 4px; flex-shrink: 0; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-title { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 500; margin: 0 0 6px; }
.agenda-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-soft); }
.agenda-company {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.agenda-period { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--ink-faint); }

/* ---------- Popover ---------- */

.popover {
  position: absolute;
  z-index: 40;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 340px;
  overflow: hidden;
  animation: popIn 0.14s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.popover-accent { height: 6px; width: 100%; }
.popover-body { padding: 18px 20px 16px; position: relative; }

.popover-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-faint);
}
.popover-close:hover { color: var(--accent); }

.popover-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding-right: 22px;
}

.popover-company {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Status vem livre do Pipefy, então usa cor neutra — não entra na paleta por empresa. */
.popover-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.agenda-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

/* Fase (etapa no pipe) — mais discreta que o status, só contorno. */
.agenda-phase {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
}

.popover h4 { font-size: 17.5px; font-weight: 500; line-height: 1.32; margin: 0 0 16px; padding-right: 22px; }

.popover-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.meta-label { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10.5px; white-space: nowrap; }
.meta-value { color: var(--ink); font-size: 13px; text-align: right; }
.meta-value.mono { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }

.popover-people { margin-bottom: 14px; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.avatar-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--line-soft);
  border-radius: 999px;
  padding: 3px 11px 3px 3px;
  font-size: 12px;
  color: var(--ink);
}
.avatar-chip .chip-avatar { width: 22px; height: 22px; font-size: 10px; }

.popover-footer { display: flex; justify-content: space-between; align-items: center; }
.popover-timestamp { font-size: 10.5px; color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; }
.popover-delete { background: none; border: none; color: var(--accent); font-size: 12px; padding: 0; }
.popover-delete:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 32, 46, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.15s ease;
}
.modal-backdrop[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 26px 28px 24px;
  width: 480px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -20px rgba(24, 32, 46, 0.5);
  animation: modalIn 0.18s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-head h3 { font-size: 19px; font-weight: 500; font-style: italic; padding-right: 20px; }

.modal-close { background: none; border: none; font-size: 20px; line-height: 1; color: var(--ink-faint); }
.modal-close:hover { color: var(--accent); }

.modal-sub { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 18px; line-height: 1.5; }
.modal-sub code { font-family: 'IBM Plex Mono', monospace; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }

#eventForm { display: flex; flex-direction: column; gap: 14px; }
#eventForm label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-soft); flex: 1; }
#eventForm input, #eventForm select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
#eventForm input:focus, #eventForm select:focus { outline: none; border-color: var(--accent); }

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

.form-error { color: var(--accent); font-size: 12.5px; background: var(--accent-soft); padding: 8px 10px; border-radius: var(--radius-sm); margin: 0; }
.form-success { color: #2f6b45; font-size: 12.5px; background: #dcefe1; padding: 8px 10px; border-radius: var(--radius-sm); margin: 0; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 13.5px; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.form-actions .btn-primary { flex-direction: row; align-items: center; padding: 10px 18px; font-size: 13.5px; }

/* ---------- App shell / left navigation bar ---------- */

.app-shell { display: flex; min-height: 100vh; }
.shell { display: block; flex: 1; min-width: 0; }

.leftbar {
  width: 232px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.leftbar-actions { display: flex; flex-direction: column; gap: 10px; }

/* O botão de alternância usa a mesma classe .btn-filters (visual idêntico ao "Filtros");
   .btn-tab-switch só acrescenta o estado ativo, quando a visão de previstas está aberta. */
.btn-tab-switch.on-previstas {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-tab-switch.on-previstas:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Selo no cabeçalho do calendário indicando que a visão atual é de datas previstas. */
.tab-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
}
.tab-indicator[hidden] { display: none; }

.btn-filters {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 15px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.btn-filters:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-filters .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
}
.btn-filters .badge[hidden] { display: none; }

.leftbar .btn-primary { width: 100%; }

/* ---------- Retractable filter drawer ---------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 300px;
  overflow-y: auto;
  padding: 24px 22px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  z-index: 60;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 32, 46, 0.28);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- User menu ---------- */

.user-menu { position: relative; margin-top: auto; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  font-size: 13px;
  color: var(--ink);
}
.user-menu-trigger:hover { border-color: var(--ink-faint); }
.user-menu-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}
.user-menu-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-width: 210px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 70;
  animation: popIn 0.12s ease;
}
.user-menu-dropdown[hidden] { display: none; }
.user-menu-dropdown a, .user-menu-dropdown button {
  text-align: left;
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  display: block;
  width: 100%;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--line-soft); }
.user-menu-dropdown .menu-divider { height: 1px; background: var(--line-soft); margin: 4px 2px; }
.user-menu-dropdown .danger { color: var(--accent); }

/* ---------- Participant picker (modal) ---------- */

.people-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  max-height: 130px;
  overflow-y: auto;
  background: #fff;
}
.people-picker .filter-empty { padding: 4px; }

/* ---------- Auth pages ---------- */

.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-shell { width: 100%; max-width: 420px; padding: 20px; }
.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 30px;
  animation: modalIn 0.2s cubic-bezier(.2,.9,.3,1.2);
}
.auth-brand { margin-bottom: 24px; }
.auth-title { font-size: 20px; font-weight: 500; font-style: italic; margin: 0 0 6px; }
.auth-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 20px; }

#setupForm, #loginForm { display: flex; flex-direction: column; gap: 14px; }
#setupForm label, #loginForm label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
#setupForm input, #loginForm input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
#setupForm input:focus, #loginForm input:focus { outline: none; border-color: var(--accent); }

.auth-submit { width: 100%; flex-direction: row; align-items: center; justify-content: center; padding: 11px; font-size: 14px; margin-top: 4px; }

/* ---------- Admin page ---------- */

.admin-shell { max-width: 920px; margin: 0 auto; padding: 34px 28px 60px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-header-actions { display: flex; align-items: center; gap: 18px; }
.admin-main { display: flex; flex-direction: column; gap: 24px; }
.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
}
.admin-panel h2 { font-size: 17px; font-weight: 500; font-style: italic; margin: 0 0 6px; }
.admin-form { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.admin-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-soft); flex: 1; }
.admin-form input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.admin-form input:focus { outline: none; border-color: var(--accent); }

.admin-table-wrap { overflow-x: auto; margin-top: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.admin-table td.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); }
.status-pending { color: var(--accent); font-size: 12px; }
.status-active { color: #3f8f5f; font-size: 12px; }
.link-btn.danger { color: var(--accent); }
.link-btn[disabled] { color: var(--ink-faint); cursor: not-allowed; text-decoration: none; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .leftbar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .leftbar-actions { flex-direction: row; width: auto; }
  .leftbar .btn-primary, .btn-filters { width: auto; }
  .user-menu { margin-top: 0; margin-left: auto; }
  .user-menu-dropdown { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; }
  .calendar-wrap { padding: 20px 18px 40px; }
  .admin-shell { padding: 24px 16px 50px; }
}
