:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #1d4ed8;
  --border: #e5e7eb;

  --good: #047857;
  --warn: #b45309;
  --bad: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   HEADER / NAVIGATION
   ========================= */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #111827;
  color: white;
}

.brand {
  font-weight: 700;
  font-size: 18px;
}

.topbar nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.topbar a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.topbar a:hover {
  text-decoration: underline;
}

.inline {
  display: inline;
}

.inline button {
  background: #374151;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   LAYOUT
   ========================= */

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

/* =========================
   CARDS (KEY FIX)
   ========================= */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* =========================
   FORMS
   ========================= */

label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}

textarea {
  min-height: 90px;
}

/* =========================
   BUTTONS
   ========================= */

button,
.button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.button.secondary {
  background: #4b5563;
}

/* =========================
   ALERTS
   ========================= */

.alert {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.alert.success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

/* =========================
   TABLES
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 10px;
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

/* =========================
   BADGES / STATUS
   ========================= */

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #e5e7eb;
}

.badge.high {
  background: #fee2e2;
  color: var(--bad);
}

.badge.medium {
  background: #fef3c7;
  color: var(--warn);
}

.badge.low {
  background: #dcfce7;
  color: var(--good);
}

/* =========================
   UTILITIES
   ========================= */

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

/* =========================
   ACTION ITEM ENHANCEMENTS
   ========================= */

/* overdue items */
.item-overdue {
  border-left: 4px solid var(--bad);
}

/* high priority items */
.item-high {
  border-left: 4px solid var(--warn);
}

/* =========================
   FOOTER
   ========================= */

.footer {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}