:root {
  --navy: #00146D;
  --orange: #FF8E01;
  --gray: #5A5F6E;
  --light: #F2F4F9;
  --border: #D8DBE4;
  --danger: #C0392B;
  --success: #1E7D3C;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--light);
  color: #1A1A1A;
}

a { color: var(--navy); }

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { height: 28px; width: 28px; }
.topbar .brand span { font-weight: 700; letter-spacing: 1px; }
.topbar nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
  opacity: 0.9;
}
.topbar nav a:hover { opacity: 1; text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

h1, h2, h3 { color: var(--navy); margin-top: 0; }
h1 { font-size: 24px; }
h2 { font-size: 19px; border-bottom: 3px solid var(--orange); padding-bottom: 8px; }
h3 { font-size: 16px; }

.muted { color: var(--gray); font-size: 14px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--navy);
}
.btn:hover { opacity: 0.92; }
.btn-orange { background: var(--orange); }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); }

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.status-in { background: #E6F4EA; color: var(--success); }
.status-out { background: #F2F4F9; color: var(--gray); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--navy); background: var(--light); font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
tr:last-child td { border-bottom: none; }

input[type=text], input[type=password], input[type=email], input[type=date],
input[type=datetime-local], select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
}
label { font-size: 13px; font-weight: 600; color: var(--gray); display: block; margin-top: 12px; }

.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.form-row > div { flex: 1; min-width: 160px; }

.error-box {
  background: #FDECEA;
  color: var(--danger);
  border: 1px solid #F5C6C0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}
.success-box {
  background: #E6F4EA;
  color: var(--success);
  border: 1px solid #BFE3C9;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 10px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-card img { height: 60px; margin-bottom: 6px; }
.login-card .tagline { color: var(--gray); font-size: 13px; letter-spacing: 1px; margin-bottom: 22px; }
.login-card form { text-align: left; }

footer.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  padding: 24px;
}

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-sup { background: #EFE3FF; color: #5B21B6; }
.badge-emp { background: #E1EEFF; color: var(--navy); }
.badge-inactive { background: #FDECEA; color: var(--danger); }

@media (max-width: 640px) {
  .topbar nav a { margin-left: 10px; }
}

/* ---- project-tool additions ---- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters > div { min-width: 160px; }

.project-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 12px; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; text-decoration: none; color: inherit;
}
.project-card:hover { border-color: var(--navy); }
.project-card .pc-main { flex: 1; min-width: 0; }
.project-card h3 { margin: 0 0 4px 0; font-size: 16px; color: var(--navy); }
.project-card .pc-meta { font-size: 13px; color: var(--gray); }
.project-card .pc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--light); color: var(--navy); border: 1px solid var(--border);
}
.tag-category { background: #E1EEFF; color: var(--navy); border-color: #C7DEFF; }

.status-pill-project { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-Intake { background: #EEF0F5; color: var(--gray); }
.st-Scoping { background: #FFF3E0; color: #B15E00; }
.st-InProgress { background: #E1EEFF; color: var(--navy); }
.st-Blocked { background: #FDECEA; color: var(--danger); }
.st-InReview { background: #F3E8FF; color: #6B21A8; }
.st-Completed { background: #E6F4EA; color: var(--success); }
.st-OnHold { background: #F2F4F9; color: var(--gray); }
.st-Cancelled { background: #F2F4F9; color: #8A8F9C; text-decoration: line-through; }

.priority-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.pr-Low { background: #9AA0AE; }
.pr-Medium { background: var(--orange); }
.pr-High { background: #E0752A; }
.pr-Urgent { background: var(--danger); }

.stat-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; text-align: center; min-width: 90px; }
.stat-box .n { font-size: 20px; font-weight: 700; color: var(--navy); }
.stat-box .l { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.4px; }

textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; margin-top: 4px; resize: vertical;
}

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.hint-box { background: var(--light); border: 1px dashed var(--border); border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--gray); margin-top: 6px; }

.checklist-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done span.title { text-decoration: line-through; color: var(--gray); }
.checklist-item form { margin: 0; }

.note-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.note-item:last-child { border-bottom: none; }
.note-item .meta { font-size: 12px; color: var(--gray); margin-bottom: 3px; }

.link-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
.link-item:last-child { border-bottom: none; }

.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; margin-top: 0; }

.status-select-inline { display: inline-block; }
.status-select-inline select { width: auto; display: inline-block; margin-top: 0; padding: 6px 8px; font-size: 13px; }
