/* =============================================================================
   Q10 API Explorer — CSS v2.0
   Dark glassmorphism theme with login, admin, and code examples
   ============================================================================= */

/* ─── Google Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Custom Properties ────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #6366f1;
    --accent-blue-hover: #818cf8;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html,
body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
}

/* ─── LOGIN ────────────────────────────────────────────────────────────── */

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── BUTTONS ──────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-accent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ─── MENU TOGGLE (HAMBURGER) ───────────────────────────────────────────── */

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger {
    top: 50%;
    margin-top: -1px;
}

.hamburger::before {
    content: '';
    top: -6px;
}

.hamburger::after {
    content: '';
    top: 6px;
}

/* Animación a X cuando está activo */
.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: translateX(-50%) rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: translateX(-50%) rotate(-45deg);
    top: 0;
}

/* ─── SIDEBAR OVERLAY ───────────────────────────────────────────────────── */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 57px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ─── HEADER ───────────────────────────────────────────────────────────── */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    font-size: 22px;
}

.header-badge {
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-blue-hover);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-version {
    font-size: 12px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-role {
    padding: 2px 8px;
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ─── LAYOUT ───────────────────────────────────────────────────────────── */

.layout {
    display: flex;
    height: calc(100vh - 57px);
}

/* ─── SIDEBAR ──────────────────────────────────────────────────────────── */

.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.sidebar-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-header {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-count {
    padding: 1px 6px;
    background: var(--bg-glass);
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 24px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-blue-hover);
    border-left-color: var(--accent-blue);
}

.nav-method {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border-radius: 3px;
}

.perm-badge {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.6;
}

/* ─── CONTENT ──────────────────────────────────────────────────────────── */

.content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Welcome */
.welcome {
    text-align: center;
    padding: 80px 20px;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.welcome h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.welcome p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.stat-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue-hover);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── ENDPOINT PANEL ───────────────────────────────────────────────────── */

.endpoint-panel {
    max-width: 900px;
}

.ep-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ep-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ep-method {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border-radius: var(--radius-sm);
}

.ep-title {
    font-size: 22px;
    font-weight: 700;
}

.ep-category {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-blue-hover);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ep-permission {
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ep-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.ep-path-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.ep-path {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--accent-cyan);
    flex: 1;
}

/* ─── PARAMS ───────────────────────────────────────────────────────────── */

.ep-params {
    margin-bottom: 24px;
}

.ep-params h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.param-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.param-row label {
    min-width: 160px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.param-row .req {
    color: var(--accent-red);
}

.param-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
}

.param-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.ep-actions {
    margin-bottom: 32px;
}

/* ─── CODE SECTION ─────────────────────────────────────────────────────── */

.code-section {
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.code-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.code-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.code-tab:hover {
    color: var(--text-primary);
}

.code-tab.active {
    color: var(--accent-blue-hover);
    border-bottom-color: var(--accent-blue);
}

.code-block {
    background: #0d1117;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #c9d1d9;
    max-height: 400px;
    tab-size: 4;
    white-space: pre;
}

/* ─── RESPONSE ─────────────────────────────────────────────────────────── */

.response-panel {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
}

.response-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.response-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.response-status {
    font-weight: 600;
}

.response-status.ok {
    color: var(--accent-green);
}

.response-status.error {
    color: var(--accent-red);
}

.response-status.loading {
    color: var(--accent-yellow);
}

.response-time {
    color: var(--text-muted);
}

.response-count {
    color: var(--accent-cyan);
}

.response-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: #c9d1d9;
    background: #0d1117;
    overflow-x: auto;
    max-height: 500px;
    white-space: pre;
    margin: 0;
}

/* ─── TEST RESULTS ─────────────────────────────────────────────────────── */

.test-results h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.test-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.test-stat {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
}

.test-stat.ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.test-stat.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.test-stat.total {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.test-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.test-item:last-child {
    border-bottom: none;
}

.test-icon {
    font-size: 16px;
}

.test-name {
    font-weight: 500;
    min-width: 200px;
}

.test-records {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 13px;
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.error-text {
    color: var(--accent-red);
}

/* ─── ADMIN PAGE ───────────────────────────────────────────────────────── */

.admin-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--accent-blue-hover);
    border-bottom-color: var(--accent-blue);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.admin-table th {
    background: var(--bg-card);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-hover);
}

.role-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.role-badge.developer {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-blue-hover);
}

.role-badge.viewer {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.active {
    background: var(--accent-green);
}

.status-dot.inactive {
    background: var(--accent-red);
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.setting-key {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
    color: var(--accent-cyan);
}

.setting-value {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
}

.setting-value:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.setting-desc {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 160px;
}

/* ─── Setting Input with Toggle ───────────────────────────────────────── */

.setting-input-wrapper {
    display: flex;
    flex: 1;
    gap: 8px;
}

.setting-input-wrapper .setting-value {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-left-radius: var(--radius-sm);
}

.toggle-visibility {
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.toggle-visibility:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.toggle-visibility:active {
    transform: scale(0.95);
}

/* ─── MODAL ────────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.modal-card h2 {
    font-size: 20px;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

/* ─── SCROLLBAR ────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────────── */

/* Tablets y móviles grandes (≤ 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
    }
}

/* Tablets (≤ 768px) - Activa menú hamburguesa */
@media (max-width: 768px) {
    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Header responsive */
    .header {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-title {
        font-size: 16px;
    }

    .header-badge,
    .header-version {
        display: none;
    }

    .header-stats {
        display: none;
    }

    .header-right {
        flex-wrap: wrap;
        gap: 6px;
    }

    .header-right .btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* Sidebar como panel deslizante */
    .sidebar {
        position: fixed;
        left: 0;
        top: 57px;
        width: 280px;
        min-width: 280px;
        height: calc(100vh - 57px);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    /* Content ocupa todo el ancho */
    .content {
        width: 100%;
        padding: 16px;
    }

    .welcome-stats {
        flex-direction: column;
        align-items: center;
    }
}

/* Móviles pequeños (≤ 480px) */
@media (max-width: 480px) {
    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .hamburger,
    .hamburger::before,
    .hamburger::after {
        width: 18px;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
    }

    .sidebar-overlay {
        background: rgba(0, 0, 0, 0.7);
    }

    .header {
        padding: 8px 12px;
    }

    .header-title {
        font-size: 14px;
    }

    .header-icon {
        display: none;
    }

    .header-right .btn {
        font-size: 11px;
        padding: 5px 8px;
    }

    .user-info {
        display: none;
    }

    .content {
        padding: 12px;
    }

    .welcome h2 {
        font-size: 22px;
    }

    .welcome-icon {
        font-size: 48px;
    }
}

/* Móviles muy pequeños (≤ 360px) */
@media (max-width: 360px) {
    .header-title {
        font-size: 12px;
    }

    .header-right .btn {
        padding: 4px 6px;
        font-size: 10px;
    }

    .sidebar-header {
        padding: 12px;
    }

    .sidebar-actions {
        padding: 8px 12px;
    }

    .sidebar-actions .btn {
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* ─── HTTP METHODS BADGES ──────────────────────────────────────────────── */

.nav-method {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    text-transform: uppercase;
    background: var(--bg-hover);
    color: var(--text-muted);
    min-width: 45px;
    text-align: center;
    display: inline-block;
}

.nav-item[data-method="GET"] .nav-method {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.nav-item[data-method="POST"] .nav-method {
    color: var(--accent-yellow);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.nav-item[data-method="PUT"] .nav-method {
    color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-item[data-method="DELETE"] .nav-method {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.param-input[data-param="Body"] {
    height: 120px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
}
/* ═══ POWER BI MODAL ═════════════════════════════════════════════════════ */

.pb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pbFadeIn 0.3s ease;
}

@keyframes pbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pb-modal {
    background: linear-gradient(145deg, #1a1f35 0%, #0f1429 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: pbSlideUp 0.4s ease;
}

@keyframes pbSlideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(99, 102, 241, 0.05);
}

.pb-modal-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pb-modal-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

.pb-modal-title h2 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pb-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pb-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: rotate(90deg);
}

.pb-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ─── Power BI Sidebar ───────────────────────────────────────────────────── */

.pb-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.pb-sidebar::-webkit-scrollbar {
    width: 6px;
}

.pb-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.pb-category {
    margin-bottom: 4px;
}

.pb-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.pb-category-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pb-category-header.active {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--accent-blue);
}

.pb-category-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.pb-category-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.pb-category-count {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-muted);
}

.pb-guides {
    display: none;
    padding-left: 20px;
}

.pb-category.expanded .pb-guides {
    display: block;
}

.pb-guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 0 8px 8px 0;
    margin-right: 12px;
}

.pb-guide-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.pb-guide-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-blue-hover);
}

.pb-guide-item .guide-icon {
    font-size: 14px;
    opacity: 0.8;
}

.pb-guide-item .guide-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.pb-guide-item .guide-badge.required {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.pb-guide-item .guide-badge.permission {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* ─── Power BI Content ───────────────────────────────────────────────────── */

.pb-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.02) 0%, transparent 100%);
}

.pb-content::-webkit-scrollbar {
    width: 8px;
}

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

.pb-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.pb-welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 20px rgba(99, 102, 241, 0.3));
}

.pb-welcome h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pb-welcome p {
    font-size: 15px;
    max-width: 400px;
}

/* Markdown Content Styles */
.pb-guide-content {
    animation: pbContentFade 0.3s ease;
}

@keyframes pbContentFade {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.pb-guide-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pb-guide-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-blue-hover);
    margin: 28px 0 14px 0;
}

.pb-guide-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px 0;
}

.pb-guide-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.pb-guide-content ul {
    margin: 12px 0 12px 24px;
    color: var(--text-secondary);
}

.pb-guide-content li {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 6px;
}

.pb-guide-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pb-guide-content code:not(pre code) {
    background: rgba(99, 102, 241, 0.15);
    padding: 3px 8px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-cyan);
}

.pb-guide-content pre {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    overflow-x: auto;
    margin: 16px 0;
    position: relative;
}

.pb-guide-content pre code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #c9d1d9;
}

.pb-guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.pb-guide-content th {
    background: rgba(99, 102, 241, 0.15);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.pb-guide-content td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.pb-guide-content tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.pb-guide-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 28px 0;
}

/* Warning/Info boxes */
.pb-guide-content .warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}

.pb-guide-content .warning-box::before {
    content: "⚠️ ";
}

.pb-guide-content .info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}

/* ─── Power BI Button ───────────────────────────────────────────────────── */

.btn-powerbi {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease !important;
}

.btn-powerbi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

/* Tablets landscape (1024px - 1200px) */
@media (max-width: 1200px) {
    .pb-modal {
        max-width: 95vw;
    }

    .pb-sidebar {
        width: 260px;
        min-width: 260px;
    }
}

/* Tablets portrait (768px - 1024px) */
@media (max-width: 1024px) {
    .pb-modal {
        max-height: 95vh;
    }

    .pb-sidebar {
        width: 240px;
        min-width: 240px;
    }

    .pb-content {
        padding: 24px;
    }

    .pb-category-header {
        padding: 10px 16px;
    }

    .pb-guide-item {
        padding: 8px 12px 8px 24px;
    }
}

/* Mobile landscape / Small tablets (600px - 768px) */
@media (max-width: 768px) {
    .pb-modal {
        max-height: 97vh;
        border-radius: 16px;
    }

    .pb-modal-header {
        padding: 16px 20px;
    }

    .pb-modal-title h2 {
        font-size: 18px;
    }

    .pb-modal-body {
        flex-direction: column;
    }

    .pb-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 45vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        overflow-y: auto;
    }

    .pb-category-header {
        padding: 12px 16px;
    }

    .pb-category-name {
        font-size: 13px;
    }

    .pb-guides {
        padding-left: 12px;
    }

    .pb-guide-item {
        padding: 10px 12px 10px 24px;
        font-size: 13px;
    }

    .pb-content {
        padding: 20px;
        min-height: 0;
    }

    .pb-guide-content h2 {
        font-size: 20px;
    }

    .pb-guide-content h3 {
        font-size: 16px;
    }
}

/* Mobile portrait (< 600px) */
@media (max-width: 600px) {
    .pb-modal-overlay {
        padding: 10px;
    }

    .pb-modal {
        height: 95vh;
        border-radius: 12px;
    }

    .pb-modal-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .pb-modal-title {
        gap: 10px;
    }

    .pb-modal-icon {
        font-size: 22px;
    }

    .pb-modal-title h2 {
        font-size: 16px;
    }

    .pb-modal-close {
        width: 36px;
        height: 36px;
    }

    .pb-sidebar {
        max-height: 40vh;
        padding: 12px 0;
    }

    .pb-category-header {
        padding: 10px 14px;
        gap: 8px;
    }

    .pb-category-icon {
        font-size: 16px;
        width: 24px;
    }

    .pb-category-name {
        font-size: 13px;
    }

    .pb-category-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    .pb-guide-item {
        padding: 8px 10px 8px 20px;
        font-size: 12px;
        gap: 6px;
    }

    .pb-guide-item .guide-icon {
        font-size: 12px;
    }

    .pb-content {
        padding: 16px;
    }

    .pb-welcome-icon {
        font-size: 48px;
    }

    .pb-welcome h3 {
        font-size: 20px;
    }

    .pb-welcome p {
        font-size: 14px;
    }

    .pb-guide-content h2 {
        font-size: 18px;
    }

    .pb-guide-content h3 {
        font-size: 15px;
    }

    .pb-guide-content pre {
        padding: 12px;
        font-size: 11px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pb-guide-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pb-guide-content code {
        font-size: 12px;
        word-break: break-word;
    }
}

/* Extra small devices (< 400px) */
@media (max-width: 400px) {
    .pb-modal-overlay {
        padding: 5px;
    }

    .pb-modal {
        height: 97vh;
        border-radius: 8px;
    }

    .pb-modal-header {
        padding: 12px;
    }

    .pb-modal-title h2 {
        font-size: 14px;
    }

    .pb-sidebar {
        max-height: 35vh;
    }

    .pb-category-header {
        padding: 8px 12px;
    }

    .pb-guide-item {
        padding: 8px 8px 8px 16px;
    }

    .pb-content {
        padding: 12px;
    }
}
