* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f6f8;
  margin: 0;
  color: #1c1f24;
}
.topbar {
  background: #14213d;
  color: #fff;
  padding: 0 28px;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar .brand { font-size: 15px; font-weight: 600; letter-spacing: 0.5px; display:flex; align-items:center; gap:8px; }
.topbar .brand .dot { width:8px; height:8px; border-radius:50%; background:#4c8dff; }
.topbar nav a {
  color: #c9d3e6; text-decoration: none; margin-left: 22px; font-size: 13.5px;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.topbar nav a:hover, .topbar nav a.active { color: #fff; border-bottom-color: #4c8dff; }

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

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: 10px; padding: 16px 18px;
  border: 1px solid #e6e8ec;
}
.stat-card .label { font-size: 12px; color: #7a7f89; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.stat-card .value { font-size: 24px; font-weight: 600; color: #14213d; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  margin-bottom: 20px;
}
.card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 14px; }
h2 { margin: 0; font-size: 17px; font-weight: 600; color: #14213d; }
.subtle { font-size: 13px; color: #7a7f89; margin: 2px 0 0; }

label { font-size: 12.5px; color: #5a5f68; display: block; margin-bottom: 5px; font-weight: 500; }
input[type=text], input[type=password], input[type=date], input[type=number], select {
  width: 100%; padding: 9px 11px; border: 1px solid #d7dae0; border-radius: 7px; font-size: 14px;
  background: #fbfbfc;
}
input:focus, select:focus { outline: none; border-color: #4c8dff; background: #fff; }

button, .btn {
  background: #2952e3; color: #fff; border: none; padding: 10px 18px;
  border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #1e3fc4; }
.btn-ghost { background: transparent; color: #2952e3; border: 1px solid #d7dae0; }
.btn-ghost:hover { background: #f0f3ff; }

table { width: 100%; border-collapse: collapse; margin-top: 6px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid #eef0f3; font-size: 14px; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; color: #8a8f99; font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfd; }

.total-box {
  font-size: 16px; font-weight: 600; color: #14213d;
  background: #eef3ff; padding: 12px 18px; border-radius: 8px; display: inline-block; margin-top: 14px;
}
.error { background: #fdeeee; color: #b3261e; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; border: 1px solid #f6cccc; }
.success { background: #eaf7ef; color: #146c3a; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; border: 1px solid #c7ecd5; }

.tag { font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 500; }
.tag.super { background: #fdf1de; color: #915a00; }
.tag.admin { background: #e3ecff; color: #1e40c4; }
.tag.inactive { background: #f0f0f0; color: #888; }

form.inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
form.inline > div { flex: 1; min-width: 150px; }

.link-danger { color: #b3261e; font-size: 13px; text-decoration: none; }
.link-danger:hover { text-decoration: underline; }
.link-plain { color: #2952e3; font-size: 13px; text-decoration: none; }
.link-plain:hover { text-decoration: underline; }
