/* ============================================================
   Oneteam — Council Meetings module
   Design tokens (clean admin aesthetic, Inertia/Laravel feel)
   ============================================================ */

:root {
  /* Surfaces */
  --bg:           #f6f7f9;
  --bg-elev:     #ffffff;
  --bg-sunken:   #eef0f3;
  --bg-hover:    #f1f3f6;
  --bg-active:   #e8ecf1;

  /* Borders */
  --border:      #e3e6eb;
  --border-strong: #cdd2da;
  --border-soft: #edeff3;

  /* Text */
  --ink:         #15171c;
  --ink-soft:    #3a4150;
  --muted:       #6b7280;
  --muted-soft:  #8a92a0;
  --on-accent:   #ffffff;

  /* Brand — deep teal/blue, civic-serious */
  --brand:       #0f4c5c;
  --brand-600:   #0c3e4b;
  --brand-50:    #e7f0f3;
  --brand-100:   #cfe1e6;

  /* Functional */
  --success:     #15803d;
  --success-bg:  #e7f4ec;
  --warning:     #b45309;
  --warning-bg:  #fdf2dd;
  --danger:      #b42318;
  --danger-bg:   #fdecec;
  --info:        #1d4ed8;
  --info-bg:     #e8efff;
  --neutral-bg:  #eef0f3;

  /* Sidebar */
  --sidebar-bg:    #0e1422;
  --sidebar-bg-2:  #131b2e;
  --sidebar-ink:   #cfd5e2;
  --sidebar-muted: #7e889c;
  --sidebar-active-bg: rgba(255,255,255,0.08);
  --sidebar-active-ink: #ffffff;
  --sidebar-accent: #56b3c7;

  /* Type */
  --font-sans: "Inter", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;

  /* Sizing */
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --shadow-xs: 0 1px 0 rgba(15, 22, 36, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 22, 36, 0.06), 0 1px 1px rgba(15,22,36,0.03);
  --shadow-md: 0 4px 12px rgba(15, 22, 36, 0.08), 0 2px 4px rgba(15,22,36,0.04);
  --shadow-lg: 0 16px 40px rgba(15, 22, 36, 0.16), 0 4px 12px rgba(15,22,36,0.06);

  --header-h: 56px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body, #root {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* App layout =================================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.app__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sidebar ====================================================== */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #000;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar__logo {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #2c91a7 0%, #0f4c5c 100%);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px;
}
.sidebar__brand-text { font-weight: 600; color: white; letter-spacing: -0.01em; }
.sidebar__brand-sub { font-size: 11px; color: var(--sidebar-muted); }

.sidebar__module-switcher {
  margin: 12px 12px 6px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: var(--sidebar-bg-2);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.sidebar__module-switcher:hover { background: rgba(255,255,255,0.05); }
.sidebar__module-icon {
  width: 22px; height: 22px; border-radius: 5px;
  background: rgba(86,179,199,0.18);
  color: var(--sidebar-accent);
  display: grid; place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.sidebar__module-name { color: white; font-weight: 500; flex: 1; }
.sidebar__module-chev { color: var(--sidebar-muted); }

.sidebar__section-label {
  padding: 14px 18px 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  font-weight: 600;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}
.sidebar__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--sidebar-ink);
  cursor: pointer;
  border: 0; background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}
.sidebar__item:hover { background: rgba(255,255,255,0.04); color: white; }
.sidebar__item--active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-ink);
  font-weight: 500;
}
.sidebar__item--active::before {
  content: "";
  position: absolute;
  left: -8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--sidebar-accent);
  border-radius: 0 2px 2px 0;
}
.sidebar__item-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.sidebar__item-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  color: var(--sidebar-ink);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.sidebar__item--active .sidebar__item-badge {
  background: var(--sidebar-accent);
  color: #06222a;
  font-weight: 600;
}

.sidebar__footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #2a3144; color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.sidebar__user-name { font-size: 13px; color: white; }
.sidebar__user-role { font-size: 11px; color: var(--sidebar-muted); }

/* Top bar ======================================================= */
.topbar {
  height: var(--header-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.topbar__crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  flex: 1; min-width: 0;
}
.topbar__crumb-current { color: var(--ink); font-weight: 500; }
.topbar__crumb-sep { color: var(--muted-soft); }
.topbar__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  width: 280px;
  font-size: 13px;
  color: var(--muted);
}
.topbar__search:hover { border-color: var(--border-strong); }
.topbar__search kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}
.topbar__icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.topbar__icon-btn:hover { background: var(--bg-hover); color: var(--ink); }

/* Page wrapper ================================================== */
.page {
  flex: 1;
  padding: 24px 32px 48px;
  min-width: 0;
}
.page--narrow { max-width: 960px; }
.page__header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 20px;
}
.page__title-block { flex: 1; min-width: 0; }
.page__title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--ink);
}
.page__subtitle { color: var(--muted); font-size: 13.5px; margin: 0; }
.page__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Buttons ======================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.08s, border-color 0.08s, transform 0.05s;
  height: 32px;
  font-family: inherit;
}
.btn:hover { background: var(--bg-hover); border-color: #b8bec8; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}
.btn--ghost:hover { background: var(--bg-hover); color: var(--ink); border-color: transparent; }
.btn--danger {
  color: var(--danger);
  border-color: #f1cfca;
  background: white;
}
.btn--danger:hover { background: var(--danger-bg); border-color: #e6b3ad; }
.btn--success {
  color: white;
  border-color: var(--success);
  background: var(--success);
}
.btn--success:hover { background: #126c34; border-color: #126c34; }
.btn--sm { height: 28px; font-size: 12.5px; padding: 4px 10px; }
.btn--icon { padding: 0; width: 32px; height: 32px; }
.btn--icon.btn--sm { width: 28px; height: 28px; }

.btn-group {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
}
.btn-group .btn {
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--border);
  background: white;
  height: 30px;
}
.btn-group .btn:last-child { border-right: 0; }
.btn-group .btn--active {
  background: var(--bg-active);
  color: var(--ink);
  font-weight: 600;
}

/* Tabs ========================================================== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 2px;
}
.tab {
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--ink); }
.tab--active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.tab__count {
  background: var(--bg-sunken);
  color: var(--muted);
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.tab--active .tab__count { background: var(--brand-50); color: var(--brand); }

/* Cards ========================================================= */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}
.card__header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.card__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.card__sub { font-size: 12px; color: var(--muted); }
.card__actions { margin-left: auto; display: flex; gap: 6px; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }
.card__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}

/* Stat tile */
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.stat__label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.stat__value {
  font-size: 26px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat__delta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.stat__delta--up { color: var(--success); }
.stat__delta--down { color: var(--danger); }

/* Badges / pills =============================================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--neutral-bg);
  color: var(--ink-soft);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--sm { font-size: 10.5px; padding: 1px 6px; }
.badge--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge--info    { background: var(--info-bg);    color: var(--info);    }
.badge--brand   { background: var(--brand-50);   color: var(--brand);   }
.badge--neutral { background: var(--neutral-bg); color: var(--ink-soft);}
.badge--outline { background: transparent; border-color: var(--border-strong); color: var(--ink-soft); }

/* Tables ======================================================== */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elev);
}
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fafbfc;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafbfc; cursor: pointer; }
.tbl__primary { font-weight: 500; color: var(--ink); }
.tbl__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tbl__num { font-variant-numeric: tabular-nums; color: var(--muted); }
.tbl__row--inactive td { color: var(--muted); }

/* Forms ========================================================= */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.field__hint { font-size: 11.5px; color: var(--muted); }
.field__row { display: flex; gap: 12px; }
.field__row > .field { flex: 1; }
.input, .select, .textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13.5px;
  background: white;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,76,92,0.12);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M5 6 0 0h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-soft);
  cursor: pointer;
}
.checkbox input, .radio input { accent-color: var(--brand); }

/* Avatars ======================================================= */
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  background: #d6dde6;
  color: #2a3144;
  flex-shrink: 0;
}
.avatar--lg { width: 40px; height: 40px; font-size: 13px; }
.avatar--sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar-stack {
  display: inline-flex;
}
.avatar-stack .avatar {
  border: 2px solid var(--bg-elev);
  margin-left: -8px;
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Status pill colors map ======================================== */
.status-Draft        { background: var(--neutral-bg); color: var(--ink-soft); }
.status-Scheduled    { background: var(--info-bg); color: var(--info); }
.status-InProgress   { background: #fff2da; color: var(--warning); }
.status-Completed    { background: var(--success-bg); color: var(--success); }
.status-Cancelled    { background: #f4f4f5; color: var(--muted); text-decoration: line-through; }
.status-Submitted    { background: var(--info-bg); color: var(--info); }
.status-Added        { background: #ede7fb; color: #5a3ab8; }
.status-Voted        { background: #fff2da; color: var(--warning); }
.status-Resolved     { background: var(--success-bg); color: var(--success); }
.status-Rejected     { background: var(--danger-bg); color: var(--danger); }

/* Section divider =============================================== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* Detail page two-column ======================================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: flex-start;
}
.detail-grid__main { min-width: 0; }
.detail-grid__side { display: flex; flex-direction: column; gap: 16px; }

/* Chips list ==================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
}
.chip__avatar { width: 20px; height: 20px; border-radius: 50%; background: #d6dde6; color:#2a3144; display:grid; place-items:center; font-size: 9px; font-weight: 600;}
.chip__remove { color: var(--muted); cursor: pointer; padding: 0 4px; }

/* Attachments =================================================== */
.attachment {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 12.5px;
}
.attachment__icon {
  width: 28px; height: 28px;
  border-radius: 5px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 10px; letter-spacing: 0.02em;
  color: white;
  flex-shrink: 0;
}
.attachment__icon--pdf  { background: #c0392b; }
.attachment__icon--xlsx { background: #1e7e3e; }
.attachment__icon--doc  { background: #1d4ed8; }
.attachment__icon--img  { background: #6d28d9; }
.attachment__name { font-weight: 500; }
.attachment__size { color: var(--muted); font-size: 11.5px; }

/* Empty state =================================================== */
.empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
}
.empty__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-sunken);
  margin: 0 auto 12px;
  display: grid; place-items: center;
  color: var(--muted);
}
.empty__title { color: var(--ink); font-weight: 500; font-size: 14px; margin: 0 0 4px; }
.empty__text { font-size: 13px; margin: 0 0 12px; }

/* Modal ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 22, 36, 0.4);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: var(--bg-elev);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  overflow: hidden;
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal--lg { max-width: 720px; }
.modal__header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: 15px; font-weight: 600; margin: 0; }
.modal__close { margin-left: auto; }
.modal__body { padding: 18px; overflow: auto; }
.modal__footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* Vote bar ====================================================== */
.votebar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-sunken);
}
.votebar__seg { height: 100%; }
.votebar__seg--for { background: var(--success); }
.votebar__seg--against { background: var(--danger); }
.votebar__seg--abstain { background: #cbd0d8; }

/* Agenda timeline ============================================== */
.agenda-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.agenda-item--active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,76,92,0.10);
}
.agenda-item__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.agenda-item__head:hover { background: #fafbfc; }
.agenda-item__num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--ink-soft);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.agenda-item--active .agenda-item__num,
.agenda-item--resolved .agenda-item__num { background: var(--brand); color: white; }
.agenda-item__body {
  padding: 0 14px 16px 52px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}
.agenda-item__title { font-weight: 500; }

.drag-handle {
  cursor: grab; color: var(--muted-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.drag-handle::before, .drag-handle::after {
  content: "···";
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 0.5;
}

/* Permission lock overlay ====================================== */
.lock-overlay {
  position: relative;
}
.lock-overlay__veil {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.6);
  display: grid; place-items: center;
  font-size: 12px; color: var(--muted);
  border-radius: inherit;
  pointer-events: none;
}

/* Skeleton (loading) =========================================== */
.sk {
  background: linear-gradient(90deg, #eef0f3 0%, #f6f7f9 50%, #eef0f3 100%);
  background-size: 200% 100%;
  animation: sk 1.4s ease-in-out infinite;
  border-radius: 4px;
  display: inline-block;
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Present mode ================================================== */
.present {
  position: fixed; inset: 0;
  background: #0b1220;
  color: white;
  display: flex; flex-direction: column;
  z-index: 200;
}
.present__topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.present__title { font-weight: 500; font-size: 15px; }
.present__meta { color: #8b96a8; font-size: 13px; }
.present__close { margin-left: auto; }
.present__body {
  flex: 1; display: grid; place-items: center;
  padding: 40px;
}
.present__card {
  width: 100%; max-width: 1100px;
  background: #131a2a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 48px 56px;
}
.present__num {
  font-size: 13px; color: #8b96a8;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 14px;
}
.present__paper-title {
  font-size: 38px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
  color: white;
}
.present__paper-desc {
  font-size: 18px; color: #c8d2e3; line-height: 1.5;
  max-width: 80ch;
  margin: 0;
}
.present__vote-board {
  margin-top: 36px;
  background: rgba(11,18,32,0.72);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
}
.present__vote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.present__vote-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b96a8;
  font-weight: 700;
}
.present__vote-outcome {
  margin-top: 4px;
  color: white;
  font-size: 22px;
  font-weight: 650;
}
.present__vote-progress {
  display: grid;
  gap: 8px;
  min-width: 260px;
  color: #c8d2e3;
  font-size: 13px;
  text-align: right;
}
.present__vote-progress-track {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.present__vote-progress-fill {
  height: 100%;
  background: var(--sidebar-accent);
  transition: width 0.25s ease;
}
.present__vote {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.08);
}
.present__vote-cell {
  background: #0b1220;
  padding: 22px;
  min-height: 260px;
}
.present__vote-cell--for     { background: linear-gradient(180deg, rgba(34,197,94,0.14), rgba(11,18,32,0.92)); }
.present__vote-cell--against { background: linear-gradient(180deg, rgba(239,68,68,0.14), rgba(11,18,32,0.92)); }
.present__vote-cell--abstain { background: linear-gradient(180deg, rgba(156,163,175,0.12), rgba(11,18,32,0.92)); }
.present__vote-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #c8d2e3; font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}
.present__vote-count {
  font-size: 56px; font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.present__vote-members {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  max-height: 170px;
  overflow: auto;
}
.present__vote-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: white;
  font-size: 13px;
}
.present__vote-member small {
  color: #8b96a8;
  font-size: 11px;
  white-space: nowrap;
}
.present__vote-empty {
  padding: 10px;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 8px;
  color: #8b96a8;
  font-size: 13px;
  text-align: center;
}
.present__footer {
  padding: 18px 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: #8b96a8;
}
.present__progress { flex: 1; }
.present__progress-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.present__progress-fill {
  height: 100%;
  background: var(--sidebar-accent);
  transition: width 0.3s;
}

/* Toast ========================================================= */
.toast-container {
  position: fixed; right: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 300;
}
.toast {
  background: #15171c;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  min-width: 240px;
  animation: toast-in 0.2s ease-out;
}
.toast--success { border-left: 3px solid #22c55e; }
.toast--info { border-left: 3px solid var(--sidebar-accent); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Vote pill summary ============================================ */
.vote-summary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.vote-summary__seg {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.vote-summary__seg--for { background: var(--success-bg); color: var(--success); }
.vote-summary__seg--against { background: var(--danger-bg); color: var(--danger); }
.vote-summary__seg--abstain { background: var(--neutral-bg); color: var(--muted); }

.vote-rollcall {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.vote-rollcall__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.vote-rollcall__list {
  display: grid;
  gap: 1px;
  max-height: 340px;
  overflow: auto;
}
.vote-rollcall__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: white;
}
.vote-rollcall__person {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.vote-rollcall__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vote-rollcall__meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vote-rollcall__choices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vote-choice {
  border: 1px solid var(--border);
  background: white;
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.vote-choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.vote-choice--success.vote-choice--active {
  border-color: #aedcc1;
  background: var(--success-bg);
  color: var(--success);
}
.vote-choice--danger.vote-choice--active {
  border-color: #f1cfca;
  background: var(--danger-bg);
  color: var(--danger);
}
.vote-choice--neutral.vote-choice--active {
  border-color: var(--border-strong);
  background: var(--neutral-bg);
  color: var(--muted);
}

/* Subnav under page header (Meeting detail tabs) ============== */
.subnav {
  display: flex; gap: 4px;
  padding: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Filter bar =================================================== */
.filterbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filterbar__sep { width: 1px; height: 20px; background: var(--border); }
.filterbar__search {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px;
  background: var(--bg-sunken);
  border-radius: 5px;
  font-size: 13px; color: var(--muted);
  min-width: 160px;
}
.filterbar__search input {
  flex: 1;
  border: 0; outline: 0; background: transparent;
  font-size: 13px; color: var(--ink);
  font-family: inherit;
}

/* Toggle (presence) ============================================ */
.toggle-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-pill input { display: none; }
.toggle-pill__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.1s;
}
.toggle-pill--on { background: var(--success-bg); border-color: #aedcc1; color: var(--success); }
.toggle-pill--on .toggle-pill__dot { background: var(--success); }

/* Mobile responsive notes ====================================== */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .page { padding: 16px; }
}
