:root {
  --navy: #1f3864;
  --navy-dark: #16294a;
  --bg: #f5f6f8;
  --border: #dfe3e8;
  --danger: #b3261e;
  --ok: #1e7e34;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: #222;
  margin: 0;
}
.topbar {
  background: var(--navy);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
}
.topbar .brand { color: white; font-weight: bold; text-decoration: none; font-size: 18px; }
.nav-links a { color: #cdd6e3; text-decoration: none; margin-left: 20px; font-size: 14px; }
.nav-links a:hover { color: white; }

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

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

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
input[type=text], input[type=password], input[type=date], select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
.row { display: flex; gap: 16px; }
.row > div { flex: 1; }

button, .btn {
  display: inline-block;
  background: white;
  border: 1px solid var(--border);
  color: #222;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  margin-top: 16px;
}
.btn-primary, button[type=submit] {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
button[type=submit]:hover, .btn-primary:hover { background: var(--navy-dark); }
.btn-danger { color: var(--danger); border-color: var(--danger); }

table.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.table th, table.table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.table th { color: #555; font-weight: 600; }

.plain-list { padding-left: 18px; }
.file-list { list-style: none; padding: 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }

.muted { color: #666; }
.muted.small { font-size: 12px; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; white-space: pre-line; }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c3; }
.flash-ok { background: #eaf6ec; color: var(--ok); border: 1px solid #c3e6cb; }

.login-box {
  max-width: 340px;
  margin: 80px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
}
.login-box form { text-align: left; }

code { background: #f0f1f3; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
