/* Guias Mu Honor - Dark GitBook Theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0b0f13;
    color: #e2e8f0;
    min-height: 100vh;
}

a { color: #009ee3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px;
    min-width: 280px;
    background: #0e1318;
    border-right: 1px solid #1e2733;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.main {
    margin-left: 280px;
    flex: 1;
    padding: 48px 56px;
    max-width: calc(100% - 280px);
}

/* ── Sidebar header ── */
.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid #1e2733;
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: 0.02em;
}

.sidebar-logo i { color: #009ee3; font-size: 18px; }
.sidebar-logo:hover { text-decoration: none; color: #009ee3; }

/* ── Search ── */
.sidebar-search {
    padding: 12px 14px;
    border-bottom: 1px solid #1e2733;
    flex-shrink: 0;
}

.sidebar-search form { display: flex; gap: 6px; }

.sidebar-search input {
    flex: 1;
    padding: 7px 11px;
    background: #141c26;
    border: 1px solid #2d3748;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.sidebar-search input:focus { border-color: #009ee3; }
.sidebar-search input::placeholder { color: #4a5568; }

.sidebar-search button {
    padding: 7px 10px;
    background: #009ee3;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.sidebar-search button:hover { background: #007bb5; }

/* ── Nav categories ── */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0 20px; }

.category-group { margin-bottom: 4px; }

.category-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #4a5568;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    user-select: none;
}

.category-title:hover { color: #718096; background: #0e1318; }
.category-title.open  { color: #718096; }

.category-title .cat-icon    { font-size: 13px; }

.category-title .toggle-icon {
    margin-left: auto;
    font-size: 10px;
    color: #2d3748;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.category-title.open .toggle-icon { transform: rotate(90deg); }

.category-tutorials { display: none; }

.tutorial-link {
    display: block;
    padding: 6px 18px 6px 34px;
    color: #718096;
    font-size: 13.5px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.12s;
    line-height: 1.4;
}

.tutorial-link:hover {
    color: #cbd5e0;
    background: #141c26;
    text-decoration: none;
}

.tutorial-link.active {
    color: #009ee3;
    border-left-color: #009ee3;
    background: rgba(0, 158, 227, 0.07);
    font-weight: 500;
}

.sidebar-empty {
    padding: 30px 20px;
    color: #4a5568;
    font-size: 13px;
    text-align: center;
}

/* ── Main content ── */
.content-area { max-width: 780px; }

/* Welcome */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
}

.welcome-icon { font-size: 56px; color: #2d3748; margin-bottom: 24px; }
.welcome h1 { font-size: 28px; color: #e2e8f0; margin-bottom: 12px; font-weight: 700; }
.welcome p { color: #718096; font-size: 15px; line-height: 1.7; max-width: 460px; }

/* Tutorial header */
.tutorial-header { margin-bottom: 32px; }

.tutorial-breadcrumb {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.tutorial-breadcrumb span { color: #718096; }

.tutorial-title {
    font-size: 34px;
    font-weight: 700;
    color: #f7fafc;
    line-height: 1.25;
    margin-bottom: 14px;
}

.tutorial-meta {
    font-size: 13px;
    color: #4a5568;
    padding-top: 14px;
    border-top: 1px solid #1e2733;
}

.tutorial-cover {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #1e2733;
}

/* Tutorial body */
.tutorial-body {
    font-size: 16px;
    line-height: 1.8;
    color: #cbd5e0;
}

.tutorial-body h1,
.tutorial-body h2,
.tutorial-body h3,
.tutorial-body h4 { color: #f7fafc; margin: 32px 0 14px; font-weight: 600; }

.tutorial-body h1 { font-size: 28px; }
.tutorial-body h2 { font-size: 22px; border-bottom: 1px solid #1e2733; padding-bottom: 8px; }
.tutorial-body h3 { font-size: 18px; }
.tutorial-body h4 { font-size: 16px; }

.tutorial-body p { margin-bottom: 18px; }

.tutorial-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #1e2733;
}

.tutorial-body ul,
.tutorial-body ol { margin: 8px 0 18px 26px; }
.tutorial-body li { margin-bottom: 7px; }

.tutorial-body code {
    background: #141c26;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'Courier New', 'Cascadia Code', monospace;
    font-size: 14px;
    color: #f6ad55;
}

.tutorial-body pre {
    background: #0b1117;
    border: 1px solid #1e2733;
    padding: 18px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 14px;
}

.tutorial-body pre code { background: none; padding: 0; color: #e2e8f0; }

.tutorial-body blockquote {
    border-left: 4px solid #009ee3;
    background: rgba(0,158,227,0.07);
    padding: 14px 20px;
    margin: 18px 0;
    border-radius: 0 8px 8px 0;
    color: #a0aec0;
}

.tutorial-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.tutorial-body th {
    background: #141c26;
    padding: 10px 16px;
    text-align: left;
    color: #e2e8f0;
    font-weight: 600;
    border-bottom: 2px solid #2d3748;
}
.tutorial-body td {
    padding: 10px 16px;
    border-bottom: 1px solid #1e2733;
    color: #cbd5e0;
}
.tutorial-body tr:hover td { background: #0e1318; }

.tutorial-body a { color: #009ee3; }
.tutorial-body a:hover { text-decoration: underline; }

/* ── Search results ── */
.search-header { margin-bottom: 24px; }
.search-header h2 { font-size: 22px; color: #e2e8f0; font-weight: 600; }
.search-header p { color: #718096; font-size: 14px; margin-top: 4px; }

.result-card {
    background: #111720;
    border: 1px solid #1e2733;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 14px;
    transition: border-color 0.15s;
}

.result-card:hover { border-color: #2d4a6a; }
.result-cat { font-size: 11px; color: #4a5568; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.result-card h3 { font-size: 17px; margin-bottom: 8px; }
.result-card h3 a { color: #009ee3; }
.result-card h3 a:hover { text-decoration: underline; }
.result-card p { font-size: 14px; color: #718096; line-height: 1.6; }
.no-results { text-align: center; padding: 60px 20px; color: #4a5568; }
.no-results i { font-size: 40px; margin-bottom: 16px; }

/* ── Responsive ── */
.menu-toggle {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: #009ee3;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

@media (max-width: 820px) {
    .menu-toggle { display: block; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open { transform: translateX(0); }

    .main {
        margin-left: 0;
        max-width: 100%;
        padding: 56px 22px 30px;
    }
}

/* ── Admin ── */
.admin-body {
    background: #0b0f13;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
}

.admin-nav {
    background: #0e1318;
    border-bottom: 1px solid #1e2733;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.admin-nav-brand {
    font-weight: 700;
    font-size: 16px;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav-brand i { color: #009ee3; }

.admin-nav-links { display: flex; gap: 8px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary { background: #009ee3; color: white; }
.btn-primary:hover { background: #007bb5; color: white; text-decoration: none; }
.btn-secondary { background: #1e2733; color: #a0aec0; }
.btn-secondary:hover { background: #2d3748; color: #e2e8f0; text-decoration: none; }
.btn-danger { background: #c53030; color: white; }
.btn-danger:hover { background: #9b2c2c; color: white; text-decoration: none; }
.btn-warning { background: #b7791f; color: white; }
.btn-warning:hover { background: #975a16; color: white; text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-success { background: #276749; color: white; }
.btn-success:hover { background: #22543d; color: white; text-decoration: none; }

.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

.admin-section { margin-bottom: 36px; }

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e2733;
}

.admin-section-title { font-size: 16px; font-weight: 600; color: #e2e8f0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
    background: #0e1318;
    color: #718096;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #1e2733;
}

.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #141c26;
    color: #cbd5e0;
    vertical-align: middle;
}

.admin-table tr:hover td { background: #0e1318; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-green { background: rgba(72,187,120,0.15); color: #68d391; }
.badge-gray  { background: rgba(160,174,192,0.1); color: #718096; }

.admin-empty {
    text-align: center;
    padding: 40px;
    color: #4a5568;
    font-size: 14px;
}

/* Login form */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0f13;
}

.login-card {
    background: #111720;
    border: 1px solid #1e2733;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.login-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #f7fafc;
    text-align: center;
}

.login-card p {
    color: #4a5568;
    font-size: 14px;
    text-align: center;
    margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }

label {
    display: block;
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    background: #0b0f13;
    border: 1px solid #2d3748;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus { border-color: #009ee3; }
input::placeholder { color: #4a5568; }

.alert {
    padding: 11px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error { background: rgba(197,48,48,0.15); border: 1px solid #c53030; color: #fc8181; }
.alert-success { background: rgba(39,103,73,0.2); border: 1px solid #276749; color: #68d391; }
.alert-warning { background: rgba(183,121,31,0.15); border: 1px solid #b7791f; color: #f6ad55; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 16px; }

.form-hint { font-size: 12px; color: #4a5568; margin-top: 4px; }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: auto; }
.form-check label { margin: 0; }

.admin-form-card {
    background: #111720;
    border: 1px solid #1e2733;
    border-radius: 10px;
    padding: 28px;
}

.admin-form-title {
    font-size: 20px;
    font-weight: 700;
    color: #f7fafc;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1e2733;
}

.confirm-card {
    background: #111720;
    border: 1px solid #c53030;
    border-radius: 10px;
    padding: 32px;
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
}

.confirm-card h2 { color: #fc8181; margin-bottom: 12px; font-size: 20px; }
.confirm-card p { color: #a0aec0; margin-bottom: 24px; font-size: 14px; line-height: 1.7; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
