* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, #f0f4ff 0%, #d9e2f0 100%);
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 10, 30, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: #3d4b68;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: #1a263b;
}

.nav-links a i {
    font-size: 1rem;
}

.nav-links a.hidden {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 1rem 0.5rem 0.8rem;
    background: white;
    border-radius: 40px;
    border: 1px solid #e3eaf5;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #b0c2dd;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2a3b5e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: #1a263b;
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-type {
    font-size: 0.7rem;
    color: #6a7a9a;
    background: #eef3fc;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-weight: 500;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee;
    color: #c62828;
}

/* ===== CONTENT ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ===== FLASH INFORMATIVO ===== */
.flash-card {
    border-left: 4px solid #dc3545;
    background: rgba(255, 255, 255, 0.92);
}

.flash-card .card-title i {
    color: #dc3545;
}

.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 10, 30, 0.08);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a263b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-title i {
    color: #4a6fa5;
}

.card-badge {
    background: #e8edf8;
    color: #2a3b5e;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
}

.view-all-link {
    color: #2a3b5e;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}

.view-all-link i {
    font-size: 0.7rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* ===== IMAGEN CON SUPERPOSICIÓN - MUCHO MÁS GRANDE ===== */
.image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
}

.image-wrapper {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 10, 30, 0.08);
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 600px; /* MUCHO MÁS GRANDE */
    object-fit: contain;
    display: block;
    background: white;
}

/* Imagen superpuesta arriba a la izquierda */
.image-overlay-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    background: white;
    z-index: 2;
}

.image-overlay-top-left .overlay-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== ACTIVIDAD RECIENTE - SECCIÓN SEPARADA ABAJO ===== */
.activity-section {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.activity-card .card-header {
    margin-bottom: 0.5rem;
}

.btn-toggle-activity {
    background: #eef3fc;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #1a263b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle-activity:hover {
    background: #dbe1ed;
    transform: translateY(-1px);
}

.btn-toggle-activity i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.activity-list-collapsible {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.activity-list-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

.activity-list-collapsible.expanded {
    max-height: 600px;
    opacity: 1;
    padding-top: 0.5rem;
}

/* ===== LIST ITEMS ===== */
.list-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    gap: 0.8rem;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef3fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a3b5e;
    flex-shrink: 0;
    font-size: 1rem;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 500;
    color: #1a263b;
    font-size: 0.95rem;
}

.list-item-sub {
    font-size: 0.8rem;
    color: #6a7a9a;
    margin-top: 0.1rem;
}

.list-item-time {
    font-size: 0.8rem;
    color: #6a7a9a;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-user {
    font-weight: 600;
    color: #1a263b;
}

.activity-action {
    font-weight: 500;
    color: #1a263b;
}

/* ===== TIMELINE ===== */
.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    font-weight: 500;
    color: #1a263b;
    font-size: 0.95rem;
}

.timeline-duration {
    font-size: 0.8rem;
    color: #6a7a9a;
    margin-top: 0.2rem;
}

.timeline-section {
    display: inline-block;
    background: #eef3fc;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-size: 0.7rem;
    color: #2a3b5e;
    margin-top: 0.3rem;
}

.timeline-link {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #4a6fa5;
    text-decoration: none;
}

/* ===== URGENT EVENTS ===== */
.urgent-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.urgent-badge-small {
    background: #dc3545;
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 40px;
    font-size: 0.55rem;
    font-weight: 700;
    animation: pulse-urgent 1.5s infinite;
    display: inline-block;
    margin-left: 0.5rem;
}

@keyframes pulse-urgent {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.no-events-message {
    color: #6a7a9a;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem 0;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    color: #6a7a9a;
    font-size: 0.85rem;
    padding: 1.5rem 0 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
}

.footer i {
    margin-right: 0.4rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    body {
        padding: 1rem;
    }
    .main-image {
        max-height: 480px;
    }
}

@media (max-width: 700px) {
    body {
        padding: 0.8rem;
    }
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
        border-radius: 1.5rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        width: 100%;
    }
    .nav-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    .user-profile {
        padding: 0.3rem 0.6rem 0.3rem 0.4rem;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .user-name {
        font-size: 0.8rem;
        max-width: 80px;
    }
    .logout-btn {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }
    .card {
        padding: 1.2rem;
        border-radius: 1.5rem;
    }
    .card-title {
        font-size: 1rem;
    }
    .card-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.7rem;
    }
    .list-item {
        padding: 0.6rem 0;
        gap: 0.6rem;
    }
    .list-item-icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .list-item-title {
        font-size: 0.85rem;
    }
    .list-item-sub {
        font-size: 0.7rem;
    }
    .list-item-time {
        font-size: 0.7rem;
    }
    .timeline-item {
        gap: 0.6rem;
        padding: 0.6rem 0;
    }
    .timeline-title {
        font-size: 0.85rem;
    }
    .timeline-duration {
        font-size: 0.7rem;
    }
    .btn-toggle-activity {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
    .flash-card .card-title {
        font-size: 0.95rem;
    }
    .main-image {
        max-height: 350px;
    }
    .image-overlay-top-left {
        width: 100px;
        height: 100px;
        top: 12px;
        left: 12px;
    }
    .image-wrapper {
        border-radius: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        padding: 0.6rem 0.7rem;
        border-radius: 1rem;
        gap: 0.5rem;
    }
    .logo-icon {
        width: 100px;
        height: 40px;
    }
    .nav-links a {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    .nav-links a i {
        font-size: 0.7rem;
    }
    .nav-links a span {
        display: none;
    }
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    .user-name {
        font-size: 0.65rem;
        max-width: 50px;
    }
    .user-type {
        display: none;
    }
    .logout-btn span {
        display: none;
    }
    .logout-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    .card {
        padding: 0.8rem;
        border-radius: 1rem;
    }
    .card-header {
        margin-bottom: 0.8rem;
    }
    .card-title {
        font-size: 0.85rem;
    }
    .card-title i {
        font-size: 0.8rem;
    }
    .card-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.5rem;
    }
    .list-item {
        padding: 0.4rem 0;
        gap: 0.4rem;
    }
    .list-item-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        border-radius: 8px;
    }
    .list-item-title {
        font-size: 0.75rem;
    }
    .list-item-sub {
        font-size: 0.6rem;
    }
    .list-item-time {
        font-size: 0.6rem;
    }
    .urgent-badge-small {
        font-size: 0.45rem;
        padding: 0.05rem 0.3rem;
    }
    .timeline-item {
        gap: 0.4rem;
        padding: 0.4rem 0;
    }
    .timeline-title {
        font-size: 0.75rem;
    }
    .timeline-duration {
        font-size: 0.6rem;
    }
    .timeline-section {
        font-size: 0.55rem;
        padding: 0.1rem 0.4rem;
    }
    .timeline-link {
        font-size: 0.65rem;
    }
    .no-events-message {
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }
    .footer {
        font-size: 0.65rem;
        padding: 0.8rem 0 0.2rem 0;
    }
    .btn-toggle-activity {
        font-size: 0.6rem;
        padding: 0.2rem 0.6rem;
    }
    .btn-toggle-activity i {
        font-size: 0.6rem;
    }
    .flash-card .card-title {
        font-size: 0.85rem;
    }
    .main-image {
        max-height: 250px;
    }
    .image-overlay-top-left {
        width: 70px;
        height: 70px;
        top: 10px;
        left: 10px;
        border-width: 2px;
    }
    .image-wrapper {
        border-radius: 1rem;
    }
}

@media (max-width: 380px) {
    body {
        padding: 0.3rem;
    }
    .navbar {
        padding: 0.4rem 0.5rem;
    }
    .logo-icon {
        width: 100px;
        height: 32px;
    }
    .card {
        padding: 0.6rem;
        border-radius: 0.8rem;
    }
    .list-item-title {
        font-size: 0.65rem;
    }
    .list-item-icon {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    .main-image {
        max-height: 200px;
    }
    .image-overlay-top-left {
        width: 55px;
        height: 55px;
        top: 6px;
        left: 6px;
        border-width: 2px;
    }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        margin-bottom: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    .card {
        padding: 0.8rem;
    }
    .main-image {
        max-height: 350px;
    }
    .image-overlay-top-left {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
}

/* ===== ESTILOS PARA FLASH INFORMATIVO ===== */
.flash-card .timeline-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.flash-card .timeline-title {
    flex: 1 !important;
    min-width: 150px !important;
}

.flash-card .section-badge {
    display: inline-block !important;
    padding: 0.2rem 0.7rem !important;
    border-radius: 40px !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    color: #2a3b5e !important;
    text-transform: uppercase !important;
}

.flash-card .timeline-duration {
    display: none !important;
}

/* ===== MEJORAR VISUAL DE ACTIVIDAD RECIENTE ===== */
.activity-list-collapsible .list-item-sub {
    font-size: 0.75rem !important;
    color: #4a5a7a !important;
    margin-top: 0.1rem !important;
    line-height: 1.4 !important;
}