/* style.css — univerzální tmavý minimalistický motiv
   Created :: 2026-05-25
   Updated :: 2026-05-25

   TIMELINE
   2026-05-25 :: Vytvoření – globální font-size, layout LIŠTA1/2/3, breadcrumb,
                 patička, formuláře, flash hlášky, tabulky, login obrazovka, nástěnka.

   Pravidlo: font-size je definován globálně (--fs-base). Mění se jen tam,
   kde je to nutné (H1, drobné popisky), přes proměnné níže.
*/

:root {
    /* Barvy */
    --bg:           #0f1115;
    --bg-2:         #12151c;
    --panel:        #171a21;
    --panel-2:      #1c2029;
    --border:       #262b36;
    --border-soft:  #20242e;
    --text:         #e7e9ee;
    --muted:        #8b93a7;
    --accent:       #7aa2ff;
    --accent-2:     #5d86e8;
    --accent-ink:   #0f1115;
    --ok:           #4ade80;
    --ok-bg:        #11271a;
    --err:          #f87171;
    --err-bg:       #2a1416;
    --warn:         #fbbf24;
    --warn-bg:      #2a2310;
    --info:         #60a5fa;
    --info-bg:      #14202e;

    /* Typografie – globální velikost písma */
    --fs-base:      15px;
    --fs-small:     13px;
    --fs-tiny:      12px;
    --fs-h1:        22px;
    --fs-h2:        17px;
    --lh:           1.55;

    /* Rozměry */
    --radius:       10px;
    --radius-sm:    8px;
    --gap:          16px;
    --maxw:         95%;
    --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: var(--fs-base); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: var(--lh);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: var(--fs-h1); font-weight: 600; margin: 0 0 16px; color: #fff; }
h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 12px; color: #fff; }
p  { margin: 0 0 12px; }

hr.breaker { border: 0; border-top: 1px solid var(--border-soft); margin: 24px 0; }

/* ============================================================
   LIŠTA1 :: horní lišta
   ============================================================ */
.lista1 {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 30;
}
.lista1__in {
    max-width: var(--maxw); margin: 0 auto;
    display: flex; align-items: stretch; justify-content: space-between;
    gap: var(--gap); padding: 0 20px; height: 40px;
}
.lista1__brand { display: inline-flex; align-items: center; font-weight: 600; color: #fff; font-size: 1rem; }
.lista1__brand:hover { text-decoration: none; }
.lista1__right { display: flex; align-items: stretch; gap: 2px; }
.lista1__right a {
    display: inline-flex; align-items: center;
    color: var(--muted); padding: 0 10px;
    border-bottom: 2px solid transparent;
    font-size: var(--fs-small);
}
.lista1__right a:hover { color: var(--text); text-decoration: none; }
.lista1__right a.is-active { color: #fff; border-bottom-color: var(--accent); }
.lista1__email { color: var(--text); font-weight: 500; }
.lista1__sep { align-self: center; width: 1px; height: 20px; background: var(--border); margin: 0 6px; }
.lista1__logout { color: var(--err); }

/* ============================================================
   LIŠTA2 :: hlavní menu (moduly)
   ============================================================ */
.lista2 { background: var(--bg-2); border-bottom: 1px solid var(--border); }
.lista2__in {
    max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
    display: flex; gap: 4px; min-height: 38px; align-items: stretch;
}
.lista2 a {
    display: inline-flex; align-items: center; padding: 0 14px;
    color: var(--muted); font-size: var(--fs-small);
    border-bottom: 2px solid transparent;
}
.lista2 a:hover { color: var(--text); text-decoration: none; }
.lista2 a.is-active { color: #fff; border-bottom-color: var(--accent); }
.lista2__empty { display: inline-flex; align-items: center; color: var(--muted); font-size: var(--fs-small); opacity: .6; }

/* ============================================================
   LIŠTA3 :: submenu
   ============================================================ */
.lista3 { background: var(--panel-2); border-bottom: 1px solid var(--border); }
.lista3__in {
    max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
    display: flex; gap: 2px; min-height: 34px; align-items: stretch; flex-wrap: wrap;
}
.lista3 a {
    display: inline-flex; align-items: center; padding: 0 12px;
    color: var(--muted); font-size: var(--fs-small);
    border-bottom: 2px solid transparent;
}
.lista3 a:hover { color: var(--text); text-decoration: none; }
.lista3 a.is-active { color: #fff; border-bottom-color: var(--accent); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    max-width: var(--maxw); margin: 0 auto; padding: 9px 20px 0;
    font-size: var(--fs-small); color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 8px; opacity: .5; }
.breadcrumb .current { color: var(--text); }

/* ============================================================
   OBSAH
   ============================================================ */
.content { max-width: var(--maxw); margin: 0 auto; padding: 20px; }

.panel {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
}
.panel + .panel { margin-top: var(--gap); }
.panel__title { margin: 0 0 16px; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny  { font-size: var(--fs-tiny); }

/* ============================================================
   FLASH HLÁŠKY
   ============================================================ */
.flash { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px; border: 1px solid transparent; font-size: var(--fs-small); }
.flash ul { margin: 0; padding-left: 18px; }
.flash li { margin: 2px 0; }
.flash--error   { background: var(--err-bg);  border-color: #5b2126; color: #fecaca; }
.flash--success { background: var(--ok-bg);   border-color: #1e4d31; color: #bbf7d0; }
.flash--info    { background: var(--info-bg); border-color: #1e3a5b; color: #bfdbfe; }
.flash--warning { background: var(--warn-bg); border-color: #5b4a17; color: #fde68a; }

/* ============================================================
   FORMULÁŘE
   ============================================================ */
.form { max-width: 460px; }
.form--wide { max-width: 640px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-small); color: var(--muted); }
.field .hint { display: block; margin-top: 6px; font-size: var(--fs-tiny); color: var(--muted); }

input[type=text], input[type=email], input[type=password],
input[type=search], select, textarea {
    width: 100%; padding: 11px 13px;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 1rem; font-family: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122,162,255,.15); }
input::placeholder { color: #5b6273; }

/* Select – vlastní šipka + tmavá nabídka (sjednocení s inputy) */
select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding-right: 36px; cursor: pointer; line-height: 1.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' stroke='%238b93a7' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; background-size: 10px;
}
select option { background: var(--panel); color: var(--text); }
select:disabled { opacity: .55; cursor: not-allowed; }

.checkbox { display: flex; align-items: center; gap: 9px; font-size: var(--fs-small); color: var(--muted); cursor: pointer; }
.checkbox input { width: auto; }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* Tlačítka */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    background: var(--panel-2); color: var(--text);
    border: 1px solid var(--border); font-size: var(--fs-small);
    font-family: inherit; cursor: pointer; line-height: 1;
}
.btn:hover { background: #232834; text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn--primary:hover { background: var(--accent-2); }
.btn--danger { background: transparent; color: var(--err); border-color: #5b2126; }
.btn--danger:hover { background: var(--err-bg); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 12px; font-size: var(--fs-tiny); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ============================================================
   TABULKY
   ============================================================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.tbl th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .03em; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--bg-2); }
table.tbl td.actions { white-space: nowrap; text-align: right; }

/* Kompaktní varianta tabulky (např. pro logy – hustší a přehlednější) */
table.tbl.tbl--sm { font-size: var(--fs-tiny); }
table.tbl.tbl--sm th, table.tbl.tbl--sm td { padding: 5px 9px; }
table.tbl.tbl--sm th { font-size: 10px; }
table.tbl.tbl--sm td .tiny { font-size: 11px; }
table.tbl.tbl--sm td .btn { padding: 1px 8px; font-size: 11px; border-radius: 6px; }

/* Štítky */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: var(--fs-tiny); border: 1px solid var(--border); color: var(--muted); }
.badge--admin  { color: var(--accent); border-color: #2c3a5e; background: #141a2b; }
.badge--user   { color: var(--muted); }
.badge--active { color: var(--ok); border-color: #1e4d31; background: var(--ok-bg); }
.badge--banned { color: var(--err); border-color: #5b2126; background: var(--err-bg); }
.badge--nopass { color: var(--warn); border-color: #5b4a17; background: var(--warn-bg); }

.level { font-weight: 600; }
.level--INFO, .level--info { color: var(--info); }
.level--error, .level--ERROR { color: var(--err); }
.level--warning, .level--WARNING { color: var(--warn); }

/* ============================================================
   PATIČKA
   ============================================================ */
.paticka { margin-top: 36px; border-top: 1px solid var(--border); }   /* čára přes celou šířku */
.paticka__in {
    max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
    color: var(--muted); font-size: var(--fs-tiny);
    display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; align-items: center;
}
.paticka a { color: var(--muted); }
.paticka a:hover { color: var(--text); }
.paticka__contact { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.paticka__contact .dot { opacity: .4; }

/* ============================================================
   NÁSTĚNKA :: karty modulů
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }
.card {
    display: block; background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card__title { color: #fff; font-weight: 600; margin-bottom: 4px; }
.card__desc { color: var(--muted); font-size: var(--fs-small); }

/* ============================================================
   PŘIHLAŠOVACÍ OBRAZOVKA
   ============================================================ */
.auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background:
        radial-gradient(1200px 600px at 50% -10%, #1a2030 0%, var(--bg) 60%);
}
.auth__card {
    width: 100%; max-width: 400px; background: var(--panel);
    border: 1px solid var(--border); border-radius: 14px; padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.auth__logo img { width: 30px; height: 30px; }
.auth__logo span { font-weight: 600; color: #fff; }
.auth__title { font-size: var(--fs-h1); color: #fff; margin: 14px 0 4px; }
.auth__sub { color: var(--muted); font-size: var(--fs-small); margin-bottom: 22px; }
.auth__foot { margin-top: 18px; text-align: center; font-size: var(--fs-small); color: var(--muted); }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.auth .btn--primary { width: 100%; padding: 12px; }

/* Utility */
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: var(--fs-small); }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--text); }

/* ============================================================
   MODÁLNÍ OKNO
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100; padding: 24px;
    background: rgba(0,0,0,.6); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
}
.modal-overlay.is-open { display: flex; }
.modal {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); width: 100%; max-width: 760px; max-height: 85vh;
    display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.modal__title { color: #fff; font-weight: 600; font-size: var(--fs-h2); }
.modal__close { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal__close:hover { color: var(--text); }
.modal__body { padding: 16px 18px; overflow: auto; }
.modal__body pre {
    margin: 0; white-space: pre-wrap; word-break: break-word;
    font-size: var(--fs-small); color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg-2); border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); padding: 12px;
}
.modal__label {
    color: var(--muted); font-size: var(--fs-tiny); text-transform: uppercase;
    letter-spacing: .04em; margin: 14px 0 5px;
}
.modal__label:first-child { margin-top: 0; }

@media (max-width: 640px) {
    .lista1__email-text { display: none; }
    .dl { grid-template-columns: 1fr; gap: 2px 0; }
    .dl dd { margin-bottom: 8px; }
}
