/* Základní layout pro všechny stránky (login, client, admin) */

:root {
    --bg-body: #0f172a;
    --bg-card: #020617;
    --bg-card-soft: #020617;
    --accent: #3b82f6;
    --accent-soft: #1d4ed8;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-strong: #f9fafb;
    --danger: #f97373;
    --success: #22c55e;
    --border-subtle: #1f2933;
    --radius-lg: 12px;
    --radius-pill: 999px;
    --shadow-card: 0 20px 35px rgba(0,0,0,.45);
    --shadow-soft: 0 10px 20px rgba(0,0,0,.35);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #1f2937 0, var(--bg-body) 40%);
    color: var(--text-main);
}

/* Wrapper – login */

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 420px;
}

/* Nadpisy, text */

h1 {
    margin: 0 0 4px;
    font-size: 22px;
    color: var(--text-strong);
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-main);
}

/* Formuláře */

.field {
    margin-bottom: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: #020617;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(59,130,246,.45);
}

/* Tlačítka */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 10px;
    white-space: nowrap;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: var(--text-strong);
}

.btn-primary:hover {
    background: var(--accent-soft);
}

.btn-secondary {
    width: 100%;
    background: #111827;
    color: var(--text-main);
    font-size: 12px;
    padding: 7px 10px;
}

.btn:disabled {
    opacity: .6;
    cursor: default;
}

/* Status zprávy */

.status {
    margin-top: 12px;
    font-size: 13px;
    min-height: 18px;
    white-space: pre-wrap;
    word-break: break-word;
}

.status.ok {
    color: var(--success);
}

.status.err {
    color: var(--danger);
}

/* Malý text dole */

.small {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.small code {
    background: #020617;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 10px;
}

/* Login – seznam API tlačítek */

.links {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Layout pro client/admin dashboard */

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    background: var(--bg-body);
}

.app-sidebar {
    background: rgba(2,6,23,0.95);
    border-right: 1px solid #020617;
    padding: 20px 18px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
}

.app-main {
    padding: 20px 24px;
}

.app-logo {
    font-weight: 600;
    color: var(--text-strong);
    font-size: 18px;
    margin-bottom: 4px;
}

.app-logo span {
    color: var(--accent);
}

.app-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.app-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.app-nav li {
    margin-bottom: 6px;
}

.app-nav button {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 10px;
    font-size: 13px;
    background: transparent;
    border-radius: 8px;
    border: 1px solid transparent;
    color: #fff;
}

.app-nav button.app-nav-active {
    background: #292929;
    border-color: #00599d;
    color: #47afff;
}

.app-footer {
    margin-top: 24px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Cards, tabulky */

.app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.card-sm {
    background: var(--bg-card-soft);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #020617;
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
    font-size: 13px;
}

.card-sm-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-sm-value {
    font-weight: 600;
    color: var(--text-strong);
}

.card-sm-note {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.section-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--text-strong);
}

.table-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #020617;
    box-shadow: 0 12px 24px rgba(0,0,0,.35);
    background: #020617;
}

.table-simple {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table-simple thead {
    background: #020617;
}

.table-simple th,
.table-simple td {
    padding: 6px 8px;
    border-bottom: 1px solid #020617;
}

.table-simple tbody tr:nth-child(even) {
    background: #020617;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    border: 1px solid #1f2937;
    background: #020617;
}

.badge.green {
    color: #a7f3d0;
    border-color: #065f46;
    background: rgba(6,95,70,0.25);
}

.badge.red {
    color: #fecaca;
    border-color: #7f1d1d;
    background: rgba(127,29,29,0.25);
}

/* Responsivita */

@media (max-width: 840px) {
    .app-shell {
        grid-template-columns: 1fr;
    }
    .app-sidebar {
        border-right: none;
        border-bottom: 1px solid #020617;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .app-main {
        padding: 16px 14px 20px;
    }
}

/* Grafy */

.overview-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* rodič grafu má pevnou výšku */
.chart-card {
  position: relative;
  padding: 1rem;
  height: 260px;        /* klidně uprav na 220–320 podle vkusu */
}

/* canvas vyplní celou kartu */
.chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Heartbeat status značky */
.status-ok {
  color: #4caf50;        /* zelená */
  font-weight: 500;
}

.status-warn {
  color: #ffb74d;        /* oranžová */
  font-weight: 500;
}

.status-bad {
  color: #e57373;        /* červená */
  font-weight: 500;
}

/* ---------- Login layout v2 ---------- */

.login-body {
    background: radial-gradient(circle at top, rgba(37,99,235,0.3) 0, #020617 55%);
}

.login-layout {
    display: flex;
    width: 100%;
    max-width: 980px;
    gap: 32px;
}

.login-left {
    flex: 1.1;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top left, #1d4ed8 0, #020617 55%);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-logo {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
}

.logo-main {
    color: var(--text-strong);
}

.logo-sub {
    margin-left: 6px;
    color: var(--accent);
}

.login-tagline {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 360px;
}

.login-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.login-meta-small {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.8;
}

.login-right-wrapper {
    flex: 1;
    max-width: 400px;
}

.login-card {
    width: 100%;
}

.login-form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.link-like {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    cursor: pointer;
    color: var(--accent);
    text-decoration: underline;
}

.link-like:hover {
    color: var(--accent-soft);
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .login-layout {
        flex-direction: column;
    }

    .login-right-wrapper {
        max-width: 100%;
    }
}


