:root {
    --projekt: #0d6efd;
    --projekt-rgb: 13, 110, 253;
    --primary: var(--projekt);
    --bg: #f5f7fb;
    --surface: #ffffff;
    --border: #e6eaf2;
    --text: #1f2937;
    --muted: #6b7280;
    --sidebar-w: 240px;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
    --bs-primary: var(--projekt);
    --bs-primary-rgb: var(--projekt-rgb);
    --bs-link-color-rgb: var(--projekt-rgb);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-bs-theme="dark"] {
    --bg: #0f1420;
    --surface: #171d2c;
    --border: #262e42;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--bs-body-font-family);
    font-size: .925rem;
}

/* ---------- sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
}

@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        transition: transform .2s ease;
    }

    .main {
        margin-left: var(--sidebar-w);
        transition: margin .2s ease;
    }

    body.sidebar-collapsed .sidebar { transform: translateX(-100%) !important; }
    body.sidebar-collapsed .main { margin-left: 0; }
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem 1.25rem .75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--projekt);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.projekt-box {
    margin: 0 1rem 1rem;
    padding: .55rem .75rem;
    border-radius: 10px;
    background: rgba(var(--projekt-rgb), .08);
    border-left: 4px solid var(--projekt);
    font-weight: 600;
    font-size: .85rem;
    line-height: 1.3;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1px .75rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
}

.sidebar .nav-link i { font-size: 1.1rem; }
.sidebar .nav-link:hover { background: rgba(var(--projekt-rgb), .07); color: var(--text); }
.sidebar .nav-link.active { background: rgba(var(--projekt-rgb), .12); color: var(--projekt); font-weight: 600; }

/* ---------- topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-top: 3px solid var(--projekt);
    padding: .5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--projekt);
}

.content { padding: 1.5rem; max-width: 1500px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.breadcrumb { font-size: .8rem; margin-bottom: .15rem; }

/* ---------- cards, tables, buttons ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; padding: .85rem 1.15rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-footer { background: transparent; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius) !important; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th {
    background: transparent;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--projekt); --bs-btn-border-color: var(--projekt); --bs-btn-hover-bg: var(--projekt); --bs-btn-hover-border-color: var(--projekt); --bs-btn-active-bg: var(--projekt); --bs-btn-active-border-color: var(--projekt); --bs-btn-disabled-bg: var(--projekt); --bs-btn-disabled-border-color: var(--projekt); }
.btn-primary:hover { filter: brightness(.92); }
.btn-outline-primary { --bs-btn-color: var(--projekt); --bs-btn-border-color: var(--projekt); --bs-btn-hover-bg: var(--projekt); --bs-btn-hover-border-color: var(--projekt); --bs-btn-active-bg: var(--projekt); }
.form-control, .form-select { border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--projekt); box-shadow: 0 0 0 .2rem rgba(var(--projekt-rgb), .15); }
.form-check-input:checked { background-color: var(--projekt); border-color: var(--projekt); }
.form-label { font-weight: 500; font-size: .85rem; }

.stat { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.stat .ikona { width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--projekt-rgb), .12); color: var(--projekt); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat .cislo { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat .popis { color: var(--muted); font-size: .8rem; }

.prazdno { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.prazdno i { font-size: 2.5rem; opacity: .5; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 400px; }
