:root {
  color-scheme: light;
  --ink: #152538;
  --muted: #4a6075;
  --paper: #fff;
  --background: #eff4f8;
  --line: #d4dfe9;
  --blue: #1355a0;
  --navy: #102843;
  --accent: #eaf3ff;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #edf5ff;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 10% 5%, #c4deff 0, transparent 46%),
    radial-gradient(ellipse at 92% 22%, #cbecff 0, transparent 40%),
    linear-gradient(150deg, #f7fbff, #e9f2ff 65%, #f9fcff);
  background-attachment: fixed;
}
a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }
header {
  background: #ffffffb8;
  color: var(--navy);
  border-bottom: 1px solid #fff;
  box-shadow: 0 6px 28px #173b7210;
  backdrop-filter: blur(22px) saturate(155%);
}
.top, main { max-width: 1180px; margin: auto; padding-inline: clamp(16px, 4vw, 42px); }
.top { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; text-decoration: none; color: var(--navy); }
.mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: linear-gradient(150deg,#2c79da,#10478a); color: white; box-shadow: inset 0 1px #ffffff80, 0 4px 12px #174d8e35; }
.brand small { color: var(--muted); }
nav, .account { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav a { color: var(--navy); padding: 11px 12px; border-radius: 999px; text-decoration: none; }
nav a:hover, nav [aria-current] { background: #dcecff; color: #104582; }
.account { margin-left: 10px; color: var(--navy); font-size: .9rem; }
main { padding-block: 36px 52px; }
.guest { display: grid; justify-items: center; padding-top: clamp(42px, 12vh, 120px); }
.login { width: min(100%, 440px); }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); margin-bottom: 6px; line-height: 1.16; letter-spacing: -.035em; }
h2 { font-size: 1.22rem; margin-bottom: 16px; }
h3 { font-size: 1rem; }
.heading p:last-child, .muted, small { color: var(--muted); }
.heading p:last-child { margin-bottom: 0; }
small { display: block; }
.eyebrow { color: var(--blue); font-size: .76rem; letter-spacing: .12em; font-weight: 750; margin-bottom: 10px; }
.panel {
  min-width: 0;
  background: linear-gradient(145deg, #fffffff5, #f6fbffbd);
  border: 1px solid #fff;
  border-radius: 24px;
  padding: clamp(17px, 3vw, 28px);
  box-shadow: inset 0 1px 0 #fff, 0 14px 44px #173b7218, 0 0 0 1px #9cb8dd34;
  backdrop-filter: blur(18px);
}
.columns { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; align-items: start; }
.form-panel label, section form label { margin: 0 0 14px; }
label { display: block; font-weight: 650; font-size: .92rem; }
input { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; min-height: 44px; border: 1px solid #9eb3c7; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-weight: 400; }
input[readonly] { background: #f1f5fa; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: var(--blue); color: white; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.92); }
button:disabled { cursor: wait; opacity: .65; }
button[hidden] { display: none; }
.secondary { color: #16467c; background: var(--accent); border-color: #c0d7f3; }
.quiet { color: inherit; background: transparent; border-color: currentColor; }
.danger { background: #a3222c; }
:focus-visible { outline: 3px solid #0080cf; outline-offset: 3px; }
.search, .filters { display: flex; align-items: end; gap: 10px; }
.filters { margin-bottom: 20px; }
.filters label { margin: 0; }
.filters label:first-child { flex: 1; }
.filters input[type=number] { max-width: 125px; }
.results { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.results article { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 11px; background: #f7faff; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.results p { margin: 1px 0 3px; }
[data-summary] { margin: 8px 0; }
.picker > p:last-child { margin: 14px 0 0; }
.pagination { display: flex; gap: 12px; margin-top: 12px; }
.number { font-family: Consolas, monospace; overflow-wrap: anywhere; }
.issued { font-size: 1.15rem; padding: 12px; border-radius: 8px; background: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f2f7fb; font-size: .88rem; }
.badge { display: inline-block; color: #135543; background: #e3f5ed; border-radius: 999px; padding: 3px 8px; font-size: .83rem; }
.cancelled { color: #80232b; background: #fde9eb; }
.empty { padding: 22px; background: #f5f8fb; border-radius: 10px; color: var(--muted); }
.alert, .success { padding: 12px; border-radius: 8px; background: #fce8e9; color: #80232b; }
.success { background: #e3f5ed; color: #135543; }
dt { color: var(--muted); font-size: .88rem; }
dd { margin: 0 0 10px; }
.history, .people { list-style: none; margin: 0 0 16px; padding: 0; }
.history li, .people li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.history span, .history p { display: block; overflow-wrap: anywhere; }
.history p { margin: 6px 0 0; white-space: pre-line; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
details { border-top: 1px solid var(--line); margin-top: 12px; }
summary { padding: 12px 0; cursor: pointer; color: var(--blue); font-weight: 650; }
.login h1 { margin-bottom: 24px; }
.login { padding: clamp(24px, 5vw, 42px); }
.login button { width: 100%; margin-top: 6px; }
@media (max-width: 820px) {
  .top { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 12px; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  #issue .form-panel { order: 2; }
}
@media (max-width: 520px) {
  .heading, .filters { align-items: stretch; flex-direction: column; }
  .filters input[type=number] { max-width: none; }
  nav { gap: 4px; }
  nav a { padding-inline: 8px; }
  .account { margin-left: 0; }
}
