:root {
    --primary: #1479BD;
    --primary-dark: #0E5A8E;
    --primary-deep: #0B3F66;
    --primary-light: #E6F1FA;
    --accent: #E1A54F;
    --text: #1F2933;
    --muted: #66788A;
    --line: #D9E2EC;
    --ok: #1E8E3E;
    --warn: #B97F2C;
    --bad: #C62828;
}

* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--text); background: #F5F8FB; }
a { color: var(--primary-dark); }
h1 { font-size: 22px; margin: 0 0 16px; color: var(--primary-deep); }
h2 { font-size: 16px; margin: 24px 0 10px; color: var(--primary-deep); }

.top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 10px 24px; background: var(--primary-deep); color: #fff; }
.top a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand img { height: 30px; background: #fff; border-radius: 4px; padding: 2px 6px; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a:hover { color: var(--accent); }
.who { margin-left: auto; opacity: .9; }
.who a { text-decoration: underline; }

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 6px; padding: 12px 16px; text-decoration: none; color: var(--text); }
.tile b { display: block; font-size: 26px; color: var(--primary-deep); }
.tile.warn { border-left-color: var(--warn); }
.tile.bad { border-left-color: var(--bad); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--primary-light); color: var(--primary-deep); font-weight: 600; white-space: nowrap; }
tr:hover td { background: #FAFCFE; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, monospace; word-break: break-all; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; margin-right: 4px; background: var(--primary-light); color: var(--primary-deep); }
.badge.ok { background: #E3F4E8; color: var(--ok); }
.badge.warn { background: #FBF0DE; color: var(--warn); }
.badge.bad { background: #FBE3E3; color: var(--bad); }
.badge.pending { background: #E8EAF6; color: #3949AB; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.flash.ok { background: #E3F4E8; color: var(--ok); }
.flash.err { background: #FBE3E3; color: var(--bad); }

form.inline { display: inline; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
    font: inherit; padding: 6px 8px; border: 1px solid #B8C6D4; border-radius: 4px; min-width: 0; max-width: 100%;
}
textarea { width: 100%; }
button, .button { font: inherit; padding: 6px 14px; border-radius: 4px; border: 1px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--primary-dark); }
button.secondary { background: #fff; color: var(--primary-dark); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.actions form { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.actions form:last-child { border-bottom: 0; }
.code { background: #F0F4F8; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }

.login { max-width: 360px; margin: 60px auto; }
.login input { width: 100%; margin-bottom: 12px; }
