/* Paleta de colores y variables globales modernas */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary: #0f172a;       /* Slate oscuro profesional */
    --primary-hover: #1e293b;
    --accent: #2563eb;        /* Azul moderno para elementos activos */
    --accent-light: #eff6ff;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    
    --success-bg: #f0fdf4;
    --success-text: #166534;
    --success-border: #bbf7d0;
    
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --error-border: #fecaca;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

.container {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    max-width: 540px;
    width: 100%;
}

/* Área de Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.company-logo {
    max-height: 60px; /* Controla la altura del logo de manera uniforme */
    width: auto;
    object-fit: contain;
}
.company-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.75rem;
    letter-spacing: -0.025em;
}

/* Selector de Modos de tipo Segmentado (Estilo Píldora Moderna) */
.modo-selector {
    display: flex;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    gap: 0.25rem;
}

.modo-option {
    flex: 1;
    cursor: pointer;
    text-align: center;
}

/* Ocultamos el radio button por defecto de manera accesible */
.modo-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modo-option span {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

/* Estilo cuando la pestaña correspondiente está seleccionada */
.modo-option input[type="radio"]:checked + span {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.modo-option:hover span {
    color: var(--primary);
}

/* Área de Input y Botón de Acción */
.input-area {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-area input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--primary);
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 0.75rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-area input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.input-area button {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.input-area button:hover {
    background: var(--primary-hover);
}

.input-area button:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Alertas de Resultados */
.resultado {
    display: none; /* Se maneja dinámicamente desde JS */
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.exito {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

/* Panel de Información Adicional (Consulta) */
.info-extra {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.info-extra ul {
    list-style: none;
}

.info-extra li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border-color);
}

.info-extra li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-extra li:first-child {
    padding-top: 0;
}

.info-extra li strong {
    color: var(--text-muted);
    font-weight: 500;
}

.info-extra li span {
    color: var(--primary);
    font-weight: 600;
}