/**
 * Feedback Admin - Design Premium & Moderne
 * Style : Cards modernes, animations fluides, filtres visuels
 */

/* ===== HEADER AMÉLIORÉ ===== */
.feedback-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
}

.feedback-admin-header__left {
    flex: 1;
}

.feedback-admin-header__right {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* ===== FILTRES ===== */
.feedback-filters {
    display: flex;
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    padding: 4px;
    border: 1px solid rgba(12, 129, 228, 0.12);
    box-shadow: var(--shadow-sm);
}

.feedback-filter-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-medium);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-filter-btn:hover {
    color: var(--color-primary);
    background: rgba(12, 129, 228, 0.04);
}

.feedback-filter-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(12, 129, 228, 0.25);
}

.feedback-filter-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-full);
    font-size: 11px;
    font-weight: var(--font-weight-bold);
}

.feedback-filter-btn.active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== STAT CARDS AMÉLIORÉES ===== */
.feedback-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.feedback-stat-card {
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid rgba(12, 129, 228, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feedback-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.feedback-stat-card:hover::before {
    opacity: 1;
}

.feedback-stat-card--warning::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.feedback-stat-card--success::before { background: linear-gradient(180deg, #10b981, #34d399); }
.feedback-stat-card--danger::before { background: linear-gradient(180deg, #ef4444, #f87171); }

.feedback-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-stat-card--warning .feedback-stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.08));
    color: #f59e0b;
}

.feedback-stat-card--success .feedback-stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(52, 211, 153, 0.08));
    color: #10b981;
}

.feedback-stat-card--danger .feedback-stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.08));
    color: #ef4444;
}

.feedback-stat-icon svg {
    width: 24px;
    height: 24px;
}

.feedback-stat-content {
    flex: 1;
}

.feedback-stat-value {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    font-family: var(--font-secondary);
    line-height: 1;
    margin-bottom: 4px;
}

.feedback-stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-medium);
    font-weight: var(--font-weight-medium);
}

/* ===== FEEDBACK CARDS GRID ===== */
.feedback-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

/* ===== FEEDBACK CARD ===== */
.feedback-card {
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(12, 129, 228, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.feedback-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(12, 129, 228, 0.15);
}

/* Status bar on top */
.feedback-card__status-bar {
    height: 4px;
    width: 100%;
}

.feedback-card--pending .feedback-card__status-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.feedback-card--rewarded .feedback-card__status-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.feedback-card--rejected .feedback-card__status-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.feedback-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    gap: var(--spacing-md);
}

.feedback-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

/* ===== BADGES AMÉLIORÉS ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-badge--pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge--pending::before {
    background: #f59e0b;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-badge--rewarded {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.1));
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge--rewarded::before {
    background: #10b981;
}

.status-badge--rejected {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.1));
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge--rejected::before {
    background: #ef4444;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--border-radius-md);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
}

.category-badge--bug {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.category-badge--improvement {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

.category-badge--suggestion {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}

.category-badge--other {
    background: rgba(107, 114, 128, 0.08);
    color: #4b5563;
}

.feedback-card__date {
    font-size: 12px;
    color: var(--color-text-light);
    white-space: nowrap;
}

/* ===== CARD BODY ===== */
.feedback-card__body {
    padding: var(--spacing-lg);
    flex: 1;
}

.feedback-card__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-secondary);
    line-height: 1.4;
}

.feedback-card__message {
    font-size: var(--font-size-sm);
    color: var(--color-text-medium);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    white-space: pre-wrap;
}

.feedback-card__url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    padding: 6px 10px;
    background: rgba(12, 129, 228, 0.04);
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
    max-width: 100%;
    overflow: hidden;
}

.feedback-card__url:hover {
    background: rgba(12, 129, 228, 0.08);
    color: var(--color-primary-dark);
}

.feedback-card__url svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.feedback-card__url span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== CARD FOOTER ===== */
.feedback-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(12, 129, 228, 0.02);
    border-top: 1px solid rgba(12, 129, 228, 0.06);
    gap: var(--spacing-md);
}

.feedback-card__user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 0;
}

.feedback-card__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.feedback-card__user-email {
    font-size: var(--font-size-sm);
    color: var(--color-text-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feedback-card__credits {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--border-radius-full);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    color: #059669;
}

.feedback-card__credits svg {
    width: 16px;
    height: 16px;
}

/* ===== ACTIONS ===== */
.feedback-card__actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-white);
    border-top: 1px solid rgba(12, 129, 228, 0.06);
}

.feedback-action-form {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex: 1;
}

.feedback-action-form--validate {
    flex: 2;
}

.credits-input {
    width: 90px;
    padding: 10px 12px;
    border: 1px solid rgba(12, 129, 228, 0.15);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    background: var(--color-white);
    transition: all 0.2s ease;
    color: var(--color-black);
}

.credits-input:focus {
    outline: none;
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.credits-input::placeholder {
    color: var(--color-text-light);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-action--success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-action--success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.btn-action--danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-action--danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* Status indicator for processed cards */
.feedback-card__status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.feedback-card__status-indicator--success {
    background: rgba(16, 185, 129, 0.06);
    color: #059669;
}

.feedback-card__status-indicator--danger {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

.feedback-card__status-indicator svg {
    width: 18px;
    height: 18px;
}

/* ===== EMPTY STATE AMÉLIORÉ ===== */
.feedback-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    text-align: center;
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    border: 2px dashed rgba(12, 129, 228, 0.15);
}

.feedback-empty-state__icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(12, 129, 228, 0.08), rgba(58, 184, 232, 0.04));
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
}

.feedback-empty-state__icon svg {
    width: 36px;
    height: 36px;
    opacity: 0.7;
}

.feedback-empty-state__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-secondary);
}

.feedback-empty-state__text {
    font-size: var(--font-size-base);
    color: var(--color-text-medium);
    max-width: 400px;
}

/* ===== ANIMATION ===== */
.feedback-card {
    opacity: 0;
    transform: translateY(20px);
    animation: card-appear 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.feedback-card:nth-child(1) { animation-delay: 0.05s; }
.feedback-card:nth-child(2) { animation-delay: 0.1s; }
.feedback-card:nth-child(3) { animation-delay: 0.15s; }
.feedback-card:nth-child(4) { animation-delay: 0.2s; }
.feedback-card:nth-child(5) { animation-delay: 0.25s; }
.feedback-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes card-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .feedback-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .feedback-admin-header {
        flex-direction: column;
    }

    .feedback-stats {
        grid-template-columns: 1fr;
    }

    .feedback-cards-grid {
        grid-template-columns: 1fr;
    }

    .feedback-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .feedback-filter-btn {
        flex: 1;
        justify-content: center;
    }

    .feedback-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .feedback-card__actions {
        flex-direction: column;
    }

    .feedback-action-form {
        width: 100%;
    }

    .btn-action {
        flex: none;
        width: 100%;
    }
}

/* ===== LEGACY TABLE SUPPORT (hidden by default) ===== */
.feedback-table-container {
    display: none;
}
