:root { --blue:#104E8C; --blue2:#0c4074; --ink:#1c2833; --mut:#5c6b7a; --bd:#c5d0dc; --bg:#f4f7fb; --red:#9b2335; --red2:#fdecee; --green:#0e6b3c; --green2:#e5f6ec; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: #fff; }
img.logo { height: 46px; width: auto; background: #fff; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--blue); font-weight: 650; }
h2 { font-size: 18px; margin: 0 0 4px; color: var(--blue); }
.sub { color: var(--mut); margin: 0 0 12px; }
.fine { color: var(--mut); font-size: 12px; margin: 16px 0 0; }

#gate { min-height: 100vh; display: grid; place-items: center; background: #f7f9fb; padding: 24px; }
.login { width: min(560px, 100%); }
.login h1 { font-size: 26px; margin-top: 12px; }
.login-lead { margin: 0 0 16px; color: var(--ink); }
.login .panel-b { display: grid; gap: 12px; }
.login label { display: grid; gap: 6px; font-weight: 650; }
.login select { font: inherit; padding: 8px; border: 1px solid var(--bd); width: 100%; }
.login button { justify-self: start; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--blue); color: #fff; padding: 8px 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.org { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.app { font-size: 18px; font-weight: 650; }
.session { display: flex; align-items: center; gap: 10px; }
.session label { font-size: 12px; }
.session select { margin-left: 6px; min-width: 260px; padding: 4px; font: inherit; color: var(--ink); }

.menubar { display: flex; flex-wrap: wrap; gap: 0; background: #fff; border-bottom: 1px solid var(--bd); padding: 0 8px; }
.menubar a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--blue); text-decoration: none; border-bottom: 3px solid transparent; }
.menubar a.active { border-bottom-color: var(--blue); font-weight: 650; background: var(--bg); }
.cnt { background: var(--blue); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; font-weight: 650; }
.cnt:empty { display: none; }

main { padding: 16px 20px 28px; background: var(--bg); min-height: calc(100vh - 108px); }
.panel { background: #fff; border: 1px solid var(--bd); }
.panel-h { background: var(--blue); color: #fff; padding: 8px 12px; font-weight: 650; }
.panel-b { padding: 12px; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; align-items: start; }
[hidden] { display: none !important; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e6ebf1; padding: 7px 6px; text-align: left; vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; color: #3d4c5c; background: #f4f7fb; }
th.num, td.num { text-align: right; white-space: nowrap; }
tr.sel td { background: #e7f0fa; }
tbody tr { cursor: pointer; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 2px; background: #e7f0fa; color: var(--blue); margin: 0 6px 6px 0; }
.badge.fast { background: var(--green2); color: var(--green); }
.badge.hold { background: #fff4e5; color: #8a5a00; }
.line { border-top: 1px solid #e6ebf1; padding: 8px 0; }
.line strong { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input, .credit-form input, .credit-form select, .login select { font: inherit; padding: 6px; border: 1px solid var(--bd); background: #fff; }
.filters input { min-width: 160px; }
.credit-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.record-row { display: grid; grid-template-columns: 180px 1fr; gap: 8px; border-top: 1px solid #e6ebf1; padding: 6px 0; }
.record-row span { color: var(--mut); }
button { font: inherit; margin: 8px 8px 0 0; padding: 7px 12px; border-radius: 2px; border: 1px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; }
button.secondary, button.ghost { background: #fff; color: var(--blue); }
.session button.ghost { margin: 0; border-color: #fff; color: #fff; background: transparent; }
.session button.ghost:hover { background: var(--blue2); }
button.link { background: transparent; color: var(--blue); border: 0; padding: 0; margin: 0; text-decoration: underline; }
.banner { display: none; }
.banner.err:not(:empty) { display: block; background: var(--red2); color: var(--red); border: 1px solid #f3b7b2; padding: 8px 10px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .session select { min-width: 0; width: 100%; }
}
