/* MCAST Frontend Admin Styles - Minimalist Design */

.mcast-admin-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #2c3e50;
}

/* Header */
.mcast-header {
    background: #000043;
    color: white;
    padding: 30px;
    border-radius: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #000043;
}

.mcast-header h1 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.mcast-header h1::before {
    content: "■ ";
    font-size: 12px;
    margin-right: 8px;
}

.mcast-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
    font-weight: 300;
}

.logout-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 10px 20px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.logout-btn::before {
    content: "→ ";
    margin-right: 5px;
}

.logout-btn:hover {
    background: white;
    color: #000043;
    border-color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2px;
    margin-bottom: 30px;
    background: #e0e0e0;
}

.stat-card {
    background: white;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.stat-card:hover {
    background: #f8f9fa;
    border-left-color: #000043;
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #000043;
    opacity: 0.3;
}

.stat-icon::before {
    content: "▪";
    font-size: 24px;
}

.stat-number {
    font-size: 32px;
    font-weight: 300;
    color: #000043;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Export Section */
.export-section {
    background: #000043;
    color: white;
    padding: 30px;
    border-radius: 2px;
    margin-bottom: 30px;
    border-left: 5px solid #000043;
}

.export-section h3 {
    margin: 0 0 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    color: white;
}

.export-section h3::before {
    content: "▪ ";
    margin-right: 5px;
    color: white;
}

.export-buttons {
    display: flex;
    gap: 2px;
    margin-bottom: 15px;
}

.export-btn {
    flex: 1;
    padding: 15px 30px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.export-btn::before {
    content: "↓ ";
    margin-right: 8px;
    font-size: 12px;
    color: white;
}

.export-btn:hover {
    background: white;
    color: #000043;
    border-color: white;
}

.export-note {
    margin: 0;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 300;
    color: white;
}

/* Filters */
.filters-section {
    background: white;
    padding: 30px;
    border-radius: 2px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.filters-section h3 {
    margin: 0 0 20px;
    color: #000043;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.filters-section h3::before {
    content: "▪ ";
    margin-right: 5px;
}

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

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item.full-width {
    grid-column: 1 / -1;
}

.filter-item label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
}

.filter-input:focus {
    border-color: #000043;
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 2px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary {
    background: #000043;
    color: white;
}

.btn-primary:hover {
    background: #1a1a5c;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.quick-filters {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
}

.quick-filters strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
    margin-right: 10px;
}

.quick-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 400;
    font-size: 12px;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.quick-btn:hover,
.quick-btn.active {
    background: #000043;
    color: white;
    border-color: #000043;
}

/* Table Section */
.table-section {
    background: white;
    padding: 30px;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h3 {
    margin: 0;
    color: #000043;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.table-header h3::before {
    content: "▪ ";
    margin-right: 5px;
}

.table-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.table-controls label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
}

.table-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    background: white;
}

.table-container {
    overflow-x: auto;
}

#eventsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#eventsTable thead {
    background: #f8f9fa;
    border-top: 2px solid #000043;
    border-bottom: 2px solid #000043;
}

#eventsTable th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 500;
    color: #000043;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

#eventsTable td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

#eventsTable tbody tr {
    transition: background 0.2s;
}

#eventsTable tbody tr:hover {
    background: #f8f9fa;
}

.event-name {
    font-weight: 500;
    color: #000043;
}

.event-type {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    color: #000043;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.service-badge {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 10px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-btn {
    padding: 6px 12px;
    margin: 2px;
    background: #000043;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-btn:hover {
    background: #1a1a5c;
}

.loading-cell {
    text-align: center;
    padding: 60px !important;
}

.loader {
    border: 2px solid #f0f0f0;
    border-top: 2px solid #000043;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.page-btn {
    padding: 10px 20px;
    background: #000043;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 400;
    transition: background 0.2s;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-btn:hover:not(:disabled) {
    background: #1a1a5c;
}

.page-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
}

#perPage {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: white;
    font-size: 12px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,67,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 2px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #000043;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #000043;
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-header h2::before {
    content: "▪ ";
    margin-right: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
    opacity: 0.7;
}

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

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f8f9fa;
}

.detail-row {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #000043;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .mcast-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
        gap: 1px;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}
