:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --panel: #ffffff;
    --accent: #f59e0b;
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--soft);
    color: var(--ink);
    font-family: "Poppins", system-ui, sans-serif;
}

a {
    text-decoration: none;
}

.simple-navbar {
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
    backdrop-filter: blur(16px);
}

.navbar-brand small,
.admin-brand small {
    color: var(--muted);
    display: block;
    font-size: .68rem;
    line-height: 1;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    border-radius: 16px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    letter-spacing: -.05em;
    width: 46px;
}

.hero-section {
    background:
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, .18), transparent 32%),
        linear-gradient(135deg, #eef6ff 0%, #ffffff 52%, #fff7ed 100%);
    padding: 92px 0 64px;
}

.eyebrow,
.section-label {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-section h1 {
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: .98;
    margin: 18px 0;
}

.hero-section .lead {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 700px;
}

.hero-search {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
    display: flex;
    gap: 12px;
    margin: 32px 0 18px;
    max-width: 720px;
    padding: 10px 12px 10px 20px;
    position: relative;
}

.hero-search input {
    border: 0;
    flex: 1;
    min-width: 0;
    outline: none;
}

.hero-search button {
    background: var(--primary);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    padding: 11px 24px;
}

.search-suggestions {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .16);
    display: none;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 30;
}

.search-suggestions.show {
    display: block;
}

.search-suggestions a,
.empty-suggestion {
    color: var(--ink);
    display: block;
    padding: 14px 18px;
}

.search-suggestions small {
    color: var(--muted);
    display: block;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-card,
.intro-panel,
.doc-content,
.doc-sidebar,
.auth-panel,
.admin-card {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: var(--radius);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.hero-card {
    padding: 24px;
    transform: rotate(1deg);
}

.hero-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.hero-card-header span {
    background: #cbd5e1;
    border-radius: 50%;
    height: 12px;
    width: 12px;
}

.doc-preview {
    align-items: center;
    background: #f8fafc;
    border-radius: 20px;
    display: flex;
    gap: 18px;
    padding: 20px;
}

.doc-icon {
    align-items: center;
    background: var(--primary);
    border-radius: 18px;
    color: #fff;
    display: flex;
    font-size: 2rem;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 18px;
}

.metric-grid div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.metric-grid strong {
    display: block;
    font-size: 1.5rem;
}

.metric-grid small,
.tutorial-meta,
.tutorial-footer,
.popular-card small,
.doc-sidebar li {
    color: var(--muted);
}

.section-pad {
    padding: 64px 0;
}

.intro-panel {
    display: grid;
    gap: 32px;
    grid-template-columns: .8fr 1.2fr;
    padding: 36px;
}

.intro-panel h2,
.section-heading h2 {
    font-weight: 800;
    letter-spacing: -.04em;
}

.section-heading {
    align-items: end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.category-grid,
.tutorial-grid {
    display: grid;
    gap: 18px;
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--ink);
    padding: 20px;
    transition: .2s ease;
}

.category-card:hover,
.category-card.active,
.tutorial-card:hover {
    border-color: rgba(37, 99, 235, .35);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
    transform: translateY(-3px);
}

.category-card span {
    align-items: center;
    border-radius: 14px;
    display: flex;
    font-size: 1.4rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 16px;
    width: 48px;
}

.category-card strong,
.category-card small {
    display: block;
}

.filter-pills {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
}

.filter-pills a {
    border-radius: 999px;
    color: var(--muted);
    display: inline-block;
    font-weight: 700;
    padding: 8px 16px;
}

.filter-pills .active {
    background: var(--primary);
    color: #fff;
}

.tutorial-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tutorial-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tutorial-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    transition: .2s ease;
}

.tutorial-thumb {
    align-items: center;
    background: linear-gradient(135deg, #dbeafe, #f8fafc);
    color: var(--primary);
    display: flex;
    height: 170px;
    justify-content: center;
    position: relative;
}

.tutorial-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.tutorial-thumb span {
    font-size: 3.2rem;
}

.tutorial-thumb em,
.doc-type {
    border-radius: 999px;
    font-size: .72rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 7px 12px;
    position: absolute;
    right: 14px;
    top: 14px;
}

.badge-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.badge-video {
    background: #dcfce7;
    color: #16a34a;
}

.tutorial-body {
    padding: 20px;
}

.tutorial-meta,
.tutorial-footer {
    align-items: center;
    display: flex;
    font-size: .84rem;
    gap: 14px;
    justify-content: space-between;
}

.tutorial-card h3 {
    font-size: 1.12rem;
    font-weight: 800;
    margin: 14px 0 8px;
}

.tutorial-card h3 a {
    color: var(--ink);
}

.tutorial-card p {
    color: var(--muted);
    min-height: 52px;
}

.tutorial-footer a {
    color: var(--primary);
    font-weight: 800;
}

.popular-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    display: flex;
    gap: 14px;
    padding: 16px;
}

.popular-card span {
    align-items: center;
    background: #fff7ed;
    border-radius: 14px;
    color: var(--accent);
    display: flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.site-footer {
    background: var(--ink);
    color: #fff;
    margin-top: 60px;
    padding: 42px 0;
}

.site-footer p,
.site-footer small {
    color: #cbd5e1;
}

.tutorial-detail {
    padding: 48px 0 80px;
}

.breadcrumb-wrap {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.breadcrumb-wrap a {
    color: var(--primary);
    font-weight: 700;
}

.doc-sidebar {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.doc-sidebar ul {
    list-style: none;
    margin: 18px 0;
    padding: 0;
}

.doc-sidebar li {
    margin-bottom: 12px;
}

.doc-content {
    padding: clamp(24px, 5vw, 48px);
    position: relative;
}

.doc-content .doc-type {
    position: static;
}

.doc-content h1 {
    font-size: clamp(2rem, 5vw, 3.7rem);
    font-weight: 800;
    letter-spacing: -.06em;
    margin: 20px 0;
}

.content-box {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 20px;
    margin: 24px 0;
    padding: 22px;
}

.rich-content :last-child {
    margin-bottom: 0;
}

.rich-content a {
    color: var(--primary);
    font-weight: 700;
}

.feedback-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 24px;
    padding: 24px;
}

.feedback-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.feedback-card p {
    color: var(--muted);
    margin: 0;
}

.viewer-card iframe {
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 20px;
    height: 720px;
    width: 100%;
}

.video-wrapper {
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 22px;
    overflow: hidden;
}

.video-wrapper iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.related-section {
    margin-top: 36px;
}

.related-section h3 {
    font-weight: 800;
    margin-bottom: 18px;
}

.empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    color: var(--muted);
    padding: 36px;
    text-align: center;
}

.empty-state i {
    color: var(--primary);
    font-size: 2.4rem;
}

.auth-body {
    align-items: center;
    background: linear-gradient(135deg, #eff6ff, #fff7ed);
    display: flex;
    min-height: 100vh;
}

.auth-card {
    margin: auto;
    max-width: 460px;
    padding: 24px;
    width: 100%;
}

.auth-panel {
    padding: 34px;
}

.auth-panel h1 {
    font-weight: 800;
    text-align: center;
}

.admin-body {
    background: #f1f5f9;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #0f172a;
    color: #fff;
    padding: 24px;
}

.admin-brand {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.admin-sidebar nav a {
    border-radius: 16px;
    color: #cbd5e1;
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 13px 14px;
}

.admin-sidebar nav a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-main {
    padding: 28px;
}

.admin-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    font-weight: 800;
    margin: 0;
}

.admin-topbar p {
    color: var(--muted);
    margin: 0;
}

.admin-card {
    padding: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
}

.upload-preview {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: var(--muted);
    display: flex;
    height: 150px;
    justify-content: center;
    overflow: hidden;
}

.upload-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ck-editor__editable {
    min-height: 260px;
}

@media (max-width: 992px) {
    .intro-panel,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .section-heading,
    .admin-topbar,
    .feedback-card {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero-search {
        border-radius: 24px;
        flex-wrap: wrap;
    }

    .hero-search button {
        width: 100%;
    }
}
