/* Monitor de Servicios Web - Estilos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-toggle {
    background: white;
    color: #667eea;
}

.btn-refresh {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

/* Vista Dashboard */
.dashboard-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.status-indicator {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.status-operational {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.status-issues {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.status-down {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.status-unknown {
    background: linear-gradient(135deg, #d3d3d3 0%, #a0a0a0 100%);
}

.status-text {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.response-time {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
    color: #667eea;
}

.last-checked {
    font-size: 0.9em;
    color: #666;
    margin-top: 15px;
}

/* Vista Badges */
.badges-view {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.badge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.badge-item:last-child {
    border-bottom: none;
}

.badge-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.badge-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}

.badge-operational {
    background: #d4edda;
    color: #155724;
}

.badge-issues {
    background: #fff3cd;
    color: #856404;
}

.badge-down {
    background: #f8d7da;
    color: #721c24;
}

.badge-unknown {
    background: #e2e3e5;
    color: #383d41;
}

/* Loading */
.loading {
    text-align: center;
    color: white;
    font-size: 1.2em;
    padding: 40px;
    display: none;
}

.loading.active {
    display: block;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

/* Sub-servicios */
.subservices-toggle {
    margin-top: 15px;
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    text-align: center;
    color: #667eea;
    transition: background 0.3s;
}

.subservices-toggle:hover {
    background: rgba(102, 126, 234, 0.2);
}

.subservices-list {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.subservice-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.85em;
    border-bottom: 1px solid #f0f0f0;
}

.subservice-item:last-child {
    border-bottom: none;
}

.subservice-name {
    color: #333;
    flex: 1;
}

.subservice-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 600;
}

.subservice-item.operational .subservice-status {
    background: #d4edda;
    color: #155724;
}

.subservice-item.issues .subservice-status {
    background: #fff3cd;
    color: #856404;
}

.subservice-item.down .subservice-status {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .dashboard-view {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
}


