@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css");

/* ===================================================
   FoxBlox Admin - Design System v5
   Layout: sidebar fixed left, topbar fixed top
   Dashboard: CSS Grid app-shell (same sidebar, different wrapper)
   =================================================== */

/* --- CSS Variables --------------------------------- */
:root {
    /* Preview design tokens (1:1 s preview-dashboard.html) */
    --ink:             #0d1117;
    --ink2:            #374151;
    --muted:           #6b7280;
    --light:           #9ca3af;
    --border:          #e5e7eb;
    --bg:              #ffffff;
    --bg2:             #f9fafb;
    --bg3:             #f3f4f6;

    --accent:          #5b50f0;
    --accent-d:        #4a40d4;
    --accent-bg:       #f0efff;
    --green:           #16a34a;
    --green-bg:        #dcfce7;
    --amber:           #d97706;
    --amber-bg:        #fff7ed;
    --red:             #dc2626;
    --red-bg:          #fef2f2;

    --primary:         #5b50f0;
    --primary-dark:    #4a40d4;
    --primary-light:   #7c74f5;
    --success:         #10b981;
    --success-light:   #d1fae5;
    --danger:          #ef4444;
    --danger-light:    #fee2e2;
    --warning:         #f59e0b;
    --warning-light:   #fef3c7;
    --info:            #3b82f6;
    --info-light:      #dbeafe;

    --bg-primary:      #ffffff;
    --bg-secondary:    #f8fafc;
    --bg-tertiary:     #f1f5f9;
    --card-bg:         #ffffff;
    --hover-bg:        #f1f5f9;
    --text-primary:    #0f172a;
    --text-secondary:  #475569;
    --text-tertiary:   #94a3b8;
    --border-color:    #e2e8f0;
    --shadow-color:    rgba(0,0,0,.1);

    --sidebar-width:   300px;
    --topbar-height:   72px;

    --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
    --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem;
    --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow:    0 1px 3px rgba(0,0,0,.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1);

    --rounded-sm:  .25rem; --rounded: .5rem; --rounded-md: .625rem;
    --rounded-lg:  1rem;   --rounded-xl: 1.5rem; --rounded-2xl: 2rem;
    --rounded-full: 9999px;

    --transition:      all .2s cubic-bezier(.4,0,.2,1);
    --transition-fast: all .15s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
    --bg-primary:    #0f172a;
    --bg-secondary:  #1e293b;
    --bg-tertiary:   #334155;
    --card-bg:       #1e293b;
    --hover-bg:      #334155;
    --text-primary:  #f1f5f9;
    --text-secondary:#cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color:  #334155;
    --shadow-color:  rgba(0,0,0,.5);

    /* Preview design tokeny (sada, kterou používají moduly recenze/social/chat) –
       bez tohoto zůstávaly moduly ve světlém režimu. */
    --ink:        #e6edf3;
    --ink2:       #c9d1d9;
    --muted:      #9aa4b2;
    --light:      #6e7681;
    --border:     #30363d;
    --bg:         #161b22;
    --bg2:        #0d1117;
    --bg3:        #21262d;
    --accent-bg:  #1e1b4b;
    --green-bg:   #0f2e1d;
    --amber-bg:   #2e2410;
    --red-bg:     #33161a;
    --success-light: #0f2e1d;
    --danger-light:  #33161a;
    --warning-light: #2e2410;
    --info-light:    #10233f;
}

/* Pozadí stránky (v :root/body je natvrdo světlý gradient – v dark ho přebijeme). */
[data-theme="dark"] html,
[data-theme="dark"] body {
    background: #0d1117 !important;
    color: var(--text-primary);
}
[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(91,80,240,.10), transparent 24%),
        linear-gradient(180deg, #0d1117 0%, #0b0f16 100%) !important;
}

/* Hlavní plochy modulů (recenze/social/chat/přehled). Mají místy natvrdo bílé
   pozadí v inline stylech – proto !important. Okraj řešíme přes proměnnou (--border už
   je tmavá), ať nezničíme barevné accent-okraje karet. */
[data-theme="dark"] .ch-section-card,
[data-theme="dark"] .ch-hero,
[data-theme="dark"] .ch-status-panel,
[data-theme="dark"] .sc-row .stat-card,
[data-theme="dark"] .history-card,
[data-theme="dark"] .conv-card,
[data-theme="dark"] .sm-post-card {
    background: #161b22 !important;
    color: var(--ink);
}

/* Filtry, přepínače, ozubená kolečka, archivační prvky, formulářové ovládací prvky. */
[data-theme="dark"] .rv-filterbar,
[data-theme="dark"] .history-filterbar,
[data-theme="dark"] #sm-filterform,
[data-theme="dark"] .arch-bulkbar,
[data-theme="dark"] .arch-chip,
[data-theme="dark"] .arch-done-btn,
[data-theme="dark"] .arch-btn,
[data-theme="dark"] .sc-gear,
[data-theme="dark"] .sc-picker,
[data-theme="dark"] .rv-filter-toggle,
[data-theme="dark"] .sm-filter-toggle,
[data-theme="dark"] .cf-filter-toggle,
[data-theme="dark"] .rv-control,
[data-theme="dark"] .history-control,
[data-theme="dark"] .form-control,
[data-theme="dark"] .ch-meta-pill,
[data-theme="dark"] .ch-tab-pill {
    background: #161b22 !important;
    border-color: #30363d !important;
    color: var(--ink2);
}
[data-theme="dark"] .rv-control option,
[data-theme="dark"] .history-control option,
[data-theme="dark"] .form-control option { background: #161b22; color: var(--ink2); }

/* --- Reset ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(circle at top left, rgba(91,80,240,.06), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
img { display: block; max-width: 100%; }

/* --- Scrollbar ------------------------------------- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* =================================================== */
/*  SIDEBAR (fixed left, all pages)                    */
/* =================================================== */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    z-index: 200;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top, rgba(91,80,240,.12), transparent 28%),
        linear-gradient(180deg, #fcfcff 0%, #f7f8fb 100%);
    border-right: 1px solid rgba(229,231,235,.92);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

/* --- Brand ----------------------------------------- */
.sidebar-brand {
    padding: 20px 18px 0;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 16px;
    border-radius: 16px;
    transition: var(--transition-fast);
}
.brand-link:hover { background: rgba(255,255,255,.6); }

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.brand-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}
.brand-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.04em;
    color: var(--ink);
    line-height: 1;
}
.brand-pill {
    width: 42px; height: 42px;
    border-radius: 14px;
    display: grid; place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #7c73ff 100%);
    box-shadow: 0 12px 24px rgba(91,80,240,.28);
    font-size: 20px;
    flex-shrink: 0;
}
.brand-link-default {
    gap: 10px;
    padding: 10px 12px;
    font-weight: 700;
    color: var(--text-primary);
}
.brand-icon { font-size: 1.4rem; }
.brand-logo-link { display: block; padding: 10px 12px; }

/* --- Nav ------------------------------------------- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-section-title {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--light);
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--ink2);
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
    position: relative;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}
.nav-link:hover {
    background: rgba(255,255,255,.86);
    border-color: rgba(229,231,235,.9);
    color: var(--ink);
    transform: translateX(2px);
}
.nav-link.active {
    background: linear-gradient(180deg, #ffffff 0%, #f8f6ff 100%);
    color: var(--accent);
    border-color: rgba(91,80,240,.24);
    box-shadow: 0 12px 24px rgba(91,80,240,.12);
}

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-expandable {
    justify-content: flex-start;
}
.nav-expandable .nav-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--light);
    transition: transform .2s ease;
}
.nav-link-parent.active > .nav-expandable .nav-arrow { transform: rotate(90deg); }
.nav-link-parent.active > .nav-expandable {
    color: var(--accent);
}

.nav-link-parent { display: flex; flex-direction: column; }

.nav-submenu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 0 12px;
}
.nav-submenu.active { display: flex; }
.nav-submenu .nav-link {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 14px;
    background: rgba(255,255,255,.55);
}

/* --- Sidebar Footer -------------------------------- */
.sidebar-footer {
    padding: 14px;
    margin: 0 18px 20px;
    background: linear-gradient(135deg, #0d1117 0%, #1f2937 100%);
    border-radius: 20px;
    flex-shrink: 0;
    color: #fff;
}
.sf-kicker {
    font-size: 11px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 8px;
}
.sf-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.sf-text  { margin: 0; font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.76); }
.sf-link {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: .9rem; padding: 10px 12px; border-radius: 12px;
    background: rgba(91,80,240,.12); color: #cdc8fb;
    font-size: .8125rem; font-weight: 700; text-decoration: none;
    transition: background .2s ease;
}
.sf-link:hover { background: rgba(91,80,240,.22); }

/* =================================================== */
/*  TOPBAR (fixed top, all pages)                      */
/* =================================================== */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0 var(--space-6);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.topbar-search {
    flex: 1 1 460px;
    max-width: 720px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    color: var(--muted);
}
.topbar-search input {
    border: 0; background: transparent; width: 100%;
    outline: none; font: inherit; color: var(--ink);
}
.topbar-search input::placeholder { color: #c4c9d4 !important; font-weight: 400; }
.topbar-search input::-webkit-input-placeholder { color: #c4c9d4; font-weight: 400; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.topbar-btn-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Icon buttons */
.icon-btn {
    width: 46px; height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    color: var(--ink2);
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    font-size: 18px;
    transition: var(--transition-fast);
}
.icon-btn:hover {
    background: #fff;
    border-color: rgba(91,80,240,.2);
    color: var(--ink);
}
.icon-btn-accent { color: var(--accent); }

.icon-badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Živé chaty v horní liště – zelená pilulka (stejný gradient jako dřívější
   tlačítko „Aktivní chaty" na dashboardu) s počtem lidí, kteří si právě píší. */
.live-chat-pill {
    height: 46px; padding: 0 14px 0 12px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(16,185,129,.28);
    font-size: 18px;
    transition: var(--transition-fast);
}
.live-chat-pill:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(16,185,129,.36); }
.live-chat-pill .live-chat-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); flex-shrink: 0; }
.live-chat-pill .live-chat-num {
    font-size: 14px; font-weight: 900; letter-spacing: -.02em;
    background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 10px;
}

.live-chat-pill.is-live .live-chat-dot { background: #fff; animation: liveChatPulse 1.8s infinite; }
@keyframes liveChatPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
    70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) {
    .live-chat-pill.is-live .live-chat-dot { animation: none; }
}

/* Hromadný výběr – jednotná velikost ovládacích prvků ve všech modulech
   (sociální sítě, recenze, chat, znalosti webu). Dřív měl každý modul svoje
   rozměry: někde velké tlačítko, jinde btn-sm, takže to působilo rozházeně. */
.bulk-toggle,
.bulk-toolbar .btn,
.bulk-toolbar button.btn {
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}
.bulk-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bulk-toolbar select,
.bulk-toolbar .form-control,
.bulk-toolbar .rv-control,
.bulk-toolbar .history-control {
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 999px !important;
    width: auto !important;
    height: auto !important;
}
.bulk-toolbar .bulk-hint  { font-size: 12.5px; color: var(--muted, #6b7280); }
.bulk-toolbar .bulk-count { font-size: 13.5px; font-weight: 800; }

/* Notifications wrap */
.notif-wrap { position: relative; }

.notif-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 340px; max-height: 480px; overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
    z-index: 500;
}

/* Profile */
.profile-wrap { position: relative; }

.profile-btn {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    color: var(--ink);
    transition: var(--transition-fast);
}
.profile-btn:hover { background: #fff; border-color: rgba(91,80,240,.2); }

.profile-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #5b50f0 0%, #7c3aed 100%);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; flex-shrink: 0;
}

.profile-copy {
    display: flex; flex-direction: column; align-items: flex-start;
    text-align: left; gap: 2px;
}
.profile-copy strong { font-size: 14px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.profile-copy span   { font-size: 12px; line-height: 1.1; color: var(--muted); }

.profile-chevron { font-size: 11px; color: var(--text-tertiary); margin-left: 2px; }

.profile-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px);
    width: 240px; padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
    display: grid; gap: 4px; z-index: 500;
}

.profile-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    color: var(--ink2);
    font-size: 13px; font-weight: 700;
    transition: background .15s ease, color .15s ease;
    border: none; background: none; width: 100%; text-align: left;
    text-decoration: none;
}
.profile-link:hover, .profile-link.active { background: var(--bg2); color: var(--ink); }
.profile-link-danger { color: var(--red); }
.profile-link-danger:hover { background: var(--red-bg); color: var(--red); }

.profile-divider { height: 1px; background: var(--border); margin: 4px 0; }

.profile-lang-wrap { position: relative; }
.profile-lang-toggle { justify-content: space-between; }
.profile-submenu-chevron { font-size: 11px; }
.profile-lang-submenu {
    position: absolute; right: 100%; top: 0; margin-right: 6px;
    width: 160px; padding: 8px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: 14px; box-shadow: 0 12px 28px rgba(15,23,42,.1);
    display: grid; gap: 2px; z-index: 600;
}
.profile-lang-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    background: none; border: none; width: 100%; text-align: left; cursor: pointer;
}
.profile-lang-option:hover { background: var(--bg-secondary); }
.profile-lang-check { margin-left: auto; color: var(--accent); }

/* Sync button (dashboard only) */
.solid-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; border-radius: 999px;
    background: var(--accent); color: #fff; border: none;
    font-size: 14px; font-weight: 700;
    box-shadow: 0 10px 24px rgba(91,80,240,.24);
    transition: transform .15s ease, box-shadow .15s ease;
}
.solid-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(91,80,240,.3); }

/* =================================================== */
/*  SYNC MODAL (shared - all pages)                    */
/* =================================================== */
#sync-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 9999;
    align-items: center; justify-content: center;
}
#sync-modal.open { display: flex; }
.sync-modal-box {
    background: #fff; border-radius: 18px;
    padding: 2.5rem 2rem 2rem; text-align: center;
    min-width: 280px; box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.sync-ring-wrap {
    position: relative; display: inline-block;
    width: 90px; height: 90px; margin-bottom: 1.2rem;
}
.sync-ring-wrap svg { width: 90px; height: 90px; transform: rotate(-90deg); }
.sync-ring-label {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: var(--ink);
}
.sync-modal-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 .4rem; }
.sync-modal-msg   { font-size: .85rem; color: var(--muted); }

/* =================================================== */
/*  MAIN CONTENT (all pages)                           */
/* =================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
    padding: var(--space-6);
}

/* =================================================== */
/*  DASHBOARD: app-shell grid                          */
/* =================================================== */
body.dashboard-page {
    padding: 16px;
    background:
        radial-gradient(circle at top left, rgba(91,80,240,.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body.dashboard-page .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "sidebar topbar" "sidebar main";
    min-height: calc(100vh - 32px);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* On dashboard: sidebar is in grid, not fixed */
body.dashboard-page .sidebar {
    position: relative !important;
    top: auto !important; left: auto !important;
    bottom: auto !important; right: auto !important;
    width: auto !important;
    grid-area: sidebar;
    border-right: 1px solid rgba(229,231,235,.92);
    overflow-y: auto;
    height: auto;
}

/* On dashboard: topbar in grid */
body.dashboard-page .topbar {
    position: static !important;
    left: auto !important; top: auto !important; right: auto !important;
    height: auto !important;
    grid-area: topbar;
    padding: 20px 24px 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* On dashboard: main content in grid */
body.dashboard-page .main-content {
    grid-area: main;
    margin: 0 !important;
    padding: 20px 24px 24px !important;
    background: transparent !important;
}

body.dashboard-page .mobile-header { display: none !important; }

/* =================================================== *//*  DASHBOARD: nav + topbar + header styles            */
/* =================================================== */
body.dashboard-page .nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
body.dashboard-page .nav-subgroup {
    display: grid;
    gap: 6px;
    padding: 6px 0 0 12px;
}
body.dashboard-page .nav-label {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--light);
}
body.dashboard-page .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--ink2);
    font-size: 14px;
    font-weight: 700;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
    border: 1px solid transparent;
    background: transparent;
}
body.dashboard-page .nav-item i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}
body.dashboard-page .nav-item:hover {
    background: rgba(255,255,255,.86);
    border-color: rgba(229,231,235,.9);
    transform: translateX(2px);
}
body.dashboard-page .nav-item.active {
    background: linear-gradient(180deg, #ffffff 0%, #f8f6ff 100%);
    color: var(--accent);
    border-color: rgba(91,80,240,.24);
    box-shadow: 0 12px 24px rgba(91,80,240,.12);
}
body.dashboard-page .nav-item.sub {
    margin-left: 10px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 14px;
    background: rgba(255,255,255,.55);
}
body.dashboard-page .nav-item.section-toggle {
    justify-content: space-between;
}
body.dashboard-page .nav-item.section-toggle .left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
body.dashboard-page .nav-arrow {
    font-size: 12px;
    color: var(--light);
}
body.dashboard-page .search {
    flex: 1 1 460px;
    max-width: 720px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    color: var(--muted);
}
body.dashboard-page .search input {
    border: 0;
    background: transparent;
    width: 100%;
    outline: none;
    font: inherit;
    color: var(--ink);
}
body.dashboard-page .top-actions,
body.dashboard-page .header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
body.dashboard-page .header-icon-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    color: var(--ink2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}
body.dashboard-page .header-icon-btn.accent { color: var(--accent); }
body.dashboard-page .header-icon-btn .mini-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
body.dashboard-page .header-profile-wrap { position: relative; }
body.dashboard-page .header-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}
body.dashboard-page .header-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b50f0 0%, #7c3aed 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}
body.dashboard-page .header-user-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}
body.dashboard-page .header-user-copy strong { font-size: 14px; line-height: 1.1; }
body.dashboard-page .header-user-copy span { font-size: 12px; color: var(--muted); line-height: 1.1; }
body.dashboard-page .profile-dropdown-preview {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 240px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
    display: grid;
    gap: 4px;
    z-index: 5;
}
body.dashboard-page .profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ink2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
body.dashboard-page .profile-link.active,
body.dashboard-page .profile-link:hover { background: var(--bg2); color: var(--ink); }
body.dashboard-page .profile-divider { height: 1px; background: var(--border); margin: 4px 0; }
body.dashboard-page .ghost-btn,
body.dashboard-page .solid-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    border: 1px solid transparent;
}
body.dashboard-page .ghost-btn {
    background: rgba(255,255,255,.88);
    color: var(--ink2);
    border-color: var(--border);
}
body.dashboard-page .solid-btn {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(91,80,240,.24);
}
body.dashboard-page .ghost-btn:hover,
body.dashboard-page .solid-btn:hover { transform: translateY(-1px); }

/* =================================================== *//*  MOBILE HEADER                                      */
/* =================================================== */
.mobile-header {
    display: none;
    position: fixed; top: 0; left: 0; right: 0;
    height: 60px; z-index: 300;
    background: linear-gradient(135deg, var(--accent) 0%, #7c73ff 100%);
    padding: 0 var(--space-4);
    align-items: center; justify-content: space-between;
    box-shadow: 0 4px 16px rgba(91,80,240,.2);
}
.mobile-header-title {
    display: flex; align-items: center; gap: .5rem;
    color: #fff; font-weight: 700; font-size: 1.15rem;
}
.mobile-menu-btn {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; padding: 4px;
}
.mobile-menu-btn span {
    display: block; width: 24px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: var(--transition-fast);
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 190;
}

/* =================================================== */
/*  NOTIFICATIONS DROPDOWN                             */
/* =================================================== */
.dropdown-title {
    padding: .75rem 1rem .5rem;
    font-size: .875rem; font-weight: 700; color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}
.dropdown-empty-state {
    padding: 2rem 1rem; text-align: center; color: var(--text-secondary); font-size: .875rem;
}

/* =================================================== */
/*  CARDS & PANELS                                     */
/* =================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--rounded-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
}

.container { max-width: none; margin: 0 auto; }

/* =================================================== */
/*  FORMS                                              */
/* =================================================== */
.form-group { margin-bottom: var(--space-4); }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-2); }
.form-control, .form-select {
    width: 100%; padding: .625rem .875rem;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--rounded-md); font: inherit;
    color: var(--text-primary); font-size: .875rem;
    transition: border-color .2s ease, box-shadow .2s ease;
    outline: none;
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,80,240,.12); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: .875rem; padding-right: 2.25rem; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* =================================================== */
/*  BUTTONS                                            */
/* =================================================== */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .625rem 1.25rem; border-radius: var(--rounded-lg);
    font: inherit; font-size: .875rem; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    transition: var(--transition-fast); text-decoration: none;
}
.btn-primary   { background: var(--primary);  color: #fff; box-shadow: 0 4px 12px rgba(91,80,240,.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--bg-secondary); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-success   { background: var(--success); color: #fff; }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .875rem 1.75rem; font-size: 1rem; }

/* =================================================== */
/*  BADGES                                             */
/* =================================================== */
.badge {
    display: inline-flex; align-items: center;
    padding: .25rem .625rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-success  { background: var(--success-light);  color: var(--success); }
.badge-danger   { background: var(--danger-light);   color: var(--danger); }
.badge-warning  { background: var(--warning-light);  color: var(--warning); }
.badge-info     { background: var(--info-light);     color: var(--info); }
.badge-primary  { background: var(--accent-bg);      color: var(--accent); }
.badge-neutral  { background: var(--bg-tertiary);    color: var(--text-secondary); }

/* =================================================== */
/*  TABLES                                             */
/* =================================================== */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%; border-collapse: collapse;
    font-size: .875rem;
}
.table th, .table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.table th { font-weight: 700; color: var(--text-secondary); font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; }
.table tr:hover td { background: var(--hover-bg); }

/* =================================================== */
/*  ALERTS                                             */
/* =================================================== */
.alert {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .875rem 1rem; border-radius: var(--rounded-lg);
    font-size: .875rem; margin-bottom: var(--space-4); border: 1px solid transparent;
}
.alert-success  { background: var(--success-light);  border-color: var(--success);  color: #065f46; }
.alert-danger   { background: var(--danger-light);   border-color: var(--danger);   color: #991b1b; }
.alert-warning  { background: var(--warning-light);  border-color: var(--warning);  color: #92400e; }
.alert-info     { background: var(--info-light);     border-color: var(--info);     color: #1e40af; }

/* =================================================== */
/*  FLASH MESSAGES                                     */
/* =================================================== */
.flash-message { padding: .875rem 1rem; border-radius: var(--rounded-lg); margin-bottom: var(--space-4); font-weight: 600; }
.flash-success { background: var(--success-light); color: #065f46; }
.flash-error   { background: var(--danger-light);  color: #991b1b; }
.flash-warning { background: var(--warning-light); color: #92400e; }
.flash-info    { background: var(--info-light);    color: #1e40af; }

/* =================================================== */
/*  TABS                                               */
/* =================================================== */
.tabs       { display: flex; gap: 4px; border-bottom: 2px solid var(--border-color); margin-bottom: var(--space-6); }
.tab-btn    { padding: .75rem 1.25rem; font-size: .875rem; font-weight: 600; color: var(--text-secondary); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition-fast); }
.tab-btn:hover  { color: var(--text-primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* =================================================== */
/*  MODAL                                              */
/* =================================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--card-bg); border-radius: var(--rounded-2xl); padding: var(--space-6); max-width: 560px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.modal-title  { font-size: 1.125rem; font-weight: 700; }
.modal-close  { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--text-secondary); }

/* =================================================== */
/*  STATS / METRICS                                    */
/* =================================================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
    border: 1px solid var(--border-color);
    border-radius: 22px; padding: 20px;
    display: flex; align-items: center; gap: 16px;
    position: relative; overflow: hidden;
    min-height: 100px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.stat-card::before {
    content: ''; position: absolute; left: 20px; right: 20px; top: 0;
    height: 1px; background: rgba(229,231,235,.9);
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0; position: relative; z-index: 1;
    background: rgba(91,80,240,.1); color: var(--primary);
}
.stat-card.primary .stat-icon { background: rgba(91,80,240,.1);  color: #5b50f0; }
.stat-card.success .stat-icon { background: rgba(16,185,129,.1);   color: #10b981; }
.stat-card.danger  .stat-icon { background: rgba(239,68,68,.1);    color: #ef4444; }
.stat-card.warning .stat-icon { background: rgba(245,158,11,.1);   color: #d97706; }
.stat-body    { position: relative; z-index: 1; min-width: 0; }
.stat-info    { position: relative; z-index: 1; min-width: 0; flex: 1; }
.stat-value   { font-size: 1.75rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 4px; }
.stat-label   { font-size: .75rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .08em; }
.stat-note    { font-size: .8125rem; color: var(--text-tertiary); margin-top: 2px; }
.stat-meta    { font-size: .8125rem; color: var(--text-tertiary); margin-top: 2px; }

/* =================================================== */
/*  DARK MODE OVERRIDES                                */
/* =================================================== */
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #080d18 100%);
    border-right-color: #1e293b;
}
[data-theme="dark"] .brand-name  { color: #f1f5f9; }
[data-theme="dark"] .nav-link    { color: rgba(255,255,255,.65); }
[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .nav-link.active { background: rgba(91,80,240,.2); color: #ada7f7; }
[data-theme="dark"] .nav-section-title { color: rgba(255,255,255,.35); }
[data-theme="dark"] .nav-submenu .nav-link { background: rgba(255,255,255,.04); }
[data-theme="dark"] .topbar {
    background: rgba(15,23,42,.95) !important;
    border-bottom-color: #1e293b !important;
}
[data-theme="dark"] .icon-btn    { background: rgba(255,255,255,.06); border-color: #1e293b; color: rgba(255,255,255,.7); }
[data-theme="dark"] .profile-btn { background: rgba(255,255,255,.06); border-color: #1e293b; }
[data-theme="dark"] .profile-dropdown,
[data-theme="dark"] .notif-dropdown,
[data-theme="dark"] .profile-lang-submenu {
    background: #1e293b; border-color: #334155;
}
[data-theme="dark"] .profile-link { color: rgba(255,255,255,.7); }
[data-theme="dark"] .profile-link:hover,
[data-theme="dark"] .profile-link.active { background: rgba(255,255,255,.08); color: #fff; }
[data-theme="dark"] .card { background: #1e293b; border-color: #334155; }

/* =================================================== */
/*  RESPONSIVE — MOBILE (<= 768px)                    */
/* =================================================== */
@media (max-width: 768px) {
    .mobile-header { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        top: 60px;
        z-index: 200;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar-overlay.active { display: block; }

    .topbar {
        left: 0;
        top: 60px;
        height: auto;
        padding: var(--space-3) var(--space-4) !important;
        flex-wrap: wrap;
    }

    .main-content {
        margin-left: 0;
        margin-top: 120px;
        padding: var(--space-4);
    }

    /* Dashboard mobile */
    body.dashboard-page {
        padding: 8px;
    }
    body.dashboard-page .app-shell {
        display: block;
        border-radius: 16px;
        min-height: auto;
    }
    /* top: 60px – pod fialovou mobilní lištou (z-index 300). Dřív top:0, takže horní
       část menu byla schovaná pod lištou s logem a hamburgerem. */
    body.dashboard-page .sidebar {
        position: fixed !important;
        transform: translateX(-100%);
        top: 60px !important; left: 0 !important; bottom: 0 !important;
        width: var(--sidebar-width) !important;
        height: calc(100% - 60px) !important;
        z-index: 200 !important;
        overflow-y: auto !important;
    }
    body.dashboard-page .sidebar.active {
        transform: translateX(0);
    }
    /* Na mobilu je topbar (hledání/ikony/profil) v normálním toku POD fixním mobile-header
       pruhem, ne přes něj – dřív oba měly position:fixed;top:0, takže se překrývaly a
       vykukující obsah topbaru vypadal „roztažený mimo obrazovku". */
    body.dashboard-page .topbar {
        position: relative !important;
        top: auto !important; left: auto !important; right: auto !important;
        margin-top: 60px;
        padding: var(--space-3) var(--space-4) !important;
        background: rgba(255,255,255,.95) !important;
        border-bottom: 1px solid var(--border-color) !important;
        backdrop-filter: blur(12px) !important;
        flex-wrap: wrap;
        row-gap: var(--space-2);
        z-index: auto !important;
    }
    body.dashboard-page .topbar-search-wrap { flex: 1 1 100%; order: 3; max-width: none; }
    /* Rozložení ikon/profilu/synchronizace na mobilu řeší inline <style> v includes/header.php
       (PHP stránka se nikdy nebere ze staré cache service workeru, style.css ano). */
    body.dashboard-page .profile-copy { display: none; }
    body.dashboard-page .main-content {
        margin-top: 0 !important;
        padding: var(--space-4) !important;
    }
    body.dashboard-page .mobile-header { display: flex !important; }
}

/* =================================================== */
/*  UTILITIES                                          */
/* =================================================== */
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-none    { display: none; }
.d-block   { display: block; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); } .mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.p-4  { padding: var(--space-4); } .p-6 { padding: var(--space-6); }
.text-sm  { font-size: .875rem; } .text-xs { font-size: .75rem; }
.text-lg  { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; } .font-black { font-weight: 900; }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.rounded    { border-radius: var(--rounded); }
.rounded-lg { border-radius: var(--rounded-lg); }
.rounded-xl { border-radius: var(--rounded-xl); }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   SJEDNOCENÉ ZÁLOŽKY — jednotný vzhled tabů napříč celou aplikací
   Vzor: stránka „Profil firmy" (.cp-tab) = klasické taby s orámováním aktivní.
   Přebíjí inline definice tabů v modulech:
     .ch-tab-pill (Chat, Firma, Recenze, Social, Emaily…),
     .tab (Smart Fox), .module-tab-link (FAQ widget).
   !important je nutné, protože původní pravidla jsou v inline <style> blocích.
   ⤺ Záloha „pilulkového" stylu je dole v zakomentovaném bloku.
   ═══════════════════════════════════════════════════════════════════════════ */
/* Výchozí: oddělovací proužek (taby bez navazující karty, Smart Fox .tabs, FAQ .module-tabs) */
.ch-tab-row, .tabs, .module-tabs {
    display: flex !important;
    gap: 6px !important;
    border: none !important;
    border-bottom: 2px solid var(--border-color, #e5e7eb) !important;
    margin: 0 0 1.5rem !important;
    flex-wrap: wrap !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
/* Taby, za kterými následuje obsah → tvoří HLAVIČKU bílé karty, aby taby nebyly
   samostatný plovoucí blok, ale součást stejné karty jako obsah pod nimi.
   Dva vzory:
     A) .ch-tab-row + .ch-tab-content > .ch-section-card  (Chat)
     B) .ch-tab-row + .ch-section-card                    (Writing, Korektury, Recenze, Social…) */
.ch-tab-row:has(+ .ch-tab-content),
.ch-tab-row:has(+ .ch-section-card) {
    background: var(--card-bg, #fff) !important;
    /* horizontální padding 24px = zarovnání tabů s obsahem karty (ch-section-card má padding:22px 24px) */
    padding: 22px 24px 0 !important;
    margin: 0 !important;
    border: 1px solid var(--border, #e5e7eb) !important;
    border-bottom: 2px solid var(--border-color, #e5e7eb) !important;
    /* rohy 28px = stejné zaoblení jako ch-section-card, aby karta navazovala */
    border-radius: 28px 28px 0 0 !important;
    box-shadow: none !important;
}
/* Obsahová karta hned pod taby splyne s hlavičkou (zruší horní okraj/zaoblení) */
.ch-tab-content.active > .ch-section-card:first-child,
.ch-tab-row + .ch-section-card {
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin-top: 0 !important;
}
.ch-tab-pill, .tabs .tab, .module-tab-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: auto !important;
    padding: .7rem 1.4rem !important;
    font-weight: 700 !important;
    font-size: .95rem !important;
    color: var(--text-secondary, #64748b) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    margin-bottom: -2px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
}
.ch-tab-pill:hover, .tabs .tab:hover, .module-tab-link:hover {
    color: var(--text-primary, #0f172a) !important;
    background: var(--bg-secondary, #f1f5f9) !important;
}
.ch-tab-pill.active, .tabs .tab.active, .module-tab-link.active {
    color: var(--text-primary, #0f172a) !important;
    background: var(--card-bg, #fff) !important;
    border: 1px solid var(--border-color, #e5e7eb) !important;
    border-bottom: 2px solid var(--card-bg, #fff) !important;
    box-shadow: none !important;
}

/* ─── ZÁLOHA: původní „pilulkový" styl tabů (odkomentuj pro návrat) ───────────
.ch-tab-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:1.5rem; border-bottom:none; }
.ch-tab-pill { display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px;
    border-radius:999px; font-size:13px; font-weight:700; color:var(--ink2); background:transparent;
    border:1px solid transparent; text-decoration:none; transition:all .18s; white-space:nowrap; margin-bottom:0; }
.ch-tab-pill:hover { background:rgba(91,80,240,.07); color:var(--accent); }
.ch-tab-pill.active { background:rgba(91,80,240,.10); color:var(--accent); border-color:rgba(91,80,240,.18); }
──────────────────────────────────────────────────────────────────────────── */