:root,
[data-bs-theme=light] {

    font-size: 15px;
    --bs-primary: #008AD1;
    --bs-primary-rgb: 0, 115, 176;
    --bs-link-color: #008AD1;
    --bs-link-hover-color: #005688;
    --bs-info: #0E8DC7;
    --bs-info-rgb: 14, 141, 199;
    --bs-card-cap-bg: #008AD1;
    --bs-card-cap-color: #ffffff;

    
    --primary-color: #008AD1;
    --primary-hover: #005688;
    --primary-color-rgb: 0, 115, 176;

    
    --bg-base: #F7F9FC;
    --surface: #FFFFFF;

    
    --text-primary: #008AD1;
    --text-secondary: #6e6e6e;

    
    --active-tab-bg: #008AD1;
    --border-color: #E5E7EB;

    
    --success-color: #198754;
    --success-color-rgb: 25, 135, 84;
    --warning-color: #ffc107;
    --warning-color-rgb: 255, 193, 7;
    --error-color: #dc3545;
    --error-color-rgb: 220, 53, 69;
    --info-color: #1878A8;
    --info-color-rgb: 24, 120, 168;
}

body {
    background-color: var(--bg-base);
    color: #000;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    overflow-y: scroll;
}

::-webkit-scrollbar {
  display: none;
}

/* Firefox */
* {
  scrollbar-width: none;
}

h1, h3, h4, h5, h6 { color: #000; }

.h2 {
    color: var(--bs-primary) !important;
}

main, .navbar > .container-fluid {
    width: 95vw;
	margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px){
    main, .navbar > .container-fluid {
        width: 90vw;
    }
}

@media (min-width: 1200px){
    main, .navbar > .container-fluid {
        width: 80vw;
    }
}

.text-muted { color: var(--text-secondary) !important; }
.text-primary { color: var(--bs-primary) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--error-color) !important; }

.bg-primary {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; color: #000 !important; }
.bg-danger  { background-color: var(--error-color) !important; }

@font-face {
    font-family: "Material Icons";
    font-style: normal;
    font-weight: 400;
    src:
        url("/djcompass/public/fonts/material-icons/MaterialIcons-Regular.woff2") format("woff2"),
        url("/djcompass/public/fonts/material-icons/MaterialIcons-Regular.woff") format("woff"),
        url("/djcompass/public/fonts/material-icons/MaterialIcons-Regular.ttf") format("truetype");
}

.material-icons {
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    margin: 0 !important;
    padding: 0 !important;
}

.form-label {
    color: #000000 !important;
}

.form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

input[readonly], textarea[readonly], input[disabled], textarea[disabled], select[disabled] {
    background-color: #eaebed !important;
    border: 1px solid #d1d3e2 !important;
    cursor: not-allowed;
}

.bg-readonly-box {
    background-color: #F1F3F6 !important;
    border: 1px solid #d1d3e2 !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-hover);
    --bs-btn-active-bg: var(--primary-hover);
    --bs-btn-active-border-color: var(--primary-hover);
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
    color: #fff !important;
}

.btn-secondary {
    --bs-btn-bg: #f0f2f5;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: #e2e6ea;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: #d5d9dd;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: #f0f2f5;
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-color: var(--bs-primary);
    color: var(--bs-primary) !important;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none !important;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease-in-out;
    text-decoration: none !important;
}

.btn-action-view { color: var(--info-color); }
.btn-action-view:hover {
    background-color: rgba(var(--info-color-rgb), 0.1);
    color: var(--info-color);
}

.btn-action-edit { color: var(--primary-color); }
.btn-action-edit:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--primary-color);
}

.btn-action-delete { color: var(--error-color); }
.btn-action-delete:hover {
    background-color: rgba(var(--error-color-rgb), 0.1);
    color: var(--error-color);
}

.btn-year-nav {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--primary-color) !important;
}
.btn-active-year { cursor: default; }
.btn-year-nav:hover {
    background-color: var(--bg-base) !important;
    color: var(--primary-hover) !important;
}

.nav-link {
    color: var(--text-secondary);
    transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: var(--primary-color); }

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    background-color: var(--active-tab-bg) !important;
    border-color: var(--active-tab-bg) !important;
    color: white !important;
    font-weight: 600;
}

.dropdown-menu::-webkit-scrollbar { display: none; }

.card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--bs-primary) !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    margin-bottom: 0;
	color: #fff;
}

.badge {
    vertical-align: middle;
    padding: 0.25rem 0.5rem;
}
.badge * {
    padding: 0 !important;
    margin: 0 !important;
}

.table thead th {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    vertical-align: middle;
    border-bottom: none !important;
    padding: 5px 10px !important;
}

.table-light { --bs-table-bg: #F9FAFB; }
.border, .border-bottom, .border-top, .table-bordered { border-color: var(--border-color) !important; }

table a { margin: 0; padding: 0; }
table .material-icons { font-size: 20px; margin: 0; }

table.dataTable thead > tr > th {
    padding-right: 35px !important;
    position: relative !important;
}

table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc {
    text-align: left !important;
}

.dt-column-order {
    right: 10px !important;
    left: auto !important;
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
}

table.dataTable thead th span.dt-column-order {
    margin-left: 0 !important;
}

table.dataTable th.dt-type-numeric,
table.dataTable th.dt-type-date,
table.dataTable td.dt-type-numeric,
table.dataTable td.dt-type-date {
    text-align: center !important;
}

.dataTables_wrapper { padding: 0; }
.dataTables_length,
.dataTables_filter { margin-bottom: 1rem; margin-top: 0.5rem; }
.dataTables_info,
.dataTables_paginate { margin-top: 1rem; }

.page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.w-15 { width: 15%; }

.link-shortened {
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.notif-item-body { min-width: 0; }

.notif-empty p {
    font-size: 0.875rem;
    margin: 0;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(15deg); }
    20%, 40%, 60%, 80% { transform: rotate(-15deg); }
}
.bell-shake {
    animation: bell-shake 0.8s cubic-bezier(.36, .07, .19, .97) both;
    transform-origin: top center;
}

.sidebar:has(.notif-panel.show) { overflow: visible !important; }

.sidebar:has(.notif-panel.show) > div { overflow: visible !important; }

.sidebar .nav-item { margin: 0 10px; }
.sidebar .nav-item:first-child { margin-top: 10px; }

.sidebar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}
.sidebar a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar .collapse .nav-item a {
    padding: 8px 20px 8px 35px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    background-color: transparent;
    box-shadow: none;
}
.sidebar .collapse .nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}
.sidebar .collapse .nav-item a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
    box-shadow: none;
}

.sidebar .nav-item a .material-icons.expand_more {
    margin-right: 0;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}
.sidebar .nav-item a:not(.collapsed) .material-icons.expand_more,
.sidebar .nav-item a.active .material-icons.expand_more {
    transform: rotate(180deg);
}

.sidebar-profile-img {
    width: 30px !important;
    height: 30px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.sidebar-user-info a {
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}
.sidebar-user-info a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 300px;
    height: 300px;
}
.heatmap-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border-radius: 4px;
}

.risk-low     { background-color: var(--success-color); }
.risk-med     { background-color: var(--warning-color); color: #000; }
.risk-high    { background-color: var(--error-color); }
.risk-extreme { background-color: #000000; color: white; }

#modal-manager-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-manager-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}
.modal-manager-content {
    position: relative;
    background: white;
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    padding: 25px;
}
.modal-manager-close-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

.modal-title {
	color: #fff;
}

.approval-card { max-width: 900px; width: 100%; margin: 2rem auto; }
.section-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.org-node-content{
    text-align: center;
    padding: 10px;
    border: 1px solid #505050;
	width: 150px;
}

.org-title {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.org-name {
    color: #4e4e4e;
    font-size: 0.8rem;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.google-visualization-orgchart-lineleft,
.google-visualization-orgchart-lineright,
.google-visualization-orgchart-linebottom {
    border-color: var(--bs-primary) !important;
}

/* Training Module Styles */
.border-start-primary { border-left: 4px solid var(--bs-primary) !important; }
.border-start-danger { border-left: 4px solid var(--error-color) !important; }
.border-start-success { border-left: 4px solid var(--success-color) !important; }
.border-start-warning { border-left: 4px solid var(--warning-color) !important; }

.form-check-label{
    white-space: normal;
}

/* ── Notificaciones (navbar dropdown) ─────────────────────────────────── */

.notif-panel { min-width: 340px; padding: 0; }

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.25);
    border-radius: 4px;
}

.notif-item {
    display: flex;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: #1f2937;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background-color: rgba(var(--bs-primary-rgb), 0.05); }
.notif-item.notif-unread { background-color: #eef6fc; }
.notif-item.notif-unread::before {
    content: '';
    display: block;
    width: 3px;
    flex-shrink: 0;
    background: var(--bs-primary);
    border-radius: 2px;
    align-self: stretch;
}

.notif-item-icon { flex-shrink: 0; margin-top: 2px; }
.notif-item-body { flex: 1; min-width: 0; }

.notif-item-msg {
    margin: 0 0 3px;
    font-size: 0.85rem;
    color: #1f2937;
    line-height: 1.4;
}

.notif-item-time {
    font-size: 0.75rem;
    color: #595959; /* FIX contraste: #888→#595959 (ratio 7.0:1) */
}

