:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a2433;
  --muted: #64748b;
  --line: #d9e2ec;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}
.site-title {
  font-size: 1.2rem;
  font-weight: 700;
}
nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
h1 { margin-top: 0; }
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .95rem;
}
input, button {
  font: inherit;
  padding: .5rem .6rem;
}
button {
  cursor: pointer;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: .35rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: .6rem .7rem;
  font-size: .95rem;
}
th {
  background: #f8fafc;
}
.summary-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.summary-card,
.card,
.section-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1rem;
}
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  margin-right: .5rem;
}
.badge-row { margin-bottom: .3rem; }
.pagination {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 2rem;
}

.help-text { color: #555; margin-top: -0.5rem; margin-bottom: 1rem; }

.account-nav {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.narrow {
  max-width: 34rem;
}

.auth-card {
  margin-top: 3rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  border: 1px solid #b8c0cc;
  border-radius: 0.35rem;
}

button {
  background: #0b57d0;
  color: #fff;
  border: 0;
  padding: 0.7rem 1rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}

.muted {
  color: #5f6b7a;
}


.external-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1rem 0;
}

.external-links a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
  text-decoration: none;
  font-weight: 600;
}

.external-links a:hover {
  background: #eef2ff;
}


.inline-form {
  display: inline;
  margin: 0;
}

.link-button {
  background: none;
  border: none;
  color: #0b57d0;
  cursor: pointer;
  font: inherit;
  margin: 0 0 0 0.5rem;
  padding: 0;
  text-decoration: underline;
}

.link-button:hover {
  color: #063889;
}


.sort-link {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.sort-link:hover {
  text-decoration: underline;
}

.sort-indicator {
  color: #0b57d0;
  font-size: 0.85em;
}

.export-bar {
  margin-bottom: 0.75rem;
}

.export-button {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.export-button:hover {
  background: #eef2ff;
  text-decoration: none;
}
