//* ===============================
// MCA CSS – V.1.12 Dark Theme – Dashboard RAM Mejorado
// Compatible con todos los módulos MCA
// Solo se modificó los módulo Dashboard 
// Dir:  /var/www/html/assets/css/
// ===============================

/* ===============================
   Wrapper y Layout General
=============================== */
.mca-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    padding: 10px;
}

.mca-content {
    max-width: 1200px;
    margin: 0 auto;
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.7);
}

.mca-dashboard-header h2 {
    margin: 0 0 5px 0;
    font-size: 1.8em;
    color: #fff;
}

.mca-dashboard-header p {
    margin: 0 0 15px 0;
    color: #ccc;
}

/* ===============================
   Secciones MCA
=============================== */
.mca-section {
    margin-bottom: 25px;
}

.mca-section h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
    border-bottom: 2px solid #444;
    padding-bottom: 5px;
    color: #eee;
}

/* ===============================
   Tablas
=============================== */
.mca-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.mca-table th, .mca-table td {
    padding: 8px 12px;
    border: 1px solid #333;
    color: #e0e0e0;
}

.mca-table th { background-color: #222; }

.mca-table tr:nth-child(even) { background-color: #1b1b1b; }
.mca-table tr:nth-child(odd)  { background-color: #1f1f1f; }

/* Estados de servidores */
.registered { background-color: #2e7d32; color: #fff; }
.not-registered { background-color: #f9a825; color: #000; }
.missing { background-color: #c62828; color: #fff; }

/* ===============================
   Botones generales
=============================== */
.mca-button, .mca-button1, .mca-button2, .mca-button3 {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 2px 2px 2px 0;
    font-size: 0.9em;
    transition: background 0.2s;
}

.mca-button:hover,
.mca-button1:hover,
.mca-button2:hover,
.mca-button3:hover { opacity: 0.85; }

.mca-button1 { background-color: #ff8f00; color: #fff; }   /* Forge */
.mca-button2 { background-color: #43a047; color: #fff; }   /* Fabric */
.mca-button3 { background-color: #1e88e5; color: #fff; }   /* NeoForge */
.mca-button  { background-color: #8e24aa; color: #fff; }   /* CurseForge */
/* ===============================
   MCA Header – estilo tipo card ajustado con icono
=============================== */
.mca-header {
    background: #1e1e1e;        /* mismo fondo que los cards */
    color: #ff9800;             /* color destacado para el título */
    font-size: 1.1em;           /* letra más pequeña */
    font-weight: 600;
    padding: 12px 20px;         /* algo menos de padding */
    margin-bottom: 15px;        /* separa del menú */
    border-radius: 10px;        /* mismo borde que los cards */
    box-shadow: 0 0 8px rgba(255,152,0,0.1);
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;              /* para alinear icono y texto */
    align-items: center;
    gap: 10px;                  /* espacio entre icono y texto */
    white-space: nowrap;        /* evita que se rompa en 2 líneas */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icono del header */
.mca-header-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Hover opcional */
.mca-header:hover {
    box-shadow: 0 0 12px rgba(255,152,0,0.2);
    transform: translateY(-2px);
}

/* Si quieres que el header ocupe todo el ancho del contenedor */
.container .mca-header {
    width: 100%;
    box-sizing: border-box;
}

/* ===============================
   MCA Mods Module
=============================== */
.scroll-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mod-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #fff;
}

.mod-item.Forge { background-color: #ff8f00; }
.mod-item.Fabric { background-color: #43a047; }
.mod-item.NeoForge { background-color: #1e88e5; }
.mod-item.CurseForge { background-color: #8e24aa; }

.mod-checkbox { margin-right: 5px; }

#modSearch {
    width: 100%;
    padding: 5px 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* ===============================
   MCA Users Module
=============================== */
.mca-users-table button {
    background-color: #1e88e5;
    color: #fff;
}

.mca-users-table button:hover { opacity: 0.85; }

/* ===============================
   MCA Versions Module – Mejorado con borde naranja
=============================== */
.mca-section {
    background-color: #1e1e1e; /* uniforme con tarjetas principales */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 2px solid #ff9800; /* borde naranja tipo dashboard */
    margin-bottom: 25px;
}

.mca-section h3 {
    color: #ff9800;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.mca-section p {
    color: #e0e0e0;
    margin-bottom: 15px;
}

.mca-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.mca-section ul li {
    background-color: #2c2c2c;
    color: #fff;
    margin-bottom: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    transition: 0.3s;
    border-left: 3px solid #ff9800; /* mini detalle naranja en cada item */
}

.mca-section ul li:hover {
    background: linear-gradient(45deg,#ff9800,#ffc107);
    color: #121212;
}

/* Opcional: icono delante de cada mod/versión */
.mca-section ul li::before {
    content: "🟠";
    margin-right: 8px;
}


/* ===============================
   MCA Stats Module
=============================== */
.stats-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1 1 150px;
    background: #2c2c2c;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    color: #fff;
}

.stat-box h4 { margin: 0 0 5px 0; font-size: 1.1em; }
.stat-box p  { margin: 0; font-size: 1em; }

/* Progress bars */
.progress { background-color: #333; }
.progress-inner {
    height: 100%;
    background-color: #76ff03;
    width: 0;
    transition: width 0.3s ease;
}

/* ===============================
   MCA Logs Module
=============================== */
#logOutput {
    background-color: #101010;
    color: #fff;
    font-family: monospace;
    font-size: 0.85em;
    padding: 8px;
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
}

/* ===============================
   MCA Status Module
=============================== */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online { background-color: #43a047; }
.status-offline { background-color: #c62828; }

/* ===============================
   MCA Actions Module
=============================== */
.mcactions-buttons button {
    background-color: #ff8f00;
    color: #fff;
    border-radius: 5px;
    padding: 6px 12px;
    margin: 3px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.mcactions-buttons button:hover { opacity: 0.85; }

/* ===============================
   Formularios
=============================== */
input[type="text"], input[type="file"], select, button {
    font-family: inherit;
    font-size: 0.9em;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 5px;
}

button { cursor: pointer; }

/* ===============================
   MCA Dashboard Module – Solo modificado
=============================== */
.mcadashboard-ram-types {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.mcadashboard-ram-type {
    padding: 6px 14px;
    border: 2px solid #ffb74d; /* borde naranja */
    border-radius: 8px;
    background-color: #1a1a1a; /* negro profundo */
    color: #ffeb3b; /* amarillo brillante */
    cursor: pointer;
    font-weight: 600;
    text-shadow: 0 0 2px #ff9800;
    transition: all 0.25s ease-in-out;
}

.mcadashboard-ram-type.active {
    background-color: #ff9800; /* naranja intenso para activo */
    color: #212121;
    border-color: #ffc107;
    box-shadow: 0 0 8px #ffb74d, 0 0 15px #ff9800 inset;
}

.mcadashboard-ram-type:hover:not(.active) {
    background-color: #333;
    border-color: #ffb74d;
    color: #fff176;
}

.mcadashboard-ram-details {
    display: none;
}

.mcadashboard-ram-details.active {
    display: block;
}

.mcadashboard-ram-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.mcadashboard-ram-box {
    flex: 1 1 180px; /* tarjetas más compactas */
    max-width: 260px; /* límite ancho */
    background: #1f1f1f; /* negro suave */
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 6px #ff9800 inset, 0 0 4px #ffb74d;
    transition: transform 0.2s, box-shadow 0.3s;
}

.mcadashboard-ram-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 12px #ff9800, 0 0 8px #ffc107 inset;
}
/* ===============================
   MCA Servers Module – Toque visual sutil
   (NO afecta a otros módulos)
=============================== */

.mca-server-table {
    border-left: 4px solid #ff9800; /* naranja MCA */
    box-shadow: 0 0 6px rgba(255,152,0,0.15);
    border-radius: 4px;
    overflow: hidden; /* para que los bordes redondeados y sombras se vean bien */
}

.mca-server-table tr.not-registered {
    background: linear-gradient(90deg, #3a2a00, #1f1f1f);
    color: #ffe082;
    border-left: 4px solid #ffb300;
    transition: all 0.3s ease-in-out;
}

.mca-server-table tr.not-registered:hover {
    background: linear-gradient(90deg, #5d3c00, #333333);
    box-shadow: 0 0 8px rgba(255,193,7,0.15) inset;
    cursor: pointer;
}

.mca-server-table tr.registered {
    background: linear-gradient(90deg, #2e7d32, #66bb6a); /* verde oscuro -> verde medio */
    color: #fff;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
}

.mca-server-table tr.registered:hover {
    background: linear-gradient(90deg, #388e3c, #81c784); /* un poco más claro al hover */
    box-shadow: 0 0 8px rgba(255,255,255,0.15) inset;
    cursor: pointer;
}
/* ===============================
   MCA Install Module – Toque Aternos
=============================== */
.mcainstall-card {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 0 8px rgba(255,152,0,0.1);
    transition: transform 0.2s, box-shadow 0.3s;
    flex: 1 1 400px; /* crece hasta llenar el espacio, mínimo 300px */
    max-width: 48%;  /* no muy grande, para 2 cards por fila */
    box-sizing: border-box;
    min-width: 320px; /* para pantallas pequeñas */
}

/* hover */
.mcainstall-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(255,152,0,0.2);
}

/* Grid unificado */
.mcainstall-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between; /* distribuye cards a lo ancho */
}

/* Form groups */
.mcainstall-card .mca-form-group {
    margin-bottom: 12px;
}

/* Max Players y Puerto en la misma fila */
.mcainstall-card .mca-form-group.row {
    display: flex;
    gap: 12px;
}
.mcainstall-card .mca-form-group.row > div {
    flex: 1;
}

/* Toggles tipo Aternos */
.mcainstall-card .toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}
.mcainstall-card .toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.mcainstall-card .toggle label {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 24px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.3s;
}
.mcainstall-card .toggle label::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.mcainstall-card .toggle input:checked + label {
    background-color: #ff9800;
}
.mcainstall-card .toggle input:checked + label::before {
    transform: translateX(24px);
}

/* ===============================
   MCA Install – Inputs casi completos
=============================== */
.mcainstall-card input[type="number"],
.mcainstall-card input[type="text"],
.mcainstall-card select,
.mcainstall-card input[type="file"] {
    width: calc(100% - 12px);  /* ocupa casi todo el ancho del card */
    box-sizing: border-box;
    padding: 6px 10px;
    font-size: 0.95em;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: #1e1e1e;
    color: #e0e0e0;
    line-height: 1.4em;
    max-width: none;           /* eliminamos el límite anterior */
}

/* Inputs numéricos: quitar flechas por defecto */
.mcainstall-card input[type="number"] {
    -moz-appearance: textfield;
}
.mcainstall-card input[type="number"]::-webkit-inner-spin-button,
.mcainstall-card input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Selects y file uniformes */
.mcainstall-card select,
.mcainstall-card input[type="file"] {
    height: 30px;
}

/* Max Players y Puerto en la misma fila */
.mcainstall-card .mca-form-group.row {
    display: flex;
    gap: 12px;
}
.mcainstall-card .mca-form-group.row > div {
    flex: 1;
}
.mcainstall-card .mca-form-group.row input,
.mcainstall-card .mca-form-group.row select {
    max-width: 100%;
}

/* Labels arriba del input */
.mcainstall-card .mca-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

/* En pantallas pequeñas, que sea full width */
@media (max-width: 700px) {
    .mcainstall-card {
        max-width: 100%;
    }
}
/* ===============================
   MCA Consola – Estilo Terminal (FIX REAL)
=============================== */

/* Sección consola (no pisa .mca-section global) */
.mca-console-section {
    background-color: #121212;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #ff9800;
    box-shadow: 0 0 6px rgba(255,152,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

/* LOG — Consola principal */
.mca-console-log {
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    color: #fff;

    height: 450px;           /* Altura más grande */
    overflow-y: auto;
    font-size: 0.95em;
    line-height: 1.35em;
    white-space: pre-wrap;

    box-shadow:
        inset 0 0 8px rgba(255,152,0,0.25),
        0 0 20px rgba(255,152,0,0.35); /* Glow externo */
    box-sizing: border-box;
    position: relative;
    transition: box-shadow 0.3s ease;
}

/* Glow activo cuando se enfoca el input */
.mca-console-log:focus-within {
    box-shadow:
        inset 0 0 10px rgba(255,152,0,0.35),
        0 0 30px rgba(255,152,0,0.5);
}

/* Cursor parpadeante con glow */
.mca-console-log::after {
    content: '|';
    color: #ffb300; /* más brillante */
    margin-left: 4px;
    text-shadow:
        0 0 4px #ff9800,
        0 0 10px #ffc107;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.1%, 100% { opacity: 0; }
}

/* Visualizer (El "efecto música" ahora es un glow estático) */
.mca-console-visualizer {
    height: 30px;
    display: flex;
    gap: 5px;
    align-items: center; /* Centramos verticalmente */
    justify-content: flex-start; /* Alineamos a la izquierda */
    padding-left: 18px; /* Mismo padding que el input */
}

.mca-console-visualizer span {
    width: 6px;
    height: 10px; /* Altura fija para que no se mueva como música */
    background: #ff9800; /* Color sólido con glow */
    border-radius: 3px;
    box-shadow: 0 0 4px #ff9800, 0 0 8px #ffc107;
}

/* Input + botón (Ajustes para que la barra de escribir sea larga) */
.mca-console-input-wrapper {
    display: flex;
    gap: 10px;
}

.mca-console-input {
    flex: 1; /* Ocupa todo el espacio disponible */
    height: 60px;
    padding: 0 18px;
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    border-radius: 8px;
    border: 1px solid #333;
    background: #1e1e1e;
    color: #fff;
    outline: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.mca-console-input:focus {
    border-color: #ff9800;
    box-shadow:
        0 0 6px rgba(255,152,0,0.6),
        0 0 18px rgba(255,152,0,0.4),
        inset 0 0 8px rgba(255,152,0,0.25);
    backdrop-filter: blur(6px);
}

.mca-console-button {
    height: 60px;
    padding: 0 22px; /* Define el ancho con un padding cómodo */
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #ff9800, #ffc107);
    color: #121212;
    cursor: pointer;
    transition: 0.25s;
    flex-shrink: 0; /* Evita que el botón se encoja cuando el input crece */
}

.mca-console-button:hover {
    box-shadow: 0 0 14px rgba(255,152,0,0.8);
}

/* Glow general de la sección cuando hay foco en el input */
.mca-console-section:has(.mca-console-input:focus) {
    box-shadow:
        0 0 25px rgba(255,152,0,0.35),
        inset 0 0 12px rgba(255,152,0,0.25);
}

/* ===============================
   ANIMACIÓN GLOW BOTÓN AL ENVIAR (NUEVO)
=============================== */
@keyframes flashGlowButton {
    0% { box-shadow: 0 0 14px rgba(255, 152, 0, 0.8); }
    50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.9), 0 0 60px rgba(255, 255, 255, 0.6); background: linear-gradient(45deg, #ffffff, #fff7e6); } /* Brillo blanco fuerte */
    100% { box-shadow: 0 0 14px rgba(255, 152, 0, 0.8); background: linear-gradient(45deg, #ff9800, #ffc107); }
}

.mca-console-button.is-sending {
    animation: flashGlowButton 0.4s ease-out;
}

/* ===============================
   MCA Users – Magia visual
=============================== */

.mca-users-header {
    border: 2px solid #ff9800;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mca-users-section {
    border: 2px solid #ff9800;
    border-top: none;
    box-shadow: inset 0 0 8px rgba(255,152,0,0.08);
}

/* Tabla */
.mca-users-table tbody tr:hover {
    background: rgba(255,152,0,0.06);
}

/* Avatar */
.mca-user-avatar {
    margin-right: 6px;
}

/* Roles */
.mca-role {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
}

.mca-role.jugador {
    background: #2e7d32;
    color: #c8facc;
}

.mca-role.admin {
    background: #b71c1c;
    color: #ffdada;
}

/* Estado */
.mca-status {
    font-weight: bold;
    font-size: 0.9em;
}

.mca-status.online {
    color: #4caf50;
}

.mca-status.offline {
    color: #f44336;
}

/* Acciones */
.mca-actions {
    display: flex;
    gap: 8px;
}

.mca-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.25s;
}

.mca-btn.edit {
    background: #2a2a2a;
    color: #ff9800;
}

.mca-btn.edit:hover {
    background: #ff9800;
    color: #121212;
}

.mca-btn.delete {
    background: #2a2a2a;
    color: #ff5252;
}

.mca-btn.delete:hover {
    background: #ff5252;
    color: #121212;
}
/* ==============================================
   2. HEADER DEL MENU (El lateral, SIN imagen)
   Fíjate: NO HAY ESPACIO entre .mca-header y .menu
   ============================================== */
.mca-header.menu {
    height: auto; /* Que se adapte al contenido */
    background: #2a2a2a; /* Fondo sólido oscuro para el lateral */
    border: none; /* Quitamos los bordes naranjas gruesos */
    border-left: 4px solid #ff9800; /* Solo un detalle a la izquierda */
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: none;
    display: flex;
    justify-content: flex-start; /* Alineado a la izquierda */
    gap: 12px;
}

/* Ajuste para el icono del menú */
.mca-header.menu .mca-header-icon {
    width: 28px;
    height: 28px;
}
/* ==============================================
   HEADER
   1. BANNER PRINCIPAL (El de arriba, con imagen)
    FOOTER BOX
   ============================================== */
.mca-header {
    position: relative;
    width: 100%;
    height: 180px; /* header más alto que 140px, profesional */

    background-image: 
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
        url('/assets/img/mca.png');
    background-repeat: no-repeat;
    background-position: center center; /* centra la parte importante de la imagen */
    background-size: cover; /* llena el contenedor y recorta lo que sobra */

    border-top: 3px solid #ff9800;
    border-bottom: 3px solid #ff9800;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    overflow: hidden;
    margin: 0;
    padding: 0;
}
/* footer y cajas siguen igual */
.mca-footer {
    width: 100%;
    background: #1e1e1e;
    border-top: 2px solid #ff9800;
    border-bottom: 2px solid #ff9800;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.mca-footer-box {
    max-width: 1400px;
    width: 100%;
    padding: 10px 20px;
    text-align: center;
    color: #ff9800;
    font-weight: bold;
    border-radius: 12px;
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.mca-content {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Responsive: reduce altura en pantallas pequeñas */
@media (max-width: 1024px) {
    .mca-header {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .mca-header {
        height: 80px;
        background-size: contain;
    }
}

@media (max-width: 480px) {
    .mca-header {
        height: 60px;
        background-size: contain;
        border-top: 1px solid #ff9800;
        border-bottom: 1px solid #ff9800;
    }
}