/**
 * AyFSupport Frontend Styles
 *
 * Estilos del botón, triggers de menú, vistas de reportes y modal de edición.
 * Compatible con temas claros y temas oscuros (dark mode).
 */

/* ==========================================================================
   1. BOTONES Y ACCIONES RÁPIDAS
   ========================================================================== */

.ayfsupport-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    line-height: 1.2;
}

.ayfsupport-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.ayfsupport-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.2);
}

.ayfsupport-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.ayfsupport-btn-md {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 8px;
}

.ayfsupport-btn-lg {
    padding: 14px 24px;
    font-size: 16px;
    border-radius: 10px;
}

.ayfsupport-link:not([class*="text-"]) {
    color: #0284c7;
}

.ayfsupport-link:not([class*="font-"]) {
    font-weight: 600;
}

.ayfsupport-link:hover:not([class*="hover:text-"]):not([role="menuitem"]) {
    color: #0369a1;
    text-decoration: underline;
}

.ayfsupport-link[role="menuitem"] {
    text-decoration: none !important;
}

.ayfsupport-link[role="menuitem"] .ayfsupport-btn-icon {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
}

.ayfsupport-btn-icon,
.ayfsupport-nav-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ayfsupport-btn:hover .ayfsupport-btn-icon,
.ayfsupport-link:hover .ayfsupport-btn-icon {
    transform: scale(1.1);
}

.menu-item-ayfsupport .ayfsupport-menu-trigger {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* ==========================================================================
   2. VISTA PRINCIPAL DE REPORTES FRONTEND (.ayf-frontend-container)
   ========================================================================== */

.ayf-frontend-container {
    --ayf-primary: #0284c7;
    --ayf-primary-hover: #0369a1;
    --ayf-bg: #ffffff;
    --ayf-card-bg: #ffffff;
    --ayf-card-border: #e2e8f0;
    --ayf-text-main: #0f172a;
    --ayf-text-muted: #64748b;
    --ayf-input-bg: #f8fafc;
    --ayf-input-border: #cbd5e1;
    --ayf-toolbar-bg: #f8fafc;
    --ayf-modal-bg: #ffffff;
    --ayf-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);

    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: var(--ayf-text-main);
    box-sizing: border-box;
}

.ayf-frontend-container * {
    box-sizing: border-box;
}

/* Soporte Dark Mode */
@media (prefers-color-scheme: dark) {
    .ayf-frontend-container {
        --ayf-bg: #0f172a;
        --ayf-card-bg: #1e293b;
        --ayf-card-border: #334155;
        --ayf-text-main: #f8fafc;
        --ayf-text-muted: #94a3b8;
        --ayf-input-bg: #0f172a;
        --ayf-input-border: #475569;
        --ayf-toolbar-bg: #1e293b;
        --ayf-modal-bg: #1e293b;
        --ayf-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

.dark .ayf-frontend-container {
    --ayf-bg: #0f172a;
    --ayf-card-bg: #1e293b;
    --ayf-card-border: #334155;
    --ayf-text-main: #f8fafc;
    --ayf-text-muted: #94a3b8;
    --ayf-input-bg: #0f172a;
    --ayf-input-border: #475569;
    --ayf-toolbar-bg: #1e293b;
    --ayf-modal-bg: #1e293b;
    --ayf-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Header */
.ayf-frontend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ayf-card-border);
}

.ayf-frontend-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ayf-frontend-icon-badge {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    flex-shrink: 0;
}

.ayf-frontend-icon-badge .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ayf-frontend-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--ayf-text-main);
    line-height: 1.2;
}

.ayf-frontend-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--ayf-text-muted);
}

.ayf-frontend-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botones universales del frontend */
.ayf-frontend-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.2;
    text-decoration: none;
}

.ayf-frontend-btn-primary {
    background: #0284c7;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.ayf-frontend-btn-primary:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.ayf-frontend-btn-secondary {
    background: var(--ayf-toolbar-bg);
    color: var(--ayf-text-main) !important;
    border: 1px solid var(--ayf-card-border);
}

.ayf-frontend-btn-secondary:hover {
    background: var(--ayf-card-border);
    transform: translateY(-1px);
}

/* Resumen de Métricas Rápidas */
.ayf-frontend-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ayf-stat-card {
    background: var(--ayf-card-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--ayf-shadow);
}

.ayf-stat-card:hover,
.ayf-stat-card.active {
    transform: translateY(-2px);
    border-color: #0284c7;
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.15);
}

.ayf-stat-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.ayf-stat-total .ayf-stat-number { color: #0284c7; }
.ayf-stat-open .ayf-stat-number { color: #d97706; }
.ayf-stat-in-progress .ayf-stat-number { color: #2563eb; }
.ayf-stat-resolved .ayf-stat-number { color: #16a34a; }

.ayf-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ayf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Barra de Filtros y Búsqueda */
.ayf-frontend-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--ayf-toolbar-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.ayf-search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
}

.ayf-search-box .dashicons-search {
    position: absolute;
    left: 10px;
    color: var(--ayf-text-muted);
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.ayf-search-box .ayf-input {
    width: 100%;
    padding: 8px 32px 8px 34px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid var(--ayf-input-border);
    background: var(--ayf-input-bg);
    color: var(--ayf-text-main);
    transition: border-color 0.2s;
}

.ayf-search-box .ayf-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.ayf-search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--ayf-text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.ayf-filters-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ayf-select {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--ayf-input-border);
    background: var(--ayf-input-bg);
    color: var(--ayf-text-main);
    cursor: pointer;
}

.ayf-select:focus {
    outline: none;
    border-color: #0284c7;
}

/* Estados Vacíos y Carga */
.ayf-state-box {
    text-align: center;
    padding: 48px 20px;
    background: var(--ayf-card-bg);
    border: 1px dashed var(--ayf-card-border);
    border-radius: 12px;
    color: var(--ayf-text-muted);
}

.ayf-empty-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #94a3b8;
    display: block;
}

.ayf-empty-subtext {
    margin: 8px 0 16px 0;
    font-size: 14px;
}

.ayf-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(2, 132, 199, 0.2);
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: ayfSpin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes ayfSpin {
    to { transform: rotate(360deg); }
}

.ayf-spin {
    animation: ayfSpin 1s linear infinite;
    display: inline-block;
}

/* Cuadrícula de Reportes (Cards Grid) */
.ayf-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.ayf-report-card {
    background: var(--ayf-card-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: var(--ayf-shadow);
    cursor: pointer;
}

.ayf-report-card:hover {
    transform: translateY(-2px);
    border-color: #0284c7;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.12);
}

.ayf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ayf-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.ayf-card-id {
    font-size: 12px;
    font-family: monospace;
    font-weight: 600;
    color: var(--ayf-text-muted);
    background: var(--ayf-toolbar-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--ayf-card-border);
}

.ayf-card-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ayf-text-main);
    line-height: 1.3;
}

.ayf-card-excerpt {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: var(--ayf-text-muted);
    line-height: 1.5;
    flex: 1;
}

.ayf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--ayf-card-border);
    font-size: 12px;
}

.ayf-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ayf-text-muted);
}

.ayf-card-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.ayf-card-view-btn {
    background: transparent;
    border: none;
    color: #0284c7;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ayf-card-view-btn:hover {
    background: rgba(2, 132, 199, 0.1);
}

/* Insignias de Estado y Prioridad */
.ayf-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ayf-badge-open {
    background: #fef3c7;
    color: #b45309;
}

.ayf-badge-in-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.ayf-badge-resolved {
    background: #dcfce7;
    color: #15803d;
}

.ayf-badge-closed {
    background: #f1f5f9;
    color: #475569;
}

.ayf-badge-prio-low {
    background: #f1f5f9;
    color: #475569;
}

.ayf-badge-prio-medium {
    background: #fef9c3;
    color: #a16207;
}

.ayf-badge-prio-high {
    background: #fee2e2;
    color: #b91c1c;
}

.ayf-badge-prio-critical {
    background: #7f1d1d;
    color: #ffffff;
}

.ayf-badge-has-img {
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 6px;
}

.ayf-badge-has-img .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* ==========================================================================
   3. MODAL DE DETALLE Y EDICIÓN (.ayf-modal-backdrop)
   ========================================================================== */

.ayf-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ayf-modal-backdrop.is-active {
    display: flex;
    animation: ayfFadeIn 0.2s ease-out;
}

@keyframes ayfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.ayf-modal-open {
    overflow: hidden;
}

.ayf-modal-dialog {
    background: var(--ayf-modal-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: ayfScaleUp 0.2s ease-out;
    overflow: hidden;
}

@keyframes ayfScaleUp {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal Header */
.ayf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 24px;
    border-bottom: 1px solid var(--ayf-card-border);
    background: var(--ayf-toolbar-bg);
}

.ayf-modal-header-info {
    flex: 1;
}

.ayf-modal-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0284c7;
    margin-bottom: 4px;
}

.ayf-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ayf-text-main);
    line-height: 1.3;
}

.ayf-modal-id-badge {
    display: inline-block;
    font-family: monospace;
    font-size: 12px;
    color: var(--ayf-text-muted);
    margin-top: 4px;
}

.ayf-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--ayf-text-muted);
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.ayf-modal-close-btn:hover {
    color: #ef4444;
}

/* Modal Body */
.ayf-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Tabs */
.ayf-modal-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--ayf-card-border);
    margin-bottom: 18px;
}

.ayf-modal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ayf-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}

.ayf-modal-tab-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ayf-modal-tab-btn:hover {
    color: #0284c7;
}

.ayf-modal-tab-btn.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

.ayf-tab-counter {
    background: var(--ayf-card-border);
    color: var(--ayf-text-main);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.ayf-tab-content {
    display: none;
}

.ayf-tab-content.active {
    display: block;
}

/* Meta Bar */
.ayf-modal-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 16px;
    background: var(--ayf-toolbar-bg);
    border-radius: 8px;
    margin-bottom: 18px;
    align-items: center;
}

.ayf-meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.ayf-meta-label {
    font-weight: 600;
    color: var(--ayf-text-muted);
}

.ayf-meta-val {
    font-weight: 500;
    color: var(--ayf-text-main);
}

/* Editor de Descripción */
.ayf-modal-field-group {
    margin-bottom: 20px;
}

.ayf-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ayf-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--ayf-text-main);
}

.ayf-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #0284c7;
}

.ayf-char-count {
    font-size: 12px;
    color: var(--ayf-text-muted);
}

.ayf-field-help {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--ayf-text-muted);
}

.ayf-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 8px;
    border: 1px solid var(--ayf-input-border);
    background: var(--ayf-input-bg);
    color: var(--ayf-text-main);
    resize: vertical;
    transition: border-color 0.2s;
    font-family: inherit;
}

.ayf-textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Reporter Info Box */
.ayf-reporter-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 14px 16px;
    background: var(--ayf-toolbar-bg);
    border-radius: 8px;
}

.ayf-reporter-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ayf-reporter-item .dashicons {
    color: #0284c7;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.ayf-reporter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ayf-text-muted);
}

.ayf-reporter-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--ayf-text-main);
    word-break: break-all;
}

.ayf-reporter-value a {
    color: #0284c7;
    text-decoration: underline;
}

/* Galería de Capturas */
.ayf-screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.ayf-screenshot-item {
    background: var(--ayf-toolbar-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 8px;
    overflow: hidden;
}

.ayf-screenshot-thumb {
    position: relative;
    cursor: pointer;
    background: #000000;
    height: 140px;
    overflow: hidden;
}

.ayf-screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ayf-screenshot-thumb:hover img {
    transform: scale(1.05);
}

.ayf-screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 13px;
    font-weight: 600;
}

.ayf-screenshot-thumb:hover .ayf-screenshot-overlay {
    opacity: 1;
}

.ayf-screenshot-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ayf-text-main);
}

.ayf-link-external {
    color: #0284c7;
}

/* Metadatos Técnicos */
.ayf-metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.ayf-meta-item {
    background: var(--ayf-toolbar-bg);
    border: 1px solid var(--ayf-card-border);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.ayf-meta-item-label {
    font-weight: 600;
    color: var(--ayf-text-muted);
}

.ayf-meta-item-value {
    font-weight: 500;
    color: var(--ayf-text-main);
    font-family: monospace;
}

.ayf-empty-substate {
    text-align: center;
    padding: 30px 16px;
    color: var(--ayf-text-muted);
}

.ayf-empty-substate .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: #94a3b8;
}

/* Modal Footer */
.ayf-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--ayf-card-border);
    background: var(--ayf-toolbar-bg);
}

.ayf-modal-footer-status {
    font-size: 13px;
    font-weight: 500;
}

.ayf-sync-loading {
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ayf-sync-success {
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ayf-sync-error {
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ayf-modal-footer-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* ==========================================================================
   4. LIGHTBOX DE CAPTURAS
   ========================================================================== */

.ayf-lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.ayf-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.ayf-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.ayf-lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
}

/* ==========================================================================
   5. RESPONSIVIDAD (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 640px) {
    .ayf-frontend-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ayf-frontend-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ayf-reports-grid {
        grid-template-columns: 1fr;
    }

    .ayf-modal-backdrop {
        padding: 10px;
    }

    .ayf-modal-header,
    .ayf-modal-body,
    .ayf-modal-footer {
        padding: 14px 16px;
    }

    .ayf-modal-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .ayf-modal-footer-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
}
