*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--body-color);
    background: var(--body-bg);
}

header {
    background: var(--header-bg);
    color: #fff;
    padding: 1rem 2rem;
}

header .main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

header .site-title {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
}

header .nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

header .nav-links a {
    color: var(--header-link);
    text-decoration: none;
    font-size: 0.95rem;
}

header .nav-links a:hover,
header .nav-links a.active {
    color: var(--header-link-active);
}

.breadcrumbs {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.breadcrumbs a { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.4rem; color: #aaa; }
.breadcrumbs .current { color: #333; }

.page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

.page-layout--no-sidebar {
    grid-template-columns: 1fr;
}

.sidebar {
    position: sticky;
    top: 1.5rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius);
    padding: 1rem 0;
    font-size: 0.875rem;
}

.sidebar-label {
    padding: 0 1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--body-color);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: background 0.1s, border-color 0.1s;
}

.sidebar-nav li a:hover {
    background: var(--sidebar-hover-bg);
    color: var(--accent);
    border-left-color: var(--accent-border);
}

.sidebar-nav li a.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}

@media (max-width: 700px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

.hero-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-content { min-width: 0; }

footer {
    border-top: 1px solid #e8edf5;
    padding: 1.5rem 2rem;
    color: #666;
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

.lede, .hero-text, .docs-intro {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 2rem;
}

.section-body, .feature-body, .docs-body {
    margin-bottom: 1.5rem;
}

.cta, .cta-section, .docs-footer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--cta-bg);
    border-radius: var(--radius);
    text-align: center;
}

/* Pending page */
.pending-page {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    margin: 2rem auto;
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: var(--spinner-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Landing */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 { font-size: 2.5rem; }

.feature {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Docs */
.docs-page { max-width: 800px; }

/* Admin */
.admin main { max-width: 1400px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }
.stat-number { font-size: 1.75rem; font-weight: 700; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th { background: #f5f5f5; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: #555; }

dl { margin: 1rem 0; }
dt { font-weight: 600; color: #555; margin-top: 0.5rem; }
dd { margin-left: 0; margin-bottom: 0.25rem; }

pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--header-bg);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn:hover { opacity: 0.85; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #e74c3c; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
