/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f8ff;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background-color: #1a3f6a;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

header .logo-container {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

header .logo-container:hover {
    opacity: 0.8;
}

header img {
    height: 40px;
    margin-right: 15px;
}

.container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin-top: 100px;
    margin-bottom: 40px;
}

.container-wide {
    max-width: 800px;
}

.container-xl {
    max-width: 1200px;
    padding: 0;
    overflow: hidden;
    display: flex;
}

.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

h2 {
    color: #1a3f6a;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 600;
}

h3 {
    color: #1a3f6a;
    font-size: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    text-align: left;
    margin-top: 30px;
}

label {
    display: block;
    text-align: left;
    font-weight: bold;
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #1a3f6a;
}

input,
select {
    width: 100%;
    padding: 10px 15px;
    margin: 0;
    display: block;
    border: 1px solid #c0e0f0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input:focus,
select:focus {
    border-color: #1a3f6a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 63, 106, 0.1);
}

.password-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.password-wrapper input {
    padding-right: 45px;
    margin-top: 10px;
}

#toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

button {
    background-color: #1a3f6a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 17px;
    margin-top: 15px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #132e4d;
}

button:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.menu-grid {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-btn {
    background-color: white;
    color: #1a3f6a;
    border: 2px solid #1a3f6a;
    padding: 20px;
    font-size: 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-btn:hover:not(:disabled) {
    background-color: #1a3f6a;
    color: white;
}

.admin-emp-card {
    position: relative;
    background-color: #f9fcff;
    margin: 14px 0;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #d9ebf7;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.admin-emp-card:hover {
    background-color: #eaf3fa;
}

.notification-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    margin-top: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab.active {
    color: #1a3f6a;
    border-bottom-color: #1a3f6a;
}

/* --- ESTILOS MÓDULO TIMECHECK --- */
.tc-sidebar {
    width: 250px;
    background-color: #1a2a3a;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

.tc-sidebar-header {
    padding: 20px;
    background-color: #13222e;
    font-size: 20px;
    font-weight: bold;
}

.tc-nav-section {
    padding: 10px 20px;
    font-size: 12px;
    color: #8a9ba8;
    text-transform: uppercase;
    margin-top: 15px;
    text-align: left;
}

.tc-nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #cfd8dc;
    transition: 0.2s;
    text-align: left;
}

.tc-nav-item:hover,
.tc-nav-item.active {
    background-color: #2b3e50;
    color: white;
    border-left: 4px solid #3498db;
}

.tc-main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f4f7f6;
    text-align: left;
    width: 100%;
    overflow-x: auto;
}

.tc-table-custom {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-collapse: collapse;
    margin-top: 20px;
}

.tc-table-custom th {
    background-color: #673ab7;
    color: white;
    padding: 15px;
    text-align: left;
    font-size: 14px;
}

.tc-table-custom td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 14px;
}

.tc-clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.tc-clickable-row:hover {
    background-color: #f0f0f0 !important;
}

.tc-btn-header {
    width: auto;
    margin: 0;
    padding: 8px 15px;
    font-size: 14px;
}

.tc-box {
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.tc-reg-row {
    border-bottom: 1px solid #eee;
}

.tc-reg-row:hover {
    background-color: #f9f9f9;
}

.tc-reg-weekend {
    background-color: #fdf5f6;
}

.tc-reg-total-week {
    background-color: #b3e5fc;
    font-weight: bold;
    text-align: right;
}

.tc-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid #ccc;
    background: white;
    margin-right: 5px;
    transition: 0.2s;
}

.tc-pill-group {
    display: inline-block;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    margin-right: 5px;
    border: 1px solid transparent;
}

.tc-pill-group:hover {
    background-color: #e2e6ea;
    border: 1px solid #ccc;
}

/* --- ESTILOS EDICIÓN DE HORARIOS --- */
.horario-info-alert {
    background-color: #f2f9fc;
    border: 1px solid #bce2ee;
    border-left: 4px solid #1ba5cc;
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: #2c5b73;
    text-align: left;
}

.horario-table-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.horario-table-grid th {
    background-color: #35a9d8;
    color: white;
    font-weight: bold;
    padding: 8px 4px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #289bc9;
}

.horario-table-grid td {
    padding: 4px 6px;
    vertical-align: middle;
    text-align: center;
}

.horario-table-grid td.label-col {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    width: 140px;
}

.horario-input {
    width: 100%;
    max-width: 85px;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    display: inline-block;
}

.horario-input:focus {
    border-color: #35a9d8;
    box-shadow: 0 0 0 2px rgba(53, 169, 216, 0.2);
}

.horario-divider-row td {
    padding: 0;
    height: 4px;
    background-color: #35a9d8;
}

.horario-section-banner {
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.horario-section-content {
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 12px 14px;
    margin-bottom: 15px;
}

/* Switch Toggle Styling */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    vertical-align: middle;
    margin-left: 6px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch-toggle input:checked + .switch-slider {
    background-color: #28a745;
}

.switch-toggle input:checked + .switch-slider:before {
    transform: translateX(16px);
}

/* Píldoras y badges de Horarios Generados */
.tc-horario-pill {
    background: #505050;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: inline-block;
    margin-bottom: 2px;
    white-space: nowrap;
    font-weight: 500;
}

.tc-descanso-pill {
    background: #68b3cc;
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    font-weight: 500;
    margin-top: 1px;
}

.tc-total-sem-badge {
    background: #8b6bc6;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.tc-info-badges {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.tc-info-badge-desc {
    background: #d94350;
    color: white;
    width: 20px;
    height: 15px;
    border-radius: 3px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tc-info-badge-desc.norestar {
    background: #20c997;
}

.tc-info-badge-margen {
    background: #20c997;
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
}

.tc-horario-actions {
    font-size: 11.5px;
    margin-top: 4px;
    color: #888;
}

.tc-horario-actions .action-link {
    color: #0d6efd;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.tc-horario-actions .action-link:hover {
    text-decoration: underline;
}

.tc-horario-actions .action-link.text-danger {
    color: #dc3545;
}

.tc-cal-grid {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

.tc-cal-grid th {
    background-color: #5a809e;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 10px 4px;
    font-size: 14px;
    border: 1px solid #4a6f8d;
}

.tc-cal-grid td {
    border: 1px solid #eee;
    height: 80px;
    vertical-align: top;
    padding: 2px;
    position: relative;
}

.tc-cal-day-num {
    text-align: right;
    font-size: 12px;
    color: #888;
    padding: 2px 4px;
}

.tc-cal-bar {
    color: white;
    font-size: 11px;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: filter 0.2s;
}

.tc-cal-bar:hover {
    filter: brightness(0.9);
    border: 1px solid #333;
}

/* Estilos específicos para Informes */
.inf-row-title {
    background-color: #3bb3c3;
    color: white;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.inf-row-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
    background-color: white;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.inf-select {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1;
    max-width: 350px;
    margin: 0;
}

.inf-input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 160px;
    margin: 0;
}

.inf-btn-group {
    display: flex;
    gap: 10px;
}

.inf-btn-pdf {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    margin: 0;
    width: auto;
    transition: 0.2s;
}

.inf-btn-pdf:hover {
    background-color: #c82333;
}

.inf-btn-xlsx {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    margin: 0;
    width: auto;
    transition: 0.2s;
}

.inf-btn-xlsx:hover {
    background-color: #218838;
}


.aus-row-title {
    background: #d9435b;
    color: white;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aus-row-content {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

.aus-badge {
    background: #607d8b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 14px;
}

.aus-year-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #bfc7cf;
    border-radius: 4px;
    min-width: 180px;
}

/* Ocultar todas las pantallas por defecto */
#main-menu,
#dashboard,
#vacaciones-screen,
#registro-screen,
#admin-menu,
#admin-panel-nominas,
#admin-panel-vacaciones,
#admin-detalle-vacaciones,
#admin-panel-empleados,
#admin-form-empleado,
#admin-timecheck-screen {
    display: none;
}