/* Agenda Page Styles */
:root {
    --primary-color: #dc3545;
    --secondary-color: #ffc107;
    --dark-color: #000000;
    --light-color: #ffffff;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #dc3545 0%, #000000 50%, #ffc107 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="particles" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="0.5" fill="white" opacity="0.1"/><circle cx="18" cy="18" r="0.3" fill="white" opacity="0.1"/><circle cx="10" cy="15" r="0.4" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23particles)"/></svg>');
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23dc3545" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

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

.agenda-legend {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-controls .form-label {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.filter-controls .form-select {
    min-width: 200px;
    border-radius: 25px;
    border: 2px solid #dee2e6;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-controls .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    background: white;
}

/* Agenda Grid */
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.agenda-item {
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.agenda-item:nth-child(1) { animation-delay: 0.1s; }
.agenda-item:nth-child(2) { animation-delay: 0.2s; }
.agenda-item:nth-child(3) { animation-delay: 0.3s; }
.agenda-item:nth-child(4) { animation-delay: 0.4s; }
.agenda-item:nth-child(5) { animation-delay: 0.5s; }
.agenda-item:nth-child(6) { animation-delay: 0.6s; }

.agenda-card {
    background: var(--light-color);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.agenda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agenda-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(220, 53, 69, 0.2);
}

.agenda-card:hover::before {
    opacity: 1;
}

.agenda-card .card-header {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.agenda-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(30deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(30deg); }
}

.agenda-item[data-tingkat='daerah'] .card-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #a71d2a 100%);
}

.agenda-item[data-tingkat='cabang'] .card-header {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 50%, #d39e00 100%);
    color: #000;
}

.agenda-card .date-day {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.agenda-card .date-month-year {
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

.agenda-card .card-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.agenda-card .badge-container {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.agenda-card .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    white-space: nowrap;
}

.agenda-card .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse 2s infinite;
}

.agenda-card .status-indicator.upcoming {
    background: #17a2b8;
}

.agenda-card .status-indicator.ongoing {
    background: #28a745;
}

.agenda-card .status-indicator.completed {
    background: #6c757d;
}

.agenda-card .status-badge {
    padding: 0.35rem 0.7rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.agenda-card .status-badge.upcoming {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.agenda-card .status-badge.ongoing {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    border: 1px solid rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

.agenda-card .status-badge.completed {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.agenda-card .status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agenda-card .status-badge i {
    font-size: 0.8rem;
}

.agenda-card .agenda-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agenda-card .agenda-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.agenda-card .meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.agenda-card .meta-item:hover {
    background: rgba(220, 53, 69, 0.05);
    transform: translateX(4px);
}

.agenda-card .meta-item i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.agenda-card .meta-item span {
    font-weight: 500;
    color: #495057;
}

.agenda-card .card-footer {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.agenda-card .btn-detail {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    color: var(--light-color);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.agenda-card .btn-detail::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;
}

.agenda-card .btn-detail:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.agenda-card .btn-detail:hover::before {
    left: 100%;
}

.agenda-card .btn-detail:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.empty-icon {
    margin-bottom: 2rem;
    font-size: 4rem;
    color: #dc3545;
    opacity: 0.6;
    position: relative;
    z-index: 1;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.empty-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.empty-text {
    color: #6c757d;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1.5rem;
    margin: 2rem 0;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-text {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Modal Styles */
.agenda-modal {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.agenda-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
}

.modal-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-status {
    margin-left: 1rem;
}

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

.status-badge.upcoming {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.status-badge.ongoing {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.completed {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* Modal Status Badge */
.agenda-modal .status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.agenda-modal .status-badge.upcoming {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.agenda-modal .status-badge.ongoing {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    border: 1px solid rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

.agenda-modal .status-badge.completed {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.agenda-modal .status-badge i {
    font-size: 0.8rem;
}

/* Modal Status Badge Responsive */
@media (max-width: 768px) {
    .agenda-modal .status-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .agenda-modal .status-badge i {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .agenda-modal .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .agenda-modal .status-badge i {
        font-size: 0.65rem;
    }
}

.agenda-modal-body {
    padding: 2rem;
}

.agenda-modal-badge {
    margin-bottom: 1.5rem;
}

.agenda-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.agenda-modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #c82333);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-content strong {
    display: block;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-content span {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
}

.agenda-modal-description {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.agenda-modal-description h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.description-content {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

.agenda-modal-footer {
    background: #f8f9fa;
    border: none;
    padding: 1.5rem 2rem;
    justify-content: flex-end;
}

.agenda-modal-footer .btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .agenda-modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .modal-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .modal-status {
        margin-left: 0;
    }
    
    .agenda-modal-body {
        padding: 1.5rem;
    }
    
    .agenda-modal-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .agenda-modal-footer {
        padding: 1.25rem 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .filter-section {
        padding: 1.5rem 0;
    }
    
    .filter-container {
        justify-content: center;
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .agenda-legend {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .legend-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
    }
    
    .filter-controls {
        justify-content: center;
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        min-width: 150px;
    }
    
    .filter-controls .form-select {
        min-width: 250px;
        width: 100%;
        max-width: 300px;
    }
    
    .agenda-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0.5rem;
    }
    
    .agenda-card .card-body {
        padding: 1.5rem 1.25rem;
    }
    
    .agenda-card .card-footer {
        padding: 1.25rem;
    }
    
    .agenda-card .badge-container {
        gap: 0.6rem;
        margin-bottom: 1.1rem;
    }
    
    .agenda-card .badge {
        font-size: 0.68rem;
        padding: 0.32rem 0.65rem;
    }
    
    .agenda-card .status-badge {
        padding: 0.32rem 0.65rem;
        font-size: 0.68rem;
    }
    
    .empty-state {
        padding: 4rem 1.5rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filter-section {
        padding: 1.25rem 0;
    }
    
    .legend-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .legend-color {
        width: 8px;
        height: 8px;
    }
    
    .filter-controls {
        gap: 1rem;
    }
    
    .filter-group {
        min-width: 100px;
    }
    
    .filter-controls .form-label {
        font-size: 0.8rem;
    }
    
    .filter-controls .form-select {
        min-width: 180px;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .agenda-grid {
        gap: 1.5rem;
        padding: 0;
    }
    
    .agenda-card .date-day {
        font-size: 2.5rem;
    }
    
    .agenda-card .date-month-year {
        font-size: 1rem;
    }
    
    .agenda-card .agenda-title {
        font-size: 1.2rem;
    }
    
    .agenda-card .meta-item {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
    
    .agenda-card .card-body {
        padding: 1.25rem 1rem;
    }
    
    .agenda-card .card-footer {
        padding: 1rem;
    }
    
    .agenda-card .btn-detail {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .agenda-card .badge-container {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .agenda-card .badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    
    .agenda-card .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.6rem;
    }
    
    .agenda-card .badge-container {
        gap: 0.4rem;
        margin-bottom: 0.9rem;
    }
    
    .empty-state {
        padding: 3rem 1rem;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-title {
        font-size: 1.5rem;
    }
    
    .empty-text {
        font-size: 1rem;
    }
}