/* ===========================
   ESTILO GENERAL RETRO MDT
   =========================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Lucida Console", "Consolas", "Courier New", monospace;
}

body {
    background-color: #000000;
    color: #00ff48;          /* verde fosforito estilo terminal */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   HEADER (BARRA AZUL SUPERIOR)
   =========================== */

.mdt-header {
    width: 100%;
    padding: 6px 12px;
    background-color: #234b86;          /* azul similar al de la captura */
    border-bottom: 3px solid #c0c0c0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mdt-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdt-badge {
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
    border: 1px solid #c0c0c0;
    padding: 2px 6px;
    background-color: #234b86;
}

.mdt-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #ffffff;
}

.mdt-status {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: #d8ffd8;
}

.mdt-clock {
    color: #ffff66;
}

/* ===========================
   BARRA ESTADO UNIDAD
   =========================== */

.mdt-unit-bar {
    background-color: #181818;
    border-bottom: 2px solid #404040;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.unit-status-display {
    font-size: 0.8rem;
}

.unit-status-label {
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid #00ff48;
}

/* Colores muy simples, todos tirando a terminal */
.unit-available { background-color: #004d26; }
.unit-busy      { background-color: #4d3d00; }
.unit-oncall    { background-color: #4d0000; }
.unit-off       { background-color: #3a3a3a; }

.unit-status-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.unit-btn {
    background-color: #404040;
    border: 1px solid #808080;
    color: #00ff48;
    padding: 3px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
}

.unit-btn:hover {
    background-color: #5a5a5a;
}

/* ===========================
   BARRA DE PESTAÑAS (BOTONES F1-F12)
   =========================== */

.mdt-tabs {
    display: flex;
    background-color: #202020;
    border-bottom: 3px solid #808080;
}

.tab-btn {
    flex: 1;
    background-color: #404040;
    border: 1px solid #000000;
    border-bottom: none;
    color: #00ff48;
    padding: 8px 4px;
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
}

.tab-btn + .tab-btn {
    border-left: none;
}

.tab-btn:hover {
    background-color: #555555;
}

.tab-btn.active {
    background-color: #000000;
    border-top: 2px solid #c0c0c0;
    border-left: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
    color: #ffffff;
}

/* ===========================
   ZONA PRINCIPAL NEGRA
   =========================== */

.mdt-main {
    flex: 1;
    background-color: #000000;
    padding: 10px 12px 18px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* TITULOS */

h2 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #00ff48;
}

h3 {
    font-size: 0.85rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    color: #00ff48;
}

/* ===========================
   FORMULARIOS
   =========================== */

.mdt-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    background-color: #000000;
    border: 1px solid #404040;
    padding: 6px 8px;
}

.mdt-form label {
    font-size: 0.75rem;
}

.mdt-form input {
    flex: 1;
    min-width: 200px;
    padding: 4px 6px;
    background-color: #000000;
    border: 1px solid #404040;
    color: #00ff48;
}

.mdt-form button {
    padding: 4px 8px;
    background-color: #404040;
    border: 1px solid #808080;
    color: #00ff48;
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
}

.mdt-form button:hover {
    background-color: #5a5a5a;
}

/* ===========================
   LAYOUT DE PANELES (TABLAS + FICHAS)
   =========================== */

.mdt-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.mdt-panel {
    flex: 1;
    background-color: #000000;
    border: 1px solid #404040;
    padding: 6px;
}

.mdt-detail-panel {
    max-width: 360px;
    min-width: 260px;
}

/* ===========================
   TABLAS ESTILO TERMINAL
   =========================== */

.mdt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    color: #00ff48;
}

.mdt-table thead {
    background-color: #000000;
    border-bottom: 1px solid #404040;
}

.mdt-table th,
.mdt-table td {
    padding: 3px 4px;
    border-bottom: 1px solid #202020;
}

.mdt-table tbody tr:nth-child(even) {
    background-color: #050505;
}

.mdt-table tbody tr:hover {
    background-color: #202020;
    cursor: pointer;
}

/* estados de texto (simplemente diferentes verdes/amarillos/rojos) */
.status-wanted             { color: #ff3b3b; }
.status-under-investigation{ color: #ffff66; }
.status-cleared            { color: #66ff99; }
.status-active             { color: #ffff66; }
.status-dispatched         { color: #66ddff; }
.status-closed             { color: #66ff99; }

/* ===========================
   FICHAS DETALLE
   =========================== */

.detail-section-title {
    margin-top: 6px;
    margin-bottom: 2px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #00ff48;
}

.detail-field,
.detail-list {
    font-size: 0.75rem;
}

.detail-list {
    margin-left: 14px;
}

/* ===========================
   CUADRO NARANJA DE PRIORIDAD
   =========================== */

.priority-box {
    margin-top: 8px;
    margin-left: auto;
    max-width: 260px;
    background-color: #ff7b00;
    border: 2px solid #c0c0c0;
    padding: 8px;
    text-align: center;
    color: #000000;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.priority-box-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.priority-box-type {
    margin: 4px 0;
}

.priority-box-ack {
    margin-top: 8px;
    border: 1px solid #000000;
    padding: 3px 4px;
}

/* ===========================
   LEYENDA / CHIPS RP
   =========================== */

.mdt-results {
    margin-top: 8px;
    border: 1px solid #404040;
    padding: 6px;
    font-size: 0.75rem;
}

.mdt-hint {
    font-size: 0.7rem;
    color: #66ff99;
    font-style: italic;
    margin-top: 4px;
}

.rp-chip {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid #000000;
    font-size: 0.7rem;
    margin-right: 4px;
}

.rp-danger { background-color: #4d0000; color: #ffcccc; }
.rp-medium { background-color: #4d3d00; color: #fff3bc; }
.rp-low    { background-color: #004d26; color: #c1ffdf; }
.rp-prio1  { background-color: #660000; color: #ffe5e5; }
.rp-prio2  { background-color: #664d00; color: #fff0c2; }

.mdt-legend {
    margin-top: 10px;
    border: 1px solid #404040;
    padding: 6px;
    font-size: 0.75rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* ===========================
   FOOTER (BARRA DE ESTADO)
   =========================== */

.mdt-footer {
    background-color: #101010;
    border-top: 2px solid #404040;
    padding: 4px 10px;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    color: #00ff48;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
    .mdt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .mdt-layout {
        flex-direction: column;
    }

    .mdt-detail-panel {
        max-width: 100%;
        min-width: 100%;
    }

    .mdt-form {
        flex-direction: column;
        align-items: stretch;
    }
}
