/* ==========================================================================
   THE SEED - IDENTIDAD VISUAL (DARK MODE)
   ========================================================================== */

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

:root {
    /* Paleta de Colores Extraída */
    --bg: #07090B;
    --bg-2: #0B0F12;
    --panel: #111417;
    --panel-2: #15191D;
    --panel-soft: #0E1613;
    --green: #00C896;
    --green-2: #00A77D;
    --green-dark: #153022;
    --cream: #DBD8C8;
    --ink: #F4F1E8;
    --muted: #9BA3A8;
    --line: #252B2F;
    --line-green: rgba(0,200,150,.32);
    --danger: #FF5D5D;
    
    /* Sombras y Formas */
    --shadow: 0 18px 46px rgba(0,0,0,.28);
    --radius: 18px;
}

/* ==========================================================================
   BASE Y TIPOGRAFÍA
   ========================================================================== */
* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    /* El degradado de fondo original con halos verdes y crema */
    background: 
        radial-gradient(circle at 16% 0%, rgba(0,200,150,.10), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(219,216,200,.05), transparent 26%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
    background-attachment: fixed;
    color: var(--ink);
    padding: 20px;
}

h1, h2, h3 {
    letter-spacing: -0.04em;
    color: var(--cream);
    margin-top: 0;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    color: var(--green-2);
}

hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 20px 0;
}

/* ==========================================================================
   FORMULARIOS Y ENTRADAS (INPUTS / SELECTS)
   ========================================================================== */
label {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: var(--green);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input, select {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #080B0D;
    color: var(--ink);
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

/* Soporte para select múltiple */
select[multiple] {
    height: auto;
    padding: 8px;
}

input:focus, select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,200,150,.10);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
button {
    appearance: none;
    border: 1px solid var(--line);
    background: #101316;
    color: var(--cream);
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px; /* Aspecto de píldora del diseño original */
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.16s ease;
    user-select: none;
}

button:hover {
    transform: translateY(-1px);
    border-color: var(--line-green);
    box-shadow: 0 8px 22px rgba(0,200,150,.09);
    color: #fff;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--line);
    box-shadow: none;
    transform: none;
}

/* Botones principales y de acción (Guardar, Pagar, Añadir) */
button[type="submit"], 
.btn-primario,
a button {
    background: linear-gradient(135deg, var(--green), var(--green-2));
    color: #04100C;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(0,200,150,.18);
    font-weight: 900;
}

button[type="submit"]:hover, 
.btn-primario:hover,
a button:hover {
    border-color: transparent;
    color: #000;
    box-shadow: 0 12px 28px rgba(0,200,150,.25);
}

/* Botón de Logout o Peligro */
.btn-peligro {
    color: #FF9E9E;
    border-color: rgba(255,93,93,.22);
    background: rgba(255,93,93,.06);
}

.btn-peligro:hover {
    border-color: rgba(255,93,93,.4);
    box-shadow: 0 8px 22px rgba(255,93,93,.15);
}

/* ==========================================================================
   TABLAS Y PANELES (Adaptado al sistema salarial)
   ========================================================================== */
.panel {
    background: linear-gradient(180deg, rgba(21,25,29,.98), rgba(13,17,20,.98));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* Brillo sutil interno en los paneles */
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(0,200,150,.06), transparent 40%);
    pointer-events: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: rgba(17,20,23,.72);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.055);
}

th {
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.4);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255,255,255,.02);
}

/* Fila de desglose expandible */
tr[id^="desglose_"] td {
    background: var(--panel-soft);
    border-top: 1px dashed var(--line-green);
    border-bottom: 2px solid var(--line);
}

tr[id^="desglose_"] ul {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

tr[id^="desglose_"] strong {
    color: var(--cream);
    font-size: 15px;
}

/* ==========================================================================
   UTILIDADES (Login y Contenedores)
   ========================================================================== */
.login-container {
    max-width: 400px;
    margin: 10vh auto;
    text-align: center;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(17,20,23,.86);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

/* ==========================================================================
   AJUSTES DE LOGO Y LOGIN
   ========================================================================== */
.logo {
    width: 70px;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.logo-inline {
    width: 60px;
    height: auto;
    vertical-align: middle;
    margin-right: 15px;
}

.login-panel {
    max-width: 420px;
    margin: 12vh auto; /* Centra el cuadro en la pantalla */
    text-align: left;
}

.login-panel h2 {
    text-align: center;
    margin-bottom: 24px;
}

.login-panel .logo {
    margin: 0 auto 20px auto; /* Centra el logo en el login */
}

/* ==========================================================================
   ELEMENTOS NATIVOS Y CALENDARIO
   ========================================================================== */
/* Le ordena al navegador que use su tema oscuro para los pop-ups del sistema */
:root {
    color-scheme: dark;
}

/* Las garras para atrapar el ícono del calendario */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    /* Invertimos el ícono oscuro por defecto y le damos un tono verdoso */
    filter: invert(70%) sepia(50%) saturate(600%) hue-rotate(110deg) brightness(120%);
    opacity: 0.7;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* El destello cuando el lobo acecha (Hover) */
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: rgba(0, 200, 150, 0.15); /* Fondo verde sutil */
    box-shadow: 0 0 8px rgba(0, 200, 150, 0.4); /* Pequeño resplandor */
    transform: scale(1.15); /* Crece ligeramente */
}