/* TecnoAdictos - Estilos del Dashboard */

.top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo a {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
    letter-spacing: 2px;
}

.nav-status { color: var(--success); font-size: 0.85rem; }

.sidebar {
    position: fixed;
    top: 57px;
    left: 0;
    width: 220px;
    height: calc(100vh - 57px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-menu { list-style: none; }

.sidebar-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: var(--accent);
    background: rgba(0,229,255,0.07);
    text-decoration: none;
    border-left: 3px solid var(--accent);
}

.menu-group {
    padding: 1rem 1.5rem 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.main-content {
    margin-left: 220px;
    padding: 2.5rem;
    flex: 1;
}

.welcome-panel h1 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
}

.welcome-panel .subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.module-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, transform 0.2s;
    color: var(--text-primary);
    cursor: pointer;
}

.module-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.module-icon { font-size: 2rem; }
.module-card h3 { color: var(--accent); margin-top: 0.5rem; }
.module-card p { color: var(--text-primary); }
.module-card small { color: var(--text-secondary); }

/* Módulos internos */
.module-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.module-header h1 { font-size: 1.8rem; color: var(--accent); }
.module-header p { color: var(--text-secondary); margin-top: 0.4rem; }

.footer {
    margin-left: 220px;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
}

/* ===== FORMULARIOS ===== */
.sim-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sim-card h2 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="number"], input[type="text"], select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    width: 120px;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

select { width: auto; cursor: pointer; }

.btn {
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #000; }
.btn-secondary { background: var(--accent-2); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* ===== TABLA DE PROCESOS ===== */
.process-table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead th {
    background: var(--bg-primary);
    color: var(--accent);
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: rgba(0,229,255,0.04); }
tbody td { padding: 0.55rem 0.9rem; color: var(--text-primary); }
tbody td.mono { font-family: monospace; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-success { background: rgba(63,185,80,0.15); color: var(--success); }
.badge-warning { background: rgba(210,153,34,0.15); color: var(--warning); }
.badge-danger  { background: rgba(248,81,73,0.15); color: var(--danger); }
.badge-info    { background: rgba(0,229,255,0.12); color: var(--accent); }

/* ===== GANTT ===== */
.gantt-wrap {
    overflow-x: auto;
    margin-top: 0.5rem;
}

.gantt-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    min-height: 36px;
}

.gantt-label {
    width: 70px;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 10px;
}

.gantt-bar {
    height: 30px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: bold;
    color: #000;
    margin-right: 2px;
    white-space: nowrap;
    padding: 0 4px;
    transition: opacity 0.2s;
}

.gantt-bar:hover { opacity: 0.8; }

.gantt-idle {
    background: var(--border) !important;
    color: var(--text-secondary) !important;
}

.gantt-timeline {
    display: flex;
    margin-left: 70px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}

.gantt-tick {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: left;
    padding-top: 2px;
}

/* ===== MEMORIA MAP ===== */
.memory-map {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.5rem;
}

.mem-block {
    display: flex;
    align-items: center;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.mem-block.free {
    background: rgba(63,185,80,0.08);
    border-color: rgba(63,185,80,0.3);
    color: var(--success);
}

.mem-block.occupied {
    background: rgba(0,229,255,0.08);
    border-color: rgba(0,229,255,0.35);
    color: var(--accent);
}

.mem-block.selected {
    background: rgba(124,58,237,0.2);
    border-color: var(--accent-2);
    color: #c4b5fd;
    box-shadow: 0 0 8px rgba(124,58,237,0.4);
}

.mem-size-bar {
    height: 12px;
    background: var(--border);
    border-radius: 2px;
    margin-left: auto;
    margin-right: 1rem;
    overflow: hidden;
}

.mem-size-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
}

/* ===== RAID ===== */
.raid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.raid-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.2rem;
    text-align: center;
}

.raid-card h3 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.raid-stat {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0.3rem 0;
}

.raid-stat.good { color: var(--success); }
.raid-stat.bad  { color: var(--danger); }

.raid-label { font-size: 0.75rem; color: var(--text-secondary); }

.disk-visual {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.disk-icon {
    width: 28px; height: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

.disk-icon.parity { border-color: var(--warning); background: rgba(210,153,34,0.1); }
.disk-icon.mirror { border-color: var(--accent-2); background: rgba(124,58,237,0.1); }

.alert-box {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.alert-box.info    { background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.3); color: var(--accent); }
.alert-box.warning { background: rgba(210,153,34,0.1); border: 1px solid rgba(210,153,34,0.3); color: var(--warning); }
.alert-box.success { background: rgba(63,185,80,0.08); border: 1px solid rgba(63,185,80,0.3); color: var(--success); }
.alert-box.danger  { background: rgba(248,81,73,0.1);  border: 1px solid rgba(248,81,73,0.3);  color: var(--danger); }

/* result section */
#resultSection, #memResultSection, #raidResultSection { display: none; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ===== RESPONSIVE (MÓVIL Y TABLET) ===== */
@media (max-width: 768px) {
    .top-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .sidebar-menu li {
        width: auto;
    }
    
    .sidebar-menu li a {
        padding: 0.5rem 1rem;
        border-radius: 4px;
        border-left: none;
    }
    
    .sidebar-menu li a:hover,
    .sidebar-menu li a.active {
        border-left: none;
        background: rgba(0, 229, 255, 0.1);
    }
    
    .menu-group {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
    
    .footer {
        margin-left: 0;
        padding: 1rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }

    .grid-2col {
        grid-template-columns: 1fr;
    }
}

