:root {
  --bg: #0f172a;        /* slate-900 */
  --panel: #111827;     /* gray-900 */
  --muted: #1f2937;     /* gray-800 */
  --text: #e5e7eb;      /* gray-200 */
  --text-dim: #9ca3af;  /* gray-400 */
  --primary: #22d3ee;   /* cyan-400 */
  --accent: #a78bfa;    /* violet-400 */
  --danger: #f87171;    /* red-400 */
  --ok: #34d399;        /* emerald-400 */
  --warning: #fbbf24;   /* amber-400 */
  --radius: 16px;
  --shadow: 0 10px 25px rgba(0,0,0,.35);
}
* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0b1025 0%, #0b1025 60%, #0b132b 100%);
  color: var(--text);
}
.wrap { max-width: 1100px; margin: 32px auto; padding: 0 16px }
header { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 18px }
h1 { font-size: 26px; margin: 0; letter-spacing: .3px }
.badge { font-size: 12px; padding: 4px 10px; background: #0ea5b8; color: #001519; border-radius: 999px; font-weight: 700 }

.grid { display: grid; gap: 16px }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr) }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr) }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr 1fr } }
@media (max-width: 700px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr } }

.card { background: linear-gradient(180deg, #0f172a, #0c1226); border: 1px solid #1f2a44; border-radius: var(--radius); box-shadow: var(--shadow); }
.card .inner { padding: 16px }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px }

@media (max-width: 900px){ .stats { grid-template-columns: 1fr 1fr } }
.stat { background: linear-gradient(180deg, #101935, #0b132b); border: 1px solid #1e2a49; border-radius: 14px; padding: 14px }
.stat h3 { margin: 0; font-size: 12px; color: var(--text-dim); letter-spacing: .4px }
.stat .v { font-size: 22px; margin-top: 6px; font-variant-numeric: tabular-nums }

.toolbar { display:flex; gap: 8px; flex-wrap: wrap }
.toolbar .spacer { flex: 1 }

label { display:block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px }
input, select, textarea { width: 100%; background: #10172a; border: 1px solid #1f2a44; color: var(--text); padding: 10px 12px; border-radius: 12px; outline: none }
textarea { min-height: 42px; resize: vertical }

button, .btn { appearance: none; border: 0; padding: 10px 14px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: .2s transform ease, .2s filter ease; color: #07121a }
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.05) }
.btn-primary { background: linear-gradient(180deg, #22d3ee, #1fb6d8) }
.btn-secondary { background: linear-gradient(180deg, #a78bfa, #7c3aed) }
.btn-ghost { background: transparent; border: 1px solid #30406e; color: var(--text) }
.btn-danger { background: linear-gradient(180deg, #fb7185, #ef4444) }
.btn-ok { background: linear-gradient(180deg, #34d399, #059669) }

table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: 12px; color: var(--text-dim); font-weight: 600; padding: 10px 12px }
tbody td { padding: 12px; border-top: 1px solid #1f2a44; vertical-align: top }
tr:hover td { background: rgba(167,139,250,.05) }
.mono { font-variant-numeric: tabular-nums }
.pill { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius: 999px; background: #0b1b33; border: 1px solid #20335a; color: #bfdbfe; font-size: 12px }

.footer-note { margin-top: 12px; font-size: 12px; color: var(--text-dim) }

/* Print styles for Report */
@media print {
  body { background: white; color: black }
  .no-print { display: none !important }
  .report h1 { font-size: 20px }
  .report table { width: 100%; border-collapse: collapse }
  .report thead th, .report td { border: 1px solid #999; padding: 6px }
}

/* ===== Modální okno ===== */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.modal-dialog {
  position: relative; margin: 6vh auto 0;
  max-width: 860px; width: calc(100% - 32px);
  background: linear-gradient(180deg, #0f172a, #0c1226);
  border: 1px solid #1f2a44; border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: modal-in .16s ease-out;
}
@keyframes modal-in {
  from { transform: translateY(8px); opacity: 0.6 }
  to   { transform: translateY(0);   opacity: 1 }
}
.modal-header { display:flex; align-items:center; gap:12px; padding: 14px 16px; border-bottom: 1px solid #1f2a44 }
.modal-body   { padding: 16px }
.modal-actions{
  display:flex; align-items:center; gap:10px; padding: 12px 16px; border-top: 1px solid #1f2a44
}
.modal-close { font-size: 20px; line-height: 1; padding: 6px 10px }

.cols-3__span-2 { grid-column: span 2; }
@media (max-width: 700px){ .cols-3__span-2 { grid-column: auto; } }

/* Zamknout scroll pozadí při otevřeném modálu */
body.modal-open { overflow: hidden; }

/* ===== Graf (SVG) ===== */
.chart { width: 100%; }
.chart svg { width: 100%; height: 320px; display: block; }
.chart .axis { stroke: #31446f; stroke-width: 1; }
.chart .grid { stroke: #213352; stroke-width: 1; opacity: .5 }
.chart .bar { fill: #22d3ee; }
.chart .bar:hover { filter: brightness(1.1); }
.chart .label { fill: var(--text-dim); font-size: 11px; dominant-baseline: hanging }
.chart .ylabel { fill: var(--text-dim); font-size: 11px; dominant-baseline: middle; text-anchor: end }
.chart .title { fill: var(--text); font-weight: 700; font-size: 14px }

/* ===== Plnění měsíce (progress) ===== */
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress-meta { display: flex; justify-content: space-between; align-items: center; }
.progress-bar {
  height: 14px; background: #0e1a30;
  border: 1px solid #1f2a44; border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #22d3ee, #7c3aed);
  transition: width .25s ease;
}
.progress-fill.ok {
  background: linear-gradient(90deg, #34d399, #059669);
}

.home-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:10px;
  border:1px solid #e5e7eb; text-decoration:none; color:inherit;
}
.home-btn:hover{ border-color:#60a5fa }

#chart{ max-width:100%; height:auto; }
.chart-legend{ margin-top:8px; display:flex; flex-direction:column; gap:6px; font-size:13px; color:#6b7280 }
.chart-legend .dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle }


