#evf-ev-app {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

.evf-ev-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.evf-ev-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

#evf-ev-form-select {
    padding: 8px 16px;
    font-size: 15px;
    line-height: 1.2;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    min-width: 260px;
    cursor: pointer;
    height: 42px;
    display: inline-flex;
    align-items: center;
}

#evf-ev-form-select:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Controls */
#evf-ev-controls {
    margin-bottom: 20px;
}

.evf-ev-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.evf-ev-actions {
    justify-content: space-between;
}

.evf-ev-actions > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

#evf-ev-search {
    flex: 1;
    min-width: 220px;
    max-width: 400px;
    padding: 10px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

#evf-ev-search:focus {
    border-color: #3b82f6;
    outline: none;
}

#evf-ev-dropdown-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.evf-ev-dropdown-filter {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.2;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    height: 36px;
}

.evf-ev-dropdown-filter:focus {
    border-color: #3b82f6;
    outline: none;
}

#evf-ev-per-page {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.2;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    height: 36px;
}

#evf-ev-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.evf-ev-btn {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.evf-ev-btn:hover {
    background: #2563eb;
}

/* Loading */
#evf-ev-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #64748b;
}

/* Table */
#evf-ev-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    background: #fff;
}

#evf-ev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#evf-ev-table thead {
    background: #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 1;
}

#evf-ev-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
    user-select: none;
}

.evf-ev-sortable {
    cursor: pointer;
}

.evf-ev-sortable:hover {
    background: #e2e8f0;
}

#evf-ev-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    max-width: 300px;
    word-wrap: break-word;
}

#evf-ev-table tbody tr:hover {
    background: #f8fafc;
}

#evf-ev-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

#evf-ev-table tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* Thumbnails */
.evf-ev-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.2s;
}

.evf-ev-thumb:hover {
    transform: scale(3);
    z-index: 100;
    position: relative;
    border-radius: 8px;
}

/* Pagination */
#evf-ev-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.evf-ev-page-btn {
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.evf-ev-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.evf-ev-page-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.evf-ev-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.evf-ev-dots {
    padding: 0 4px;
    color: #94a3b8;
}

/* Access denied */
.evf-ev-denied {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .evf-ev-header {
        flex-direction: column;
        align-items: flex-start;
    }
    #evf-ev-form-select, #evf-ev-search {
        width: 100%;
        max-width: 100%;
    }
    .evf-ev-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Duplicate detection */
.evf-ev-dup-row {
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.evf-ev-dup-row label {
    font-size: 13px;
    color: #475569;
    white-space: nowrap;
}

#evf-ev-dup-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#evf-ev-dup-fields label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

#evf-ev-dup-fields input[type="checkbox"] {
    cursor: pointer;
}

.evf-ev-btn-outline {
    background: #fff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.evf-ev-btn-outline:hover {
    background: #eff6ff;
}

.evf-ev-btn-outline.active {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.evf-ev-btn-outline.active:hover {
    background: #dc2626;
}

.evf-ev-dup-group-0 { background: #fef3c7 !important; }
.evf-ev-dup-group-1 { background: #dbeafe !important; }
.evf-ev-dup-group-2 { background: #dcfce7 !important; }
.evf-ev-dup-group-3 { background: #fce7f3 !important; }
.evf-ev-dup-group-4 { background: #e0e7ff !important; }
.evf-ev-dup-group-5 { background: #ffedd5 !important; }
.evf-ev-dup-group-6 { background: #f3e8ff !important; }
.evf-ev-dup-group-7 { background: #ccfbf1 !important; }

/* =========================================
   BROADCAST & LOG MODALS
   ========================================= */

.evf-ev-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.evf-ev-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.evf-ev-modal-wide {
    width: 750px;
}
.evf-ev-modal-close {
    position: absolute;
    top: 10px; right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}
.evf-ev-modal-close:hover { color: #000; }
.evf-ev-modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.evf-ev-modal-field {
    margin-bottom: 12px;
}
.evf-ev-modal-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}
.evf-ev-modal-field input,
.evf-ev-modal-field textarea,
.evf-ev-modal-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.evf-ev-modal-field textarea {
    resize: vertical;
}
.evf-ev-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}
.evf-ev-btn-primary {
    background: #0073aa !important;
    color: #fff !important;
}
.evf-ev-btn-primary:hover {
    background: #005a87 !important;
}
.evf-ev-btn-cancel {
    background: #94a3b8 !important;
}
.evf-ev-btn-cancel:hover {
    background: #64748b !important;
}

#evf-ev-broadcast-count {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    padding: 8px;
    background: #f0f6fc;
    border-radius: 4px;
}

.evf-ev-broadcast-success {
    margin-top: 12px;
    padding: 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 14px;
}
.evf-ev-broadcast-error {
    margin-top: 12px;
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 14px;
}

.evf-ev-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.evf-ev-log-table th,
.evf-ev-log-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.evf-ev-log-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.evf-ev-log-table tr:hover {
    background: #f9f9f9;
}
.evf-ev-log-ok { color: #28a745; font-weight: 600; }
.evf-ev-log-fail { color: #dc3545; font-weight: 600; }