:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #203040;
  --muted: #6d7a87;
  --primary: #0f5fa8;
  --primary-2: #0b4e89;
  --danger: #b83838;
  --success: #1f8f4d;
  --border: #d7e0ea;
  --shadow: 0 10px 30px rgba(10, 41, 74, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
.page { max-width: 1200px; margin: 0 auto; padding: 24px; }
.page.wide { max-width: 1440px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-card { width: 100%; max-width: 420px; padding: 28px; }
.card { padding: 20px; margin-bottom: 22px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 22px;
}
.topbar.simple { margin-top: 20px; }
.topbar h1 { margin: 0 0 6px; font-size: 32px; }
.muted { color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
}
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.checkbox input { width: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; padding: 11px 16px;
  background: var(--surface-2); color: var(--text); cursor: pointer;
  min-height: 44px;
}
.btn:hover { filter: brightness(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { min-height: 34px; padding: 7px 12px; border-radius: 10px; font-size: 14px; }
.full { width: 100%; }
.alert {
  padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid transparent;
}
.alert-error { background: #fff1f1; color: #8f1f1f; border-color: #f0caca; }
.alert-success { background: #eefaf2; color: #17643a; border-color: #ccebd6; }
.table-wrap { overflow: auto; }
table {
  width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden;
}
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: #edf3fa; font-size: 14px; }
.row-missed { background: #fff3f3; }
.filters {
  display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 14px; align-items: end;
}

.billing-filters {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.filter-actions { display: flex; gap: 10px; align-items: end; }
.stats-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow);
}
.stat-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-card strong { font-size: 20px; }
.inline-form-box {
  margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 14px;
}
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

@media (max-width: 1100px) {
  .grid-2, .stats-grid, .filters, .form-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}

.line-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.line-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f8;
  border: 1px solid #d6e0ea;
  font-size: 13px;
  color: #15324b;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eef3f8;
  border: 1px solid var(--border);
  color: var(--text);
  min-height: 44px;
}

.stats-grid-seven {
  grid-template-columns: repeat(7, 1fr);
}


.stats-grid-three {
  grid-template-columns: repeat(3, 1fr);
}

.inline-form-box h3 {
  margin: 0 0 6px;
}

.page-footer {
  margin: 28px 0 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

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


.stats-grid-four { grid-template-columns: repeat(4, 1fr); }

.totals-row td {
  background: #f4f8fd;
  border-top: 2px solid #d4e0ee;
}

.page-footer, .login-footer {
  line-height: 1.6;
}

.page-footer a, .login-footer a {
  font-weight: 700;
}

.live-overview-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.section-head h2, .live-panel h3 {
  margin: 0 0 10px;
}

.live-overview-top {
  margin-top: 18px;
  margin-bottom: 18px;
}

.live-overview-grid {
  align-items: stretch;
}

.live-panel {
  background: #f4f8fd;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.call-duration {
  white-space: nowrap;
  font-weight: 600;
  color: #1b4f83;
}


.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 18px;
}

.app-badge strong {
  font-size: 18px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 10px;
  background: #eb8639;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.login-shell {
  width: 100%;
  max-width: 420px;
}

.quick-range-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.row-outgoing-answered {
  background: #f0fbf3;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -4px 0 24px;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-status {
  min-width: 82px;
  text-align: center;
  font-weight: 600;
}

.btn-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.auto-refresh-row {
  margin-top: -2px;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.toggle-inline input {
  width: 18px;
  height: 18px;
}

.ctu-filters{grid-template-columns:minmax(240px,420px) auto}.ctu-filters .filter-actions{align-self:end}


/* v17.1 */
.feature-link-card{display:flex;align-items:center;justify-content:space-between;gap:24px;border-left:5px solid #1e67ad}
.feature-link-card h2{margin:0 0 6px}
.feature-link-card p{margin:0}
.btn-pdf{font-weight:700;border-color:#b8c8d9}
@media(max-width:760px){.feature-link-card{align-items:flex-start;flex-direction:column}}

/* v17.2 – přirážka a porovnání fakturace */
.help-inline{cursor:help;color:#1d67ad}.billing-comparison-table{min-width:1450px}.billing-comparison-table .group-head{text-align:center}.billing-comparison-table .actual-head{background:#eef2f6}.billing-comparison-table .billed-head{background:#e7f4ff}.billing-comparison-table td:nth-child(n+5){white-space:nowrap}.billing-note{margin:10px 4px 0}.billing-table-card .table-wrap{max-width:100%;overflow-x:auto}

.app-brand-link{color:inherit;text-decoration:none}.app-brand-link:hover{text-decoration:underline}
