*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0f2544;
  --navy-light:  #1a3a6b;
  --accent:      #2563eb;
  --accent-bg:   #eff6ff;
  --green:       #16a34a;
  --green-bg:    #f0fdf4;
  --amber:       #d97706;
  --amber-bg:    #fffbeb;
  --red:         #dc2626;
  --red-bg:      #fef2f2;
  --gray:        #6b7280;
  --gray-bg:     #f3f4f6;
  --border:      #e5e7eb;
  --white:       #ffffff;
  --text:        #111827;
  --muted:       #6b7280;
  --bg:          #f1f5f9;
  --radius:      10px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  padding: 22px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-logo { display: flex; align-items: center; gap: 16px; }
.atom-icon   { font-size: 42px; line-height: 1; }
.header-text h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.header-text p  { font-size: 13px; opacity: 0.72; margin-top: 3px; }
.header-date    { font-size: 13px; opacity: 0.65; text-align: right; flex-shrink: 0; }

/* ── Layout ── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ── Section ── */
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  display: inline-block;
}
.section-title.no-border { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
}

/* ── Dashboard ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  border-top: 4px solid var(--accent);
}
.dash-card.dash-meeting     { border-top-color: var(--navy); }
.dash-card.dash-recruitment { border-top-color: var(--accent); }
.dash-card.dash-todos       { border-top-color: var(--amber); }

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.dash-icon  { font-size: 17px; }
.dash-label { font-size: 12px; font-weight: 600; color: var(--muted); flex: 1; text-transform: uppercase; letter-spacing: .4px; }
.dash-edit-btn {
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 9px;
  cursor: pointer;
  transition: background 0.12s;
}
.dash-edit-btn:hover { background: var(--accent-bg); }

.dash-big {
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}
.dash-big.overdue { color: var(--red); }
.dash-sub    { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.dash-detail { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.dash-detail.warn { color: var(--red); font-weight: 600; }
.dash-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.dash-link:hover { text-decoration: underline; }

.progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin: 8px 0 10px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ── Tools ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, transform 0.15s;
  display: block;
}
.tool-card:not(.tool-soon):hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card.tool-soon { opacity: 0.55; cursor: default; }
.tool-icon   { font-size: 28px; margin-bottom: 12px; }
.tool-name   { font-size: 15px; font-weight: 700; margin-bottom: 7px; }
.tool-desc   { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.tool-status { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tool-active { background: var(--green-bg); color: var(--green); }
.tool-coming { background: var(--gray-bg); color: var(--gray); }

/* ── Todo Filters ── */
.todo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.filter-btn {
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ── Todo List ── */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 48px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.todo-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
}
.todo-item.priority-high   { border-left-color: var(--red); }
.todo-item.priority-medium { border-left-color: var(--amber); }
.todo-item.priority-low    { border-left-color: var(--green); }
.todo-item.done            { opacity: 0.45; border-left-color: var(--border); }

.todo-check {
  width: 17px; height: 17px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.todo-body  { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 500; margin-bottom: 5px; word-break: break-word; }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-meta  { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.todo-badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; }
.badge-high   { background: var(--red-bg);   color: var(--red); }
.badge-medium { background: var(--amber-bg); color: var(--amber); }
.badge-low    { background: var(--green-bg); color: var(--green); }

.todo-status-badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; }
.status-pending    { background: #f3f4f6; color: #6b7280; }
.status-inprogress { background: #dbeafe; color: #1d4ed8; }
.status-waiting    { background: #fef3c7; color: #b45309; }
.status-done       { background: var(--green-bg); color: var(--green); }

.todo-due      { font-size: 12px; color: var(--muted); }
.todo-due.warn { color: var(--red);   font-weight: 600; }
.todo-due.soon { color: var(--amber); font-weight: 600; }
.todo-assignee { font-size: 12px; color: var(--muted); }
.todo-note     { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 4px; }

.todo-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.12s; }
.todo-item:hover .todo-actions { opacity: 1; }
.todo-action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.12s;
}
.todo-action-btn:hover        { background: var(--gray-bg); }
.todo-action-btn.del:hover    { background: var(--red-bg); color: var(--red); border-color: var(--red); }

/* ── Buttons ── */
.btn-primary {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-primary:hover { background: var(--navy-light); }
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-secondary:hover { background: var(--gray-bg); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-body label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
}

/* ── Sync indicator ── */
.sync-indicator {
  position: fixed;
  bottom: 16px;
  right: 20px;
  font-size: 12px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sync-indicator.show { opacity: 1; }

/* ── Calendar ── */
.cal-filters { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

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

.cal-month-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}
.cal-month-header:first-child { margin-top: 0; }

.cal-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cal-card-past { opacity: 0.5; }

.cal-card-left {
  padding: 13px 16px;
  border-left: 4px solid var(--accent);
}

.cal-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-short {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.cal-committee {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.cal-card .todo-actions { opacity: 0; transition: opacity 0.12s; }
.cal-card:hover .todo-actions { opacity: 1; }

.cal-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}
.cal-sep   { color: var(--border); }
.cal-time  { font-weight: 500; color: var(--text); }
.cal-date-text { color: var(--muted); }
.cal-past   { color: var(--muted); font-style: italic; }
.cal-today  { color: var(--amber); font-weight: 700; }
.cal-future { color: var(--accent); font-weight: 600; }

.cal-format-row { font-size: 13px; color: var(--muted); }
.cal-format     { }
.cal-note       { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 4px; }

.cal-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.cal-attendees {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.cal-attendee-chip {
  background: var(--gray-bg);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.attendee-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.attendee-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  transition: all 0.12s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.attendee-check-item:hover { background: var(--gray-bg); }
.attendee-check-item input[type="checkbox"] { cursor: pointer; accent-color: var(--navy); width: auto; flex-shrink: 0; }

.time-row {
  display: flex;
  gap: 12px;
}
.time-row > div { flex: 1; display: flex; flex-direction: column; gap: 10px; }

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 8px;
}
.back-link:hover { text-decoration: underline; }

/* ── Subcommittee Directory ── */
.sub-controls    { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.sub-search      { padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; width: 230px; color: var(--text); }
.sub-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sub-filter-row  { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-total       { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }

#sub-list { display: flex; flex-direction: column; gap: 4px; }

.sub-row {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sub-row.expired { opacity: 0.5; }
.sub-row-header  { display: flex; align-items: center; gap: 8px; padding: 11px 16px; cursor: pointer; transition: background 0.12s; user-select: none; }
.sub-row-header:hover { background: var(--gray-bg); }

.sub-num          { font-size: 12px; color: var(--muted); flex-shrink: 0; min-width: 22px; }
.sub-short-badge  { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--accent-bg); color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.sub-type-badge   { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.sub-type-regular { background: #eff6ff; color: #2563eb; }
.sub-type-adhoc   { background: #f5f3ff; color: #7c3aed; }
.sub-name         { font-size: 13px; flex: 1; min-width: 0; line-height: 1.45; }
.sub-status-badge   { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.sub-status-active  { background: var(--green-bg); color: var(--green); }
.sub-status-expired { background: var(--gray-bg);  color: var(--gray); }
.sub-chevron      { font-size: 12px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.sub-row.expanded .sub-chevron { transform: rotate(180deg); }

.sub-row-body {
  padding: 14px 16px 12px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.sub-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.sub-detail-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.sub-detail-value       { font-size: 13px; color: var(--text); }
.sub-detail-value.empty { color: var(--muted); font-style: italic; }
.sub-details-order { padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 12px !important; }
.sub-note         { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 10px; }
.sub-members-section { margin-bottom: 10px; }
.sub-members-list { margin: 6px 0 0 18px; padding: 0; font-size: 13px; color: var(--text); line-height: 1.8; }
.sub-members-list li { padding: 0; }
.sub-row-actions  { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .header-inner    { flex-direction: column; align-items: flex-start; }
  .atom-icon       { font-size: 30px; }
  .header-text h1  { font-size: 18px; }
  .header-text p   { font-size: 12px; }
  .header-date     { font-size: 12px; }
  .main-content    { padding: 18px 14px; gap: 28px; }
  .dashboard-grid  { grid-template-columns: 1fr; }
  .tools-grid      { grid-template-columns: 1fr; }
  .dash-big        { font-size: 30px; }
}
