/* Estilos específicos para el Panel de Administración */
.admin-body {
    background-color: #f4f7f6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* MODO OSCURO */
body.dark-mode .admin-body {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .sidebar-admin,
body.dark-mode .admin-main-panel,
body.dark-mode .admin-card-option,
body.dark-mode .bg-light,
body.dark-mode .card,
body.dark-mode .modal-content {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .admin-card-option h5,
body.dark-mode .text-dark,
body.dark-mode h3,
body.dark-mode h4 {
    color: #a0a0a0 !important; /* Softer grey for titles in dark mode */
}

/* General text color for dark mode */
body.dark-mode .form-label,
body.dark-mode,
body.dark-mode p,
body.dark-mode span,
body.dark-mode small,
body.dark-mode label,
body.dark-mode a:not(.btn), /* Exclude buttons from this general rule */
body.dark-mode .text-muted { /* Ensure text-muted also becomes light */
    color: #e0e0e0 !important;
}

/* Table styling for dark mode */
body.dark-mode .table {
    color: #e0e0e0;
    border-color: #333;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #2d2d2d;
    border-color: #444;
    color: #fff;
}

body.dark-mode .form-control:focus {
    background-color: #333;
    color: #fff;
}

/* Sidebar Navigation Links - Light Mode */
.sidebar-admin .nav-link {
    color: #343a40 !important; /* Ensure dark text in light mode */
}

.sidebar-admin .nav-link.active {
    background-color: var(--azul-marino); /* Active state background in light mode */
    color: white !important;
}

.sidebar-admin .nav-link:hover {
    background-color: var(--verde-institucional); /* Hover background in light mode */
    color: white !important;
}

/* Sidebar Navigation Links - Dark Mode */
body.dark-mode .sidebar-admin .nav-link {
    color: #e0e0e0 !important; /* White for dark mode */
}

body.dark-mode .sidebar-admin .nav-link.active {
    background-color: #007bff !important; /* Active state background in dark mode (Bootstrap primary blue) */
    color: #ffffff !important;
}

body.dark-mode .sidebar-admin .nav-link:hover {
    background-color: #333333 !important; /* Darker hover for dark mode */
    color: #ffffff !important;
}

/* Table specific dark mode styles */
body.dark-mode .table {
    background-color: #1e1e1e !important; /* Main table background */
}

body.dark-mode .table thead th {
    background-color: #282828 !important; /* Table header background */
    border-color: #333 !important;
    color: #ffffff !important;
}

body.dark-mode .table tbody tr {
    background-color: #1e1e1e !important; /* Default row background */
}

body.dark-mode .table tbody tr:nth-of-type(odd) {
    background-color: #222222 !important; /* Alternate row background */
}

body.dark-mode .table tbody tr:hover {
    background-color: #333333 !important; /* Row hover background */
}

body.dark-mode .table,
body.dark-mode .table-responsive,
body.dark-mode .table.table-bordered,
body.dark-mode .table thead th,
body.dark-mode .table tbody tr,
body.dark-mode .table tbody td,
body.dark-mode .table tbody th {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

body.dark-mode .table th,
body.dark-mode .table td,
body.dark-mode .table a,
body.dark-mode .table small,
body.dark-mode .table span {
    color: #f5f5f5 !important;
}

body.dark-mode .table thead th {
    background-color: #282828 !important; /* Table header background */
    border-color: #333 !important;
    color: #ffffff !important;
}

body.dark-mode .table tbody tr:nth-of-type(odd) {
    background-color: #222222 !important; /* Alternate row background */
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: #333333 !important;
}

body.dark-mode .bg-white,
body.dark-mode .table-light,
body.dark-mode .table-light th,
body.dark-mode .table-light td,
body.dark-mode .bg-white .table {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-mode .table-light thead th,
body.dark-mode .table-light tbody tr {
    background-color: #1e1e1e !important;
}

body.dark-mode .table-light thead th {
    background-color: #252525 !important;
    color: #ffffff !important;
}

body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .table a,
body.dark-mode .table small,
body.dark-mode .table span {
    color: #f5f5f5 !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="url"],
body.dark-mode input[type="password"],
body.dark-mode input[type="file"] {
    background-color: #212121 !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

body.dark-mode .form-control.border-0,
body.dark-mode .form-control.bg-white,
body.dark-mode .form-control.bg-light,
body.dark-mode .form-select.bg-white,
body.dark-mode .form-select.bg-light,
body.dark-mode textarea.bg-white,
body.dark-mode textarea.bg-light,
body.dark-mode .input-group .form-control,
body.dark-mode .admin-main-panel .form-control,
body.dark-mode .admin-main-panel .form-select,
body.dark-mode .admin-main-panel textarea,
body.dark-mode .admin-main-panel input[type="text"],
body.dark-mode .admin-main-panel input[type="email"],
body.dark-mode .admin-main-panel input[type="url"],
body.dark-mode .admin-main-panel input[type="password"],
body.dark-mode .admin-main-panel input[type="file"] {
    background-color: #212121 !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

body.dark-mode .admin-main-panel .form-control::placeholder,
body.dark-mode .admin-main-panel .form-select option,
body.dark-mode .admin-main-panel textarea::placeholder {
    color: rgba(255,255,255,0.65) !important;
}

body.dark-mode .admin-main-panel .bg-light,
body.dark-mode .admin-main-panel .bg-white,
body.dark-mode .admin-main-panel .border,
body.dark-mode .admin-main-panel .border-light,
body.dark-mode .admin-main-panel .staff-member-form,
body.dark-mode .admin-main-panel .staff-member-form .bg-light,
body.dark-mode .admin-main-panel .d-flex.align-items-center.mb-2.p-2.border.rounded.bg-light,
body.dark-mode .admin-main-panel .filter-bar {
    background-color: #1f1f1f !important;
    color: #e8e8e8 !important;
    border-color: #333 !important;
}

body.dark-mode .admin-main-panel .form-select option,
body.dark-mode select.form-select option {
    background-color: #212121 !important;
    color: #f1f1f1 !important;
}

body.dark-mode .form-select,
body.dark-mode select {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
}

body.dark-mode .form-check-input {
    background-color: #1e1e1e !important;
    border-color: #444 !important;
}

body.dark-mode .admin-main-panel .form-label,
body.dark-mode .admin-main-panel label,
body.dark-mode .admin-main-panel small,
body.dark-mode .admin-main-panel .text-muted {
    color: #e0e0e0 !important;
}
body.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-secondary:focus {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-danger,
body.dark-mode .btn-warning,
body.dark-mode .btn-info,
body.dark-mode .btn-secondary {
    border-color: transparent !important;
}

body.dark-mode .alert,
body.dark-mode .card-header,
body.dark-mode .card-body,
body.dark-mode .table-responsive,
body.dark-mode .page-item .page-link {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: #333 !important; /* Cell borders */
}

/* Adjust badge colors for dark mode if they are light in light mode */
body.dark-mode .badge.bg-info {
    background-color: #0dcaf0 !important; /* Bootstrap info color */
    color: #121212 !important; /* Dark text for light badge */
}

body.dark-mode .badge.bg-warning {
    background-color: #ffc107 !important; /* Bootstrap warning color */
    color: #121212 !important; /* Dark text for light badge */
}

body.dark-mode .badge.bg-success {
    background-color: #198754 !important; /* Bootstrap success color */
    color: #ffffff !important;
}

body.dark-mode .badge.bg-primary {
    background-color: #0d6efd !important; /* Bootstrap primary color */
    color: #ffffff !important;
}

body.dark-mode .badge.bg-secondary {
    background-color: #6c757d !important; /* Bootstrap secondary color */
    color: #ffffff !important;
}

body.dark-mode .badge.bg-dark {
    background-color: #343a40 !important; /* Bootstrap dark color */
    color: #ffffff !important;
}


/* Sidebar Navigation Links - Dark Mode */
body.dark-mode .sidebar-admin .nav-link {
    color: #e0e0e0 !important; /* White for dark mode */
}

body.dark-mode .admin-sidebar-title,
body.dark-mode .sidebar-admin h5 {
    color: #e0e0e0 !important;
}

.admin-sidebar-title {
    color: var(--azul-marino);
}

.admin-card-option {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: block;
    background-color: #f8f9fa; /* Explicit light background to ensure visibility */
    height: 100%;
    border-bottom: 5px solid transparent;
}

.admin-card-option:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.admin-card-option i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.admin-card-option h5 {
    color: #007bff; /* Attractive blue for titles in light mode */
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.admin-card-option p {
    color: #000; /* Texto en negro para modo claro */
    font-size: 0.9rem;
    margin-bottom: 0;
}

.sidebar-admin {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.admin-main-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    min-height: 400px; /* Ensure panel takes up space */
}

.stats-pill {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 15px;
    border-left: 4px solid #108c35;
    margin-bottom: 10px;
}

body.dark-mode .stats-pill {
    background-color: #1d1d1d !important;
    color: #f1f1f1 !important;
    border-color: #4a90e2 !important;
}

body.dark-mode .stats-pill strong {
    color: #ffffff !important;
}

/* Estilos para el Stepper de Noticias */
.news-stepper .nav-link {
    border-radius: 0;
    border-bottom: 3px solid transparent;
    color: #6c757d !important;
    font-weight: 600;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.news-stepper .nav-link.active {
    color: var(--azul-marino) !important;
    border-bottom-color: var(--verde-institucional);
}

.news-stepper .step-number {
    display: inline-flex;
    width: 25px;
    height: 25px;
    background: #e9ecef;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-right: 8px;
}

.news-stepper .nav-link.active .step-number {
    background: var(--verde-institucional);
    color: white;
}

body.dark-mode .news-stepper {
    background-color: transparent !important;
}

body.dark-mode .news-stepper .nav-link {
    color: #f1f1f1 !important;
    border-bottom-color: transparent !important;
    background: none !important;
}

body.dark-mode .news-stepper .nav-link.active {
    color: #ffffff !important;
    border-bottom-color: #51cf66 !important;
}

body.dark-mode .news-stepper .step-number {
    background: #37474f !important;
    color: #f1f1f1 !important;
}

body.dark-mode .news-stepper .nav-link.active .step-number {
    background: #51cf66 !important;
    color: #121212 !important;
}

body.dark-mode .news-stepper .nav-link:hover {
    color: #ffffff !important;
}

body.dark-mode .news-stepper .nav-link,
body.dark-mode .news-stepper .nav-link.active {
    box-shadow: none !important;
}

.textarea-editorial {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Estilo para el recuadro de prioridad visual */
.priority-highlight-box {
    background-color: #fff9db;
    border: 2px solid #ffec99;
    color: #856404;
    transition: all 0.3s ease;
}

body.dark-mode .priority-highlight-box {
    background-color: #2d2a15 !important;
    border-color: #ffd43b !important;
    color: #ffe066 !important;
}

/* Overwrites adicionales de modo oscuro para el panel admin */
body.dark-mode .navbar-custom,
body.dark-mode .top-accent-bar,
body.dark-mode .dropdown-menu,
body.dark-mode .dropdown-item,
body.dark-mode .modal-content,
body.dark-mode .form-check,
body.dark-mode .form-check-input,
body.dark-mode .form-check-label,
body.dark-mode .btn-close {
    background-color: #1b1b1b !important;
    color: #e0e0e0 !important;
}

body.dark-mode .navbar-custom {
    background-color: #151515 !important;
    border-color: #222 !important;
}

body.dark-mode .top-accent-bar {
    background: #222 !important;
}

body.dark-mode .dropdown-menu {
    background-color: #1d1d1d !important;
    border-color: #333 !important;
}

body.dark-mode .dropdown-item,
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    color: #e8e8e8 !important;
    background-color: transparent !important;
}

body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-danger,
body.dark-mode .btn-warning,
body.dark-mode .btn-info,
body.dark-mode .btn-secondary,
body.dark-mode .btn-outline-primary,
body.dark-mode .btn-outline-danger,
body.dark-mode .btn-outline-success,
body.dark-mode .btn-outline-warning,
body.dark-mode .btn-outline-info {
    color: #f8f9fa !important;
    background-color: #24303f !important;
    border-color: #3a4755 !important;
}

body.dark-mode .btn-outline-primary,
body.dark-mode .btn-outline-danger,
body.dark-mode .btn-outline-success,
body.dark-mode .btn-outline-warning,
body.dark-mode .btn-outline-info {
    background-color: transparent !important;
    border-color: #4e5d73 !important;
}

body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-outline-danger:hover,
body.dark-mode .btn-outline-success:hover,
body.dark-mode .btn-outline-warning:hover,
body.dark-mode .btn-outline-info:hover,
body.dark-mode .btn-outline-secondary:hover {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
}

body.dark-mode .admin-card-option {
    background-color: #1f1f1f !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.35) !important;
}

body.dark-mode .admin-card-option p,
body.dark-mode .admin-card-option h5 {
    color: #f1f1f1 !important;
}

body.dark-mode .sidebar-admin,
body.dark-mode .admin-main-panel,
body.dark-mode .card,
body.dark-mode .card-header,
body.dark-mode .card-body,
body.dark-mode .alert,
body.dark-mode .table-responsive,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .form-check-input {
    background-color: #1c1c1c !important;
    border-color: #333 !important;
    color: #e9e9e9 !important;
}

body.dark-mode .form-control::placeholder,
body.dark-mode .form-select option,
body.dark-mode .form-check-label,
body.dark-mode .text-muted {
    color: rgba(255,255,255,0.72) !important;
}

body.dark-mode .bg-light {
    background-color: #1e1e1e !important;
    color: #e8e8e8 !important;
}

body.dark-mode .bg-white {
    background-color: #1e1e1e !important;
    color: #e8e8e8 !important;
}

body.dark-mode .table thead th,
body.dark-mode .table tbody td,
body.dark-mode .table tbody th,
body.dark-mode .table-responsive {
    background-color: #1f1f1f !important;
    color: #e8e8e8 !important;
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: #2d2d2d !important;
}

body.dark-mode .page-item .page-link,
body.dark-mode .pagination .page-link,
body.dark-mode .btn-close {
    background-color: #1b1b1b !important;
    color: #e8e8e8 !important;
    border-color: #333 !important;
}

body.dark-mode .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
