/* dark_theme.css */

body {
    background-color: #1a1a2e; /* Fondo oscuro principal */
    color: #e0e0e0; /* Texto claro */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    background-color: #2e2e4a; /* Fondo más oscuro para el contenedor */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); /* Sombra más pronunciada */
    border: 1px solid #3a3a5a; /* Borde sutil */
}

h2 {
    color: #8c8cff; /* Un tono de azul/púrpura para los títulos */
}

label {
    color: #c0c0c0; /* Un gris más claro para las etiquetas */
}

input[type="email"],
input[type="password"] {
    background-color: #3a3a5a; /* Fondo oscuro para los inputs */
    color: #e0e0e0; /* Texto claro dentro de los inputs */
    border: 1px solid #5a5a7a; /* Borde de los inputs */
    padding: 12px; /* Un poco más de padding */
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #a0a0a0; /* Color del placeholder */
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #8c8cff; /* Borde azul/púrpura al enfocar */
    outline: none; /* Quitar el outline por defecto */
}

.help-block {
    color: #ff6b6b; /* Rojo para los mensajes de error */
}

.btn {
    background-color: #4CAF50; /* Verde más vivo para el botón */
    color: white;
    padding: 12px 15px;
    border-radius: 5px; /* Bordes un poco más redondeados */
    transition: background-color 0.3s ease; /* Transición suave al pasar el mouse */
}

.btn:hover {
    background-color: #45a049; /* Verde un poco más oscuro al pasar el mouse */
}

/* Media queries para responsiveness - mantenerlos */
@media (max-width: 600px) {
    .login-container {
        padding: 15px; /* Menos padding en pantallas pequeñas */
        margin: 10px;
    }
}
/* --- Styles for entradas.php moved from <style> tag --- */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
}
header {
    background-color: #2e2e4a;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1 {
    color: #8c8cff;
    margin: 0;
    font-size: 1.5em;
}
.user-info {
    color: #e0e0e0;
    font-size: 1em;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.user-label {
            white-space: nowrap;
        }
.user-info span {
    font-weight: bold;
}
.nav-menu {
    background-color: #3a3a5a;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;
}
.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}
/* Small, conservative normalization to prevent small layout shifts on interactive state
   (applied only to header and nav elements). This is intentionally minimal and reversible. */
header, header * { box-sizing: border-box; }
header, .title-container, .logo-title, .version { line-height: 1; }
.nav-menu a, .nav-menu .dropbtn, .menu-link { -webkit-tap-highlight-color: transparent; outline: none; transform: none !important; transition: none !important; vertical-align: middle; }
.nav-menu a:active, .nav-menu a:focus, .nav-menu .dropbtn:active, .nav-menu .dropbtn:focus { transform: none !important; outline: none !important; }

/* Font normalization for header to avoid sub-pixel height differences between pages */
header, header * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif !important;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}
header h1, .title-container h1 { line-height: 1; margin: 0; }

/* Force a stable height for the header title area to avoid sub-pixel jumps observed on some pages */
.title-container { min-height: 58px; display: flex; flex-direction: column; justify-content: center; }
.logo-title { align-items: center; }
/* NOTE: previously an experimental normalization block was added here during debugging.
   That block has been removed to restore the original visual behavior the user preferred.
   Keep this comment as a marker for future changes. */
.nav-menu .back-button {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 1em;
}
.nav-menu .back-button:hover {
    background-color: #5a5a7a;
}
        .btn-logout {
            background-color: #ff6b6b;
            color: white;
            padding: 8px 15px;
            border: none;
            border-radius: 4px;
            text-decoration: none;
            transition: background-color 0.3s ease;
            margin-top: 2px;
        }
.btn-logout:hover {
    background-color: #e04a4a;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background-color: #2e2e4a;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
h2 {
    color: #8c8cff;
    text-align: center;
    margin-bottom: 25px;
}
.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}
.message.success {
    background-color: #4CAF50;
    color: white;
}
.message.error {
    background-color: #ff6b6b;
    color: white;
}
.message.warning {
    background-color: #FFA500;
    color: white;
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #b0b0d0;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #5a5a7a;
    border-radius: 4px;
    background-color: #3a3a5a;
    color: #e0e0e0;
    box-sizing: border-box;
}
.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #8c8cff;
    outline: none;
    box-shadow: 0 0 5px rgba(140, 140, 255, 0.5);
}

.form-actions {
    text-align: right;
    margin-top: 30px;
}
.form-actions .btn {
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    margin-left: 10px;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Estilos para el autocompletado (aplicable a materiales, proyectos, proveedores) */
.autocomplete-container {
    position: relative;
    width: 100%;
}
.autocomplete-list {
    position: absolute;
    border: 1px solid #5a5a7a;
    background-color: #3a3a5a;
    max-height: 200px;
    overflow-y: auto;
    width: calc(100% - 20px);
    z-index: 100;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
.autocomplete-list div {
    padding: 8px 10px;
    cursor: pointer;
    color: #e0e0e0;
}
.autocomplete-list div:hover,
.autocomplete-list div.active {
    background-color: #5a5a7a;
}

/* Estilos para la tabla de materiales agregados */
.materiales-agregados-section {
    margin-top: 25px;
    border: 1px solid #5a5a7a;
    border-radius: 8px;
    padding: 15px;
}
.materiales-agregados-section h3 {
    color: #b0b0d0;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}
.materiales-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}
.materiales-table th,
.materiales-table td {
    border: 1px solid #4a4a6a;
    padding: 8px;
    text-align: left;
}
.materiales-table th {
    background-color: #3a3a5a;
    color: #8c8cff;
}
.materiales-table td {
    background-color: #2e2e4a;
    color: #e0e0e0;
}
.materiales-table tbody tr:nth-child(even) {
    background-color: #33334d;
}
.materiales-table tbody tr:hover {
    background-color: #3a3a5a;
}
.materiales-table td.qty-col {
    text-align: right;
    width: 80px;
}
.materiales-table td.actions-col {
    text-align: center;
    width: 50px;
}
.btn-remove-material {
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.2em;
    transition: color 0.2s ease;
}
.btn-remove-material:hover {
    color: #e04a4a;
}

/* Estilos para el campo de archivos */
input[type="file"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #5a5a7a;
    border-radius: 4px;
    background-color: #3a3a5a;
    color: #e0e0e0;
    box-sizing: border-box;
}
input[type="file"]::-webkit-file-upload-button {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #0056b3;
}