/* ===== DASHBOARD — Vista principal ===== */

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
html.dark-theme .dashboard-toolbar {
    background: #0a101c;
    border-color: #1c2f52;
}

/* Marquee — versión Adictos_WebLogs desactualizada */
.weblogs-version-marquee-wrap {
    overflow: hidden;
    margin-bottom: 16px;
    padding: 10px 0;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.12) 0%, rgba(230, 126, 34, 0.18) 50%, rgba(243, 156, 18, 0.12) 100%);
    border: 1px solid rgba(243, 156, 18, 0.45);
    border-radius: 10px;
    position: relative;
}
html.dark-theme .weblogs-version-marquee-wrap {
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.08) 0%, rgba(230, 126, 34, 0.14) 50%, rgba(243, 156, 18, 0.08) 100%);
    border-color: rgba(243, 156, 18, 0.35);
}
.weblogs-version-marquee-track {
    display: flex;
    width: max-content;
    animation: weblogs-marquee-scroll 28s linear infinite;
    white-space: nowrap;
}
.weblogs-version-marquee-text {
    display: inline-block;
    padding-right: 4rem;
    font-size: 14px;
    font-weight: 600;
    color: #b7791f;
    letter-spacing: 0.02em;
}
html.dark-theme .weblogs-version-marquee-text {
    color: #f6ad55;
}
.weblogs-version-marquee-text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.weblogs-version-marquee-text a:hover {
    opacity: 0.85;
}
@keyframes weblogs-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.server-selector-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.server-selector-wrap label {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    color: var(--text-color, #2c3e50);
}
html.dark-theme .server-selector-wrap label { color: #e0e6ed; }

.server-select {
    min-width: 240px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-border, #e0e0e0);
    background: var(--card-bg, #fff);
    color: var(--text-color, #2c3e50);
    font-size: 14px;
    cursor: pointer;
}
html.dark-theme .server-select {
    background: #1a1d29;
    border-color: #1c2f52;
    color: #e0e6ed;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-live-clock {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}
html.dark-theme .dash-live-clock { color: #8892a0; }

.btn-refresh {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--card-border, #e0e0e0);
    background: var(--card-bg, #fff);
    color: var(--text-color, #2c3e50);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.btn-refresh:hover {
    background: #fca311;
    color: #fff;
    border-color: #fca311;
    transform: rotate(90deg);
}
.btn-refresh.spinning i { animation: dashSpin 0.7s linear; }
@keyframes dashSpin { to { transform: rotate(360deg); } }

/* ----- Hero (tokens: --dash-hero-* ; Classic = Adictos dark/light) ----- */
.dash-hero {
    --dh-bg: var(--dash-hero-bg, linear-gradient(145deg, #050508 0%, #0a101c 48%, #14213d 100%));
    --dh-fg: var(--dash-hero-fg, #ffffff);
    --dh-muted: var(--dash-hero-muted, rgba(229, 229, 229, 0.7));
    --dh-accent: var(--dash-hero-accent, #fca311);
    --dh-accent-on: var(--dash-hero-accent-on, #111111);
    --dh-border: var(--dash-hero-border, rgba(252, 163, 17, 0.28));
    --dh-shadow: var(--dash-hero-shadow, 0 12px 32px rgba(0, 0, 0, 0.35));
    --dh-pill-bg: var(--dash-hero-pill-bg, rgba(252, 163, 17, 0.1));
    --dh-pill-border: var(--dash-hero-pill-border, rgba(252, 163, 17, 0.28));
    --dh-ring-track: var(--dash-hero-ring-track, rgba(255, 255, 255, 0.12));
    --dh-glow-a: var(--dash-hero-glow-a, rgba(252, 163, 17, 0.22));
    --dh-glow-b: var(--dash-hero-glow-b, rgba(20, 33, 61, 0.55));
    --dh-metric-bg: var(--dash-hero-metric-bg, rgba(255, 255, 255, 0.06));
    --dh-metric-border: var(--dash-hero-metric-border, rgba(255, 255, 255, 0.1));

    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 22px 24px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--dh-bg);
    color: var(--dh-fg);
    border: 1px solid var(--dh-border);
    box-shadow: var(--dh-shadow);
}
.dash-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 0% 100%, var(--dh-glow-a) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 100% 0%, var(--dh-glow-b) 0%, transparent 50%);
    pointer-events: none;
    opacity: var(--dash-hero-glow-opacity, 1);
}
.dash-hero::after {
    content: none;
}
.dash-hero-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}
.dash-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    background: var(--dh-pill-bg);
    color: var(--dh-fg);
    border: 1px solid var(--dh-pill-border);
}
.dash-status-pill.online { color: #1faa6a; border-color: rgba(31, 170, 106, 0.4); }
.dash-status-pill.offline { color: #e74c3c; border-color: rgba(231, 76, 60, 0.4); }
html.dark-theme .dash-status-pill.online,
.dash-hero .dash-status-pill.online { color: #7dffb3; border-color: rgba(125, 255, 179, 0.35); }
html.dark-theme .dash-status-pill.offline,
.dash-hero .dash-status-pill.offline { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.35); }
html[data-skin]:not([data-skin="classic"]) .dash-hero .dash-status-pill.online {
    color: #1faa6a;
    border-color: rgba(31, 170, 106, 0.45);
    background: color-mix(in srgb, #1faa6a 12%, transparent);
}
html[data-skin]:not([data-skin="classic"]) .dash-hero .dash-status-pill.offline {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.4);
    background: color-mix(in srgb, #c0392b 10%, transparent);
}
.dash-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}
.dash-status-pill.online .dash-status-dot { animation: dashPulse 2s ease-in-out infinite; }
@keyframes dashPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.dash-hero-title {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--dh-fg);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.dash-hero-sub {
    display: none;
}

.dash-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 420px;
    margin: 0 0 4px;
}
.dash-hero-metric {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--dh-metric-bg);
    border: 1px solid var(--dh-metric-border);
    min-width: 0;
}
.dash-hero-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dh-muted);
}
.dash-hero-metric-value {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--dh-fg);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}
.dash-hero-metric-players .dash-hero-metric-value {
    color: var(--dh-accent);
}
.dash-hero-metric-max {
    font-size: 0.72em;
    font-weight: 600;
    color: var(--dh-muted);
    margin-left: 2px;
}

/* Classic: rail tipográfico (sin anillo ni mini-cards anidadas) */
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-ring {
    display: none;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metrics {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin: 2px 0 2px;
    padding: 14px 0 4px;
    border-top: 1px solid color-mix(in srgb, var(--dh-accent) 35%, transparent);
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric {
    flex: 1 1 140px;
    gap: 6px;
    padding: 4px 20px 4px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric + .dash-hero-metric {
    padding-left: 20px;
    border-left: 1px solid color-mix(in srgb, var(--dh-fg) 14%, transparent);
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric-label {
    order: 2;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    opacity: 0.9;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric-value {
    order: 1;
    font-size: clamp(1.55rem, 2.8vw, 2rem);
    font-weight: 800;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-title {
    margin-bottom: 2px;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric-max {
    font-size: 0.55em;
    font-weight: 600;
    vertical-align: 0.12em;
    margin-left: 4px;
    opacity: 0.75;
}
html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-link {
    margin-top: 14px;
}

html:not(.dark-theme):is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero {
    --dh-bg: linear-gradient(155deg, #ffffff 0%, #f7f8fb 48%, #eef2f7 100%);
    --dh-fg: #14213d;
    --dh-muted: rgba(20, 33, 61, 0.55);
    --dh-accent: #d98900;
    --dh-border: rgba(20, 33, 61, 0.1);
    --dh-shadow: 0 10px 28px rgba(20, 33, 61, 0.07);
    --dh-pill-bg: rgba(252, 163, 17, 0.1);
    --dh-pill-border: rgba(252, 163, 17, 0.32);
    --dh-metric-bg: transparent;
    --dh-metric-border: transparent;
    --dh-glow-a: rgba(252, 163, 17, 0.1);
    --dh-glow-b: rgba(20, 33, 61, 0.05);
}
html:not(.dark-theme):is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero .dash-status-pill.online {
    color: #1a7f4b;
    border-color: rgba(26, 127, 75, 0.35);
    background: rgba(26, 127, 75, 0.08);
}
html:not(.dark-theme):is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero .dash-status-pill.offline {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.3);
    background: rgba(192, 57, 43, 0.06);
}

.dash-hero-ring {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    color: var(--dh-accent);
}
.dash-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    color: var(--dh-accent);
}
.dash-ring-svg .dash-ring-stop {
    stop-color: var(--dh-accent);
}
.dash-ring-bg { fill: none; stroke: var(--dh-ring-track); stroke-width: 8; }
.dash-ring-progress {
    fill: none;
    stroke: var(--dh-accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.25s ease;
}
.dash-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.dash-ring-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dh-fg);
    line-height: 1;
}
.dash-ring-max {
    font-size: 13px;
    color: var(--dh-muted);
    margin-top: 2px;
}
.dash-ring-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dh-muted);
    margin-top: 4px;
}

/* ----- Stat strip ----- */
.dash-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.dash-strip-item {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e8e8e8);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dash-strip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
html.dark-theme .dash-strip-item {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-strip-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-color, #2c3e50);
    line-height: 1.2;
}
html.dark-theme .dash-strip-value { color: #e0e6ed; }
.dash-strip-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-top: 4px;
}
html.dark-theme .dash-strip-label { color: #8892a0; }
.dash-strip-item.accent-cyan .dash-strip-value { color: #e8940a; }
.dash-strip-item.accent-red .dash-strip-value { color: #e74c3c; }
.dash-strip-item.accent-purple .dash-strip-value { color: #14213d; }
.dash-strip-item.accent-green .dash-strip-value { color: #27ae60; }
.dash-strip-item.accent-orange .dash-strip-value { color: #e67e22; }

/* ----- Metric cards ----- */
.dash-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
html.dark-theme .dash-card {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-start), var(--accent-end));
}
.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}
.card-icon i { font-size: 24px; color: #fff; }
.card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #888;
    margin-bottom: 4px;
}
.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color, #2c3e50);
    line-height: 1.1;
}
html.dark-theme .card-value { color: #e0e6ed; }
.card-sub { font-size: 12px; color: #999; }

.card-players { --accent-start: #fca311; --accent-end: #e8940a; }
.card-sanctions { --accent-start: #e74c3c; --accent-end: #c0392b; }
.card-logs { --accent-start: #2ecc71; --accent-end: #27ae60; }
.card-staff { --accent-start: #fca311; --accent-end: #e8940a; }

/* ----- Panels ----- */
.dash-panel {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 14px;
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
html.dark-theme .dash-panel {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-panel .panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border, #e0e0e0);
}
html.dark-theme .dash-panel .panel-header { border-bottom-color: #1c2f52; }
.dash-panel .panel-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color, #2c3e50);
}
html.dark-theme .dash-panel .panel-header h4 { color: #e0e6ed; }
.dash-panel .panel-header h4 i { color: #fca311; font-size: 20px; }
.dash-panel .panel-body { padding: 18px 20px; }
.chart-container { position: relative; height: 280px; }
.chart-container-sm { position: relative; height: 220px; }

/* ----- Timeline ----- */
.activity-timeline { max-height: 340px; overflow-y: auto; padding-right: 6px; }
.timeline-empty { text-align: center; color: #999; padding: 30px 0; font-size: 13px; }
.timeline-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
html.dark-theme .timeline-item { border-bottom-color: rgba(255, 255, 255, 0.04); }
.timeline-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
.severity-green { background: #2ecc71; color: #2ecc71; }
.severity-yellow { background: #f39c12; color: #f39c12; }
.severity-red { background: #e74c3c; color: #e74c3c; }
.timeline-time { font-size: 11px; font-weight: 600; color: #888; }
.timeline-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fca311;
    background: rgba(252, 163, 17, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.timeline-action { font-size: 13px; font-weight: 600; margin: 4px 0; }
.timeline-player { font-size: 12px; color: #666; }

/* ----- Quick actions — rail de chips compactos ----- */
.dash-quick-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.qa-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qa-chip {
    --qa-accent: #fca311;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e2e8f0);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color, #334155) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.qa-chip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--qa-accent);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.qa-chip i {
    font-size: 16px;
    color: var(--qa-accent);
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.qa-chip span {
    color: inherit !important;
}

.qa-chip:hover,
.qa-chip:focus {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--qa-accent) 45%, transparent);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--qa-accent) 18%, transparent);
    text-decoration: none !important;
}

.qa-chip:hover::before,
.qa-chip:focus::before {
    opacity: 1;
}

.qa-chip:hover i,
.qa-chip:focus i {
    transform: scale(1.08);
}

.qa-chip-premium-locked {
    opacity: 1;
    filter: none;
    cursor: pointer;
    position: relative;
}

.qa-chip-premium-locked > span:not(.premium-lock-badge) {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(231, 76, 60, 0.85);
    opacity: 0.6;
}

.qa-chip-premium-locked:hover,
.qa-chip-premium-locked:focus {
    opacity: 1;
    filter: none;
    transform: none;
    box-shadow: none;
}

.qa-chip-premium-locked .premium-lock-badge {
    margin-left: 4px;
}

/* Acentos por acción */
.qa-players      { --qa-accent: #e8940a; }
.qa-bans         { --qa-accent: #e74c3c; }
.qa-warns        { --qa-accent: #f39c12; }
.qa-kicks        { --qa-accent: #e67e22; }
.qa-cks          { --qa-accent: #14213d; }
.qa-vehicles     { --qa-accent: #f57c00; }
.qa-players-list { --qa-accent: #3498db; }
.qa-logs         { --qa-accent: #27ae60; }
.qa-stats        { --qa-accent: #e8940a; }
.qa-search       { --qa-accent: #1c2f52; }
.qa-live         { --qa-accent: #e53935; }
.qa-map          { --qa-accent: #00acc1; }
.qa-config       { --qa-accent: #64748b; }

html.dark-theme .qa-chip,
[data-theme="dark"] .qa-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0 !important;
}

html.dark-theme .qa-chip:hover,
html.dark-theme .qa-chip:focus,
[data-theme="dark"] .qa-chip:hover,
[data-theme="dark"] .qa-chip:focus {
    background: color-mix(in srgb, var(--qa-accent) 12%, #0a101c);
    color: #fff !important;
}

html.dark-theme a.qa-chip,
html.dark-theme a.qa-chip:hover,
html.dark-theme a.qa-chip:focus,
body.dark-theme a.qa-chip,
body.dark-theme a.qa-chip:hover,
body.dark-theme a.qa-chip:focus,
[data-theme="dark"] a.qa-chip,
[data-theme="dark"] a.qa-chip:hover,
[data-theme="dark"] a.qa-chip:focus {
    color: inherit !important;
}

@media (max-width: 767px) {
    .qa-rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .qa-chip {
        flex-shrink: 0;
    }
}

.quick-alerts-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 12px;
    margin-bottom: 22px;
}
html.dark-theme .quick-alerts-bar { background: #0a101c; border-color: #1c2f52; }
.quick-alert-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(252, 163, 17, 0.08);
}

.dashboard-empty-state {
    text-align: center;
    padding: 70px 24px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 16px;
}
.empty-icon { font-size: 72px; color: #fca311; opacity: 0.75; margin-bottom: 16px; }
.server-selector-inline { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ----- Accesos rápidos arriba ----- */
.dash-quick-row { margin-bottom: 18px; }
.dash-quick-top { margin-bottom: 0; }
.dash-quick-top .panel-header { padding: 12px 18px; }
.dash-quick-top .panel-body { padding: 14px 16px 16px; }

/* ----- Resumen 24 h ----- */
.dash-24h-section {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
html.dark-theme .dash-24h-section {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-24h-header { margin-bottom: 14px; }
.dash-24h-header h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color, #2c3e50);
}
html.dark-theme .dash-24h-header h3 { color: #e0e6ed; }
.dash-24h-header h3 i { color: #fca311; }
.dash-24h-header p {
    margin: 0;
    font-size: 13px;
    color: #888;
}
.dash-24h-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}
.dash-24h-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 10px;
    border-radius: 12px;
    border: 1px solid var(--card-border, #e8e8e8);
    background: var(--card-bg, #fafbfc);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
}
html.dark-theme .dash-24h-card {
    background: #1e2230;
    border-color: #1c2f52;
}
.dash-24h-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(252, 163, 17, 0.15);
    border-color: rgba(252, 163, 17, 0.45);
}
.dash-24h-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-color, #2c3e50);
    line-height: 1.1;
}
html.dark-theme .dash-24h-value { color: #e0e6ed; }
.dash-24h-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #888;
    line-height: 1.25;
}
.dash-24h-hint {
    font-size: 9px;
    font-weight: 600;
    color: #aaa;
    line-height: 1.2;
    margin-top: 2px;
}
.dash-24h-card-alert .dash-24h-hint { color: rgba(231, 76, 60, 0.85); }
.dash-24h-card-alert {
    border-color: rgba(231, 76, 60, 0.35);
    background: linear-gradient(180deg, rgba(231, 76, 60, 0.06), transparent);
}
.dash-24h-card-alert.has-alerts {
    border-color: #e74c3c;
    box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.2);
}
.dash-24h-card-alert.has-alerts .dash-24h-value { color: #e74c3c; }

/* ----- Hero compacto ----- */
.dash-hero-compact {
    min-height: 120px;
    padding: 20px 24px;
    margin-bottom: 18px;
}
.dash-hero-ring-sm {
    width: 100px;
    height: 100px;
}
.dash-hero-ring-sm .dash-ring-value { font-size: 1.55rem; }

/* ----- Panel actividad ----- */
.dash-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-period-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
}
html.dark-theme .dash-period-tabs { background: rgba(255, 255, 255, 0.06); }
.dash-tab {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}
html.dark-theme .dash-tab { color: #a0aec0; }
.dash-tab.active {
    background: #fca311;
    color: #fff;
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.35);
}
.dash-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.dash-mode-btn {
    border: 1px solid var(--card-border, #e0e0e0);
    background: var(--card-bg, #fff);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}
html.dark-theme .dash-mode-btn {
    background: #1a1d29;
    border-color: #1c2f52;
    color: #c5cdd8;
}
.dash-mode-btn:hover { border-color: #fca311; color: #fca311; }
.dash-mode-btn.active {
    background: linear-gradient(135deg, #fca311, #e8940a);
    border-color: transparent;
    color: #fff;
}
.dash-period-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(252, 163, 17, 0.06);
    font-size: 12px;
    color: #555;
}
html.dark-theme .dash-period-stats { color: #b0b8c4; background: rgba(252, 163, 17, 0.1); }
.dash-period-stat strong { color: var(--text-color, #2c3e50); font-size: 14px; }
html.dark-theme .dash-period-stat strong { color: #e0e6ed; }
.dash-period-stat-warn strong { color: #e74c3c; }
.dash-period-stat-muted {
    width: 100%;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.chart-container-lg { height: 320px; }

.dash-anticheat-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.35);
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.dash-anticheat-detail-btn:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
}
html.dark-theme .dash-anticheat-detail-btn { color: #ff8a8a; }

/* ----- Modal anticheat ----- */
.dash-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 0, 0, 0.6) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}
.dash-modal {
    width: min(640px, 100%);
    max-height: min(80vh, 720px);
    background: #ffffff !important;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #14213d;
}
html.dark-theme .dash-modal,
[data-theme="dark"] .dash-modal {
    background: #0a101c !important;
    border-color: #1c2f52;
    color: #e0e6ed;
}
.dash-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff !important;
    flex-shrink: 0;
}
html.dark-theme .dash-modal-header,
[data-theme="dark"] .dash-modal-header {
    background: #0a101c !important;
    border-bottom-color: #1c2f52;
}
.dash-modal-header h4,
.dash-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}
.dash-modal-title i {
    color: #e74c3c;
    font-size: 20px;
    flex-shrink: 0;
}
.dash-modal-title span {
    line-height: 1.3;
}
.dash-modal-close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}
.dash-modal-close:hover { color: #e74c3c; }
.dash-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    background: #ffffff !important;
    flex: 1;
    min-height: 0;
}
html.dark-theme .dash-modal-body,
[data-theme="dark"] .dash-modal-body {
    background: #0a101c !important;
}
.dash-ac-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
html.dark-theme .dash-ac-item,
[data-theme="dark"] .dash-ac-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.dash-ac-meta { font-size: 12px; color: #888; margin-bottom: 4px; }
html.dark-theme .dash-ac-meta,
[data-theme="dark"] .dash-ac-meta { color: #9aa5b5; }
.dash-ac-player { font-size: 13px; font-weight: 600; color: inherit; }
.dash-ac-details { font-size: 12px; color: #666; margin-top: 6px; }
html.dark-theme .dash-ac-details,
[data-theme="dark"] .dash-ac-details { color: #b0b8c4; }
.dash-modal-body .timeline-empty {
    color: #888;
    margin: 0;
    text-align: center;
    padding: 24px 12px;
}
html.dark-theme .dash-modal-body .timeline-empty,
[data-theme="dark"] .dash-modal-body .timeline-empty { color: #9aa5b5; }

@media (max-width: 767px) {
    .dash-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .dash-hero-ring { width: 110px; height: 110px; }
    .card-value { font-size: 1.6rem; }
    .dash-24h-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-activity-header { flex-direction: column; align-items: flex-start; }
    .chart-container-lg { height: 260px; }
}

/* ===== DASHBOARD V2 — alineado con sidebar-modern ===== */

.dash-v2-panel .content.dash-v2 {
    padding: 24px 28px 40px;
    max-width: 1480px;
}

.dash-v2-navbar {
    border-bottom: 1px solid var(--card-border, #e8ecf0) !important;
    backdrop-filter: blur(12px);
}
html.dark-theme .dash-v2-navbar {
    background: rgba(26, 29, 35, 0.92) !important;
    border-bottom-color: #1c2f52 !important;
}

/* Topbar */
.dash-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.dash-topbar-eyebrow {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fca311;
}
html.dark-theme .dash-topbar-eyebrow { color: #fca311; }
.dash-topbar-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-color, #1a202c);
}
html.dark-theme .dash-topbar-title { color: #eef2f7; }
.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-topbar-server .server-select {
    min-width: 200px;
}

/* Alertas inteligentes */
.dash-alerts-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.dash-alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    animation: dashAlertIn 0.35s ease;
}
@keyframes dashAlertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.dash-alert-item.alert-warning {
    background: rgba(243, 156, 18, 0.12);
    border-color: rgba(243, 156, 18, 0.35);
    color: #b7791f;
}
.dash-alert-item.alert-danger {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.35);
    color: #c0392b;
}
.dash-alert-item.alert-orange {
    background: rgba(230, 126, 34, 0.12);
    border-color: rgba(230, 126, 34, 0.35);
    color: #d35400;
}
html.dark-theme .dash-alert-item.alert-warning { color: #f6ad55; background: rgba(243, 156, 18, 0.1); }
html.dark-theme .dash-alert-item.alert-danger { color: #fc8181; background: rgba(231, 76, 60, 0.1); }
html.dark-theme .dash-alert-item.alert-orange { color: #f6ad55; background: rgba(230, 126, 34, 0.1); }
.dash-alert-icon { font-size: 16px; flex-shrink: 0; }

/* Hero row + KPIs */
.dash-hero-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
    gap: 18px;
    margin-bottom: 22px;
    align-items: stretch;
}
.dash-hero-compact {
    margin-bottom: 0;
    min-height: 0;
    padding: 22px 26px;
}
.dash-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.dash-health-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--dh-pill-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--dh-pill-border, rgba(255, 255, 255, 0.15));
    color: var(--dh-fg, rgba(255, 255, 255, 0.9));
}
.dash-health-badge.health-excellent { border-color: rgba(31, 170, 106, 0.45); color: #1faa6a; }
.dash-health-badge.health-good { border-color: color-mix(in srgb, var(--dh-accent, #fca311) 45%, transparent); color: var(--dh-accent, #fca311); }
.dash-health-badge.health-warning { border-color: rgba(243, 156, 18, 0.45); color: #e67e22; }
.dash-health-badge.health-critical { border-color: rgba(231, 76, 60, 0.5); color: #e74c3c; }
.dash-health-badge.health-offline { border-color: var(--dh-pill-border, rgba(255, 255, 255, 0.2)); color: var(--dh-muted, rgba(255, 255, 255, 0.55)); }
html.dark-theme .dash-health-badge.health-excellent { color: #7dffb3; border-color: rgba(125, 255, 179, 0.4); }
html.dark-theme .dash-health-badge.health-warning { color: #ffd166; }
html.dark-theme .dash-health-badge.health-critical { color: #ff8a8a; }
.dash-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dh-accent, #fca311) !important;
    text-decoration: none;
    transition: opacity 0.2s, filter 0.2s;
}
.dash-hero-link:hover {
    opacity: 0.9;
    color: var(--dh-accent, #fca311) !important;
    filter: brightness(1.08);
}
.dash-hero-ring-sm {
    width: 110px;
    height: 110px;
}

.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.dash-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e8ecf0);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.dash-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(252, 163, 17, 0.1);
}
html.dark-theme .dash-kpi {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-kpi-emoji {
    font-size: 1.5rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.dash-kpi-cyan .dash-kpi-emoji { background: rgba(252, 163, 17, 0.15); }
.dash-kpi-green .dash-kpi-emoji { background: rgba(46, 204, 113, 0.15); }
.dash-kpi-red .dash-kpi-emoji { background: rgba(231, 76, 60, 0.15); }
.dash-kpi-purple .dash-kpi-emoji { background: rgba(232, 148, 10, 0.15); }
.dash-kpi-blue .dash-kpi-emoji { background: rgba(252, 163, 17, 0.15); }
.dash-kpi-body { min-width: 0; }
.dash-kpi-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-color, #1a202c);
}
html.dark-theme .dash-kpi-value { color: #eef2f7; }
.dash-kpi-cyan .dash-kpi-value { color: #e8940a; }
.dash-kpi-green .dash-kpi-value { color: #27ae60; }
.dash-kpi-red .dash-kpi-value { color: #e74c3c; }
.dash-kpi-purple .dash-kpi-value { color: #14213d; }
.dash-kpi-blue .dash-kpi-value { color: #fca311; }
.dash-kpi-orange .dash-kpi-emoji { background: rgba(243, 156, 18, 0.15); }
.dash-kpi-orange .dash-kpi-value { color: #e67e22; }
.dash-kpi-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.dash-kpi-link:hover .dash-kpi-value {
    text-decoration: underline;
}
.dash-kpi-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8892a0;
    margin-top: 2px;
}

/* Tarjetas v2 */
.dash-v2-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e8ecf0);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
html.dark-theme .dash-v2-card {
    background: #0a101c;
    border-color: #1c2f52;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Grid principal */
.dash-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 20px;
    align-items: start;
}
.dash-main-col { min-width: 0; }
.dash-aside-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}
.dash-v2 .dash-24h-section {
    margin-bottom: 20px;
    padding: 20px 22px;
}
.dash-v2 .dash-panel {
    margin-bottom: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
.dash-v2 .dash-activity-panel .panel-header,
.dash-v2 .dash-online-panel .panel-header,
.dash-v2 .dash-timeline-panel .panel-header {
    padding: 18px 22px 0;
    border: none;
    background: transparent;
}
.dash-v2 .dash-activity-panel .panel-body,
.dash-v2 .dash-online-panel .panel-body,
.dash-v2 .dash-timeline-panel .panel-body {
    padding: 16px 22px 22px;
}

/* Jugadores online */
.dash-online-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dash-online-header h4 { margin: 0; }
.dash-online-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #fca311, #fca311);
    color: #fff;
}
.dash-online-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}
.dash-online-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
html.dark-theme .dash-online-item { border-bottom-color: rgba(255, 255, 255, 0.06); }
.dash-online-item:last-child { border-bottom: none; }
.dash-online-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(252, 163, 17, 0.2), rgba(252, 163, 17, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fca311;
    flex-shrink: 0;
}
html.dark-theme .dash-online-avatar { color: #fca311; }
.dash-online-info { flex: 1; min-width: 0; }
.dash-online-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color, #2c3e50);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.dark-theme .dash-online-name { color: #e0e6ed; }
.dash-online-id {
    font-size: 11px;
    color: #8892a0;
}
.dash-online-ping {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}
.dash-online-ping.ping-good { background: rgba(46, 204, 113, 0.15); color: #27ae60; }
.dash-online-ping.ping-mid { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.dash-online-ping.ping-bad { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.dash-online-empty {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #8892a0;
}
.dash-online-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fca311 !important;
    background: rgba(252, 163, 17, 0.08);
    text-decoration: none;
    transition: background 0.2s;
}
.dash-online-more:hover {
    background: rgba(252, 163, 17, 0.15);
    color: #e8940a !important;
}
html.dark-theme .dash-online-more {
    background: rgba(252, 163, 17, 0.08);
    color: #fca311 !important;
}

.dash-v2 .dash-quick-row {
    margin-bottom: 22px;
}
.dash-v2 .dash-quick-top {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e8ecf0);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
html.dark-theme .dash-v2 .dash-quick-top {
    background: #0a101c;
    border-color: #1c2f52;
}
.dash-v2 .dash-quick-top .panel-header {
    padding: 18px 22px 0;
    border: none;
    background: transparent;
}
.dash-v2 .dash-quick-top .panel-body {
    padding: 14px 22px 22px;
}

@media (max-width: 1199px) {
    .dash-hero-row {
        grid-template-columns: 1fr;
    }
    .dash-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dash-main-grid {
        grid-template-columns: 1fr;
    }
    .dash-aside-col {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .dash-aside-col .dash-v2-card {
        flex: 1 1 300px;
    }
}

@media (max-width: 1100px) and (min-width: 992px) {
    .dash-hero-row {
        grid-template-columns: 1fr;
    }
    .dash-main-grid {
        grid-template-columns: 1fr;
    }
    .dash-topbar-server .server-select {
        min-width: 0;
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 767px) {
    .dash-v2-panel .content.dash-v2 {
        padding: 16px 14px 32px;
    }
    .dash-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .dash-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-aside-col {
        flex-direction: column;
    }
    .dash-hero-compact {
        flex-direction: column;
        text-align: left;
        align-items: stretch;
    }
    .dash-hero-badges {
        justify-content: flex-start;
    }
    .dash-hero-metrics {
        max-width: none;
    }
    html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric {
        flex: 1 1 calc(50% - 1px);
        min-width: 0;
        padding-right: 12px;
    }
    html:is(:not([data-skin]), [data-skin=""], [data-skin="classic"]) .dash-hero-metric + .dash-hero-metric {
        padding-left: 12px;
    }
}

/* Misma compactación móvil si el viewport miente (clase html.panel-mobile del header) */
html.panel-mobile .dash-hero-row,
html.panel-mobile .dash-main-grid {
    grid-template-columns: 1fr !important;
}
html.panel-mobile .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}
html.panel-mobile .dash-aside-col {
    position: static !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}
html.panel-mobile .dash-v2-panel .content.dash-v2 {
    padding: 16px 14px 32px;
}
html.panel-mobile .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
}
html.panel-mobile .dash-hero-compact {
    flex-direction: column;
    text-align: left;
    align-items: stretch;
}
html.panel-mobile .dash-hero-badges {
    justify-content: flex-start;
}
html.panel-mobile .dash-hero-metrics {
    max-width: none;
}
html.panel-mobile .dash-v2-panel.main-panel,
html.panel-mobile .main-panel.dash-v2-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}
