:root {
    --brand: #24a8b4;
    --brand-dark: #006c88;
    --brand-light: #e8f6f8;
    --text: #444;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f4f7f9;
}

/* ── Layout ─────────────────────────────────────── */
body {
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.page-body { display: flex; flex: 1; overflow: hidden; }
.page-main  { flex: 1; min-width: 0; overflow-y: auto; padding: 2rem; }

/* ── Navbar ──────────────────────────────────────── */
.docs-navbar {
    background: var(--brand);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    flex-shrink: 0;
}
.docs-navbar .navbar-brand img { }
.docs-navbar .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem !important;
    border-radius: 50px;
    transition: background 0.15s, color 0.15s;
}
.docs-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.15); }
.docs-navbar .navbar-toggler-icon { }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}
.sidebar-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    color: #9ca3af;
    padding: 1rem 1rem 0.4rem;
}
.sidebar-divider { border-color: var(--border); margin: 0 0 0.25rem; }

.sidebar-item {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 1rem !important;
    border: none !important;
    border-top: 1px solid #f3f4f6 !important;
    border-radius: 0 !important;
    color: var(--text-dark);
    background: #fafafa;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.sidebar-item:hover { background: #f0fafb !important; color: var(--brand-dark); }
.sidebar-item.active { background: var(--brand-light) !important; color: var(--brand-dark) !important; }
.sidebar-icon { width: 1rem; text-align: center; color: var(--text-muted); }
.sidebar-item.active .sidebar-icon,
.sidebar-item:hover .sidebar-icon { color: var(--brand); }
.sidebar-chevron { font-size: 0.6rem; color: #d1d5db; }

.sidebar-subitem {
    font-size: 0.825rem;
    padding: 0.4rem 1rem 0.4rem 2.6rem !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--text-muted);
    background: #fff;
    position: relative;
    transition: background 0.12s, color 0.12s;
}
.sidebar-subitem::before {
    content: '·';
    position: absolute;
    left: 1.8rem;
    color: #d1d5db;
    font-size: 1.1rem;
    line-height: 1.4;
}
.sidebar-subitem:hover { background: #f4f7f9 !important; color: var(--text-dark); }
.sidebar-subitem:hover::before { color: var(--brand); }
.sidebar-subitem.active {
    color: var(--brand-dark) !important;
    font-weight: 500;
    background: #fff !important;
    border-left: 3px solid var(--brand) !important;
    padding-left: calc(2.6rem - 3px) !important;
}
.sidebar-subitem.active::before { color: var(--brand); }

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb { background: transparent; padding: 0; margin-bottom: 1.5rem; font-size: 0.8rem; }
.breadcrumb-item a { color: var(--brand); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--brand-dark); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: #d1d5db; }

/* ── Home cards ──────────────────────────────────── */
.home-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none !important;
}
.home-card:hover {
    box-shadow: 0 6px 28px rgba(0,108,136,.15);
    transform: translateY(-2px);
}
.home-card .card-body { padding: 2rem 1.5rem; text-align: center; }
.home-card .card-title { color: var(--text-dark); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.4rem; }
.home-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.home-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--brand-dark);
    margin: 0 auto 1.25rem;
}

/* ── Section cards ───────────────────────────────── */
.cabinet-card {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    border: none;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}
.cabinet-card:hover {
    box-shadow: 0 6px 24px rgba(0,108,136,.13);
    transform: translateY(-2px);
}
.cabinet-card .card-title { color: var(--text-dark); font-weight: 600; }
.text-brand { color: var(--brand) !important; }

/* ── Docs content ────────────────────────────────── */
.docs-content {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    padding: 2.25rem 2.5rem;
}
.docs-content h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-dark); }
.docs-content h2 {
    font-size: 1.3rem; font-weight: 700;
    margin-top: 2rem; margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-light);
    color: var(--brand-dark);
}
.docs-content h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.docs-content img { max-width: 100%; border-radius: 10px; margin: 1rem 0; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.docs-content pre { background: #f4f7f9; border-radius: 10px; padding: 1.1rem; overflow-x: auto; font-size: 0.875rem; }
.docs-content code:not(pre code) { background: var(--brand-light); padding: 0.15em 0.45em; border-radius: 4px; font-size: 0.875em; color: var(--brand-dark); }
.docs-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.docs-content table th, .docs-content table td { padding: 0.6rem 0.85rem; border: 1px solid var(--border); }
.docs-content table thead th { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.docs-content blockquote {
    border-left: 3px solid var(--brand);
    padding: 0.6rem 1rem;
    background: var(--brand-light);
    border-radius: 0 10px 10px 0;
    color: var(--brand-dark);
    font-style: italic;
    margin: 1.25rem 0;
}
.docs-content a { color: var(--brand); }
.docs-content a:hover { color: var(--brand-dark); }

/* ── List group ──────────────────────────────────── */
.list-group-item-action { color: var(--text); border-color: var(--border); }
.list-group-item-action:hover { background: var(--brand-light); color: var(--brand-dark); }

/* ── Footer ──────────────────────────────────────── */
footer {
    background: #0d1f28;
    color: #c8d8e0;
    flex-shrink: 0;
    padding: 0.85rem 0;
}
footer small { color: #8ecfdc; }
.footer-link { font-size: 0.8rem; color: #8ecfdc; text-decoration: none; }
.footer-link:hover { color: #fff; }
