/* Paleta de Colores de KAI Experience */
:root {
    --color-primary: #1e3a5f; /* Azul oscuro del logo */
    --color-secondary: #ffffff; /* Blanco principal */
    --color-accent: #a0a0a0; /* Un gris claro para enlaces o texto */
    --color-background: #f0f2f5; /* Un gris claro para el fondo */
    --color-success: #28a745; /* Verde para mensajes de éxito */
    --color-error: #dc3545; /* Rojo para mensajes de error */
}

/* Estilos Generales y del Body */
body {
    /* Cambiado para una tipografía más limpia y ejecutiva */
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: #333;
    line-height: 1.6;
}

h1, h2 {
    color: var(--color-primary);
    /* Se agrega un peso de fuente seminegrita */
    font-weight: 600;
}

/* Reducción del tamaño de los títulos */
h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
}

.success-message {
    color: var(--color-success);
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.error-message {
    color: var(--color-error);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

/* ---------------------------------- */
/* Estilos del Formulario de Login    */
/* ---------------------------------- */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--color-primary);
    padding: 20px;
}

.login-container .logo img {
    max-width: 250px;
    margin-bottom: 20px;
}

.login-form {
    background-color: var(--color-secondary);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-top: 0;
    color: var(--color-primary);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
}

.login-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button[type="submit"]:hover {
    background-color: #1a314b;
}

/* ---------------------------------- */
/* Estilos del Header y Navegación    */
/* ---------------------------------- */
.header {
    background-color: var(--color-primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-header img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.nav-list a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-list a:hover {
    color: var(--color-accent);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-secondary);
    transition: all 0.3s ease;
}

.content {
    padding: 40px 20px;
}

/* ---------------------------------- */
/* Estilos para el Módulo de Empresas */
/* ---------------------------------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-button {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.add-button:hover {
    background-color: #1a314b;
}

/* Estilos de la tabla */
.table-container {
    overflow-x: auto;
    background-color: var(--color-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #f5f5f5;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Estilos del formulario de registro de empresas (más formal) */
.empresa-form {
    background-color: var(--color-secondary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 30px auto;
}

.empresa-form h2 {
    color: var(--color-primary);
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 25px;
    /* Reducción del tamaño de la fuente para un look más ejecutivo */
    font-size: 1.4rem;
}

.form-section {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--color-primary);
    outline: none;
}

.empresa-form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.empresa-form button[type="submit"]:hover {
    background-color: #1a314b;
    transform: translateY(-2px);
}

/* ---------------------------------- */
/* Media Queries (Responsive)         */
/* ---------------------------------- */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-menu.active {
        max-height: 300px;
        transition: max-height 0.5s ease-in;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        text-align: center;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        display: block;
        padding: 15px;
    }

    .hamburger-menu {
        display: flex;
    }
}