:root {
  --accent: #62BB46;
  --bg: #111114;
  --card: #1b1b1f;
  --muted: #8a8a90;
  --text: #fff;
  --dim: #d9d9dc;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap
}

h1 {
  font-size: 18px;
  margin: 0
}

.muted {
  color: var(--muted)
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #242429;
  min-height: 96px
}

.k {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em
}

.v {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 8px;
  flex-wrap: wrap
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #26262b;
  color: var(--dim);
  font-size: 12px
}

.bar {
  height: 8px;
  background: #2a2a2f;
  border-radius: 999px;
  overflow: hidden
}

.bar>div {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .6s ease
}

button {
  background: var(--accent);
  color: #09100f;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer
}

button:hover {
  filter: brightness(1.1)
}

button {
  transition: transform .06s ease, filter .15s ease;
}

button:active,
button.clicked {
  transform: translateY(1px);
}

input,
select,
textarea {
  border-radius: 10px;
  border: 1px solid #2a2a2f;
  background: #141417;
  color: #fff;
  padding: 8px 10px
}

.footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px
}

.cfg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px
}

.err {
  color: #ff9393;
  font-size: 12px;
  margin-left: 8px
}

.ok {
  color: #62BB46
}

.sep {
  height: 1px;
  background: #242429;
  margin: 12px 0
}

.hidden {
  display: none
}

.right {
  display: flex;
  gap: 8px;
  align-items: center
}

.mini {
  font-size: 12px;
  color: var(--muted)
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px
}

th,
td {
  border-bottom: 1px solid #242429;
  padding: 6px 8px;
  text-align: left;
  font-size: 13px
}

.t-right {
  text-align: right
}

.pill {
  background: #26262b;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--dim)
}

.sign {
  opacity: .85
}

#exportStatus a,
#exportStatus a:visited {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

#exportStatus a:hover {
  text-decoration: underline;
  filter: brightness(1.05);
}

.card > .row .right{ gap:8px; }      
.card > .row{ align-items:center; } 
.card > .row + table{ margin-top:10px; }

/* oranžový download button */
#btnDownload {
  background: #ff8a00;
  color: #0a0a0a;
  font-weight: 700;
}

#btnDownload:hover {
  filter: brightness(1.1)
}

/* vizuálna odozva kliknutia */
button.clicked {
  transform: translateY(1px);
}

button {
  transition: transform .06s ease, filter .15s ease;
}

/* vnorený scroll len pre zoznam faktúr */
.table-scroll {
  max-height: 420px;
  /* nastav si podľa potreby */
  overflow: auto;
  border-top: 1px solid #242429;
}

.table-scroll table {
  margin-top: 0
}

/* aby sa medzera nezdvojovala */

/* sticky head v rámci vnoreného scrollu */
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
}
#tbl thead th[data-sort]{user-select:none;cursor:pointer}
#tbl thead th[data-sort]:hover{text-decoration:underline}
