/* CMS oSpolek – barvy značky */
:root {
  --brand: #0864a6;
  --brand-strong: #064f84;
  --brand-soft: #e3eff8;
  --green: #65a94b;
  --slate: #647789;
  --ink: #142231;
  --line: #e2e8ee;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #f6f9fb;
  line-height: 1.5;
  font-size: 15px;
}
a {
  color: var(--brand-strong);
}
aside {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand);
  text-decoration: none;
  margin: 0 6px 18px;
}
.brand small {
  color: var(--slate);
  font-weight: 600;
}
nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
nav a:hover {
  background: #f1f5f9;
}
nav a.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
main {
  padding: 24px 32px 60px;
  max-width: 1150px;
}
h1 {
  font-size: 1.55rem;
  margin: 0 0 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
h2 {
  font-size: 1.1rem;
  margin-top: 26px;
}
.muted {
  color: var(--slate);
}
.small {
  font-size: 0.85rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.8rem;
  color: var(--slate);
  background: #f8fafc;
}
.badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  font-weight: 600;
  white-space: nowrap;
}
.s-pending {
  background: #fff4e5;
  color: #9a5b00;
}
.s-fulfilled {
  background: #e6f2e1;
  color: #3f7a2a;
}
.s-attention {
  background: #fef3f2;
  color: #b42318;
}
.s-paid {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: var(--slate);
}
.card b {
  display: block;
  font-size: 1.5rem;
  color: var(--ink);
}
.warn,
.ok,
.flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin: 10px 0;
}
.warn {
  background: #fff4e5;
  color: #6b3f00;
}
.ok {
  background: #e6f2e1;
  color: #2f5f1f;
}
.flash {
  background: var(--brand-soft);
}
.flash.error,
.error {
  background: #fef3f2;
  color: #b42318;
  padding: 8px 12px;
  border-radius: 8px;
}
.error-text {
  color: #b42318;
}
dl.grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
}
dt {
  color: var(--slate);
}
dd {
  margin: 0;
  white-space: pre-line;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 16px 16px;
  margin: 16px 0;
}
legend {
  font-weight: 700;
  padding: 0 6px;
}
label {
  display: block;
  margin: 8px 0;
  font-size: 0.92rem;
}
input,
textarea,
select {
  font: inherit;
  padding: 7px 10px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fff;
}
fieldset label > input:not([type='checkbox']),
fieldset label > textarea {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-top: 3px;
}
input[type='checkbox'] {
  accent-color: var(--brand);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.row.wrap {
  flex-wrap: wrap;
}
.row input {
  min-width: 260px;
}
.actions {
  margin: 16px 0;
}
button {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  font-weight: 600;
}
button.primary {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 9px 16px;
}
button.secondary {
  background: #fff;
  color: var(--brand-strong);
  border: 1px solid #cbd5df;
  padding: 8px 14px;
}
button.link {
  background: none;
  border: 0;
  color: #b42318;
  padding: 0;
}
.filters a {
  margin-right: 2px;
}
.total {
  font-weight: 700;
  font-size: 1.1rem;
}
@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }
  aside {
    position: static;
    height: auto;
  }
  main {
    padding: 16px;
  }
}
