/* MoneyMate — CodeCanyon documentation stylesheet */

:root {
    --ink: #0b1020;
    --ink-soft: #5c6475;
    --ink-faint: #8a92a3;
    --bg: #f7f8f3;
    --surface: #ffffff;
    --border: rgba(11, 16, 32, 0.10);
    --accent: #10B981;
    --accent-deep: #047857;
    --accent-soft: #e6f7f0;
    --sidebar-bg: #0b1020;
    --sidebar-text: rgba(255, 255, 255, 0.72);
    --sidebar-text-active: #ffffff;
    --sidebar-active-bg: rgba(16, 185, 129, 0.18);
    --code-bg: #0f1420;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(11, 16, 32, 0.04), 0 12px 32px -16px rgba(11, 16, 32, 0.18);
    --shadow-lift: 0 2px 4px rgba(11, 16, 32, 0.05), 0 18px 40px -18px rgba(11, 16, 32, 0.24);
    --max-width: 980px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.docs-shell {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 272px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    padding: 28px 0 40px;
    flex-shrink: 0;
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 24px;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.docs-brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.docs-nav-group {
    padding: 4px 0 14px;
}

.docs-nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 24px 6px;
}

.docs-nav-group a {
    display: block;
    padding: 8px 24px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.docs-nav-group a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.docs-nav-group a.is-active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active-bg);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* ---------- Main content ---------- */

.docs-main {
    margin-left: 272px;
    flex: 1;
    min-width: 0;
    padding: 48px 56px 100px;
}

.docs-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.docs-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-deep);
    margin: 0 0 8px;
}

.docs-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    line-height: 1.15;
}

.docs-lede {
    font-size: 1.125rem;
    color: var(--ink-soft);
    max-width: 720px;
    line-height: 1.6;
    margin: 0 0 36px;
}

.docs-section {
    margin: 56px 0;
    scroll-margin-top: 24px;
}

.docs-section:first-of-type { margin-top: 0; }

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-section h2:first-child { border-top: none; padding-top: 0; }

.docs-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 28px 0 10px;
}

.docs-section p {
    line-height: 1.7;
    color: var(--ink);
}

.docs-section p.muted, .docs-muted {
    color: var(--ink-soft);
}

.docs-section ul, .docs-section ol {
    line-height: 1.8;
    padding-left: 22px;
}

.docs-section li { margin-bottom: 4px; }

.docs-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.docs-badge--admin { background: #fce7f3; color: #9d174d; border-color: rgba(157, 23, 77, 0.14); }
.docs-badge--user { background: #e0f2fe; color: #0369a1; border-color: rgba(3, 105, 161, 0.14); }
.docs-badge--public { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(4, 120, 87, 0.14); }
.docs-badge--plan { background: #fef6e7; color: #92400e; border-color: rgba(146, 64, 14, 0.14); }

.docs-shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin: 18px 0 8px;
}

.docs-shot-caption {
    font-size: 0.8125rem;
    color: var(--ink-faint);
    margin: 0 0 4px;
}

.docs-callout {
    background: var(--accent-soft);
    border: 1px solid rgba(4, 120, 87, 0.14);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
}

.docs-callout--warn {
    background: #fef6e7;
    border-color: rgba(146, 64, 14, 0.14);
}
.docs-callout--warn .docs-callout-title { color: #92400e; }

.docs-callout--info {
    background: #e0f2fe;
    border-color: rgba(3, 105, 161, 0.14);
}
.docs-callout--info .docs-callout-title { color: #0369a1; }

.docs-callout--danger {
    background: #fee2e2;
    border-color: rgba(153, 27, 27, 0.14);
}
.docs-callout--danger .docs-callout-title { color: #991b1b; }

.docs-callout p:last-child { margin-bottom: 0; }

.docs-callout-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent-deep);
    margin-bottom: 4px;
    display: block;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.docs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.docs-card:hover {
    box-shadow: var(--shadow-lift);
    border-color: rgba(11, 16, 32, 0.16);
    transform: translateY(-1px);
}

.docs-card h4 {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-card p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.docs-table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

table.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.875rem;
    background: var(--surface);
}

.docs-table th, .docs-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}

.docs-table thead th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    background: var(--bg);
    font-weight: 700;
}

.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table tbody tr:hover td { background: rgba(16, 185, 129, 0.035); }

code, .docs-code-inline {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: rgba(11, 16, 32, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
}

pre.docs-code {
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.65;
    box-shadow: var(--shadow);
}

.docs-toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.docs-toc-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    font-weight: 700;
    margin-bottom: 10px;
}

.docs-toc ul {
    columns: 2;
    margin: 0;
    padding-left: 18px;
}

.docs-toc a { font-size: 0.875rem; }

.docs-footer-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.9375rem;
}

.docs-footer-nav a {
    font-weight: 600;
}

.docs-step-list {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.docs-step-list > li {
    counter-increment: step;
    position: relative;
    padding-left: 42px;
    margin-bottom: 22px;
}

.docs-step-list > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.12);
}

.docs-step-list h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.docs-step-list p { margin: 0; color: var(--ink-soft); }

.docs-kbd {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 0.8em;
}

@media (max-width: 960px) {
    .docs-sidebar { display: none; }
    .docs-main { margin-left: 0; padding: 32px 20px 80px; }
    .docs-toc ul { columns: 1; }
}
