/* --- New Project Card Styles --- */
.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px;
    display: block;
    /* Make it a block-level element */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.project-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-card-image {
    transform: scale(1.05);
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
    /* Allow clicks to go through to the link */
}

.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px;
    color: white;
    width: 100%;
    pointer-events: none;
    /* Allow clicks to go through to the link */
}

.project-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.project-card-desc {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.project-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.project-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.project-action-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.project-action-btn.delete:hover {
    background-color: #e74c3c;
    color: white;
}

/* --- Pagination Styles --- */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.pagination {
    display: flex;
    gap: 5px;
}

.history-header .filters .form-select {
    border-radius: 20px;
    /* Fully rounded corners */
    border-color: #ced4da;
    padding-left: 1rem;
    padding-right: 2.5rem;
    /* Make space for the dropdown arrow */
    background-position: right 0.75rem center;
}

.pagination .page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.pagination .page-link:hover {
    background-color: #007bff;
    color: #fff;
}

.pagination .page-link.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    cursor: default;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #16a085 100%);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, rgba(30, 58, 50, 0.95) 0%, rgba(44, 95, 63, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    position: fixed;
    height: 100vh;
    overflow-y: hidden;
    overflow-x: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    left: 0;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.logo-image {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    border-radius: 6px;
}

.brand-container {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.brand-name {
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 2px;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 8px;
    line-height: 1.1;
    font-weight: 400;
}

.sidebar.collapsed .brand-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.close-btn {
    display: none;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.nav-menu {
    padding: 15px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    margin: 3px 10px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    gap: 12px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(3px);
}

.nav-link.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.4);
}

/* Estilo especial para el botón de Plan Operativo Anual (Mostaza) */
.nav-link.nav-link-poa i,
.nav-link.nav-link-poa span {
    color: #e1ad01;
    /* Color mostaza base */
}

.nav-link.nav-link-poa:hover {
    background: rgba(225, 173, 1, 0.1);
}

.nav-link.nav-link-poa.active {
    background: linear-gradient(135deg, #e1ad01, #d97706) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(225, 173, 1, 0.4) !important;
}

.nav-link.nav-link-poa.active i,
.nav-link.nav-link-poa.active span {
    color: white !important;
}

.nav-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

.nav-text {
    transition: opacity 0.3s ease;
    white-space: nowrap;
    font-size: 13px;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 8px 0;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logout-section {
    padding: 0 10px;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    gap: 12px;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    width: calc(100% - 220px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    min-width: 0;
    /* Eliminamos overflow-x para no romper el position: sticky del navbar */
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* --- Burbujas de Notificación del Sidebar (Contadores) --- */

.sidebar-badge {
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 14px;
    text-align: center;
    margin-left: auto;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: badge-pulse 2s infinite;
}

/* Efecto de pulso luminoso en la burbuja */
@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Reposicionamiento del contador cuando el sidebar está colapsado */
.sidebar.collapsed .sidebar-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    margin-left: 0;
    font-size: 9px;
    padding: 1px 4px;
    min-width: 14px;
    height: 14px;
    line-height: 11px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 12px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1050; /* Mayor que el sidebar (1000) y overlays */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 150px;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #2c5f3f;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c5f3f;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 16px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 40px;
    background: rgba(39, 174, 96, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-profile:hover {
    background: rgba(39, 174, 96, 0.2);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
    /* To ensure the image respects the border-radius */
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* To make the image cover the circle */
}

.user-info h4 {
    color: #2c5f3f;
    font-size: 12px;
    font-weight: 600;
}

.user-info p {
    color: #7f8c8d;
    font-size: 10px;
}

.content-area {
    padding: 20px;
    overflow: hidden;
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

@keyframes premiumWidgetEntrance {
    0% {
        opacity: 0;
        transform: perspective(600px) translate3d(0, 60px, -40px) rotateX(-5deg);
        filter: blur(5px);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    50% {
        opacity: 1;
        transform: perspective(600px) translate3d(0, -5px, 0) rotateX(1deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: perspective(600px) translate3d(0, 0, 0) rotateX(0deg);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
}

.widget-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    animation: premiumWidgetEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger for widgets in grid rows */
.dashboard-grid:nth-of-type(1) .widget-card { animation-delay: 0.1s; }
.dashboard-grid:nth-of-type(2) .widget-card:nth-child(1) { animation-delay: 0.2s; }
.dashboard-grid:nth-of-type(2) .widget-card:nth-child(2) { animation-delay: 0.3s; }
.dashboard-grid:nth-of-type(2) .widget-card:nth-child(3) { animation-delay: 0.4s; }
.dashboard-grid:nth-of-type(2) .widget-card:nth-child(4) { animation-delay: 0.5s; }

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.greeting-card {
    background: linear-gradient(135deg, #1e3a32 0%, #2c5f3f 50%, #27ae60 100%);
    color: white;
}

.greeting-card::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
}

.greeting-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.greeting-icon {
    font-size: 32px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.greeting-text h2 {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
}

.greeting-text p {
    opacity: 0.9;
    font-size: 13px;
}

.weather-card {
    text-align: center;
}

.weather-icon {
    font-size: 40px;
    color: #27ae60;
    margin-bottom: 10px;
}

.temperature {
    font-size: 24px;
    font-weight: 700;
    color: #2c5f3f;
    margin-bottom: 8px;
}

.weather-desc {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: 500;
}

.stats-card {
    text-align: center;
}

.stats-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    min-height: 100%;
}

.stats-card-actions .stats-desc {
    font-size: 12px;
}

.stats-card-actions .stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card-actions .stats-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stats-icon {
    width: 50px;
    height: 50px;
    overflow: hidden;
    /* Ensure image respects the border-radius */
    border-radius: 50%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.stats-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c5f3f;
    margin-bottom: 8px;
    line-height: 1.3;
}

.stats-desc {
    color: #7f8c8d;
    line-height: 1.4;
    font-size: 11px;
}

.vacation-card .stats-icon {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.quick-actions {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c5f3f;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.section-title i {
    color: #27ae60;
    font-size: 14px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(39, 174, 96, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: #2c5f3f;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.action-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.2);
}

.action-btn i {
    font-size: 16px;
    color: #27ae60;
}

.action-btn span {
    font-weight: 500;
    text-align: center;
    font-size: 10px;
    line-height: 1.2;
}

.sidebar::-webkit-scrollbar,
.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track,
.nav-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb,
.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.nav-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
    }

    .content-area {
        padding: 18px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }

    .page-title {
        font-size: 18px;
    }

    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 220px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
        width: 100%;
    }

    .close-btn {
        display: block;
    }

    .header {
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .header-left {
        min-width: auto;
    }

    .page-title {
        font-size: 16px;
    }

    .content-area {
        padding: 15px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .widget-card {
        padding: 15px;
    }

    .greeting-content {
        text-align: center;
        justify-content: center;
    }

    .greeting-icon {
        font-size: 28px;
    }

    .greeting-text h2 {
        font-size: 16px;
    }

    .weather-icon {
        font-size: 32px;
    }

    .temperature {
        font-size: 20px;
    }

    .stats-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stats-title {
        font-size: 12px;
    }

    .quick-actions {
        padding: 15px;
    }

    .section-title {
        font-size: 14px;
        text-align: center;
        justify-content: center;
    }

    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .action-btn {
        padding: 10px 6px;
    }

    .action-btn span {
        font-size: 9px;
    }

    .user-info {
        display: none;
    }

    .nav-link {
        padding: 8px 12px;
    }

    .nav-text {
        font-size: 12px;
    }

    .brand-subtitle {
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 12px;
    }

    .page-title {
        font-size: 14px;
    }

    .content-area {
        padding: 12px;
    }

    .widget-card {
        padding: 12px;
    }

    .greeting-text h2 {
        font-size: 14px;
    }

    .greeting-text p {
        font-size: 11px;
    }

    .temperature {
        font-size: 18px;
    }

    .weather-desc {
        font-size: 10px;
    }

    .stats-title {
        font-size: 11px;
    }

    .stats-desc {
        font-size: 9px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .notification-btn {
        padding: 6px;
        font-size: 14px;
    }

    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .content-area {
        padding: 8px;
    }

    .widget-card {
        padding: 10px;
    }

    .greeting-icon {
        font-size: 24px;
    }

    .greeting-text h2 {
        font-size: 12px;
    }

    .action-btn {
        padding: 8px 4px;
    }

    .action-btn i {
        font-size: 14px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Floating Report Button --- */
#floating-report-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(255, 65, 108, 0.3);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

#floating-report-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* --- File Manager Styles --- */
.file-tree-container {
    max-height: 400px;
    /* Adjust as needed */
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.file-tree-list {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.file-tree-list ul {
    padding-left: 25px;
    border-left: 2px dashed #ced4da;
    margin-left: 8px;
}

.file-tree-list li {
    padding: 8px 0;
    position: relative;
}

.file-tree-list li::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -15px;
    width: 12px;
    height: 2px;
    background-color: #ced4da;
}

.folder-toggle {
    font-weight: 600;
    color: #2c5f3f;
    cursor: pointer;
    display: inline-block;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.folder-toggle:hover {
    background-color: #e9ecef;
}

.folder-icon {
    transition: transform 0.3s ease;
}

.folder-item.collapsed>.folder-toggle>.folder-icon {
    transform: rotate(-90deg);
}

.nested-list {
    max-height: 1000px;
    /* Large enough for content */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.folder-item.collapsed>.nested-list {
    max-height: 0;
}

.folder-item>span .fa-folder-open {
    color: #27ae60;
    margin-right: 8px;
}

.file-item a {
    text-decoration: none;
    color: #34495e;
    transition: color 0.2s ease;
    display: inline-block;
}

.file-item a:hover {
    color: #27ae60;
    text-decoration: underline;
}

.file-item .fa-file-alt {
    color: #7f8c8d;
    margin-right: 8px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* --- Compact Table Styles --- */
.table.table-compact th,
.table.table-compact td {
    padding: 8px;
    /* Reduced padding */
    font-size: 13px;
    /* Slightly smaller font */
}

.table.table-compact .actions {
    white-space: nowrap;
    /* Prevent action buttons from wrapping */
}

/* --- Photo Contest Page Styles (votacion_fotos.php) --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.photo-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.uploader-info {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.vote-section {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.vote-count {
    font-size: 1.2rem;
    font-weight: bold;
}

.vote-count .fa-heart {
    color: #e74c3c;
}

.vote-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.vote-btn:hover {
    background-color: #2980b9;
}

.vote-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.vote-btn .fa-check {
    margin-right: 5px;
}

.upload-section {
    background-color: #fdfdfd;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-section h3 {
    text-align: center;
    margin-top: 0;
    color: #4a4a4a;
}

.message {
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.photo-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.photo-location {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.photo-location .fa-map-marker-alt {
    margin-right: 5px;
}

.photo-description {
    font-size: 1rem;
    color: #34495e;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Form Grid Layout for Photo Contest */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

/* --- Toast Notification Styles (Corrected) --- */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    background-color: #333;
    color: #fff;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    content: '';
    display: block;
    width: 4px;
    border-radius: 4px;
    background-color: currentColor;
    opacity: 0.6;
}

.toast-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}

.toast.toast-success {
    background-color: #1f9d55;
}

.toast.toast-error {
    background-color: #e53935;
}

.toast.toast-warning {
    background-color: #f59e0b;
}

.toast.toast-info {
    background-color: #2563eb;
}

/* --- Loading Spinner --- */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #27ae60;
    animation: spin 1s ease infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Table Styles --- */
.widget-card .table-container {
    display: block;
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.table-container .table th,
.table-container .table td {
    white-space: nowrap;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.table thead tr {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.table th {
    padding: 15px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #2c5f3f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f1f8e9;
    /* A light green hover */
}

.table td {
    padding: 15px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.table .action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.responsive-wrapper {
    width: 100%;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.table-responsive.responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody tr {
        display: block;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
        margin-bottom: 16px;
        overflow: hidden;
    }

    .responsive-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid #eef2f3;
        font-size: 0.95rem;
        gap: 12px;
    }

    .responsive-table tbody tr td:last-child {
        border-bottom: none;
    }

    .responsive-table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c5f3f;
        flex: 1 1 45%;
        text-align: left;
    }

    .responsive-table tbody tr td:not(.actions-cell) {
        flex-wrap: wrap;
    }

    .responsive-table tbody tr td:not(.actions-cell) span,
    .responsive-table tbody tr td:not(.actions-cell) strong {
        margin-left: auto;
    }

    .responsive-table .actions-cell {
        text-align: left !important;
    }

    .responsive-table .actions-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
    }

    .responsive-table .actions-group .btn {
        flex: 1 1 48%;
        min-width: 120px;
        display: inline-flex;
        justify-content: center;
    }

    .responsive-table .badge {
        margin-left: auto;
    }

    .responsive-table .no-data-row td {
        display: block;
        border-bottom: none;
        padding: 16px;
        text-align: center !important;
    }
}

/* --- Generic Button Styles --- */
.btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ced4da;
}

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

.btn.disabled,
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatUp {
    to {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.widget-card {
    animation: fadeInUp 0.5s ease-out;
}

.widget-card:nth-child(1) {
    animation-delay: 0.1s;
}

.widget-card:nth-child(2) {
    animation-delay: 0.2s;
}

.widget-card:nth-child(3) {
    animation-delay: 0.3s;
}

.widget-card:nth-child(4) {
    animation-delay: 0.4s;
}

.sidebar.open {
    animation: slideInLeft 0.3s ease-out;
}

/* --- Unidades Page Specific Styles --- */

.styled-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.styled-form-inline label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c5f3f;
}

.styled-form-inline .form-control-sm {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.25rem 0.5rem;
}

.content-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c5f3f;
    margin-bottom: 0.5rem;
}

.custom-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.custom-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
}

.custom-list li:last-child {
    border-bottom: none;
}

.btn-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background-color: #e74c3c;
    color: white;
}

.empty-list-msg {
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
}

.card-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.styled-form .form-group {
    margin-bottom: 1rem;
}

.styled-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c5f3f;
}

.styled-form .form-control,
.styled-form-inline .form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.styled-form .form-control:focus,
.styled-form-inline .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #27ae60;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}


/* --- Modal Styles --- */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1055;
    /* Keep modal above the backdrop */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.is-active {
    display: flex;
    /* Show the modal */
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 2rem;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
    animation: slide-in 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c5f3f;
}

.modal-header .close {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #888;
    text-shadow: none;
    opacity: 1;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
}

.modal-header .close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    gap: 0.5rem;
}

@keyframes slide-in {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- User Profile Dropdown --- */
.user-profile-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    /* Initially hidden */
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1001;
    overflow: hidden;
    padding: 8px 0;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
    /* Show the menu */
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item i {
    color: #7f8c8d;
    width: 16px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #27ae60;
}

.dropdown-item:hover i {
    color: #27ae60;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ANNOUNCEMENTS SECTION STYLES
   ======================================== */

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

.announcements-section {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    max-width: 100%;
    opacity: 0;
    animation: slideUpFade 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s; /* Wait for cards to cascade in first */
}

.announcements-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: #27ae60 #f0f0f0;
}

.announcements-carousel::-webkit-scrollbar {
    height: 8px;
}

.announcements-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.announcements-carousel::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 4px;
}

.announcements-carousel::-webkit-scrollbar-thumb:hover {
    background: #229954;
}

.loading-announcements {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 14px;
}

.announcement-card {
    min-width: 320px;
    max-width: 320px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 18px 30px;
    border-left: 5px solid var(--announcement-color, #3b82f6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.announcement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.announcement-icon {
    font-size: 24px;
    color: var(--announcement-color, #3b82f6);
}

.announcement-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-urgent {
    background: #fee2e2;
    color: #dc2626;
}

.badge-important {
    background: #fed7aa;
    color: #ea580c;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

.announcement-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c5f3f;
    margin-bottom: 10px;
    line-height: 1.4;
}

.announcement-message {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.announcement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.announcement-author {
    font-size: 11px;
    color: #95a5a6;
}

.announcement-date {
    font-size: 11px;
    color: #95a5a6;
}

@media (max-width: 768px) {
    .announcement-card {
        min-width: 280px;
        max-width: 280px;
    }
}

/* Read More Button for Announcements */
.announcement-read-more {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.announcement-read-more i {
    font-size: 12px;
}

/* Notification Dropdown Styles */
.notification-container {
    position: relative;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 15px;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease;
    border: 1px solid #eee;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #efefef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.mark-read-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.mark-read-btn:hover {
    color: #2563eb;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #f0f9ff;
}

.notification-item:last-child {
    border-bottom: none;
}

.notif-icon {
    margin-right: 15px;
    font-size: 18px;
    margin-top: 2px;
}

/* Scope Badges for Notifications */
.badge-scope {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 4px;
}
.badge-scope-personal { background-color: rgba(59, 130, 246, 0.1); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-scope-rol { background-color: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-scope-sistema { background-color: rgba(148, 163, 184, 0.1); color: #475569; border: 1px solid rgba(148, 163, 184, 0.2); }

.notification-item.success .notif-icon {
    color: #10b981;
}

.notification-item.warning .notif-icon {
    color: #f59e0b;
}

.notification-item.error .notif-icon {
    color: #ef4444;
}

.notification-item.info .notif-icon {
    color: #3b82f6;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
}

.notif-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notif-time {
    font-size: 11px;
    color: #94a3b8;
}

.notification-empty {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* Scrollbar for notification list */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   MINI CALENDAR WIDGET STYLES
   ======================================== */

.calendar-widget {
    grid-column: span 2;
    padding: 0 !important;
    overflow: hidden;
}

.calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-header i {
    font-size: 1.5rem;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.mini-calendar {
    padding: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #7f8c8d;
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
    transition: all 0.2s ease;
    cursor: default;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.has-events {
    cursor: pointer;
    background: #fff;
    border: 2px solid #e9ecef;
}

.calendar-day.has-events:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.calendar-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.calendar-day.today.has-events {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-indicators {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.event-indicators i {
    font-size: 0.7rem;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #495057;
}

.calendar-legend i {
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calendar-widget {
        grid-column: span 1;
    }

    .calendar-day-header {
        font-size: 0.65rem;
        padding: 6px 0;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .event-indicators i {
        font-size: 0.6rem;
    }
}

/* Full-page calendar variant */
.calendar-widget-full {
    max-width: 1200px;
    margin: 0 auto;
}

.calendar-widget-full .mini-calendar {
    padding: 30px;
}

.calendar-widget-full .calendar-grid {
    gap: 12px;
}

.calendar-widget-full .calendar-day {
    min-height: 80px;
}

.calendar-widget-full .day-number {
    font-size: 1.1rem;
}

.calendar-widget-full .event-indicators i {
    font-size: 0.9rem;
}