* { box-sizing: border-box; }

:root {
  --navy: #17324d;
  --blue: #2f6f9f;
  --blue-dark: #245778;
  --light: #f4f7fa;
  --white: #ffffff;
  --text: #24313d;
  --muted: #6d7b87;
  --border: #dfe6eb;
  --green: #2e8b57;
  --orange: #d9822b;
  --red: #c94c4c;
  --shadow: 0 3px 14px rgba(23,50,77,.08);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--light);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.header-inner {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { font-size: 35px; }
.brand h1 { margin: 0; font-size: 23px; }
.brand p {
  margin: 3px 0 0;
  opacity: .8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}
.header-status {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
}

.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 34px 24px 60px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 25px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
}
h2 { margin: 0; font-size: 34px; color: var(--navy); }
.intro { max-width: 720px; margin: 9px 0 0; color: var(--muted); line-height: 1.5; }

.primary-button, .small-button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  padding: 11px 16px;
  font-weight: bold;
  cursor: pointer;
}
.primary-button:hover, .small-button:hover { background: var(--blue-dark); }

.danger-button {
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  padding: 9px 12px;
  font-weight: bold;
  cursor: pointer;
}
.danger-button:hover { background: #fbe8e8; }

.event-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
  margin-bottom: 18px;
}
.event-tab {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  border-radius: 9px;
  padding: 11px 15px;
  cursor: pointer;
  white-space: nowrap;
}
.event-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.event-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event-summary {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.event-summary-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.event-title h3 { margin: 0; font-size: 25px; color: var(--navy); }
.event-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.event-title p { margin: 6px 0 0; color: var(--muted); }

.progress-box { min-width: 260px; }
.progress-label { display:flex; justify-content:space-between; font-weight:bold; font-size:13px; margin-bottom:7px; }
.progress-track { height: 11px; background:#e8edf1; border-radius:20px; overflow:hidden; }
.progress-bar { height:100%; background:var(--green); border-radius:20px; transition:width .2s ease; }

.stats {
  display:grid;
  grid-template-columns: repeat(4, minmax(110px,1fr));
  gap:12px;
  margin-top:18px;
}
.stat {
  border:1px solid var(--border);
  border-radius:9px;
  padding:12px;
  background:#fafcfd;
}
.stat strong { display:block; font-size:21px; color:var(--navy); }
.stat span { color:var(--muted); font-size:12px; }

.categories { padding: 20px 24px 28px; }
.category {
  border:1px solid var(--border);
  border-radius:11px;
  margin-bottom:14px;
  overflow:hidden;
}
.category:last-child { margin-bottom:0; }
.category-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:13px 15px;
  background:#f8fafb;
}
.category-name { font-weight:bold; color:var(--navy); }
.category-count { color:var(--muted); font-size:12px; }

.task-table { width:100%; border-collapse:collapse; }
.task-table th, .task-table td {
  text-align:left;
  padding:11px 12px;
  border-top:1px solid var(--border);
  vertical-align:middle;
  font-size:13px;
}
.task-table th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.task-done { text-decoration:line-through; color:var(--muted); }
.empty-category { padding:15px; color:var(--muted); font-size:13px; }

.priority {
  display:inline-block;
  padding:4px 7px;
  border-radius:12px;
  font-size:11px;
  font-weight:bold;
}
.priority-high { background:#fbe8e8; color:var(--red); }
.priority-medium { background:#fff0dd; color:var(--orange); }
.priority-low { background:#e7f4ec; color:var(--green); }

.actions { white-space:nowrap; }
.icon-button {
  border:1px solid var(--border);
  background:white;
  border-radius:6px;
  padding:6px 8px;
  cursor:pointer;
  margin-right:4px;
}
.icon-button:hover { background:#f4f7fa; }

.modal-backdrop {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.42);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:1000;
}
.modal {
  width:min(520px,100%);
  background:white;
  border-radius:13px;
  box-shadow:0 15px 45px rgba(0,0,0,.25);
  padding:22px;
}
.modal h3 { margin:0 0 18px; color:var(--navy); }
.form-grid { display:grid; gap:13px; }
.form-field label { display:block; font-size:12px; font-weight:bold; color:var(--muted); margin-bottom:5px; }
.form-field input, .form-field select, .form-field textarea {
  width:100%;
  border:1px solid var(--border);
  border-radius:7px;
  padding:10px;
}
.form-field textarea { min-height:80px; resize:vertical; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.secondary-button {
  border:1px solid var(--border);
  background:white;
  color:var(--navy);
  border-radius:8px;
  padding:10px 14px;
  cursor:pointer;
}

@media (max-width: 800px) {
  .page-heading, .event-summary-top { flex-direction:column; align-items:flex-start; }
  .primary-button { width:100%; }
  .progress-box { width:100%; min-width:0; }
  .stats { grid-template-columns:repeat(2,1fr); }
  .task-table th:nth-child(3), .task-table td:nth-child(3),
  .task-table th:nth-child(5), .task-table td:nth-child(5) { display:none; }
}
