/* ============================================================
   DevteamPRO Bot · Estilos (violeta espacial holográfico)
   Basados en el stack iluminat1scode.com
   ============================================================ */

:root {
    /* Ink (fondos profundos violeta) */
    --ink-950: #0A0420;
    --ink-900: #13083A;
    --ink-800: #1E0F4D;
    --ink-700: #2D1B69;

    /* Neon primario (Volt violeta vibrante) */
    --neon-green:   #A855F7;
    --neon-green2:  #C084FC;
    --neon-cyan:    #00E5FF;
    --neon-magenta: #EC4899;
    --neon-pink:    #F472B6;
    --neon-purple:  #7C3AED;

    /* Brand (solo en wordmark, aquí sin uso) */
    --brand-green: #00FF88;

    /* Mute (texto) */
    --mute-100: #FFFFFF;
    --mute-200: #E8E0F2;
    --mute-300: #C5B8D9;
    --mute-400: #9088A8;
    --mute-500: #6B5F80;

    color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background: #030014;
    scrollbar-gutter: stable;
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--mute-200);
    background: transparent;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    line-height: 1.5;
}

::selection { background: var(--neon-green); color: #FFF; }

h1, h2, h3, h4 {
    font-family: Outfit, Inter, sans-serif;
    font-weight: 700;
    color: var(--mute-100);
    letter-spacing: -0.02em;
    text-wrap: balance;
}
p { text-wrap: pretty; }

code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.9em;
    background: rgba(168, 85, 247, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--neon-green2);
}

a { color: var(--neon-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   BACKGROUND ESPACIAL (fixed, z-index -10)
   ============================================================ */
.bg-space {
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, #0A0420 0%, #030014 100%);
    z-index: -10;
    pointer-events: none;
}

.bg-aurora {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -9;
    pointer-events: none;
}
.aurora-1 { top: -100px;  left: -100px;  width: 400px; height: 400px; background: var(--neon-purple); }
.aurora-2 { bottom: -150px; right: -150px; width: 500px; height: 500px; background: var(--neon-magenta); opacity: 0.35; }
.aurora-3 { top: 40%; left: 60%; width: 300px; height: 300px; background: var(--neon-cyan); opacity: 0.25; }

@media (max-width: 768px) {
    .bg-aurora { filter: blur(50px); }
    .aurora-2, .aurora-3 { display: none; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header, .admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(10, 4, 32, 0.6);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky; top: 0; z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.brand-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    box-shadow: 0 0 12px var(--neon-green);
}
.brand-name {
    font-family: Outfit, sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.brand-sub {
    font-size: 0.75rem;
    color: var(--mute-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: #00FF88;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #00FF88;
    box-shadow: 0 0 8px #00FF88;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%     { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}
.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: var(--neon-cyan);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.2rem;
}
.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--mute-300);
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.hero-note {
    color: var(--mute-400);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin: 3rem 0 2rem;
}

/* ============================================================
   TEXT GRADIENTS
   ============================================================ */
.text-grad {
    background: linear-gradient(90deg, var(--neon-green) 0%, var(--neon-cyan) 50%, var(--neon-magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.text-grad-magenta {
    background: linear-gradient(90deg, var(--neon-magenta) 0%, var(--neon-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none !important;
    border: 0;
    min-height: 48px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-purple));
    color: #FFF;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}
.btn-magenta {
    background: linear-gradient(135deg, var(--neon-magenta), var(--neon-purple));
    color: #FFF;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--mute-100);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(168, 85, 247, 0.4); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; min-height: 38px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    position: relative;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(30, 15, 77, 0.35));
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 30px rgba(10, 4, 32, 0.4);
}

.holo-border { position: relative; }
.holo-border::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--ha, 0deg), var(--neon-green), var(--neon-magenta), var(--neon-cyan), var(--neon-green));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: -1;
    animation: holoSpin 8s linear infinite;
    opacity: 0.5;
}
@property --ha { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes holoSpin { to { --ha: 360deg; } }
@media (prefers-reduced-motion: reduce) {
    .holo-border::after, .status-dot { animation: none; }
}

/* ============================================================
   COMMANDS GRID (landing)
   ============================================================ */
.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.cmd-card {
    text-align: left;
    padding: 1.5rem;
    transition: transform 0.3s;
}
.cmd-card:hover { transform: translateY(-4px); }
.cmd-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}
.cmd-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--mute-100);
}
.cmd-name code {
    background: transparent;
    padding: 0;
    color: var(--neon-cyan);
    font-size: inherit;
}
.cmd-card p {
    color: var(--mute-300);
    font-size: 0.9rem;
}

/* ============================================================
   SECURITY LIST
   ============================================================ */
.sec-list {
    max-width: 700px;
    margin: 0 auto 4rem;
    list-style: none;
    padding: 0;
}
.sec-list li {
    padding: 0.75rem 0;
    color: var(--mute-200);
    font-size: 1rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.sec-list li:last-child { border-bottom: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 2rem 0 3rem;
    color: var(--mute-500);
    font-size: 0.85rem;
    border-top: 1px solid rgba(168, 85, 247, 0.15);
    margin-top: 3rem;
}

/* ============================================================
   ADMIN LOGIN
   ============================================================ */
.admin-body { display: flex; flex-direction: column; min-height: 100vh; }

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    text-align: center;
}
.login-header { margin-bottom: 2rem; }
.lock-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.login-header h1 { font-size: 1.75rem; margin-bottom: 0.4rem; }
.login-sub { color: var(--mute-400); font-size: 0.9rem; }
.login-footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--mute-500);
    line-height: 1.6;
}
.alert-error {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #FDB4E0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}

/* ============================================================
   FORMS
   ============================================================ */
.login-form { text-align: left; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--mute-400);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
input[type="text"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    color: var(--mute-100);
    font-size: 16px !important; /* anti-zoom iOS */
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
input::placeholder { color: var(--mute-500); }

.form-inline {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.form-inline input { flex: 1 1 140px; min-width: 0; }

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-main { padding: 2rem 0 4rem; }
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}
.dash-card { padding: 1.5rem; }
.dash-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.dash-full { grid-column: 1 / -1; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.stat {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 0.85rem;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.stat-label {
    color: var(--mute-400);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.stat-val {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.05rem;
    color: var(--mute-100);
    font-weight: 700;
}

.webhook-info {
    font-size: 0.85rem;
    color: var(--mute-300);
    line-height: 1.7;
    word-break: break-all;
    margin-top: 0.5rem;
}
.webhook-info code {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
.alert-err-inline {
    color: #FDB4E0;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}

.users-container { margin-top: 0.5rem; }
.users-section { margin-bottom: 1.25rem; }
.users-section h3 {
    font-size: 0.85rem;
    color: var(--mute-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.user-ul { list-style: none; padding: 0; }
.user-ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}
.user-ul .uname { color: var(--neon-cyan); font-size: 0.85rem; }
.btn-remove {
    margin-left: auto;
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.4);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    color: var(--neon-pink);
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-remove:hover { background: rgba(236, 72, 153, 0.3); }

.feedback {
    font-size: 0.85rem;
    padding: 0.4rem 0;
    color: var(--mute-400);
    min-height: 1.2rem;
}
.feedback.ok { color: #00FF88; }
.feedback.error { color: var(--neon-pink); }
.muted { color: var(--mute-500); font-size: 0.85rem; }
.muted-note { color: var(--mute-400); font-size: 0.8rem; margin-top: 0.5rem; }

.logs-box {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--mute-300);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* ============================================================
   ============== DASHBOARD NIVEL DIOS (v2) ==================
   ============================================================ */

.admin-body { padding: 0; }

/* ============ LAYOUT ============ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    gap: 0;
}

.admin-sidebar {
    background: rgba(19, 8, 58, 0.75);
    backdrop-filter: blur(12px);
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(168, 85, 247, 0.25);
}
.sidebar-head { margin-bottom: 1.5rem; padding: 0 0.5rem; }
.brand-mark.small .brand-i { font-size: 1.1rem; }
.sidebar-bot {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--mute-500);
    margin-top: 4px;
}
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-btn {
    background: transparent;
    border: 0;
    color: var(--mute-300);
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    display: block;
    transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: rgba(168, 85, 247, 0.15); color: var(--mute-100); }
.nav-btn.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(124, 58, 237, 0.25));
    color: var(--mute-100);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4);
}
.sidebar-foot {
    padding: 0.75rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    margin-top: 0.5rem;
}
.admin-user { font-size: 0.8rem; color: var(--mute-300); margin-bottom: 0.5rem; }
.btn-logout {
    background: transparent;
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: var(--neon-pink);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
}
.btn-logout:hover { background: rgba(236, 72, 153, 0.15); }
.logout-form { margin: 0; }

.admin-main {
    padding: 1.25rem 1.5rem 3rem;
    min-width: 0;
    overflow-x: hidden;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.topbar h1 { font-size: 1.5rem; color: var(--mute-100); }
.topbar-actions { display: flex; gap: 0.5rem; align-items: center; }
.maintenance-badge {
    background: rgba(236, 72, 153, 0.2);
    color: var(--neon-pink);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ============ TABS ============ */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tab-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tab-toolbar label { color: var(--mute-400); font-size: 0.85rem; }
.tab-toolbar select, .tab-toolbar input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-200);
    padding: 6px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
}

/* ============ PANELS ============ */
.panel {
    background: rgba(19, 8, 58, 0.45);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.panel h3 { color: var(--mute-100); font-size: 1rem; margin-bottom: 0.75rem; }
.panel h4 { color: var(--mute-200); font-size: 0.9rem; margin: 0.5rem 0; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .nav-btn { flex: 0 0 auto; }
}

/* ============ CARDS + STATS ============ */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(30, 15, 77, 0.5));
    border: 1px solid rgba(168, 85, 247, 0.25);
    padding: 1rem;
    border-radius: 10px;
}
.stat-label {
    color: var(--mute-400);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.stat-value {
    color: var(--mute-100);
    font-size: 1.4rem;
    font-weight: 600;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.svc-card {
    background: rgba(19, 8, 58, 0.55);
    padding: 1rem;
    border-radius: 10px;
}
.svc-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.svc-icon { font-size: 1.5rem; }
.svc-label { color: var(--mute-100); font-weight: 500; }
.svc-cmd { color: var(--mute-400); font-size: 0.8rem; }
.svc-count {
    color: var(--neon-green2);
    font-size: 2rem;
    font-weight: 700;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    line-height: 1;
}
.svc-period { margin-top: 4px; }
.svc-badge {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--mute-400);
    font-size: 0.75rem;
}

/* ============ APIs ============ */
.apis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.api-card {
    background: rgba(19, 8, 58, 0.55);
    padding: 1rem;
    border-radius: 10px;
}
.api-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}
.api-name { font-weight: 600; color: var(--mute-100); font-family: "JetBrains Mono", monospace; }
.api-status {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.api-status.up { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.api-status.slow { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.api-status.down { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.api-status.unknown { background: rgba(255,255,255,0.1); color: var(--mute-400); }
.api-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    font-size: 0.82rem;
    color: var(--mute-300);
}
.api-actions { margin-top: 0.75rem; }

.balance-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    align-items: end;
    margin-top: 0.5rem;
}
.balance-row.balance-low { color: var(--neon-pink); }
.balance-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-green2);
    font-family: "JetBrains Mono", monospace;
}
.balance-row.balance-low .balance-value { color: var(--neon-pink); }

.chart-container {
    min-height: 200px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

/* ============ TABLES ============ */
.table-scroll { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th, .data-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}
.data-table th {
    color: var(--mute-400);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.15);
}
.data-table.small { font-size: 0.78rem; }
.data-table .mono, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.data-table .small, .small { font-size: 0.78rem; }
.data-table td.muted { color: var(--mute-500); text-align: center; padding: 1rem; }
.data-table tr.row-error { background: rgba(239, 68, 68, 0.05); }

.counter {
    display: inline-block;
    background: rgba(168, 85, 247, 0.2);
    color: var(--mute-200);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.chip-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}

/* ============ FIELDS + BUTTONS ============ */
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0.75rem;
}
.field label { color: var(--mute-300); font-size: 0.85rem; }
.field input, .field select, .field textarea {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-100);
    padding: 8px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.88rem;
    width: 100%;
}
.field textarea { font-family: "JetBrains Mono", ui-monospace, monospace; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
.hint { color: var(--mute-500); font-size: 0.75rem; }

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.inline-form input, .inline-form select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-100);
    padding: 6px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
}

.btn {
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: var(--mute-200);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: rgba(168, 85, 247, 0.12); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-green));
    color: white;
    border-color: transparent;
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(168, 85, 247, 0.4); }
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ec4899);
    color: white;
    border-color: transparent;
}
.btn-danger:hover { box-shadow: 0 6px 24px rgba(236, 72, 153, 0.4); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}
.btn-sm { padding: 4px 8px; font-size: 0.78rem; }
.btn-block { width: 100%; }

.form-actions { margin-top: 1rem; }

/* ============ MSG EDITOR ============ */
.msg-editor {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.msg-editor:last-child { border-bottom: 0; }
.msg-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.msg-editor textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-100);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    width: 100%;
    resize: vertical;
}
.msg-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.msg-history-panel { margin-top: 0.5rem; }
.msg-history-item {
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.78rem;
}
.msg-history-item pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 4px;
    margin-top: 4px;
    overflow-x: auto;
    font-size: 0.78rem;
    color: var(--mute-300);
}

/* ============ ENV EDITOR ============ */
.env-group {
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}
.env-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}
.env-row:last-child { border-bottom: 0; }
.env-name label {
    color: var(--mute-100);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.85rem;
    display: block;
}
.env-name small { display: block; margin-top: 2px; }
.env-input {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}
.env-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-100);
    padding: 6px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}
@media (max-width: 700px) {
    .env-row { grid-template-columns: 1fr; }
}

/* ============ ALERTS + TOAST ============ */
.alert {
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-size: 0.88rem;
}
.alert-error, .alert.alert-error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-warning { background: rgba(234, 179, 8, 0.15); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.3); }
.alert-success { background: rgba(34, 197, 94, 0.15); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-info { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.mt-8 { margin-top: 8px; }

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}
.toast {
    background: rgba(30, 15, 77, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: var(--mute-100);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s, transform 0.25s;
    backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(34, 197, 94, 0.5); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); }
.toast-warning { border-color: rgba(234, 179, 8, 0.5); }

/* ============ MODAL ============ */
.modal-root {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-root.is-open {
    display: flex;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(3, 0, 20, 0.75);
    backdrop-filter: blur(6px);
}
.modal-body {
    position: relative;
    background: rgba(19, 8, 58, 0.95);
    padding: 1.25rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-body h3 { margin-bottom: 0.75rem; color: var(--mute-100); }
#modal-content { color: var(--mute-200); margin-bottom: 1rem; }
#modal-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ============ PILLS + MISC ============ */
.pill {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--mute-200);
    font-family: "JetBrains Mono", ui-monospace, monospace;
}
.pill-ok { background: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
.pill-err { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }

.op-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--mute-300);
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

.totp-setup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    margin-top: 1rem;
}
.totp-secret {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    letter-spacing: 0.1em;
    color: var(--neon-green2);
    font-family: "JetBrains Mono", monospace;
}

.alert-slot { margin-top: 0.75rem; }

/* ============================================================
   ============== DASHBOARD V2 · COMPACT + RESPONSIVE =======
   ============================================================ */

.admin-body.v2 { padding: 0; margin: 0; }

/* ============ TOPBAR V2 ============ */
.topbar-v2 {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 8px 16px;
    background: rgba(10, 4, 32, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    flex-wrap: wrap;
}
.brand-block {
    display: flex;
    flex-direction: column;
    line-height: 1;
    flex-shrink: 0;
}
.brand-block .brand-i {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mute-100);
    letter-spacing: 0.02em;
}
.bot-handle {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    color: var(--mute-500);
    margin-top: 2px;
}
.tabs-v2 {
    display: flex;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 2px 0;
}
.tab-v2 {
    background: transparent;
    border: 0;
    color: var(--mute-400);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.tab-v2:hover { background: rgba(168, 85, 247, 0.1); color: var(--mute-200); }
.tab-v2.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(124, 58, 237, 0.2));
    color: var(--mute-100);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.user-chip {
    font-size: 0.78rem;
    color: var(--mute-300);
    background: rgba(168, 85, 247, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
}
.icon-btn {
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--mute-300);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.icon-btn:hover { background: rgba(168, 85, 247, 0.15); color: var(--mute-100); }
.logout-form { margin: 0; }
.maintenance-badge {
    background: rgba(236, 72, 153, 0.2);
    color: var(--neon-pink);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ============ DASHBOARD LAYOUT ============ */
.dashboard-v2 {
    padding: 14px;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.grid-2col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
}
.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 1100px) {
    .grid-3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
    .grid-2col, .grid-3col { grid-template-columns: 1fr; }
    .tabs-v2 { order: 3; width: 100%; }
    .dashboard-v2 { padding: 10px; gap: 10px; }
}

/* ============ KPI ROW ============ */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(30, 15, 77, 0.4));
    border: 1px solid rgba(168, 85, 247, 0.22);
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kpi-lbl {
    color: var(--mute-500);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.kpi-val {
    color: var(--mute-100);
    font-size: 1.15rem;
    font-weight: 700;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    line-height: 1.2;
}

/* ============ PANELS V2 ============ */
.panel-v2 {
    background: rgba(19, 8, 58, 0.45);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.panel-head h3 {
    font-size: 0.85rem;
    color: var(--mute-100);
    font-weight: 600;
    margin: 0;
}
.counter {
    display: inline-block;
    background: rgba(168, 85, 247, 0.2);
    color: var(--mute-200);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-family: "JetBrains Mono", monospace;
}

/* ============ iFreeiCloud panel (hero) ============ */
.ifree-panel {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(19, 8, 58, 0.55));
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.ifree-balance {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
}
.balance-huge {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--neon-green2);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    line-height: 1;
    letter-spacing: -0.02em;
}
.ifree-panel.low .balance-huge { color: var(--neon-pink); }
.ifree-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 12px;
    padding: 6px 0;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}
.ifree-metrics > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ifree-metrics > div > span:last-child {
    color: var(--mute-100);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 600;
}
@media (max-width: 500px) {
    .ifree-metrics { grid-template-columns: repeat(2, 1fr); }
    .balance-huge { font-size: 1.9rem; }
}
.ifree-chart {
    padding: 6px 0;
}
.ifree-chart svg {
    display: block;
    width: 100%;
    height: 60px;
}
.ifree-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 6px;
}
.ifree-actions input {
    flex: 1;
    min-width: 130px;
}

/* ============ Status pill (mini badge) ============ */
.status-pill {
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    color: var(--mute-400);
    letter-spacing: 0.02em;
    font-family: "JetBrains Mono", monospace;
}
.status-pill.up { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.status-pill.slow { background: rgba(234, 179, 8, 0.18); color: #facc15; }
.status-pill.down { background: rgba(239, 68, 68, 0.18); color: #f87171; }

/* ============ Servicios grid compact ============ */
.svc-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
@media (max-width: 500px) { .svc-grid-v2 { grid-template-columns: repeat(2, 1fr); } }
.svc-mini {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color 0.15s;
}
.svc-mini:hover { border-color: rgba(168, 85, 247, 0.35); }
.svc-mini-head {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--mute-300);
    font-size: 0.75rem;
    font-family: "JetBrains Mono", monospace;
}
.svc-mini-count {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-green2);
    font-family: "JetBrains Mono", monospace;
    line-height: 1;
    margin-top: 2px;
}

/* ============ APIs list compact ============ */
.apis-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.api-mini {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border-left: 3px solid rgba(255,255,255,0.1);
    font-size: 0.78rem;
}
.api-mini.up { border-left-color: #4ade80; }
.api-mini.slow { border-left-color: #facc15; }
.api-mini.down { border-left-color: #f87171; }
.api-mini-name {
    color: var(--mute-100);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
}
.api-mini-meta {
    color: var(--mute-500);
    font-size: 0.7rem;
}
.api-mini-btn {
    background: rgba(168, 85, 247, 0.15);
    border: 0;
    color: var(--mute-200);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
}
.api-mini-btn:hover { background: rgba(168, 85, 247, 0.3); }

/* ============ TEST PANEL ============ */
.test-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.test-result {
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--mute-200);
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 40px;
}
.test-result:empty::before {
    content: "El bot responderá aquí…";
    color: var(--mute-500);
    font-style: italic;
}

/* ============ Inputs ============ */
.input, .input-sm {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(168, 85, 247, 0.28);
    color: var(--mute-100);
    padding: 7px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.82rem;
    width: 100%;
    transition: border-color 0.15s;
}
.input-sm { padding: 4px 8px; font-size: 0.75rem; width: auto; }
.input:focus, .input-sm:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.15);
}
textarea.input {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    resize: vertical;
    line-height: 1.4;
}
.check-lbl {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--mute-300);
    cursor: pointer;
}
.row-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.row-form.no-gap { gap: 4px; }
.row-form > .input { flex: 1; min-width: 120px; }
.stack-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.grid-config {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}
@media (max-width: 600px) { .grid-config { grid-template-columns: 1fr; } }
.grid-config label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--mute-400);
}
.form-actions { margin-top: 8px; }
.form-actions.full-w { grid-column: 1 / -1; }

/* ============ Tables V2 ============ */
.tbl-v2 {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.tbl-v2 th, .tbl-v2 td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(168, 85, 247, 0.08);
}
.tbl-v2 th {
    color: var(--mute-500);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1;
}
.tbl-v2.tbl-sm { font-size: 0.72rem; }
.tbl-v2 td.muted-empty { color: var(--mute-500); text-align: center; padding: 12px; font-style: italic; }
.tbl-v2 tr.row-error { background: rgba(239, 68, 68, 0.04); }
.scroll-y-200 { max-height: 200px; overflow-y: auto; }
.scroll-y-300 { max-height: 300px; overflow-y: auto; }
.scroll-y-400 { max-height: 400px; overflow-y: auto; }

.code-mini {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    color: var(--mute-300);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.45;
    margin: 0;
}

/* Botón block y sm reforzados */
.btn.btn-block { width: 100%; display: block; }
.btn.btn-sm { padding: 3px 8px; font-size: 0.72rem; }


