@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
}

/* Background Gradients */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
}

body::before {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    left: -100px;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite alternate;
}

body::after {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    right: -50px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* Login specific */
.login-container {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    z-index: 1;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); opacity: 1; }
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
}
.input-group label {
    display: block;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}
.input-group input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.login-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(139, 92, 246, 0.7);
}

/* Layout Dashboard */
.app-layout {
    display: flex;
    width: 95vw;
    height: 90vh;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    z-index: 1;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s;
    gap: 0.75rem;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #f1f5f9;
}

.page-header p {
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.stat-icon.green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }

.stat-title {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
}

/* Recent table */
.recent-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
}

.recent-section h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
}

td {
    color: #e2e8f0;
    font-size: 0.95rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
/* ===== Extensions panel complet ===== */
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header p { color: #94a3b8; font-size: 0.9rem; }

.alert { padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.9rem; transition: opacity .5s, transform .5s; }
.alert.error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.alert.success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #4ade80; }
.alert.hide { opacity: 0; transform: translateY(-10px); }

.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; color: #f1f5f9; }

.nav-item .count { margin-left: auto; font-size: .75rem; background: rgba(255,255,255,.08); padding: .1rem .55rem; border-radius: 999px; }

.user-chip { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .5rem; }
.user-chip.small { margin: 0; padding: 0; }
.user-chip strong { display: block; color: #f1f5f9; font-size: .9rem; }
.user-chip small { color: #64748b; font-size: .75rem; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); flex-shrink: 0; }
.logout-btn svg { width: 20px; height: 20px; }

.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.orange { background: rgba(251,146,60,.2); color: #fb923c; }
.stat-icon.red { background: rgba(239,68,68,.2); color: #f87171; }

.panel { background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }
.panel h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.25rem; color: #f1f5f9; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.grid-2 > .panel { margin-bottom: 1.5rem; }
.muted { color: #64748b; }
.muted a, .panel a { color: #60a5fa; }

/* Bar chart */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar { width: 100%; background: linear-gradient(to top, #3b82f6, #8b5cf6); border-radius: 6px 6px 2px 2px; position: relative; transition: filter .2s; animation: grow .8s cubic-bezier(.16,1,.3,1); transform-origin: bottom; }
.bar:hover { filter: brightness(1.3); }
.bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: #cbd5e1; }
.bar-col small { color: #64748b; font-size: .7rem; }
@keyframes grow { from { transform: scaleY(0); } }

/* Donut */
.donut { --a: 0; --e: 0; width: 160px; height: 160px; margin: 0 auto 1.5rem; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(#4ade80 0 calc(var(--a) * 1%), #fb923c 0 calc((var(--a) + var(--e)) * 1%), #f87171 0 100%); }
.donut > div { width: 110px; height: 110px; border-radius: 50%; background: #1a2336; display: grid; place-content: center; text-align: center; }
.donut strong { font-size: 1.6rem; color: #fff; }
.donut small { color: #64748b; font-size: .75rem; }
.legend { list-style: none; display: grid; gap: .6rem; }
.legend li { display: flex; align-items: center; gap: .6rem; color: #cbd5e1; font-size: .9rem; }
.legend b { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.green { background: #4ade80; } .dot.orange { background: #fb923c; } .dot.red { background: #f87171; }

/* Forms / buttons */
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1rem; }
.form-grid .span-2 { grid-column: span 2; }
select, .toolbar input { width: 100%; padding: .75rem 1rem; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: #fff; outline: none; font-size: .95rem; }
select:focus, .toolbar input:focus { border-color: #60a5fa; }
.btn-primary { display: inline-block; padding: .75rem 1.4rem; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .2s, box-shadow .2s; align-self: end; margin-bottom: 1.5rem; }
.page-header .btn-primary { margin: 0; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(139,92,246,.7); }
.btn-ghost { padding: .75rem 1.2rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #e2e8f0; border-radius: 10px; cursor: pointer; }
.toolbar { display: flex; gap: .75rem; margin-bottom: 1.25rem; }
.toolbar input { flex: 1; } .toolbar select { width: 200px; }

form.inline { display: inline; }
.actions { white-space: nowrap; }
.right { text-align: right; }
.btn-sm { padding: .35rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600; cursor: pointer; border: 1px solid; background: transparent; transition: background .2s; margin-left: .25rem; }
.btn-sm.blue { color: #60a5fa; border-color: rgba(96,165,250,.3); } .btn-sm.blue:hover { background: rgba(96,165,250,.15); }
.btn-sm.green { color: #4ade80; border-color: rgba(74,222,128,.3); } .btn-sm.green:hover { background: rgba(74,222,128,.15); }
.btn-sm.orange { color: #fb923c; border-color: rgba(251,146,60,.3); } .btn-sm.orange:hover { background: rgba(251,146,60,.15); }
.btn-sm.red { color: #f87171; border-color: rgba(248,113,113,.3); } .btn-sm.red:hover { background: rgba(248,113,113,.15); }

code { font-family: 'Consolas', monospace; background: rgba(96,165,250,.1); color: #93c5fd; padding: .2rem .5rem; border-radius: 6px; font-size: .85rem; }
.copy { background: none; border: none; color: #64748b; cursor: pointer; vertical-align: middle; }
.copy svg { width: 16px; height: 16px; }
.copy:hover { color: #fff; } .copy.copied { color: #4ade80; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,.03); }
.badge.revoked { background: rgba(251,146,60,.2); color: #fb923c; }

@media (max-width: 1000px) {
    .grid-2, .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .sidebar { width: 80px; padding: 1rem .75rem; }
    .brand, .nav-item .count, .user-chip div:not(.avatar) { display: none; }
    .nav-item, .logout-btn { justify-content: center; font-size: 0; }
    .main-content { padding: 1.5rem; }
}

/* Popup première connexion */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(2,6,23,.75); backdrop-filter: blur(8px); display: grid; place-items: center; animation: fadeIn .3s ease; }
.modal { width: 92%; max-width: 440px; background: rgba(30,41,59,.95); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 2.25rem; box-shadow: 0 30px 60px -15px rgba(0,0,0,.7); animation: slideUp .5s cubic-bezier(.16,1,.3,1) both; transform: translateY(20px); }
.modal h2 { font-size: 1.4rem; margin-bottom: .6rem; background: linear-gradient(to right, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.modal p { color: #94a3b8; font-size: .9rem; line-height: 1.5; margin-bottom: 1.5rem; }
.modal p strong { color: #fb923c; }
.modal-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(251,146,60,.15); color: #fb923c; margin-bottom: 1rem; }
.modal-icon svg { width: 26px; height: 26px; }
.modal-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; padding: .7rem; border-radius: 8px; font-size: .85rem; margin-bottom: 1rem; }
.modal-logout { display: block; text-align: center; margin-top: 1rem; color: #64748b; font-size: .85rem; text-decoration: none; }
.modal-logout:hover { color: #cbd5e1; }
@keyframes fadeIn { from { opacity: 0; } }

/* ===== Layout pro plein écran (dashboard) ===== */
body.dash { display: block; overflow: hidden; background: #0b1120; }
body.dash::before, body.dash::after { display: none; }
body.dash .app-layout {
    width: 100vw; height: 100vh; border: none; border-radius: 0; box-shadow: none;
    background: #0b1120; backdrop-filter: none; animation: none;
}
body.dash .sidebar { width: 250px; background: #0f172a; border-right: 1px solid #1e293b; padding: 1.25rem 1rem; }
body.dash .brand { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin-bottom: 2rem; padding: .25rem .5rem; -webkit-text-fill-color: initial; background: none; color: #f8fafc; }
body.dash .brand::before { content: none; }
body.dash .brand img { height: 30px; width: auto; display: block; }
.login-logo { height: 52px; width: auto; }
body.dash .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #475569; padding: 0 .75rem; margin: .5rem 0; }
body.dash .nav-item { padding: .6rem .75rem; border-radius: 8px; font-size: .9rem; border: 1px solid transparent; }
body.dash .nav-item:hover { background: #1e293b; }
body.dash .nav-item.active { background: #1e293b; border-color: transparent; color: #fff; box-shadow: inset 3px 0 0 #3b82f6; }
body.dash .sidebar-footer { border-top: 1px solid #1e293b; padding-top: 1rem; }
body.dash .logout-btn { background: transparent; border: 1px solid #1e293b; color: #94a3b8; padding: .6rem .75rem; border-radius: 8px; font-size: .9rem; }
body.dash .logout-btn:hover { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.3); }

body.dash .main-content { padding: 0; display: flex; flex-direction: column; background: #0b1120; }
.topbar { height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; border-bottom: 1px solid #1e293b; background: #0f172a; }
.breadcrumb { color: #64748b; font-size: .85rem; } .breadcrumb b { color: #e2e8f0; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 1rem; color: #64748b; font-size: .85rem; }
.content { padding: 2rem; max-width: 1400px; width: 100%; }

body.dash .page-header { margin-bottom: 1.75rem; }
body.dash .page-header h1 { font-size: 1.5rem; font-weight: 600; }
body.dash .page-header p { font-size: .9rem; margin-top: .25rem; }

body.dash .stats-grid { gap: 1rem; margin-bottom: 1.5rem; }
body.dash .stat-card, body.dash .panel { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; }
body.dash .stat-card { flex-direction: row; align-items: center; gap: 1rem; padding: 1.25rem; }
body.dash .stat-card:hover { transform: none; border-color: #334155; background: #0f172a; }
body.dash .stat-icon { margin: 0; flex-shrink: 0; }
body.dash .stat-title { font-size: .8rem; }
body.dash .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
body.dash .panel { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
body.dash .grid-2 { gap: 1rem; }
body.dash .grid-2 > .panel { margin-bottom: 1rem; }
body.dash .panel h2 { font-size: .95rem; }
body.dash th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; background: #0b1120; }
body.dash th, body.dash td { padding: .75rem 1rem; border-bottom: 1px solid #1e293b; }
body.dash .btn-primary { background: #3b82f6; border-radius: 8px; padding: .65rem 1.2rem; font-size: .9rem; }
body.dash .btn-primary:hover { background: #2563eb; transform: none; box-shadow: none; }
body.dash .input-group input, body.dash select, body.dash .toolbar input { background: #0b1120; border-color: #1e293b; border-radius: 8px; padding: .65rem .9rem; font-size: .9rem; }
body.dash .bar { background: #3b82f6; border-radius: 4px 4px 0 0; }
body.dash .bar-empty { background: #1e293b; }
body.dash .donut > div { background: #0f172a; }
.donut.empty { background: #1e293b; }
body.dash .avatar { border-radius: 50%; }
.cat-card { text-decoration: none; color: inherit; cursor: pointer; }
body.dash .cat-card:hover { border-color: #3b82f6; }
.stat-value small { font-size: .8rem; font-weight: 400; color: #64748b; }
body.dash .nav-label:not(:first-child) { margin-top: 1.25rem; }

@media (max-width: 1000px) {
    body.dash .sidebar { width: 72px; }
    body.dash .brand { font-size: 0; justify-content: center; }
    body.dash .nav-label { display: none; }
    .content { padding: 1.25rem; }
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Docs Layout */
.docs-layout { display: grid; grid-template-columns: 1fr 250px; gap: 3rem; align-items: start; }
.docs-content section { margin-bottom: 4rem; }
.docs-content h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); color: #fff; }
.docs-content h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: #fff; display: flex; align-items: center; }
.docs-content p { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }

.api-endpoint { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; align-items: center; gap: 1rem; font-family: monospace; font-size: 1rem; margin-bottom: 2rem; }
.method.get { background: rgba(59, 130, 246, 0.1); color: var(--blue); padding: 0.25rem 0.5rem; border-radius: 4px; font-weight: bold; }
.url { color: var(--text); }

.docs-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.docs-table th, .docs-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.docs-table th { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.docs-table td code { background: var(--bg); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.9em; }

.response-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; border-left-width: 4px; }
.response-block.success { border-left-color: var(--success); }
.response-block.error { border-left-color: var(--danger); }
.response-block pre { margin: 0; border-radius: 8px; }
.response-block h3 { margin-bottom: 0.5rem; margin-top: 0; color:#fff;}
.response-block p { margin-bottom: 1rem; }

.code-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; padding: 0.75rem 1.5rem; color: var(--text-muted); cursor: pointer; font-weight: 500; font-size: 1rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.docs-nav-sticky { position: sticky; top: 2rem; }
.docs-nav-sticky h4 { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1rem; }
.docs-nav-sticky ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.docs-nav-sticky a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.docs-nav-sticky a:hover { color: var(--text); }
.hljs { background: #1e1e2e !important; border-radius: var(--radius); padding: 1.5rem !important; font-size: 0.95rem; line-height: 1.5; font-family: 'Fira Code', monospace; }

.docs-container { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; color: rgba(255, 255, 255, 0.87); line-height: 1.6; font-size: 16px; max-width: 688px; margin: 0 auto; padding-bottom: 4rem; }
.docs-container h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2rem; margin-top: 0; color: #fff; border:none; padding:0; }
.docs-container h2 { font-size: 1.5rem; font-weight: 600; margin: 3rem 0 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); color: #fff; }
.docs-container h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 1rem; color: #fff; }
.docs-container p { margin-bottom: 1.2rem; }
.vp-code { background-color: #161618; border-radius: 8px; padding: 1.25rem 1.5rem; font-family: "Fira Code", monospace; font-size: 0.9em; color: rgba(255,255,255,0.8); margin: 1.5rem 0; overflow-x: auto; }
.custom-block.warning { border: 1px solid transparent; background-color: rgba(234, 179, 8, 0.16); border-color: rgba(234, 179, 8, 0.5); color: #e2e8f0; padding: 1.2rem 1.5rem; border-radius: 8px; margin: 1.5rem 0; }
.custom-block.warning .custom-block-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; color: rgb(234, 179, 8); display: flex; align-items: center; gap: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.vp-next { display: flex; justify-content: flex-end; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.vp-next a { display: flex; flex-direction: column; align-items: flex-end; padding: 11px 16px 13px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; text-decoration: none; transition: border-color 0.25s; background: #1e1e20; }
.vp-next a:hover { border-color: #a8b1ff; }
.vp-next .desc { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.vp-next .title { font-size: 14px; font-weight: 500; color: #a8b1ff; margin-top: 2px; }
.api-pill { display: inline-block; background: #3b82f6; color: #fff; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 700; margin-right: 0.5rem; vertical-align: middle; }
.docs-container a.link { color: #a8b1ff; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.docs-container a.link:hover { border-color: #a8b1ff; }

@media (max-width: 1024px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { display: none; }
}
