/* Event Detail Page Styles */

/* Hide discussion buttons globally */
.discussion-btn,
.btn-discussion,
.view-discussion-btn,
.program-discussion-btn,
.btn-view-discussion,
.btn-thao-luan,
.xem-thao-luan {
    display: none !important;
}

/* Public Layout theme (blue) */
.public-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

    .public-layout .event-hero {
        background: transparent;
    }


.main-content {
    padding-bottom: 20px !important;
}
/* Loading */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    color: white;
    font-size: 1.2rem;
}

/* Skeleton Loading */
.skeleton-loader {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.skeleton-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.skeleton-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.skeleton-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.skeleton-btn {
    height: 40px;
    width: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
    margin-bottom: 1.5rem;
}

.skeleton-line {
    height: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line.title {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-line.long {
    width: 100%;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.short {
    width: 50%;
}

.skeleton-organizer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-info {
    flex: 1;
}

.skeleton-content {
    display: grid;
    gap: 2rem;
}

.skeleton-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.skeleton-card {
    height: 120px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Event Hero Section */
.event-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

    .event-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
        pointer-events: none;
    }

    .event-hero .event-info {
        position: relative;
        z-index: 1;
    }

.event-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Actions */
.event-header-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

    .event-header-actions .btn {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #667eea !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        opacity: 1 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        border-radius: 0.75rem !important;
        padding: 0.5rem 1rem !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

        .event-header-actions .btn:hover {
            background: rgba(255, 255, 255, 1) !important;
            color: #5a67d8 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
            border-color: rgba(255, 255, 255, 0.5) !important;
        }

    .event-header-actions .btn-success {
        background: #10b981 !important;
        color: white !important;
        border-color: #10b981 !important;
    }

        .event-header-actions .btn-success:hover {
            background: #059669 !important;
            color: white !important;
            border-color: #059669 !important;
        }

    .event-header-actions .btn-primary {
        background: #3b82f6 !important;
        color: white !important;
        border-color: #3b82f6 !important;
    }

        .event-header-actions .btn-primary:hover {
            background: #2563eb !important;
            color: white !important;
            border-color: #2563eb !important;
        }




@media (max-width: 768px) {
    .event-header-actions {
        width: 100%;
        justify-content: flex-end;
        margin: 0.5rem 0 0.5rem 0;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

        .event-header-actions .icon-btn,
        .event-header-actions .btn {
            padding: 0.4rem 0.6rem !important;
            font-size: 0.9rem !important;
            height: 40px;
            border-radius: 0.6rem !important;
            min-height: 44px; /* Better touch target */
            min-width: 44px; /* Better touch target */
        }

        .event-header-actions .btn-text {
            display: none;
        }

        .event-header-actions .icon-btn {
            min-width: 44px; /* Better touch target */
            justify-content: center;
        }

        /* Share button specific mobile improvements */
        .event-header-actions .btn-share {
            min-width: 44px;
            min-height: 44px;
            padding: 0.5rem !important;
            background: #73acf9 !important;
            border: 2px solid rgba(255, 255, 255, 0.8) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        }

        .event-header-actions .btn-share:hover {
            background: #5a9cf7 !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        }

        .event-header-actions .btn-share:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        }

        .registration-actions {
            gap: 0.25rem !important;
            flex-wrap: nowrap;
            justify-content: space-between;
            width: 100%;
        }

        .registration-actions .btn-text {
            display: none;
        }

        .registration-actions .icon-btn {
            flex: 1;
            min-width: 0;
            padding: 0.5rem 0.3rem !important;
            font-size: 0.9rem !important;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .registration-actions .icon-btn i {
            font-size: 1.2rem;
        }

    .icon-btn {
        height: 44px;
        padding: 0.6rem;
        font-size: 1.1rem;
    }

    /* Fix share icon at top-right of header */
    .event-hero {
        position: relative;
        padding-top: 1rem; /* ensure space below top bar */
    }

    .event-header-right {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 5;
    }

        .event-header-right .icon-btn {
            background: #ffffff;
            border: 2px solid rgba(255,255,255,0.6);
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            border-radius: 0.75rem;
        }

    /* Center title and meta horizontally */
    .event-title-section {
        width: 100%;
    }

    .event-title {
        text-align: center;
        width: 100%;
    }

    .event-title-meta {
        justify-content: center;
        width: 100%;
    }
}

/* Event Header Main */
.event-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .event-header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

/* Event Title Section */
.event-title-section {
    flex: 1;
}



.event-title {
    margin: 0 0 0.25rem 0;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
}

.event-title-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.event-code {
    color: #374151;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-checkin-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #dcfce7; /* light green */
    color: #166534;
    border: 1px solid #bbf7d0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .event-status-badge.status-upcoming {
        background: #e0f2fe; /* xanh nhạt */
        color: #075985;
        border-color: #bae6fd;
    }

    .event-status-badge.status-ongoing {
        background: #fef9c3; /* vàng nhạt */
        color: #92400e;
        border-color: #fde68a;
    }

    .event-status-badge.status-completed {
        background: #e5e7eb; /* xám nhạt */
        color: #374151;
        border-color: #d1d5db;
    }

    .event-status-badge.status-cancelled {
        background: #fee2e2; /* đỏ nhạt */
        color: #991b1b;
        border-color: #fecaca;
    }

/* Event Header Right */
.event-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    max-width: 40%;
    justify-content: flex-end;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Share Dropdown */
.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 160px;
    z-index: 9900;
    margin-top: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

/* Mobile share menu improvements */
@media (max-width: 768px) {
    

    /* Ensure share menu doesn't get cut off on mobile */
    .share-dropdown {
        position: relative;
    }

    /* Adjust share menu position if it would go off-screen */
    .share-menu.share-menu-left {
        right: auto;
        left: 0;
    }
}

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

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

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 44px; /* Better touch target */
    text-align: left;
}

    .share-option:hover {
        background: #f3f4f6;
        color: #1f2937;
    }

    .share-option:active {
        background: #e5e7eb;
        transform: scale(0.98);
    }

    .share-option i {
        font-size: 1.125rem;
        color: #6b7280;
        min-width: 20px;
        text-align: center;
    }

    .share-option:hover i {
        color: #374151;
    }

/* Mobile share option improvements */
@media (max-width: 768px) {
    .share-option {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        min-height: 48px; /* Larger touch target for mobile */
        border-radius: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .share-option i {
        font-size: 1.25rem;
        min-width: 24px;
    }

    .share-option:last-child {
        margin-bottom: 0;
    }
}

.share-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.icon-btn {
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: #dc2626;
    color: white !important;
    border-color: #ffffff !important;
    border-radius: 0.75rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: auto;
    height: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 1.0rem;
    backdrop-filter: blur(8px);
    white-space: nowrap;
    font-weight: 500;
    margin-right: 0.25rem;
}

/* Back button style */
.btn-back {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
}

.btn-back:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

    .icon-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
        border-color: rgba(255, 255, 255, 0.6);
    }

/* Register button - Primary action */
.btn-register {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 500 !important;
}

    .btn-register:hover {
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    }

    /* Registered button states */
    .btn-register.registered {
        background: #059669 !important;
        color: white !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

        .btn-register.registered:hover {
            color: white !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
        }

    .btn-register.pending {
        background: #f44f20 !important;
        color: white !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

        .btn-register.pending:hover {
            color: white !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
        }

    .btn-register.confirmed {
        background: #057d58 !important;
        color: white !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

        .btn-register.confirmed:hover {
            color: white !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
        }

/* Registration Actions Container */
.registration-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-delegate {
    background: linear-gradient(135deg, #60a5fa, #3b82f6) !important; /* Blue */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
}

    .btn-delegate:hover {
        background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
        color: white !important;
    }

.btn-cancel-delegate {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important; /* Orange */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
}

    .btn-cancel-delegate:hover {
        background: linear-gradient(135deg, #d97706, #b45309) !important;
        color: white !important;
    }

/* Confirm Attendance Button */
.btn-confirm {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important; /* Green gradient */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
    margin-right: 0.25rem;
}

    .btn-confirm:hover {
        background: linear-gradient(135deg, #16a34a, #15803d) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    }

/* Cancel Registration Button */
.btn-cancel {
    background: linear-gradient(135deg, #fb7185, #ef4444) !important; /* Softer red */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
}

    .btn-cancel:hover {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    }

/* Status Buttons - Disabled States */
.btn-status-confirmed {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important; /* Purple gradient */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    cursor: not-allowed !important;
}

    .btn-status-confirmed:hover {
        transform: none !important;
        box-shadow: none !important;
    }

.btn-status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important; /* Orange gradient */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    cursor: not-allowed !important;
}

    .btn-status-pending:hover {
        transform: none !important;
        box-shadow: none !important;
    }

.btn-status-rejected {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important; /* Gray gradient */
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    cursor: not-allowed !important;
}

    .btn-status-rejected:hover {
        transform: none !important;
        box-shadow: none !important;
    }

/* Share button - Secondary action */
.btn-share {
    background: #73acf9;
    color: white !important;
    border-color: #ffffff !important;
    margin-left: 0.25rem !important;
}

    .btn-share:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2) !important;
    }

/* QR Code */
.qr-thumb {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: white;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* QR Code in organizer banner */
.organizer-qr .qr-thumb {
    width: 90px;
    height: 90px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .event-title {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
        max-width: 100%;
        padding: 0 0.25rem;
    }

    .event-title-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .event-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .qr-thumb {
        width: 50px;
        height: 50px;
    }

    .organizer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Fix text overflow for mobile */
    .org-name {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        font-size: 1rem;
    }

    .org-meta span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        font-size: 0.85rem;
    }

    .meta-value {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .program-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .description-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
    }

    .meeting-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
    }

    /* Hide discussion button on mobile */
    .discussion-btn,
    .btn-discussion,
    .view-discussion-btn,
    .program-discussion-btn {
        display: none !important;
    }

    /* Show full program content */
    .program-content {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Show full notes content */
    .program-notes {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Show full text content for all elements */
    .program-description,
    .event-description,
    .organizer-description,
    .meta-description,
    .content-text,
    .text-content,
    .program-details,
    .event-details {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.5;
    }

    /* Remove text truncation */
    .text-truncate,
    .truncate,
    .ellipsis {
        white-space: normal !important;
        text-overflow: unset !important;
        overflow: visible !important;
        display: block !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Show full speaker info */
    .program-speaker,
    .speaker-info,
    .speaker-name {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        display: block;
        height: auto;
        max-height: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .organizer-qr {
        align-self: center;
    }

        .organizer-qr .qr-thumb {
            width: 80px;
            height: 80px;
        }

    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

        .content-grid.force-grid {
            grid-template-columns: 1fr !important;
        }
}

/* Organizer Banner */
.organizer-banner {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

    .organizer-banner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

.organizer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.organizer-info {
    flex: 1;
}

.organizer-qr {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.organizer-banner .org-name,
.organizer-banner .org-meta {
    position: relative;
    z-index: 1;
}

.org-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.org-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #e5e7eb;
    font-size: 0.875rem;
}

    .org-meta span {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .org-meta i {
        font-size: 1rem;
    }

/* Event Meta */
.event-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .meta-item i {
        font-size: 1.5rem;
        color: #ffffff;
        min-width: 24px;
    }

.meta-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.meta-value {
    font-size: 1.125rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.4;
}

/* Main Content */
.event-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Force grid layout for specific sections */
.content-grid.force-grid {
    display: grid !important;
}

    .content-grid.force-grid .content-section {
        grid-column: span 1;
    }

@media (min-width: 768px) {
    .content-grid.force-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .content-grid.force-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .content-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

    .content-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #1d4ed8);
        border-radius: 1rem 1rem 0 0;
    }

    .content-section:hover {
        /* Disable hover elevation for blocks */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
        transform: none;
        background: #ffffff;
        border-color: #e5e7eb;
    }

@media (max-width: 768px) {
    .content-section {
        padding: 0.75rem;
    }

    /* Fix container overflow */
    .public-page-container {
        padding: 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .event-hero {
        padding: 0.75rem 0.25rem;
        margin: 0;
    }

    .event-info {
        padding: 0.75rem 0.25rem;
    }

    .main-content {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix button overflow */
    .event-header-actions {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 0.25rem;
    }

    .event-header-actions .icon-btn,
    .event-header-actions .btn {
        flex-shrink: 0;
        min-width: auto;
        white-space: nowrap;
    }

    /* Fix meta items overflow */
    .event-meta {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .meta-item {
        max-width: 100%;
        overflow-x: hidden;
        padding: 0.75rem;
    }

    .meta-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix program cards */
    .program-cards {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .program-card {
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        padding: 0.75rem;
    }

    .program-title-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix organizer banner */
    .organizer-banner {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix topbar overflow */
    .public-topbar {
        padding: 0.5rem 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .public-topbar .brand {
        font-size: 1rem;
        max-width: 50%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right {
        flex-shrink: 0;
        gap: 0.25rem;
    }

    .topbar-right .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: auto;
    }

    /* Fix event header main */
    .event-header-main {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix content grid */
    .content-grid {
        padding: 0 0.25rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix section titles */
    .section-title {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    align-items: center;
}

.view-toggle .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-toggle .btn i {
    font-size: 1.125rem;
}

/* Section Titles */
.section-title {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
    z-index: 1;
    flex: 1;
}

    .section-title:before {
        content: "";
        width: 4px;
        height: 20px;
        background: #3b82f6;
        border-radius: 2px;
        display: inline-block;
        flex-shrink: 0;
    }

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .view-toggle {
        align-self: stretch;
    }

    .view-toggle .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

        .section-title:before {
            width: 2px;
            height: 14px;
        }

}

/* Content Text */
.description-content,
.agenda-content,
.speakers-content,
.meeting-content {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Program List */
.program-list {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

    .program-list::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

    .program-list::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #1d4ed8);
        border-radius: 1rem 1rem 0 0;
    }

    .program-list .title {
        color: #1f2937;
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #e5e7eb;
        position: relative;
        z-index: 1;
    }

        .program-list .title:before {
            content: "";
            width: 4px;
            height: 20px;
            background: #3b82f6;
            border-radius: 2px;
            display: inline-block;
            flex-shrink: 0;
        }

.program-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


.program-card {
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

    .program-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #1d4ed8);
        border-radius: 0.75rem 0.75rem 0 0;
    }

    .program-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
        border-radius: 0.75rem;
    }

    .program-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.6);
        background: rgba(255, 255, 255, 0.95);
    }

@media (max-width: 768px) {
    .program-card {
        padding: 0.75rem;
    }

    .program-list {
        padding: 0.75rem;
        margin-top: 1.5rem;
    }

    .program-order {
        padding: 0.7rem 1rem;
        font-size: 1.8rem;
        min-width: 44px;
        height: 44px;
        border-radius: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        background: #16a34a;
        border: none;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
    }

    .program-title {
        font-size: 1.15rem;
        font-weight: 700;
        /* Truncate long titles on mobile */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        max-height: calc(1.3em * 3); /* 3 lines max */
    }
    
    /* Limit description text length on mobile */
    .program-description,
    .program-detail-item .label + span {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
        max-height: calc(1.4em * 4); /* 4 lines max */
    }
    
    /* Limit filename length on mobile */
    .program-files .btn-file span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
        max-height: calc(1.2em * 2); /* 2 lines max */
    }
}

.program-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.program-title-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.program-order {
    background: #16a34a;
    color: #ffffff;
    padding: 0.8rem 1.2rem;
    border-radius: 1rem;
    min-width: 40px;
    height: 40px;
    text-align: center;
    border: none;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}



.program-time {
    background: #eff6ff;
    color: #1e3a8a;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.program-title {
    color: #1a202c;
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.program-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

/* Program Rows */
.program-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

    .program-row:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .program-row i {
        color: #3b82f6;
        font-size: 1rem;
        width: 16px;
        text-align: center;
        flex-shrink: 0;
    }

    .program-row .label {
        color: #2d3748;
        font-weight: 700;
        font-size: 0.8rem;
        min-width: 60px;
        flex-shrink: 0;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .program-row span:not(.label) {
        color: #4a5568;
        font-size: 0.8rem;
        font-weight: 500;
        flex: 1;
        min-width: 0;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

.program-files {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

    .program-files .btn-file {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        color: #3b82f6;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.75rem;
        transition: color 0.2s ease;
        padding: 0.2rem 0.4rem;
        border-radius: 0.25rem;
        background: rgba(59, 130, 246, 0.08);
        border: 1px solid rgba(59, 130, 246, 0.2);
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .program-files .btn-file:hover {
            color: #2563eb;
            text-decoration: none;
            background: rgba(59, 130, 246, 0.12);
            border-color: rgba(59, 130, 246, 0.3);
        }

        .program-files .btn-file i {
            font-size: 0.875rem;
            color: #3b82f6;
            flex-shrink: 0;
        }

/* Explicit download button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #dc2626;
    color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #dc2626;
    text-decoration: none;
    font-size: 0.75rem;
}

    .btn-download:hover {
        background: #b91c1c;
        border-color: #b91c1c;
        color: #ffffff;
    }

    .btn-download:hover i {
        color: #ffffff !important;
    }

    .btn-download i {
        color: #ffffff !important;
    }

.program-files .file-meta {
    color: #6b7280;
    font-size: 0.7rem;
    background: rgba(107, 114, 128, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(107, 114, 128, 0.2);
    flex-shrink: 0;
}

.program-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
    position: relative;
    z-index: 1;
}

    .program-actions .btn {
        padding: 0.4rem 0.8rem;
        border-radius: 0.375rem;
        font-size: 0.75rem;
        font-weight: 500;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        border: 1px solid;
        text-decoration: none;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        white-space: nowrap;
    }

        .program-actions .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .program-actions .btn:hover::before {
            left: 100%;
        }

    .program-actions .btn-outline-primary {
        color: #1d4ed8 !important;
        border-color: #3b82f6 !important;
        background: #eff6ff !important;
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    }

        .program-actions .btn-outline-primary:hover {
            color: #ffffff !important;
            background: #2563eb !important;
            border-color: #3b82f6 !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

    .program-actions .btn-outline-secondary {
        color: #6b7280 !important;
        border-color: #6b7280 !important;
        background: rgba(107, 114, 128, 0.1) !important;
        box-shadow: 0 2px 4px rgba(107, 114, 128, 0.1);
    }

        .program-actions .btn-outline-secondary:hover {
            color: white !important;
            background: #6b7280 !important;
            border-color: #6b7280 !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
        }

    .program-actions .btn i {
        font-size: 0.875rem;
        transition: transform 0.2s ease;
    }

    .program-actions .btn:hover i {
        transform: scale(1.1);
    }

@media (max-width: 768px) {
    .program-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .program-title-section {
        width: 100%;
        justify-content: flex-start;
    }

    .program-actions {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }

        .program-actions .btn {
            padding: 0.3rem 0.6rem;
            font-size: 0.7rem;
            flex: 1;
            justify-content: center;
        }

    .program-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

        .program-row i {
            display: none;
        }

        .program-row .label {
            min-width: auto;
            font-weight: 700;
            color: #667eea;
            font-size: 0.75rem;
        }

        .program-row span:not(.label) {
            font-size: 0.75rem;
        }

    .program-files {
        width: 100%;
        justify-content: flex-start;
    }

        .program-files .btn-file {
            font-size: 0.7rem;
            padding: 0.15rem 0.3rem;
        }

        .btn-download {
            min-width: 44px;
            min-height: 44px;
            padding: 0.5rem;
            font-size: 0.8rem;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .btn-download i {
            color: #ffffff !important;
            font-size: 1rem !important;
            display: inline-block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        /* Ensure download button is properly sized and visible */
        .program-files {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: nowrap;
        }
        
        .program-files .btn-file {
            flex: 1;
            min-width: 0; /* Allow text truncation */
        }
        
        .program-files .btn-download {
            flex-shrink: 0; /* Don't shrink download button */
        }

        .program-files .file-meta {
            font-size: 0.65rem;
            padding: 0.15rem 0.3rem;
        }
}

/* File List */
.file-list {
    margin-top: 0.5rem;
}

    .file-list ul {
        list-style: none;
        padding: 0 !important;
        margin: 0 !important;
        padding-left: 0rem !important;
    }

    .file-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.93);
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        transition: all 0.2s ease;
        position: relative;
        z-index: 1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

        .file-list li:hover {
            /* Disable hover visual change for blocks */
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            transform: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

.btn-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a; /* chữ đậm hơn */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

    .btn-file:hover {
        color: #0f172a;
        text-decoration: none;
    }

    .btn-file i {
        font-size: 1rem;
    }

.file-meta {
    color: #6b7280;
    font-size: 0.75rem;
    background: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.empty-note {
    color: #1d4ed8;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    border: 2px dashed #1d4ed8;
    position: relative;
    z-index: 1;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Voting & Election card */
.voting-election-card {
    margin-top: 0.75rem;
}

.voting-election-card .ve-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.voting-election-card .ve-icon {
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 0.25rem;
    font-size: 1.25rem;
}

.voting-election-card .ve-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.voting-election-card .voting-block {
    margin-top: 0.5rem;
}

.voting-election-card .sub-title {
    font-size: 1rem;
    color: #111827;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.voting-election-card .item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .voting-election-card .item-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem;
        background: #ffffff;
        border: 1px solid #ce0f27;
        border-radius: 0.5rem;
    }

.voting-election-card .item-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.voting-election-card .item-title {
    font-weight: 600;
    color: #111827;
}

.voting-election-card .item-time {
    color: #9ca3af;
    font-size: 0.875rem;
}

.voting-election-card .item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voting-election-card .ve-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.voting-election-card .ve-action[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Make participate buttons red like icon-btn btn-back */
.voting-election-card .item-actions .ve-action {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.voting-election-card .item-actions .ve-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: #ffffff !important;
}

.voting-election-card .item-actions .ve-action i {
    color: #ffffff !important;
}

/* Status badges inside items */
.voting-election-card .ve-status-badge {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: fit-content;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voting-election-card .ve-status-badge.status-preparing {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.voting-election-card .ve-status-badge.status-ongoing {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.voting-election-card .ve-status-badge.status-completed {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.voting-election-card .ve-status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 1rem;
}

/* Footer */
.event-footer {
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
}

    .event-footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
        pointer-events: none;
    }

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .footer-info p {
        margin: 0;
        color: #6b7280;
        font-size: 0.875rem;
        line-height: 1.4;
    }

        .footer-info p:first-child {
            font-weight: 600;
            font-size: 0.9rem;
            color: #374151;
        }

        .footer-info p:last-child {
            color: #9ca3af;
            font-size: 0.8rem;
            font-weight: 500;
        }

.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: transparent;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

    .footer-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .footer-link:hover::before {
        left: 100%;
    }

    .footer-link:hover {
        color: #1d4ed8; /* icon giữ xanh */
        text-decoration: none;
        background: #f1f5f9;
        border-color: #e2e8f0;
    }

@media (max-width: 768px) {
    .event-footer {
        margin-top: 2rem;
        padding:1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-info {
        order: 2;
    }

    .footer-links {
        order: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-info p {
        font-size: 0.8rem;
    }

        .footer-info p:first-child {
            font-size: 0.85rem;
        }

    .footer-link {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-hero {
        padding: 0.75rem 0;
    }

    .event-info {
        padding: 0 0.75rem;
    }

    .event-content {
        padding: 0 0.75rem;
    }

    .content-grid {
        gap: 0.75rem;
    }

    .event-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
        padding: 1rem;
    }

    .meta-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .meta-item i {
        font-size: 1.25rem;
    }

    .meta-value {
        font-size: 1rem;
    }

    .org-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .event-title {
        font-size: 1.25rem;
    }

    .event-title-meta {
        gap: 0.5rem;
    }

    .event-header-actions .btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.85rem !important;
    }
}

/* Form styles */
.login-form, .register-form {
/*    max-width: 400px;
*/    margin: 0 auto;
      margin:20px;
}

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

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: #333;
    }

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

    .form-control:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white;
}

    .btn-primary:hover:not(:disabled) {
        background-color: #0056b3;
    }

    .btn-primary:disabled {
        background-color: #6c757d;
        cursor: not-allowed;
    }

.btn-outline-light {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

    .btn-outline-light:hover {
        background-color: white;
        color: #333;
    }

.alert {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

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

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
}

    .dropdown-menu.show {
        display: block;
    }

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }

.dropdown-divider {
    height: 1px;
    background-color: #dee2e6;
    margin: 0.5rem 0;
}

/* Toast styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

    .toast::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }

.toast-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #166534;
}

    .toast-success::before {
        background: #22c55e;
    }

.toast-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

    .toast-error::before {
        background: #ef4444;
    }

.toast-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

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

.toast-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

    .toast-info::before {
        background: #3b82f6;
    }

.toast-icon {
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

    .toast-icon .material-icons {
        font-size: 20px;
    }

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

    .toast-close:hover {
        opacity: 1;
        background: rgba(0, 0, 0, 0.1);
    }

    .toast-close .material-icons {
        font-size: 16px;
    }

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

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.slide-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        padding: 12px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }
}

/* Quick Register Modal Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert i {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.form-actions .btn {
    min-width: 100px;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.me-2 {
    margin-right: 0.5rem !important;
}

/* Alert Styles */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-danger i {
    color: #dc2626;
    margin-top: 0.125rem;
}

/* Validation Styles */
.validation-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-summary-errors {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1rem;
    color: #dc2626;
}

.validation-summary-errors li {
    margin-bottom: 0.25rem;
}

/* Form validation states */
.form-control.is-invalid {
    border-color: #dc2626;
}

.form-control.is-valid {
    border-color: #16a34a;
}

/* Credentials Modal Styles */
.credentials-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.credential-item {
    margin-bottom: 1rem;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.credential-value {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.credential-value .form-control {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.credential-value .btn {
    flex-shrink: 0;
    padding: 0.375rem 0.5rem;
}

/* Mobile responsive for credentials modal */
@media (max-width: 768px) {
    .credentials-info {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .credential-value {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .credential-value .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
        border: 2px solid #d1d5db;
        border-radius: 0.375rem;
        font-weight: bold;
        width: 100%;
        box-sizing: border-box;
    }
    
    .credential-value .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 14px;
        box-sizing: border-box;
    }
    
    /* Modal responsive */
    .modal-card.modal-md {
        margin: 0.5rem;
        width: calc(100vw - 1rem);
        max-width: none;
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
        border-radius: 0.75rem;
    }
    
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .modal-title {
        font-size: 1.125rem;
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    .modal-body {
        padding: 1rem;
        overflow-x: hidden;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .form-actions button {
        width: 100%;
        padding: 0.875rem;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    /* Alert responsive */
    .alert {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    .alert i {
        font-size: 1rem;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Ensure no horizontal overflow */
    .modal-body * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix credential labels */
    .credential-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
}

.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.alert-warning {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

/* Mobile responsive for credentials modal */
@media (max-width: 768px) {
    .credential-value {
        flex-direction: column;
        align-items: stretch;
    }
    
    .credential-value .btn {
        margin-top: 0.5rem;
    }
}

