:root {
  --zenith-red: #C00000;
  --zenith-red-dark: #970000;
  --zenith-black: #1a1a1a;
  --zenith-grey: #6b6b6b;
  --zenith-grey-light: #f4f4f6;
  --zenith-grey-border: #e2e2e6;
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.05), 0 1px 1px rgba(20, 20, 20, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 20, 20, 0.08), 0 2px 6px rgba(20, 20, 20, 0.05);
  --shadow-focus: 0 0 0 4px rgba(192, 0, 0, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f6f6f8 0%, #efeff2 100%);
  color: var(--zenith-black);
  margin: 0;
  padding: 32px 16px 70px;
}

.page {
  max-width: 760px;
  margin: 0 auto;
}

.masthead {
  background: linear-gradient(135deg, #161616 0%, #3a0c0c 55%, var(--zenith-red) 145%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 34px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

.masthead .brand {
  font-size: 12.5px;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 10px;
}

.masthead h1 {
  font-size: 28px;
  margin: 0 0 8px;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.masthead .subtitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  margin: 0;
}

.notice {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 3px solid #ffffff;
}

.card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--zenith-grey-border);
  padding: 24px 28px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: #f0d0d0;
}

.card-num {
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 48px;
  font-weight: bold;
  color: rgba(192, 0, 0, 0.06);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.card h2 {
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 4px;
  color: var(--zenith-black);
  position: relative;
}

.card .hint {
  font-size: 12.5px;
  color: var(--zenith-grey);
  margin: 0 0 18px;
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 7px;
  color: var(--zenith-black);
}

.field label .req { color: var(--zenith-red); }

.field input[type="text"],
.field input[type="password"],
.field input[type="date"],
.field input[type="file"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--zenith-grey-border);
  border-radius: var(--radius-sm);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--zenith-black);
  background: #fbfbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input[type="text"]:hover,
.field input[type="password"]:hover,
.field input[type="date"]:hover,
.field input[type="file"]:hover,
.field textarea:hover {
  border-color: #cfcfd4;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--zenith-red);
  box-shadow: var(--shadow-focus);
  background: #ffffff;
}

.field textarea { resize: vertical; min-height: 64px; }

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.activity-row.hidden-row { display: none; }

.activity-row .num {
  flex: 0 0 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: var(--zenith-black);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  margin-top: 8px;
}

.activity-row textarea {
  flex: 1;
  padding: 10px 13px;
  border: 1px solid var(--zenith-grey-border);
  border-radius: var(--radius-sm);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: #fbfbfc;
  resize: vertical;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.activity-row textarea:focus {
  outline: none;
  border-color: var(--zenith-red);
  box-shadow: var(--shadow-focus);
  background: #ffffff;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  background: transparent;
  border: 1.5px dashed var(--zenith-red);
  color: var(--zenith-red);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-style 0.15s ease;
}

.add-btn:hover {
  background: var(--zenith-red);
  border-style: solid;
  color: #fff;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 13.5px;
  color: var(--zenith-black);
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--zenith-grey-border);
  background: #fbfbfc;
  transition: all 0.15s ease;
}

.radio-group label:hover {
  border-color: #cfcfd4;
  background: #f4f4f6;
}

.radio-group input[type="radio"] {
  accent-color: var(--zenith-red);
  margin: 0;
}

.radio-group label:has(input:checked),
.radio-group label.selected {
  background: var(--zenith-red);
  border-color: var(--zenith-red);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.conditional {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
}

.conditional.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.conditional-inner { overflow: hidden; }

.conditional-content {
  padding-top: 14px;
  border-top: 1px dashed var(--zenith-grey-border);
}

.submit-bar {
  text-align: right;
  margin-top: 4px;
}

button.submit-btn {
  background: linear-gradient(180deg, var(--zenith-red), var(--zenith-red-dark));
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 14px 38px;
  font-size: 15px;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(151, 0, 0, 0.28);
}

button.submit-btn:active { transform: translateY(0); }

.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 14px;
  border-left: 4px solid;
  box-shadow: var(--shadow-sm);
}

.alert-error {
  background: #fbe9e9;
  border-color: var(--zenith-red);
  color: var(--zenith-red);
}

.footer-note {
  text-align: center;
  color: var(--zenith-grey);
  font-size: 12.5px;
  margin-top: 26px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 380px;
  width: 100%;
  padding: 32px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.modal-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--zenith-red), var(--zenith-red-dark));
}

.modal-icon {
  width: 52px;
  height: 52px;
  margin: 6px auto 16px;
  border-radius: 50%;
  border: 2px solid var(--zenith-red);
  color: var(--zenith-red);
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--zenith-black);
}

.modal-box p {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--zenith-grey);
  line-height: 1.5;
}

.modal-box .submit-btn {
  padding: 11px 30px;
  font-size: 13.5px;
}

.modal-box-form {
  max-width: 560px;
  text-align: left;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box-form h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--zenith-black);
}

.modal-box-form .hint {
  margin: 0 0 16px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--zenith-grey);
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover { color: var(--zenith-black); }

/* Admin */
.admin-topbar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.admin-topbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--zenith-red), var(--zenith-red-dark));
}

.admin-topbar h1 { font-size: 18px; margin: 0; }
.admin-topbar a {
  color: var(--zenith-red);
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.admin-topbar a:hover { background: var(--zenith-grey-light); }

.filters {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--zenith-grey-border);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.filters .field { margin-bottom: 0; min-width: 160px; }

.filters button, .filters a.btn {
  background: var(--zenith-black);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.filters button:hover, .filters a.btn:hover { opacity: 0.88; }

.filters a.btn-export { background: linear-gradient(180deg, var(--zenith-red), var(--zenith-red-dark)); }

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 13px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--zenith-grey-border);
}

table.data th, table.data td {
  border-bottom: 1px solid var(--zenith-grey-border);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: var(--zenith-grey-light);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--zenith-grey);
}

table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fafafa; }

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.tag-high { background: var(--zenith-red); }
.tag-medium { background: var(--zenith-grey); }
.tag-low { background: var(--zenith-black); }

.login-box {
  max-width: 380px;
  margin: 90px auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.login-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--zenith-red), var(--zenith-red-dark));
}

.login-box h1 { font-size: 18px; margin-top: 0; text-align: center; }

.login-logo {
  display: block;
  max-width: 160px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px 16px;
  font-size: 13.5px;
}

.detail-grid dt { font-weight: bold; color: var(--zenith-grey); }
.detail-grid dd { margin: 0; }
