* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Arial, sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #222;
}
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1f2d3d;
  color: #fff;
  padding: 10px 20px;
  flex-wrap: wrap;
}
.topnav .brand { font-weight: 600; }
.topnav .nav-links a {
  color: #cfe0f5;
  margin-right: 16px;
  text-decoration: none;
}
.topnav .nav-links a:hover { text-decoration: underline; }
.topnav .nav-user { font-size: 0.9em; color: #cfd8e3; }
.topnav .nav-user a { color: #ffb; margin-left: 10px; }

.container { max-width: 1100px; margin: 20px auto; padding: 0 16px; }

.flash-messages { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; }
.flash-danger { background: #f8d0d0; color: #7a1f1f; }
.flash-info { background: #d8e8fb; color: #1c4a75; }
.flash-success { background: #d7f0d7; color: #1f6b1f; }

table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e2e5e9; text-align: left; font-size: 0.95em; }
th { background: #eef1f5; }
tr.urgency-due-soon { background: #fdf0b0; }
tr.urgency-overdue { background: #f8d0d0; }

.card {
  background: #fff;
  border: 2px solid #c7ccd4;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card > h3:first-child,
.card > h4:first-child {
  margin-top: 0;
}
.card > h3 {
  margin-top: 0;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid #1f6feb;
  color: #1f2d3d;
}
.card > h4 {
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid #dde1e7;
  color: #3a4553;
}

form.stacked label { display: block; margin-top: 10px; font-weight: 600; font-size: 0.9em; }
form.stacked input[type=text],
form.stacked input[type=password],
form.stacked input[type=number],
form.stacked textarea,
form.stacked select {
  width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #ccc; border-radius: 4px;
}
form.stacked .errors { color: #a12; font-size: 0.85em; }
button, input[type=submit], .btn {
  background: #1f6feb; color: #fff; border: none; padding: 8px 14px;
  border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block;
  font-size: 0.95em;
}
button:hover, input[type=submit]:hover, .btn:hover { background: #185cc4; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #565e64; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #96281c; }

.muted { color: #6a7381; font-size: 0.9em; }
.drag-handle {
  width: 28px;
  cursor: grab;
  color: #9aa3af;
  text-align: center;
  touch-action: none;
  user-select: none;
  font-size: 1.1em;
}
.drag-handle:active { cursor: grabbing; }
tr.dragging { background: #eaf1fb; opacity: 0.7; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.8em; }
.badge-pending { background: #fdf0b0; color: #6b5900; }
.badge-approved { background: #d7f0d7; color: #1f6b1f; }
.badge-rejected { background: #e2e5e9; color: #555; }
