/* /ddd/styles.css - Versión CLARA PRO */
:root {
    /* Paleta Neutra y Limpia */
    --color-base-dark: #f8fafc;    /* Fondo de la aplicación (Gris casi blanco) */
    --color-base-medium: #ffffff;  /* Superficies (Sidebar/Nav/Cards) */
    --color-base-light: #f1f5f9;   /* Inputs / Fondos secundarios */
    
    --color-primario: #ff8c00;     /* Naranja corporativo */
    --primario-hover: #e67e00;
    --primario-soft: #fff4e6;      /* Naranja muy suave para fondos de botones/badges */
    
    --texto: #1e293b;              /* Texto principal (Azul pizarra oscuro) */
    --texto-secundario: #64748b;   /* Texto descriptivo / Etiquetas */
    
    --borde: #e2e8f0;              /* Bordes finos y suaves */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-heavy: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif; /* Tipografía más moderna */
    background-color: var(--color-base-dark);
    color: var(--texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- VISTA LOGIN --- */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

#login-form {
    background: var(--color-base-medium);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--borde);
}

#login-form h2 {
    margin-bottom: 30px;
    color: var(--texto);
    font-weight: 700;
    letter-spacing: -0.5px;
}
/* Aseguramos que el input con lista no tenga flechas extrañas en algunos navegadores */
input::-webkit-calendar-picker-indicator {
    display: none !important; /* Oculta la flecha por defecto si prefieres que solo salga al escribir */
}

.inline-edit-input:focus {
    background: #ffffff;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px var(--primario-soft);
}
input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--borde);
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--texto);
    margin-bottom: 20px;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px var(--primario-soft);
}

button {
    padding: 10px 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primario);
    border: 1px solid var(--color-primario);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--primario-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}

/* --- PANEL PRINCIPAL --- */
nav {
    background: var(--color-base-medium);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--borde);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.content {
    width: 100%;
    height: calc(100% - 68px);
    padding: 12px;
    margin: 0px;
    position: absolute;
}

/* --- TABLAS PRO CLARAS --- */
.table-container {
    background: var(--color-base-medium);
    border-radius: var(--radius);
    border: 1px solid var(--borde);
    box-shadow: var(--shadow);
    overflow: hidden; /* Para que el radio funcione con la tabla */
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #f4f4fd;
    padding: 5px 16px;
    color: var(--texto-secundario);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    border-left: 2px solid var(--borde);
}

th:hover {
    background: var(--color-base-light);
    color: var(--color-primario);
}

td {
    padding: 8px 16px;
    color: var(--texto);
    font-size: 14px;
    border-left: 2px solid var(--borde);
}

tr:last-child td { border-bottom: none; }

tr:hover td {
    background: #FFF0e0;
}



.menu-item {
    padding: 12px 24px;
    margin: 4px 12px;
    border-radius: 8px;
    color: var(--texto-secundario);
    font-weight: 500;
    border-left: none; /* Quitamos el borde izquierdo tosco */
}

.menu-item:hover, .menu-item.active {
    background: var(--primario-soft);
    color: var(--color-primario);
}

/* --- EDICIÓN INLINE (INPUTS DENTRO DE TABLA) --- */
.inline-edit-input {
    background: #fcfcfd;
    border: 1px solid transparent;
    color: var(--texto);
    padding: 4px 8px;
    width: 100%;
    font-size: 13px;
    border-radius: 6px;
    margin:auto;
}

.inline-edit-input:hover {
    border-color: var(--borde);
    background: white;
}

.inline-edit-input:focus {
    background: white;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 2px var(--primario-soft);
}

.cost-input {
    font-weight: 600;
    color: #e11d48; /* Rojo más pro para el costo */
}

/* Estilo para Badges */
.badge {
    background: var(--primario-soft);
    color: var(--color-primario);
    padding: 4px 10px;
    border-radius: 20px; /* Badges tipo píldora */
    font-size: 11px;
    font-weight: 600;
    border: none;
    display:block;
    margin:5px;
}

.filter-bar {
    background: white;
    border: 1px solid var(--borde);
    padding: 16px;
    box-shadow: var(--shadow);
}

/* --- SIDEBAR ESTRUCTURA --- */
.app-container {
    display: block;
    min-height: calc(100% - 1px);
}

/* --- SIDEBAR --- */
#sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--borde);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}


#sidebar.closed {
    margin-left: -260px; /* Esconde el menú */
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--borde);
}

.sidebar-header img { width: 120px; } /* Por si luego pones logo */


input[type="checkbox"]{
    margin: auto 0px auto auto;
    width: auto;
}
.labelchck{
    margin: auto;
}
.divchck{
    border: 1px solid var(--borde);
    border-radius: 2px;
    background-color: #f1f1f1;
    padding: 5px 11px;
    display: flex;
}
.listachck{
    display:none;
    border: 1px solid var(--borde);
    position: absolute;
    background-color: rgb(255, 255, 255);
    min-width: 150px;
    min-height: 50px;
    overflow: auto;
    max-height: 500px;
    width: fit-content;
    height: fit-content;
}
.btn-edit-wp {
    transition: transform 0.2s;
    display: block;
    font-size: 24px;
    width: 45px;
    background-color: var(--primario-soft);
    margin: auto;
    text-align: center;
    border-radius: 10px;
}
.btn-edit-wp:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px var(--color-primario));
}
.modal-ac01 {
    position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; width: 80%; max-width: 900px; max-height: 80vh; 
    border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
}
.modal-header { background: #24303d; color: white; padding: 15px; display: flex; justify-content: space-between; }
.modal-body { padding: 20px; overflow-y: auto; }
.tabla-logs { width: 100%; border-collapse: collapse; }
.tabla-logs th { background: #f4f4f4; padding: 10px; text-align: left; }
.tabla-logs td { padding: 10px; border-bottom: 1px solid #eee; font-size: 0.9em; }
.badge-campo { background: #EB8B2A; color: white; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.text-red { color: #d9534f; text-decoration: line-through; }
.text-green { color: #5cb85c; font-weight: bold; }
