/* ================================================================
   LILI PŘÍMĚSTO — WIKI / MANUÁL
   Sdílené styly pro všechny stránky
   ================================================================ */

:root {
    --sidebar-w: 280px;
    --topbar-h: 56px;
    --content-max: 880px;
    --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe;
    --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8; --blue-800: #1e40af;
    --green-50: #f0fdf4; --green-100: #dcfce7; --green-500: #22c55e; --green-600: #16a34a; --green-700: #15803d;
    --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-500: #f59e0b; --amber-600: #d97706; --amber-700: #b45309;
    --purple-50: #faf5ff; --purple-100: #f3e8ff; --purple-500: #a855f7; --purple-600: #9333ea;
    --rose-50: #fff1f2; --rose-100: #ffe4e6; --rose-500: #f43f5e;
    --cyan-50: #ecfeff; --cyan-100: #cffafe; --cyan-500: #06b6d4;
    --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0; --gray-300: #cbd5e1;
    --gray-400: #94a3b8; --gray-500: #64748b; --gray-600: #475569; --gray-700: #334155;
    --gray-800: #1e293b; --gray-900: #0f172a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--gray-50);
}

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

/* ── SIDEBAR ── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--gray-900);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .25s ease;
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.sidebar-logo:hover { text-decoration: none; }

.logo-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: #fff;
    font-weight: 800; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}

.logo-title { font-weight: 700; font-size: 15px; }
.logo-subtitle { font-size: 11px; color: var(--gray-400); }

.sidebar-close {
    display: none;
    background: none; border: none;
    color: var(--gray-400); cursor: pointer; padding: 4px;
}

/* Search */
.sidebar-search { padding: 12px 16px; position: relative; }

.sidebar-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}

.sidebar-search input::placeholder { color: var(--gray-500); }
.sidebar-search input:focus { border-color: var(--blue-500); background: rgba(255,255,255,.1); }

.search-icon {
    position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
    color: var(--gray-500); pointer-events: none;
}

.search-kbd {
    position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
    font-size: 10px; padding: 2px 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    color: var(--gray-500);
    font-family: inherit;
    pointer-events: none;
}

/* Search results */
.search-results { padding: 0 16px 8px; max-height: 300px; overflow-y: auto; }
.search-results.hidden { display: none; }

.search-result-item {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--gray-300);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.search-result-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }

.search-result-item .result-section {
    font-size: 10px;
    color: var(--blue-500);
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 1px;
}

.search-no-results { padding: 12px; color: var(--gray-500); font-size: 13px; text-align: center; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section { padding: 4px 0; }

.nav-section-title {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--gray-500); padding: 10px 20px 4px;
}

.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 20px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 13.5px; font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .15s;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,.04); text-decoration: none; }
.nav-link.active { color: #fff; background: rgba(59,130,246,.12); border-left-color: var(--blue-500); }
.nav-link svg { flex-shrink: 0; opacity: .7; }
.nav-link.active svg { opacity: 1; }

.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-footer-text { font-size: 12px; font-weight: 600; color: var(--gray-400); }
.sidebar-footer-sub { font-size: 11px; color: var(--gray-600); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; }

/* ── MAIN CONTENT ── */
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; }

.topbar {
    position: sticky; top: 0;
    height: var(--topbar-h);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center;
    padding: 0 24px; gap: 16px; z-index: 50;
}

.hamburger { display: none; background: none; border: none; color: var(--gray-600); cursor: pointer; padding: 4px; }

.topbar-breadcrumb {
    font-size: 14px; font-weight: 600; color: var(--gray-700); flex: 1;
    display: flex; align-items: center; gap: 6px;
}

.topbar-breadcrumb a { color: var(--gray-400); text-decoration: none; font-weight: 500; }
.topbar-breadcrumb a:hover { color: var(--gray-600); }
.topbar-breadcrumb .sep { color: var(--gray-300); }

.topbar-link { font-size: 13px; color: var(--blue-600); text-decoration: none; font-weight: 500; }
.topbar-link:hover { text-decoration: underline; }

.content-wrapper { max-width: var(--content-max); margin: 0 auto; padding: 32px 32px 60px; }

/* ── TYPOGRAPHY ── */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 30px; font-weight: 800; color: var(--gray-900); letter-spacing: -.3px; margin-bottom: 8px; }
.page-header .subtitle { font-size: 16px; color: var(--gray-500); line-height: 1.6; }

h2 {
    font-size: 21px; font-weight: 700; color: var(--gray-800);
    margin-top: 36px; margin-bottom: 14px;
    padding-bottom: 8px; border-bottom: 2px solid var(--gray-100);
}

h3 { font-size: 17px; font-weight: 700; color: var(--gray-700); margin-top: 28px; margin-bottom: 10px; }
h4 { font-size: 15px; font-weight: 700; color: var(--gray-700); margin-top: 20px; margin-bottom: 6px; }

p { margin-bottom: 14px; line-height: 1.75; }

code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.88em; padding: 2px 7px;
    background: var(--gray-100); border: 1px solid var(--gray-200);
    border-radius: 4px; color: var(--gray-800);
}

strong { font-weight: 600; }

/* ── HERO (index only) ── */
.hero-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 44px 40px 40px; margin-bottom: 32px; color: #fff;
}

.hero-badge {
    display: inline-block; padding: 3px 12px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px; font-size: 12px; font-weight: 600;
    margin-bottom: 16px; letter-spacing: .5px;
}

.hero-card h1 { font-size: 34px; font-weight: 800; color: #fff; margin-bottom: 14px; }

.text-gradient {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-desc { font-size: 16px; color: rgba(255,255,255,.6); margin-bottom: 32px; max-width: 560px; line-height: 1.7; }

.hero-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.hero-card-item {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 18px;
    text-decoration: none; color: #fff;
    transition: all .2s;
}

.hero-card-item:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    transform: translateY(-2px);
    text-decoration: none;
}

.hero-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.hero-card-icon.blue { background: rgba(59,130,246,.2); color: #60a5fa; }
.hero-card-icon.green { background: rgba(34,197,94,.2); color: #4ade80; }
.hero-card-icon.purple { background: rgba(168,85,247,.2); color: #c084fc; }
.hero-card-icon.amber { background: rgba(245,158,11,.2); color: #fbbf24; }
.hero-card-icon.rose { background: rgba(244,63,94,.2); color: #fb7185; }
.hero-card-icon.cyan { background: rgba(6,182,212,.2); color: #22d3ee; }

.hero-card-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.hero-card-desc { font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.4; }

/* ── INFO BOXES ── */
.info-box {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 18px; border-radius: var(--radius);
    margin: 16px 0; font-size: 14px; line-height: 1.65;
}

.info-box.blue { background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-800); }
.info-box.green { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-700); }
.info-box.amber { background: var(--amber-50); border: 1px solid var(--amber-100); color: var(--amber-700); }
.info-box.red { background: var(--rose-50); border: 1px solid var(--rose-100); color: #be123c; }
.info-box.purple { background: var(--purple-50); border: 1px solid var(--purple-100); color: #7c3aed; }

.info-box-icon { flex-shrink: 0; margin-top: 1px; }

.info-box p { margin: 0; }
.info-box p + p { margin-top: 6px; }

.info-box kbd {
    font-family: inherit; font-size: 11px; padding: 2px 6px;
    background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.1); border-radius: 4px;
}

/* ── FEATURE GRID ── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 28px; }

.feature-item {
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: 10px; padding: 22px;
    transition: border-color .2s, box-shadow .2s;
}

.feature-item:hover { border-color: var(--blue-500); box-shadow: var(--shadow-md); }
.feature-item.compact { padding: 16px 18px; }

.feature-item a.feature-link {
    text-decoration: none; color: inherit; display: block;
}

.feature-item a.feature-link:hover { text-decoration: none; }

.feature-icon {
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}

.blue-bg { background: var(--blue-50); color: var(--blue-600); }
.green-bg { background: var(--green-50); color: var(--green-600); }
.purple-bg { background: var(--purple-50); color: var(--purple-600); }
.amber-bg { background: var(--amber-50); color: var(--amber-600); }
.rose-bg { background: var(--rose-50); color: var(--rose-500); }
.cyan-bg { background: var(--cyan-50); color: var(--cyan-500); }

.feature-item h4 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin: 0 0 4px; }
.feature-item p { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5; }

/* ── TABLES ── */
.table-wrapper {
    overflow-x: auto; margin: 14px 0 22px;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
    text-align: left; font-weight: 600; color: var(--gray-600);
    background: var(--gray-50); padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200); font-size: 13px;
}

td { padding: 10px 16px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
tr:last-child td { border-bottom: none; }
td.center { text-align: center; }

/* ── LISTS ── */
.styled-list { padding-left: 24px; margin: 10px 0 18px; }
.styled-list li { padding: 4px 0; font-size: 14px; color: var(--gray-700); line-height: 1.65; }
.styled-list li strong { color: var(--gray-800); }

.step-list { list-style: none; padding: 0; counter-reset: steps; margin: 10px 0 24px; }

.step-list > li {
    counter-increment: steps;
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--gray-100);
    font-size: 14px; line-height: 1.65;
}

.step-list > li:last-child { border-bottom: none; }

.step-list > li::before {
    content: counter(steps);
    display: flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue-50); color: var(--blue-600);
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}

.step-list li .styled-list { margin-top: 8px; }

/* ── BADGES ── */
.badge {
    display: inline-block; padding: 2px 10px;
    border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap;
}

.badge.green { background: var(--green-100); color: var(--green-700); }
.badge.amber { background: var(--amber-100); color: var(--amber-700); }
.badge.red { background: var(--rose-100); color: #be123c; }
.badge.blue { background: var(--blue-100); color: var(--blue-700); }
.badge.gray { background: var(--gray-200); color: var(--gray-600); }
.badge.purple { background: var(--purple-100); color: #7c3aed; }

/* ── STATUS LIST ── */
.status-list { margin: 14px 0 22px; }

.status-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 0; font-size: 14px; color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100); line-height: 1.5;
}

.status-item:last-child { border-bottom: none; }

/* ── CARD GRID ── */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0 22px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

.mini-card {
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 16px 18px;
    transition: border-color .2s;
}

.mini-card:hover { border-color: var(--blue-200); }

.mini-card h4 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin: 0 0 4px; }
.mini-card p { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5; }

.mini-card a { text-decoration: none; color: inherit; display: block; }
.mini-card a:hover { text-decoration: none; }

/* ── TABS PREVIEW ── */
.tabs-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 22px; }

.tab-badge {
    padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
    background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
}

.tab-badge.active { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }

/* ── FAQ ── */
.faq-list { margin: 10px 0; }

.faq-item {
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    margin-bottom: 8px; background: #fff; overflow: hidden;
}

.faq-item summary {
    padding: 14px 18px; font-weight: 600; font-size: 14px; color: var(--gray-800);
    cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 10px;
    transition: background .15s;
}

.faq-item summary:hover { background: var(--gray-50); }

.faq-item summary::before {
    content: "+";
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--blue-50); color: var(--blue-600);
    font-size: 16px; font-weight: 700; flex-shrink: 0;
}

.faq-item[open] summary::before { content: "\2212"; background: var(--blue-600); color: #fff; }

.faq-item .faq-content { padding: 0 18px 16px 50px; font-size: 14px; color: var(--gray-600); line-height: 1.7; }
.faq-item .faq-content p { margin-bottom: 8px; }
.faq-item .faq-content p:last-child { margin-bottom: 0; }

/* ── CROSSLINKS ── */
.crosslinks {
    margin-top: 40px; padding-top: 24px;
    border-top: 2px solid var(--gray-100);
}

.crosslinks h3 { margin-top: 0; color: var(--gray-500); font-size: 13px; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }

.crosslink-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.crosslink-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none; color: var(--gray-700);
    font-size: 14px; font-weight: 500;
    transition: all .15s;
}

.crosslink-item:hover { border-color: var(--blue-300); background: var(--blue-50); color: var(--blue-700); text-decoration: none; }

.crosslink-item svg { flex-shrink: 0; color: var(--gray-400); }
.crosslink-item:hover svg { color: var(--blue-500); }

/* ── FOOTER ── */
.doc-footer { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--gray-200); }

.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; color: var(--gray-600);
}

.footer-muted { color: var(--gray-400); font-size: 12px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--blue-600); text-decoration: none; font-size: 13px; }

/* ── SCREENSHOT PLACEHOLDER ── */
.screenshot-placeholder {
    background: var(--gray-100); border: 2px dashed var(--gray-300);
    border-radius: var(--radius); padding: 32px;
    text-align: center; color: var(--gray-400);
    font-size: 13px; margin: 16px 0 20px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-cards { grid-template-columns: repeat(2, 1fr); }
    .card-grid.three, .card-grid.four { grid-template-columns: repeat(2, 1fr); }
    .crosslink-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-close { display: block; }
    .main-content { margin-left: 0; }
    .hamburger { display: block; }
    .content-wrapper { padding: 20px 16px 40px; }
    .hero-card { padding: 28px 24px 24px; }
    .hero-card h1 { font-size: 24px; }
    .hero-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .feature-grid { grid-template-columns: 1fr; }
    .card-grid, .card-grid.three, .card-grid.four { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 24px; }
    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .hero-cards { grid-template-columns: 1fr; }
}
