/*
 * DARKPAY ENGINE // OBSIDIAN UI INTEGRATION
 * Pixel-perfect adaptation of Rayforge UI.
 * Strict adherence to border-based design. Dark mode only.
 */

:root {
    /* === CORE PALETTE === */
    --bg-root: #090810;       
    --bg-sidebar: #0e1019;    
    --bg-panel: #0e1019;      
    --bg-panel-hover: #1c2128;
    --bg-input: #00000024;      

    /* === BORDERS === */
    --border-outer: #30363d;  
    --border-inner: #21262d;  
    --border-focus: #58a6ff;  

    /* === TEXT === */
    --text-main: #c9d1d9;     
    --text-muted: #8b949e;    
    --text-disabled: #484f58; 
    --text-code: #a5d6ff;     

    /* === ACCENTS & STATUS === */
    --accent: #666eff;
    --accent-dim: rgba(88, 166, 255, 0.15);
    --accent-hover: #79c0ff;

    --status-success: #3fb950;
    --status-success-dim: rgba(63, 185, 80, 0.15);

    --status-warning: #d29922;
    --status-warning-dim: rgba(210, 153, 34, 0.15);

    --status-error: #f85149;
    --status-error-dim: rgba(248, 81, 73, 0.15);

    /* === TYPOGRAPHY === */
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* === GEOMETRY === */
    --radius-sm: 8px;   
    --radius-md: 10px;   
    --radius-lg: 15px;   
    --radius-full: 99px;
    --header-height: 60px;
    --sidebar-width: 260px;

    --ease-obsidian: cubic-bezier(0.16, 1, 0.3, 1); 
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    background-color: var(--bg-root); color: var(--text-main);
    font-family: var(--font-ui); font-size: 14px; font-weight: 500; line-height: 1.5;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow: hidden; 
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; color: var(--text-main); }
p { margin: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, textarea, select { font-family: inherit; font-size: inherit; border: none; background: none; outline: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-outer); border: 2px solid var(--bg-root); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-input) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* === UTILITIES === */
.d-flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.m-0 { margin: 0 !important; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.ml-4 { margin-left: 4px; } .ml-8 { margin-left: 8px; } .mr-8 { margin-right: 8px; } .ml-auto { margin-left: auto; }

.p-0 { padding: 0 !important; }
.p-8 { padding: 8px; } .p-12 { padding: 12px; } .p-16 { padding: 16px; } .p-20 { padding: 20px; } .p-24 { padding: 24px; } .p-32 { padding: 32px; }
.px-16 { padding-left: 16px; padding-right: 16px; }

.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.5px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }

.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--status-success); }
.text-warning { color: var(--status-warning); }
.text-error { color: var(--status-error); }
.text-code { color: var(--text-code); }

.w-100 { width: 100%; } .h-100 { height: 100%; }
.min-h-0 { min-height: 0; } .min-w-0 { min-width: 0; }
.hidden { display: none !important; }
.relative { position: relative; }

.spin-anim { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* === LOGIN / AUTH OVERLAY === */
.auth-overlay {
    position: fixed; inset: 0; background-color: var(--bg-root); z-index: 9999;
    display: flex; align-items: center; justify-content: center; margin: 0;
    transition: opacity 0.3s var(--ease-obsidian);
}
.auth-overlay.hidden { opacity: 0; pointer-events: none; }
.auth-card {
    width: 100%; max-width: 400px; padding: 32px; text-align: center;
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgb(11 7 19 / 42%) 100%);
    border: 1px solid var(--border-outer); border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(0); transition: transform 0.3s var(--ease-obsidian);
}
.auth-overlay.hidden .auth-card { transform: translateY(20px); }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 32px; }
.auth-logo .logo-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(88, 166, 255, 0.3); }
.auth-logo .logo-icon .material-symbols-rounded { font-size: 32px; }
.auth-logo span { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.auth-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.auth-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.auth-error { margin-top: 16px; color: var(--status-error); font-size: 13px; font-weight: 600; min-height: 20px; }

/* === LAYOUT === */
.layout { display: flex; flex-direction: row; height: 100vh; height: 100dvh; transition: opacity 0.3s var(--ease-obsidian); }

/* SIDEBAR */
.obsidian-sidebar {
    width: var(--sidebar-width); height: 100vh; height: 100dvh;
    background: var(--bg-sidebar); border-right: 1px solid var(--border-outer);
    display: flex; flex-direction: column; flex-shrink: 0; z-index: 100;
}
.sidebar-header { height: var(--header-height); padding: 0 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-inner); flex-shrink: 0; }
.logo-box { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent); border-radius: var(--radius-sm); border: 1px solid rgba(88, 166, 255, 0.3); }
.logo-box .material-symbols-rounded { font-size: 20px; }
.brand-info { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 14px; letter-spacing: 0.5px; }
.brand-version { font-size: 10px; font-family: var(--font-mono); color: var(--text-muted); }

.nav-menu { flex: 1; overflow-y: auto; padding: 20px 12px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--text-disabled); padding: 16px 12px 8px 12px; text-transform: uppercase; letter-spacing: 1px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 13px; font-weight: 500; transition: all 0.15s ease; border: 1px solid transparent; cursor: pointer;
}
.nav-item:hover { color: var(--text-main); background: var(--bg-panel-hover); }
.nav-item.active {
    color: var(--text-main); border-color: var(--border-inner);
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.05) 0%, transparent 100%);
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item .material-symbols-rounded { font-size: 18px; flex-shrink: 0; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-inner); flex-shrink: 0; }
.user-bar { display: flex; align-items: center; gap: 12px; padding: 8px; background: var(--bg-root); border-radius: var(--radius-md); border: 1px solid var(--border-outer); }
.sys-status { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.sys-status .user-name { font-size: 12px; font-weight: 600; }
.sys-status .user-role { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.status-led { font-size: 14px; font-family: 'Material Symbols Rounded'; }
.status-led.on { color: var(--status-success); }
.status-led.on::before { content: 'mode_fan'; animation: spin 1.5s linear infinite; display: block; }
.status-led.off { color: var(--status-error); }
.status-led.off::before { content: 'error'; display: block; }

.btn-logout { color: var(--text-muted); transition: color 0.2s; flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 4px; }
.btn-logout:hover { color: var(--status-error); }

/* MAIN CONTENT */
.obsidian-main { flex: 1; height: 100vh; overflow-y: auto; background: var(--bg-root); position: relative; display: flex; flex-direction: column; min-width: 0; }
.view-padding { padding: 32px; width: 100%; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.view { display: none; animation: fadeIn 0.3s var(--ease-obsidian); height: 100%; flex-direction: column; }
.view.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* PAGE HEADER */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-shrink: 0;}
.page-title { font-size: 20px; font-weight: 600; color: var(--text-main); letter-spacing: -0.5px; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* PANELS / CARDS */
.panel, .card {
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgb(11 7 19 / 42%) 100%);
    border: 1px solid var(--border-outer); border-radius: var(--radius-lg);
    padding: 20px; position: relative; margin-bottom: 24px;
}
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border-inner); padding-bottom: 16px;}
.panel-title { font-size: 14px; font-weight: 600; text-transform: uppercase; color: var(--text-main); letter-spacing: 0.5px; }

/* STAT CARDS (Dashboard) */
.stat-card-pro {
    background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-md);
    padding: 16px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.stat-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); z-index: 2; }
.stat-value { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--text-main); z-index: 2; margin-top: 8px; line-height: 1.1; }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px;
    border-radius: var(--radius-lg); font-size: 13px; font-weight: 600; font-family: var(--font-ui);
    cursor: pointer; transition: all 0.15s var(--ease-obsidian); white-space: nowrap; gap: 8px; border: 1px solid transparent;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--border-outer); color: var(--text-main); }
.btn-outline:hover { background: var(--bg-panel-hover); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-panel-hover); color: var(--text-main); }
.btn-danger { background: rgba(248, 81, 73, 0.1); color: var(--status-error); border-color: rgba(248, 81, 73, 0.3); }
.btn-danger:hover { background: var(--status-error); color: #fff; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-icon-only { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* FORMS & INPUTS */
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;}
.form-control {
    width: 100%; height: 36px; background: var(--bg-input); border: 1px solid var(--border-outer);
    border-radius: var(--radius-lg); padding: 0 12px; color: var(--text-main); font-family: var(--font-ui); font-size: 13px;
    transition: border-color 0.15s; outline: none;
}
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 1px var(--border-focus); }
textarea.form-control { height: auto; padding: 8px 12px; line-height: 1.5; resize: vertical; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; white-space: nowrap; }
.badge-success { background: var(--status-success-dim); color: var(--status-success); border: 1px solid rgba(63, 185, 80, 0.2); }
.badge-warning { background: var(--status-warning-dim); color: var(--status-warning); border: 1px solid rgba(210, 153, 34, 0.2); }
.badge-error { background: var(--status-error-dim); color: var(--status-error); border: 1px solid rgba(248, 81, 73, 0.2); }
.badge-info { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(88, 166, 255, 0.2); }
.badge-neutral { background: var(--border-inner); color: var(--text-muted); border: 1px solid var(--border-outer); }

/* TABLES */
.table-container { width: 100%; overflow-x: auto; border: 1px solid var(--border-outer); border-radius: var(--radius-md); background: var(--bg-panel); margin-bottom: 16px;}
.obsidian-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.obsidian-table th { background: var(--bg-sidebar); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-outer); white-space: nowrap; }
.obsidian-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-inner); color: var(--text-main); vertical-align: middle; }
.obsidian-table tr:last-child td { border-bottom: none; }
.obsidian-table tr:hover td { background: var(--bg-panel-hover); }
.cell-mono { font-family: var(--font-mono); font-size: 12px; }

/* MODALS */
.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-content { background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-lg); width: 100%; max-width: 500px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; max-height: 90vh; }
.modal-lg { max-width: 800px; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-inner); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.modal-header h3 { font-weight: 600; font-size: 16px; margin: 0;}
.close-modal { background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.close-modal:hover { color: var(--text-main); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border-inner); display: flex; justify-content: flex-end; gap: 12px; flex-shrink: 0; }

/* LIQUID SELECT (STYLED AS OBSIDIAN SELECT) */
.liquid-select-wrapper { position: relative; width: 100%; margin-bottom: 16px; }
.liquid-select-trigger {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none;
    height: 36px; padding: 0 12px; background: var(--bg-input); border: 1px solid var(--border-outer);
    border-radius: var(--radius-lg); color: var(--text-main); font-size: 13px; transition: all 0.2s;
}
.liquid-select-trigger:hover { border-color: var(--text-muted); }
.liquid-select-wrapper.open .liquid-select-trigger { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--bg-panel); }
.liquid-select-trigger .material-symbols-rounded { color: var(--text-muted); transition: transform 0.2s; }
.liquid-select-wrapper.open .liquid-select-trigger .material-symbols-rounded { transform: rotate(180deg); color: var(--accent); }
.liquid-select-options {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 9999;
    background: var(--bg-panel); border: 1px solid var(--border-focus); border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6); max-height: 250px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 1px;
    opacity: 0; transform: scaleY(0.95); transform-origin: top center; transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}
.liquid-select-wrapper.open .liquid-select-options { opacity: 1; transform: scaleY(1); pointer-events: auto; }
.liquid-select-option { padding: 10px 12px; font-size: 13px; color: var(--text-main); cursor: pointer; background: var(--bg-panel); border-bottom: 1px solid var(--border-inner); transition: background 0.1s; }
.liquid-select-option:last-child { border-bottom: none; }
.liquid-select-option:hover { background: var(--bg-panel-hover); }
.liquid-select-option.selected { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

/* MISC COMPONENTS */
.copy-box { display: flex; gap: 8px; }
.btn-copy { background: var(--bg-input); border: 1px solid var(--border-outer); color: var(--text-muted); border-radius: var(--radius-lg); padding: 0 16px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;}
.btn-copy:hover { background: var(--bg-panel-hover); color: var(--text-main); }
.btn-copy .material-symbols-rounded { font-size: 18px; }

.inspector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.inspector-item { background: var(--bg-input); padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-outer); }
.inspector-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; font-weight: 700; }
.inspector-val { font-weight: 600; word-break: break-all; font-size: 14px; }

.json-viewer { background: #0d1117; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-inner); font-family: var(--font-mono); font-size: 12px; color: var(--text-code); white-space: pre-wrap; word-wrap: break-word; overflow-x: auto; max-height: 300px; }

.providers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.provider-card { background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; transition: all 0.2s var(--ease-obsidian); }
.provider-card:hover { transform: translateY(-2px); border-color: var(--border-focus); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.provider-header { display: flex; justify-content: space-between; align-items: center; }
.provider-title { font-size: 16px; font-weight: 700; color: var(--text-main); }
.provider-desc { color: var(--text-muted); font-size: 12px; line-height: 1.5; flex-grow: 1; }

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: var(--status-success); box-shadow: 0 0 8px rgba(63, 185, 80, 0.6); }
.status-dot.inactive { background: var(--status-error); }

/* DOCS & PLAYGROUND */
.docs-layout { display: flex; gap: 24px; align-items: flex-start; height: 100%; min-height: 0; }
.docs-sidebar { width: 260px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; overflow-y: auto; background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-lg); padding: 16px; }
.doc-link { padding: 10px 16px; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-weight: 500; font-size: 13px; }
.doc-link:hover { background: var(--bg-panel-hover); color: var(--text-main); }
.doc-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.docs-content { flex: 1; padding: 32px; background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-lg); overflow-y: auto; height: 100%; }

.markdown-body { font-size: 14px; line-height: 1.6; color: var(--text-main); }
.markdown-body h1 { font-size: 28px; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.5px; border-bottom: 1px solid var(--border-inner); padding-bottom: 12px; }
.markdown-body h2 { font-size: 20px; font-weight: 600; margin: 32px 0 16px 0; color: #fff; }
.markdown-body h3 { font-size: 16px; font-weight: 600; margin: 24px 0 12px 0; color: #fff; }
.markdown-body p { margin-bottom: 16px; color: var(--text-muted); }
.markdown-body a { color: var(--accent); text-decoration: none; }
.markdown-body ul, .markdown-body ol { margin-bottom: 16px; padding-left: 20px; color: var(--text-muted); }
.markdown-body li { margin-bottom: 8px; }
.markdown-body pre { background: #0d1117; padding: 16px; border-radius: var(--radius-md); overflow-x: auto; margin-bottom: 24px; border: 1px solid var(--border-inner); }
.markdown-body code { font-family: var(--font-mono); font-size: 13px; }
.markdown-body p code, .markdown-body li code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; color: var(--text-code); border: 1px solid rgba(255,255,255,0.05); }
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 13px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border-inner); padding: 10px 12px; text-align: left; }
.markdown-body th { background: var(--bg-surface-low); font-weight: 600; color: var(--text-muted); }

.md-alert { padding: 16px; border-radius: var(--radius-md); margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid transparent; }
.md-alert-icon { margin-top: 2px; }
.md-alert-content { flex: 1; }
.md-alert-title { font-weight: 700; margin-bottom: 4px; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.md-alert p { margin: 0; color: inherit; font-size: 13px; }
.md-alert.note { background: var(--accent-dim); border-color: rgba(88, 166, 255, 0.3); color: #a5d6ff; }
.md-alert.warning { background: var(--status-warning-dim); border-color: rgba(210, 153, 34, 0.3); color: #e3b341; }
.md-alert.danger { background: var(--status-error-dim); border-color: rgba(248, 81, 73, 0.3); color: #ff7b72; }

.playground-layout { display: flex; gap: 24px; align-items: stretch; height: 100%; min-height: 0; }
.playground-builder { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.playground-console { flex: 1; display: flex; flex-direction: column; background: var(--bg-panel); border: 1px solid var(--border-outer); border-radius: var(--radius-lg); overflow: hidden; }
.code-tabs { display: flex; border-bottom: 1px solid var(--border-inner); background: var(--bg-sidebar); }
.code-tab { padding: 12px 20px; cursor: pointer; color: var(--text-muted); font-weight: 600; font-size: 12px; transition: 0.2s; border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: 0.5px; }
.code-tab:hover { color: var(--text-main); }
.code-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--bg-panel); }
.code-window { flex: 1; background: #0d1117; padding: 16px; overflow-y: auto; border-bottom: 1px solid var(--border-inner); min-height: 200px; }
.code-window pre { margin: 0; font-size: 12px; }
.response-header { padding: 12px 20px; background: var(--bg-sidebar); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-inner); }
.response-header h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 0; }
.response-status { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text-muted); }
.response-status.success { color: var(--status-success); }
.response-status.error { color: var(--status-error); }
.response-window { flex: 1; background: #0d1117; padding: 16px; overflow-y: auto; min-height: 200px; }
.response-window pre { margin: 0; font-size: 12px; }

.pagination { padding: 16px 20px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--border-inner); }
.page-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--bg-input); border: 1px solid var(--border-outer); color: var(--text-main); cursor: pointer; font-weight: 600; font-size: 12px; transition: all 0.2s; }
.page-btn:hover { background: var(--bg-panel-hover); border-color: var(--text-muted); }
.page-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* HIGHLIGHT JS CUSTOM THEME FOR OBSIDIAN */
.hljs { color: #c9d1d9; background: transparent; }
.hljs-keyword, .hljs-built_in, .hljs-name, .hljs-tag { color: #ff7b72; }
.hljs-string, .hljs-attr { color: #a5d6ff; }
.hljs-number, .hljs-literal { color: #79c0ff; }
.hljs-title, .hljs-class .hljs-title { color: #d2a8ff; }
.hljs-comment, .hljs-quote { color: #8b949e; font-style: italic; }

@media (max-width: 1024px) {
    .docs-layout { flex-direction: column; }
    .docs-sidebar { width: 100%; height: auto; max-height: 200px; }
    .playground-layout { flex-direction: column; }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .view-padding { padding: 16px; }
    .auth-card { padding: 24px 16px; }
}
