* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 "Segoe UI", Arial, sans-serif; color: #1f2933; background: #f4f5f7; }
a { color: #0b5cab; }
header.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #12344d; color: #fff; }
header.top a { color: #fff; text-decoration: none; }
header.top .brand { font-weight: 600; }
header.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
header.top nav a:hover { text-decoration: underline; }
header.top .who { font-size: 13px; opacity: .9; }
main { max-width: 1100px; margin: 24px auto; padding: 0 24px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.card { background: #fff; border: 1px solid #dde1e6; border-radius: 6px; padding: 16px 20px; margin-bottom: 16px; }
.flash { background: #e6f4ea; border: 1px solid #a8d5b5; padding: 8px 12px; border-radius: 4px; }
.error { background: #fdecea; border: 1px solid #f1b0a8; padding: 8px 12px; border-radius: 4px; }
.warn { background: #fff7e0; border: 1px solid #ecd48a; padding: 8px 12px; border-radius: 4px; }
.ok { background: #e6f4ea; border: 1px solid #a8d5b5; padding: 8px 12px; border-radius: 4px; }
ul.msgs { margin: 6px 0 0; padding-left: 20px; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { padding: 6px 10px; border-bottom: 1px solid #e3e6ea; text-align: left; vertical-align: top; }
th { background: #eef1f4; font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.sub td { color: #52606d; }
tr.total td { font-weight: 600; border-top: 2px solid #9aa5b1; }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 3px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
    width: 100%; max-width: 420px; padding: 7px 9px; border: 1px solid #b8c0c8; border-radius: 4px; font: inherit; }
textarea { min-height: 90px; }
button, .btn { display: inline-block; padding: 8px 16px; border: 0; border-radius: 4px; background: #0b5cab; color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
button.secondary, .btn.secondary { background: #6b7785; }
button.danger { background: #b3261e; }
button:disabled { background: #b8c0c8; cursor: not-allowed; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 24px; }
.grid div span { display: block; font-size: 12px; color: #52606d; }
.hint { font-size: 13px; color: #52606d; margin: 3px 0 0; }
.big { font-size: 26px; font-weight: 600; }
.muted { color: #52606d; }
.row { display: flex; gap: 24px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 260px; }
.inline { display: inline; }

.filters .frow { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: flex-end; }
.filters .frow > div { flex: 1 1 150px; }
.filters .frow > div:first-child { flex: 2 1 240px; }
.filters .frow label { margin-top: 0; }
.filters .fbtn { flex: 0 0 auto !important; white-space: nowrap; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 10px; background: #eef1f4; border: 1px solid #dde1e6; border-bottom: 0; }
.bulkbar #selcount { font-weight: 600; margin-right: 8px; }
.bulkbar button { padding: 6px 12px; }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: left; }
