@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Paleta Premium Dark Mode */
    --bg-main: #0B0E14;
    --bg-card: #141824;
    --bg-input: #1C2130;
    --text-primary: #FFFFFF;
    --text-secondary: #8A92A6;
    --accent-primary: #00D287;     /* Verde Éxito Radialnet */
    --accent-hover: #00B172;
    --accent-red: #FF3B5C;
    --border-dim: rgba(255, 255, 255, 0.08);
    --border-focus: #00D287;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 15px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 30px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-dim);
    margin-bottom: 40px;
}

/* Header & Logo */
.app-header {
    text-align: center;
    margin-bottom: 35px;
}
.logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-dim);
    overflow: hidden;
}
.logo-container img {
    max-width: 60%;
    object-fit: contain;
}
.app-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.app-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Formularios Globales */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-style: italic;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 210, 135, 0.15);
}
.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238A92A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 45px;
}

/* Secciones y Animaciones */
.form-section {
    display: none;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.form-section.active { display: block; }
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.form-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-dim);
}
.subsection-title {
    font-size: 16px;
    color: var(--accent-primary);
    margin: 30px 0 15px;
    font-weight: 600;
}

/* Radio Cards (Inicio) */
.radio-group-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}
.radio-card { cursor: pointer; user-select: none; display: block; }
.radio-card input { display: none; }
.radio-card .card-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--bg-input);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}
.radio-card .icon { font-size: 26px; margin-right: 18px; display: inline-block; }
.radio-card .text { font-size: 16px; font-weight: 600; }
.radio-card input:checked + .card-content {
    background: rgba(0, 210, 135, 0.1);
    border-color: var(--accent-primary);
}

/* Grillas de Evaluación (Checklist) */
.eval-grid {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-dim);
}
.eval-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}
.eval-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.eval-options label {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-dim);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.eval-options input[type="radio"] {
    margin-right: 12px;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
}
.eval-options input[type="radio"]:checked {
    border-color: var(--accent-primary);
}
.eval-options input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
}
.eval-options label:has(input:checked) {
    background: rgba(0, 210, 135, 0.05);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}
/* Estilo para los inputs de Peligro (Fugas, Dañado) */
.eval-options label.danger input[type="radio"]:checked {
    border-color: var(--accent-red);
}
.eval-options label.danger input[type="radio"]:checked::after {
    background: var(--accent-red);
}
.eval-options label.danger:has(input:checked) {
    background: rgba(255, 59, 92, 0.05);
    border-color: var(--accent-red);
    color: var(--text-primary);
}

/* Botones */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}
.btn-primary, .btn-secondary {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
}
.btn-primary { 
    background: var(--accent-primary); 
    color: #111; 
    width: 100%;
}
.btn-secondary { 
    background: transparent; 
    border: 1px solid var(--border-dim); 
    color: var(--text-secondary); 
}
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-secondary:active { transform: scale(0.98); background: var(--bg-input); }

/* Overlays (Loading y Success) */
#loading-overlay, #success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(11, 14, 20, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#loading-overlay.hidden, #success-overlay.hidden { display: none; }

.spinner {
    width: 50px; height: 50px;
    border: 4px solid var(--border-dim);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes bounce {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
#success-overlay p { color: var(--text-secondary); margin-bottom: 25px; text-align: center;}

.small-btn {
    width: auto !important;
    padding: 12px 30px !important;
    font-size: 15px !important;
    display: inline-block;
}
