:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --code-bg: #1e1e1e;
    --text: #334155;
    --border: #e2e8f0;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    margin: 0; 
    display: flex; 
    background: var(--bg); 
    color: var(--text); 
    scroll-behavior: smooth;
}

/* Sidebar */
nav { 
    width: 260px; 
    background: var(--sidebar-bg); 
    color: var(--sidebar-text); 
    height: 100vh; 
    position: fixed; 
    overflow-y: auto; 
    padding: 20px 0; 
}
nav .sidebar-header {
    padding: 0 24px; 
    margin-bottom: 30px;
}
nav h2 {
    color: white; 
    margin: 0; 
    font-size: 1.5rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}
nav span {
    font-size: 0.8rem; 
    color: #94a3b8;
}
nav h3 { 
    padding: 0 24px; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: #94a3b8; 
    margin-top: 35px; 
    margin-bottom: 10px; 
}
nav a { 
    display: block; 
    padding: 10px 24px; 
    color: inherit; 
    text-decoration: none; 
    font-size: 0.95rem; 
    border-left: 3px solid transparent; 
    transition: all 0.2s; 
}
nav a:hover, nav a.active { 
    background: #334155; 
    border-left-color: var(--primary); 
    color: white; 
}

/* Main Content */
main { 
    margin-left: 260px; 
    padding: 40px 60px; 
    max-width: 900px; 
    flex: 1; 
}
h1 { font-size: 2.5rem; color: #0f172a; margin-bottom: 10px; margin-top: 0; }
h2 { font-size: 1.8rem; color: #0f172a; margin-top: 60px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
h3 { font-size: 1.3rem; color: #0f172a; margin-top: 30px; }
p { line-height: 1.7; font-size: 1.05rem; color: #475569; }

/* Code Tabs */
.tabs { 
    display: flex; 
    margin-bottom: 0; 
    background: #334155; 
    border-radius: 8px 8px 0 0; 
    overflow: hidden; 
    margin-top: 20px; 
}
.tab { 
    padding: 12px 20px; 
    color: #cbd5e1; 
    cursor: pointer; 
    background: #334155; 
    border: none; 
    font-size: 0.9rem; 
    transition: 0.2s;
}
.tab:hover { background: #475569; color: white; }
.tab.active { background: var(--code-bg); color: #60a5fa; font-weight: bold; }
.code-container { position: relative; }
.code-block { display: none; margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; position: relative; }
.code-block.active { display: block; }

/* Code Blocks */
pre { 
    background: var(--code-bg); 
    color: #f8f8f2; 
    padding: 20px; 
    border-radius: 8px; 
    overflow-x: auto; 
    font-size: 0.9rem; 
    line-height: 1.5; 
    margin-top: 0; 
}
code { font-family: 'Consolas', 'Monaco', monospace; }
.method { 
    display: inline-block; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 0.8rem; 
    color: white; 
    margin-right: 10px; 
}
.post { background: #16a34a; }
.get { background: #2563eb; }

/* Tables */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; color: #475569; }
td code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; color: #e11d48; }

.endpoint-url { 
    background: #e2e8f0; 
    padding: 8px 12px; 
    border-radius: 6px; 
    font-family: monospace; 
    display: inline-block; 
    margin: 10px 0; 
    color: #334155; 
    font-weight: bold;
}

/* Plugin Buttons */
.btn-plugin {
    display: inline-block;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin-right: 10px;
    transition: opacity 0.2s;
}
.btn-plugin:hover { opacity: 0.9; }
.btn-plugin.whmcs { background: #2563eb; }
.btn-plugin.wp { background: #16a34a; }