:root {
    --bavaria-red: #e31221;
    --bavaria-blue: #005596;
    --bavaria-green: #2ecc71;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-muted: #a0a0a0;
}

* { box-sizing: border-box; }

body.bavaria-dark-theme {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 25px;
    line-height: 1.4;
}

.main-container {
    max-width: 1450px;
    margin: 0 auto;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--bavaria-red);
    padding-left: 20px;
    margin-bottom: 30px;
}

.title-group h1 { margin: 0; font-size: 1.6rem; }
.title-group p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.9rem; }
.module-number { color: var(--bavaria-red); font-weight: 800; }
.corp-logo { height: 55px; }

.card-glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 25px;
}

.filter-panel {
    display: flex;
    gap: 20px;
    padding: 25px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

input, select {
    background: #151515;
    border: 1px solid #333;
    color: white;
    padding: 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    min-width: 160px;
}

input:focus, select:focus { outline: 1px solid var(--bavaria-red); border-color: var(--bavaria-red); }

.button-group { display: flex; gap: 10px; }

.btn-primary { background: var(--bavaria-red); color: white; border: none; padding: 12px 25px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-primary:hover { background: #b10e19; }
.btn-primary:disabled { background: #555; cursor: not-allowed; }

.btn-secondary { background: transparent; color: white; border: 1px solid #444; padding: 12px 25px; border-radius: 5px; cursor: pointer; transition: 0.3s; }
.btn-secondary:hover { background: #333; }

.status-container { margin-bottom: 20px; display: none; padding: 12px; border-radius: 6px; font-size: 0.9rem; text-align: center; }

.header-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.info-card { background: rgba(255, 255, 255, 0.02); padding: 20px; border-radius: 8px; border-bottom: 4px solid var(--bavaria-red); }
.card-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.card-value { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 8px; }

.table-wrapper { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }

th { background: #121212; padding: 15px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid #222; text-align: left; }
td { padding: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.85rem; white-space: nowrap; }

/* Sticky Columns para identificación de KPI */
th:nth-child(1), td:nth-child(1),
th:nth-child(2), td:nth-child(2) { position: sticky; left: 0; background: #0f0f0f; z-index: 5; border-right: 1px solid #333; }
th:nth-child(2), td:nth-child(2) { left: 100px; }

.day-cell { text-align: center; min-width: 95px; }

.result-box {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 65px;
    text-align: center;
}

.status-success { border: 1px solid #28a745; color: #2ecc71; background: rgba(40, 167, 69, 0.12); }
.status-warning { border: 1px solid var(--bavaria-red); color: #ff4d4d; background: rgba(227, 18, 33, 0.12); }
.status-triggered { border: 1px solid var(--bavaria-blue); color: #3498db; background: rgba(0, 85, 150, 0.25); cursor: pointer; transition: 0.2s; }
.status-triggered:hover { background: var(--bavaria-blue); color: white; transform: scale(1.08); }
.status-neutral { color: #666; background: #1a1a1a; border: 1px solid #333; }

.herramienta-text {
    color: #d6b25e;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}