:root {
    --teal: #177f9f;
    --teal-dark: #126b87;
    --navy: #092d6b;
    --red: #b11f2e;
    --ink: #20252a;
    --muted: #6b747b;
    --line: #d9e0e4;
    --soft: #f3f5f6;
    --white: #fff;
}
* { box-sizing: border-box; }
html { background: #fff; }
body { margin: 0; color: var(--ink); background: #fff; font: 15px/1.45 Arial, Helvetica, sans-serif; }
a { color: #0077aa; }
.site-shell { width: min(1400px, 100%); margin: 0 auto; background: #fff; }
.brand-header img { display: block; width: 100%; max-height: 200px; object-fit: contain; object-position: center; }
.main-nav { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--teal); }
.main-nav a { color: #fff; text-decoration: none; text-transform: uppercase; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; letter-spacing: .15px; padding: 20px 18px; }
.main-nav a:hover, .main-nav a.active { background: var(--teal-dark); }
.user-bar { display: flex; justify-content: flex-end; gap: 18px; align-items: center; padding: 9px 18px; background: var(--soft); border-bottom: 1px solid var(--line); color: #505b62; font-size: 13px; }
.page-content { padding: 38px 20px 56px; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: #30363a; }
h1 { margin: 0 0 22px; font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { margin-top: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; border: 0; border-radius: 3px; background: var(--teal); color: #fff; text-decoration: none; text-transform: uppercase; padding: 11px 22px; cursor: pointer; font: 600 14px Arial, sans-serif; }
.btn:hover { background: var(--teal-dark); }
.btn-secondary { background: #69747b; }
.btn-danger { background: #a42c34; }
.btn-small { padding: 7px 11px; font-size: 12px; }
.card { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 22px; margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.filter-panel { border: 0; box-shadow: none; padding-left: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 24px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
label, .label { font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
    width: 100%; border: 1px solid #b9c4ca; border-radius: 3px; padding: 10px 11px; font: inherit; background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(23,127,159,.22); border-color: var(--teal); }
.inline-options { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-options label { font-weight: 400; }
.help { color: var(--muted); font-size: 13px; }
.required { color: var(--red); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--teal); color: #fff; text-align: left; padding: 12px 14px; white-space: nowrap; font-size: 14px; }
td { padding: 10px 14px; border-bottom: 1px solid #e6ebee; vertical-align: top; }
tbody tr:hover { background: #f8fbfc; }
td.number, th.number { text-align: right; }
.table-actions { white-space: nowrap; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #e8eef1; font-size: 12px; }
.badge-active { background: #dff3e5; color: #1e6d36; }
.badge-inactive { background: #f1e4e4; color: #8a3030; }
.negative { color: #a0262e; font-weight: 700; }
.flash { padding: 12px 15px; border-radius: 3px; margin: 0 0 20px; }
.flash-success { background: #e3f4e8; color: #175f2d; border: 1px solid #b8dfc2; }
.flash-error { background: #f8e5e6; color: #84252d; border: 1px solid #e4b8bc; }
.flash-info { background: #e5f1f6; color: #245d72; border: 1px solid #bad5df; }
.login-wrap { max-width: 520px; margin: 10px auto 40px; }
.login-wrap .card { padding: 28px; }
.login-wrap .btn { width: 100%; }
.download-link { display: inline-block; margin: 12px 0 16px; }
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 10px; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--teal); color: #fff; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.summary-box { padding: 14px; background: var(--soft); border-left: 4px solid var(--teal); }
.summary-box strong { display: block; font-size: 22px; }
.site-footer { color: #6d777d; border-top: 1px solid var(--line); padding: 18px 20px 30px; font-size: 12px; }
.installer { max-width: 760px; margin: 0 auto; }
code { background: #f1f3f4; padding: 2px 5px; border-radius: 3px; }
@media (max-width: 900px) {
    .main-nav { display: block; }
    .main-nav a { display: block; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.18); }
    .form-grid, .summary-grid { grid-template-columns: 1fr; }
    .page-content { padding-top: 24px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .user-bar { justify-content: space-between; }
}
@media print {
    .main-nav, .user-bar, .filter-panel, .actions, .download-link, .site-footer { display: none !important; }
    .page-content { padding: 0; }
    .brand-header img { max-height: 130px; }
    th { color: #000; background: #ddd !important; }
}

/* Password reset pages */
.login-links { margin-top: 18px; text-align: center; }
.login-links a { font-weight: 700; }
