/* ═══════════════════════════════════════════════════════════════════════
   The Domino Effect CIC — CRM Stylesheet
   Deep Slate + Coral + Teal | DM Sans + Syne
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:          #F5F6FA;
  --surface:     #FFFFFF;
  --surface-2:   #F0F1F7;
  --border:      #E4E6EF;
  --border-2:    #CBD0DF;

  --navy:        #0C1829;
  --navy-mid:    #1A2744;
  --navy-soft:   #2E4066;

  --coral:       #FF5044;
  --coral-soft:  #FF7066;
  --coral-bg:    #FFF0EF;

  --teal:        #0DCFAB;
  --teal-soft:   #3DDFC0;
  --teal-bg:     #EDFAF7;

  --amber:       #F59E0B;
  --amber-bg:    #FFFBEB;

  --text:        #0C1829;
  --text-mid:    #3D4966;
  --text-soft:   #7A83A1;
  --text-inv:    #FFFFFF;

  --sidebar-w:   240px;
  --topbar-h:    60px;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --shadow:      0 1px 3px rgba(12,24,41,.07), 0 4px 16px rgba(12,24,41,.06);
  --shadow-md:   0 4px 12px rgba(12,24,41,.1), 0 16px 40px rgba(12,24,41,.08);
  --shadow-pop:  0 8px 30px rgba(255,80,68,.22);

  --transition:  0.18s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Typography ──────────────────────────────────────────────────────────── */
.font-display { font-family: 'Syne', sans-serif; }

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

/* ── Layout shell ────────────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--coral), #ff8c44);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,80,68,.4);
}

.sidebar-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,.9);
  line-height: 1.3;
}

.sidebar-logo-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,.4);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar-section {
  padding: 16px 12px 4px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.3);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}

.nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--coral);
  border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .7;
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: rgba(255,255,255,.07); }

.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10.5px;
  color: rgba(255,255,255,.35);
}

/* ── Main content ────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
}

.topbar-spacer { flex: 1; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  width: 220px;
  transition: border-color var(--transition), width var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--navy-soft);
  width: 280px;
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.topbar-search input::placeholder { color: var(--text-soft); }

.topbar-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover { background: var(--bg); color: var(--navy); }

.topbar-dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  border: 1.5px solid #fff;
  position: absolute;
  top: 4px;
  right: 4px;
}

.hamburger {
  display: none;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

.page-content {
  padding: 24px;
  flex: 1;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left h1 {
  font-size: 22px;
  font-weight: 800;
}

.page-header-left p {
  font-size: 13.5px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,80,68,.3);
}

.btn-primary:hover {
  background: var(--coral-soft);
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  padding: 7px 12px;
}

.btn-ghost:hover { background: var(--bg); color: var(--navy); }

.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.btn-danger:hover { background: #FEE2E2; }

.btn-teal {
  background: var(--teal);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(13,207,171,.25);
}

.btn-teal:hover { background: var(--teal-soft); transform: translateY(-1px); }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-icon { padding: 7px; gap: 0; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.card-body { padding: 20px; }
.card-body-tight { padding: 16px; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 var(--radius) 0 100%;
  opacity: .05;
}

.stat-card.coral::after { background: var(--coral); }
.stat-card.teal::after  { background: var(--teal);  }
.stat-card.amber::after { background: var(--amber); }
.stat-card.navy::after  { background: var(--navy);  }

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon.coral { background: var(--coral-bg); color: var(--coral); }
.stat-icon.teal  { background: var(--teal-bg);  color: var(--teal); }
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.navy  { background: rgba(12,24,41,.06); color: var(--navy-mid); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13.5px;
}

thead tr {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}

tbody tr:hover { background: var(--bg); }

.td-name {
  font-weight: 600;
  color: var(--navy);
}

.td-muted {
  color: var(--text-soft);
  font-size: 12.5px;
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-new       { background: #EFF6FF; color: #2563EB; }
.badge-contacted { background: #F5F3FF; color: #7C3AED; }
.badge-qualified { background: var(--teal-bg); color: #0A8F75; }
.badge-converted { background: #F0FDF4; color: #16A34A; }
.badge-archived  { background: var(--surface-2); color: var(--text-soft); }

.badge-pending    { background: var(--amber-bg); color: #92400E; }
.badge-accepted   { background: var(--teal-bg); color: #0A8F75; }
.badge-in_progress { background: #EFF6FF; color: #2563EB; }
.badge-completed  { background: #F0FDF4; color: #16A34A; }
.badge-declined   { background: var(--coral-bg); color: #BE3B30; }

.badge-active       { background: #F0FDF4; color: #16A34A; }
.badge-inactive     { background: var(--surface-2); color: var(--text-soft); }
.badge-matched      { background: var(--teal-bg); color: #0A8F75; }
.badge-seeking_match { background: var(--amber-bg); color: #92400E; }

.badge-urgent { background: var(--coral-bg); color: var(--coral); }
.badge-high   { background: #FFF7ED; color: #C2410C; }
.badge-medium { background: var(--amber-bg); color: #92400E; }
.badge-low    { background: var(--surface-2); color: var(--text-soft); }
.badge-done   { background: #F0FDF4; color: #16A34A; }

/* ── Role tags ───────────────────────────────────────────────────────────── */
.role-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.role-mentee    { background: #EFF6FF; color: #1D4ED8; }
.role-mentor    { background: #F5F3FF; color: #6D28D9; }
.role-volunteer { background: var(--teal-bg); color: #0A8F75; }
.role-participant { background: var(--amber-bg); color: #92400E; }
.role-staff     { background: var(--coral-bg); color: var(--coral); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
}

.form-label .required { color: var(--coral); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(46,64,102,.1);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A83A1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-hint { font-size: 11.5px; color: var(--text-soft); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12,24,41,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(.97);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 800;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--navy); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Detail Panel (slide-out) ────────────────────────────────────────────── */
.detail-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 520px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(12,24,41,.12);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.detail-panel.open { right: 0; }

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
}

.detail-panel-body { padding: 20px 24px; flex: 1; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar .form-input,
.filter-bar .form-select {
  padding: 7px 12px;
  font-size: 13px;
}

.filter-bar .form-input { min-width: 220px; }

/* ── Pipeline view ───────────────────────────────────────────────────────── */
.pipeline {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-col {
  flex-shrink: 0;
  width: 240px;
}

.pipeline-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pipeline-col-title {
  font-family: 'Syne', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
}

.pipeline-count {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
}

.pipeline-items { display: flex; flex-direction: column; gap: 8px; }

.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.pipeline-card:hover {
  border-color: var(--navy-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.pipeline-card-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy);
  margin-bottom: 3px;
}

.pipeline-card-sub {
  font-size: 12px;
  color: var(--text-soft);
}

/* ── Timeline / Activity ─────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-soft);
}

.timeline-dot.coral { border-color: var(--coral); background: var(--coral-bg); color: var(--coral); }
.timeline-dot.teal  { border-color: var(--teal);  background: var(--teal-bg);  color: var(--teal);  }

.timeline-content { flex: 1; padding-top: 4px; }

.timeline-action {
  font-size: 13px;
  color: var(--text);
}

.timeline-meta {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ── Task items ──────────────────────────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.task-item:last-child { border-bottom: none; }

.task-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-2);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-check:hover { border-color: var(--teal); }

.task-check.done {
  background: var(--teal);
  border-color: var(--teal);
}

.task-check.done::after {
  content: '✓';
  font-size: 11px;
  color: white;
  line-height: 1;
}

.task-body { flex: 1; min-width: 0; }

.task-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy);
}

.task-title.done { text-decoration: line-through; color: var(--text-soft); }

.task-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Event card ──────────────────────────────────────────────────────────── */
.event-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 10px;
}

.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.event-date-block {
  width: 52px;
  flex-shrink: 0;
  background: var(--navy);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
}

.event-date-day {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.event-date-month {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.event-info { flex: 1; min-width: 0; }

.event-title {
  font-family: 'Syne', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.event-meta {
  font-size: 12.5px;
  color: var(--text-soft);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.capacity-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.capacity-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transition: width 0.5s ease;
}

.capacity-fill.near-full { background: var(--amber); }
.capacity-fill.full      { background: var(--coral); }

/* ── Domino cascade animation ────────────────────────────────────────────── */
@keyframes domino-fall {
  0%   { opacity: 0; transform: translateY(-12px) scaleY(.9); }
  60%  { opacity: 1; transform: translateY(3px) scaleY(1.02); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes cascade-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .6; }
}

.animate-domino { animation: domino-fall .4s ease forwards; }
.animate-cascade { animation: cascade-in .3s ease forwards; }
.animate-fade-up { animation: fade-up .35s ease forwards; }

[data-delay="1"] { animation-delay: .05s; opacity: 0; }
[data-delay="2"] { animation-delay: .10s; opacity: 0; }
[data-delay="3"] { animation-delay: .15s; opacity: 0; }
[data-delay="4"] { animation-delay: .20s; opacity: 0; }
[data-delay="5"] { animation-delay: .25s; opacity: 0; }
[data-delay="6"] { animation-delay: .30s; opacity: 0; }

.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.new-badge-dot {
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,.7);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease infinite;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-soft);
}

.empty-icon {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.empty-state h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.empty-state p  { font-size: 13.5px; }

/* ── Toast notifications ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 500;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  font-weight: 500;
  animation: fade-up .3s ease forwards;
  max-width: 320px;
}

.toast.success { background: #064E3B; }
.toast.error   { background: #7F1D1D; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

.loading-spinner.dark {
  border-color: rgba(12,24,41,.15);
  border-top-color: var(--navy);
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--coral); font-weight: 600; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coral), var(--coral-soft));
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover  { background: var(--bg); }
.page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Mobile nav (bottom bar) ─────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 8px;
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  text-align: center;
  min-width: 52px;
}

.mobile-nav-item svg { width: 20px; height: 20px; }
.mobile-nav-item.active { color: var(--coral); }

/* ── Overlay for mobile sidebar ──────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shell { grid-template-columns: 1fr; }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .main { margin-left: 0; }

  .hamburger { display: flex; }

  .topbar-search { display: none; }

  .page-content { padding: 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .form-grid { grid-template-columns: 1fr; }

  .detail-panel { width: 100%; right: -100%; }

  .mobile-nav { display: flex; }

  .main { padding-bottom: 60px; }

  .modal-overlay { padding: 12px; }

  .modal { max-height: 85vh; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .filter-bar .form-input { min-width: 0; width: 100%; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.ml-auto { margin-left: auto; }
.text-soft { color: var(--text-soft); }
.text-sm { font-size: 12.5px; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}