/* Banner Simulator: neutral admin styling, one accent colour, no external assets. */
:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1f2933; --muted: #616e7c; --border: #d9dee4; --head: #eef1f4;
  --accent: #0f6e8c; --accent-dark: #0b5468; --accent-soft: #e3f1f5;
  --ok: #1e7b4c; --ok-soft: #e4f4ea; --warn: #8a5a00; --warn-soft: #fdf3dc; --err: #b42318; --err-soft: #fdecea;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
.card h2, .panel h2 { margin-top: 0; }
code, .mono, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
code { background: var(--head); padding: .1em .35em; border-radius: 4px; }
.wrap, .mono { overflow-wrap: anywhere; word-break: break-word; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: .85rem; margin: .2rem 0 0; }

.top { background: #1f2933; color: #fff; }
.top-inner, .nav-inner, .main { max-width: 1280px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.brand:hover { color: #fff; }
.college { color: #cbd2d9; font-weight: 600; }
.disclaimer { color: #9aa5b1; font-size: .8rem; margin-left: auto; }
.nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; flex-wrap: wrap; gap: .1rem .2rem; align-items: center; padding-top: .35rem; padding-bottom: .35rem; }
.nav a { padding: .35rem .6rem; border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: .92rem; }
.nav a:hover { background: var(--head); }
.nav a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.nav .logout { margin-left: auto; }
.main { padding-top: 1.2rem; padding-bottom: 3rem; }
.crumbs { margin: 0; font-size: .9rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.panel { margin: 1rem 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.2rem; align-items: start; }
.cols > section { min-width: 0; }
.cols > .panel { margin: 0; }
.big { font-size: 1.2rem; font-weight: 600; margin: 0; }
.copyrow { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .8rem; text-decoration: none; color: var(--text); }
.stat:hover { border-color: var(--accent); }
.stat .num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent-dark); }
.stat .lbl { font-size: .85rem; color: var(--muted); }
.callout { background: var(--accent-soft); border: 1px solid #b8dce6; padding: .8rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--head); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
td.num, th.num { text-align: right; }
td.path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; min-width: 14rem; overflow-wrap: anywhere; }
td.body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; min-width: 16rem; max-width: 28rem; overflow-wrap: anywhere; color: var(--muted); }
details summary { cursor: pointer; color: var(--accent); font-size: .8rem; }
details pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--head); padding: .5rem; border-radius: 4px; max-width: 46rem; margin: .3rem 0 0; }

.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--head); color: var(--muted); white-space: nowrap; }
.badge-open, .badge-registered, .badge-created { background: var(--ok-soft); color: var(--ok); }
.badge-closed, .badge-replaced { background: var(--warn-soft); color: var(--warn); }
.badge-cancelled, .badge-dropped, .badge-withdrawn, .badge-deleted { background: var(--err-soft); color: var(--err); }
.code { font-weight: 600; }
.code-ok { color: var(--ok); } .code-warn { color: var(--warn); } .code-error { color: var(--err); }

.details { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

form { margin: 0; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
form.stack { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
form.stack:last-child { margin-bottom: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .88rem; font-weight: 600; min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
label.small { font-size: .8rem; }
input, select, button { font: inherit; }
input:not([type=checkbox]), select { padding: .4rem .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); width: 100%; min-width: 0; font-weight: 400; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { flex: 1 1 180px; max-width: 320px; }
.btn { display: inline-block; padding: .42rem .85rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; font-size: .9rem; line-height: 1.3; white-space: nowrap; }
.btn:hover { background: var(--head); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--err); border-color: #f1b8b2; }
.btn.danger:hover { background: var(--err-soft); }
.btn.small { padding: .2rem .55rem; font-size: .8rem; }
form.stack > .btn { align-self: flex-start; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: .35rem .6rem; font-size: .92rem; }
.btnrow, .toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.toolbar { margin-bottom: .6rem; justify-content: space-between; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.pager { display: flex; gap: .8rem; align-items: center; margin: .8rem 0; }

.flash { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.flash p { margin: 0; }
.flash-ok { background: var(--ok-soft); border-color: #a9dcbc; }
.flash-error { background: var(--err-soft); border-color: #f1b8b2; }
.flash-warn { background: var(--warn-soft); border-color: #f0d79a; }
.changes { margin: .5rem 0 0; padding-left: 1.2rem; max-height: 22rem; overflow-y: auto; font-size: .9rem; }

.login-card { max-width: 380px; margin: 3rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.login-card form { display: flex; flex-direction: column; gap: .8rem; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .disclaimer { margin-left: 0; width: 100%; }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: .4rem; }
  .nav .logout { margin-left: 0; }
}
