/* ===== Documents — dark theme ===== */
.doc-root {
    --bg:        #0a0b12;
    --bg2:       #10121c;
    --panel:     #141622;
    --panel2:    #191c2b;
    --border:    #242838;
    --accent:    #7c6cff;
    --accent-dim:rgba(124,108,255,.14);
    --text:      #e7e9f2;
    --muted:     #8b90a6;
    --pill-bg:   #1c2030;
    --pill-tx:   #b7b0ff;

    margin: -24px;                       /* bù padding 24px của .dashboard-content */
    min-height: calc(100vh - 60px);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
}

/* ---- HERO ---- */
.doc-hero {
    background:
        radial-gradient(1200px 300px at 20% -40%, rgba(124,108,255,.18), transparent 60%),
        linear-gradient(180deg, #131627 0%, #0a0b12 100%);
    border-bottom: 1px solid var(--border);
    padding: 40px 40px 34px;
}
.doc-hero-inner { max-width: 1180px; margin: 0 auto; }
.doc-hero-title { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: #fff; }
.doc-hero-lead { margin: 0 0 22px; color: var(--muted); max-width: 820px; }

.doc-navgrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.doc-navcard {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: border-color .15s, background .15s, transform .15s;
}
.doc-navcard:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }
.doc-navcard .material-icons { font-size: 26px; color: var(--accent); }
.doc-navcard .nc-title { font-weight: 700; margin-top: 8px; color: #fff; }
.doc-navcard .nc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---- LAYOUT ---- */
.doc-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 40px 80px;
    align-items: start;
}

/* ---- TOC ---- */
.doc-toc { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.toc-label { font-size: 11px; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding-left: 4px; margin-bottom: 2px; }
.toc-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color .15s, background .15s;
}
.toc-card:hover { border-color: #3a3f57; }
.toc-card.active { background: var(--accent-dim); border-color: var(--accent); box-shadow: 0 0 0 1px rgba(124,108,255,.25), 0 8px 24px rgba(124,108,255,.12); }
.toc-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.toc-card-head .material-icons { font-size: 18px; color: var(--accent); }
.toc-card-sub { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---- CONTENT ---- */
.doc-content { min-width: 0; }
.doc-section { scroll-margin-top: 20px; margin-bottom: 44px; }

.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sec-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent-dim);
    display: flex; align-items: center; justify-content: center;
}
.sec-icon .material-icons { font-size: 24px; color: var(--accent); }
.sec-head h2 { margin: 0; font-size: 26px; font-weight: 700; color: #fff; }
.sec-desc { color: var(--muted); max-width: 760px; margin: 0 0 18px; }

.sub-head { display: flex; align-items: center; gap: 10px; margin: 32px 0 10px; }
.sub-head .material-icons { color: var(--accent); font-size: 22px; }
.sub-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }

/* ---- cards ---- */
.doc-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    margin: 16px 0;
}
.card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.card-head > .material-icons {
    font-size: 22px; color: var(--accent);
    background: var(--accent-dim); border-radius: 9px; padding: 8px;
}
.card-title { font-weight: 700; color: #fff; font-size: 15px; }
.card-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }

.doc-content p { color: #c7cbdb; }
.doc-content strong { color: #eef0f8; }
.doc-content em { color: #d6d9e6; }

/* ---- list ---- */
.doc-list { margin: 14px 0 2px; padding: 0; list-style: none; }
.doc-list li {
    position: relative; padding: 7px 0 7px 20px;
    color: #c7cbdb; border-bottom: 1px solid rgba(255,255,255,.05);
}
.doc-list li:last-child { border-bottom: none; }
.doc-list li::before {
    content: ""; position: absolute; left: 3px; top: 15px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---- pills & inline code ---- */
.pill {
    display: inline-block;
    background: var(--pill-bg);
    color: var(--pill-tx);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 1px 8px;
    font-size: 12.5px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    white-space: nowrap;
}
.doc-content code {
    background: var(--pill-bg);
    color: var(--pill-tx);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 12.5px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* ---- callouts ---- */
.doc-callout {
    display: flex; gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid var(--border);
    color: #c7cbdb;
}
.doc-callout .material-icons { font-size: 20px; flex: 0 0 auto; margin-top: 1px; }
.doc-callout.tip  { background: rgba(43,122,201,.10); border-color: rgba(43,122,201,.35); }
.doc-callout.tip  .material-icons { color: #4aa3ff; }
.doc-callout.idea { background: rgba(217,154,19,.09); border-color: rgba(217,154,19,.32); }
.doc-callout.idea .material-icons { color: #f0b429; }

/* ---- code block ---- */
.code-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
    background: #0c0e17;
}
.code-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: #12141f;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
}
.code-head .material-icons { font-size: 15px; }
.code-block pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code-block code {
    background: none; color: #d7dbec; padding: 0;
    font-size: 12.5px; line-height: 1.65;
    font-family: "SF Mono", Menlo, Consolas, monospace; white-space: pre;
}

/* ---- metric grid ---- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px 0;
}
.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
}
.metric-card .mc-num {
    width: 24px; height: 24px; border-radius: 7px;
    background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.metric-card .mc-title { font-weight: 700; color: #fff; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.metric-card .mc-ic { font-size: 18px; color: var(--accent); }
.metric-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---- table ---- */
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: #c7cbdb; }
.doc-table thead th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.doc-table tbody tr:hover { background: rgba(255,255,255,.02); }
.doc-table td:first-child { color: #eef0f8; font-weight: 600; white-space: nowrap; }
.doc-table .auto { color: #54d18c; font-weight: 700; }
.doc-table .manual { color: #f0b429; font-weight: 700; }

/* ---- setup single column ---- */
.setup-body { max-width: 900px; margin: 0 auto; padding: 32px 40px 80px; }

/* ---- tabs (Unity / Cocos) ---- */
.seg-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin: 4px 0 14px;
}
.seg-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 16px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.seg-tab .material-icons { font-size: 17px; }
.seg-tab:hover { color: var(--text); }
.seg-tab.active { background: var(--accent); color: #fff; }

/* ---- steps rail ---- */
.step-badge {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}

/* ---- footer ---- */
.doc-footer {
    margin-top: 40px; padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center; color: var(--muted); font-size: 12.5px;
}

@media (max-width: 900px) {
    .doc-navgrid { grid-template-columns: repeat(2, 1fr); }
    .doc-layout { grid-template-columns: 1fr; }
    .doc-toc { position: static; }
    .metric-grid { grid-template-columns: 1fr; }
}
