/* public/styles/ai_summary.css */
/* Resumo AI Semanal — tema verde/azul futurista com gradientes */

/* ===== CONTAINER ===== */
.ais-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.ais-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}

.ais-header-left h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.ais-header-left h2 i {
    color: #00c9a7;
    margin-right: 8px;
}

.ais-subtitle {
    color: #7a7a9e;
    font-size: 14px;
}

.ais-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ais-btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #00c9a7, #0ea5e9);
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 201, 167, 0.3);
}

.ais-btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 201, 167, 0.4);
}

.ais-btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ais-btn-history {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    color: #475569;
    transition: all 0.2s;
}

.ais-btn-history:hover {
    border-color: #00c9a7;
    color: #00c9a7;
}

/* ===== STATUS BANNER ===== */
.ais-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.ais-status.generating {
    background: linear-gradient(135deg, #ecfdf5, #e0f7fa);
    border: 1px solid #00c9a7;
    color: #047857;
}

.ais-status.generating i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESUMO CARD ===== */
.ais-summary-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #eff6ff 100%);
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.ais-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00c9a7, #0ea5e9, #8b5cf6);
}

.ais-period-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 16px;
}

.ais-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #00c9a7, #0ea5e9);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-left: 8px;
}

.ais-summary-text {
    font-size: 15px;
    line-height: 1.75;
    color: #1e293b;
    white-space: pre-wrap;
}

.ais-summary-text strong {
    color: #059669;
}

.ais-summary-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 18px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== HIGHLIGHTS & RECOMMENDATIONS ===== */
.ais-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.ais-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ais-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ais-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ais-card.highlights h3 {
    color: #059669;
}

.ais-card.recommendations h3 {
    color: #0ea5e9;
}

.ais-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ais-card ul li {
    padding: 8px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
}

.ais-card ul li:last-child {
    border-bottom: none;
}

/* ===== METRICS MINI CARDS ===== */
.ais-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.ais-metric {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s;
}

.ais-metric:hover {
    transform: translateY(-2px);
}

.ais-metric-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.ais-metric-value {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a2e;
}

.ais-metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.ais-metric-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.ais-metric-change.up {
    color: #10b981;
}

.ais-metric-change.down {
    color: #ef4444;
}

/* ===== HISTORY LIST ===== */
.ais-history {
    margin-top: 24px;
}

.ais-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ais-history-item:hover {
    border-color: #00c9a7;
    box-shadow: 0 2px 8px rgba(0, 201, 167, 0.1);
}

.ais-history-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ais-history-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ecfdf5, #e0f7fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    font-size: 14px;
}

.ais-history-item-info {
    font-size: 13px;
    color: #475569;
}

.ais-history-item-info strong {
    color: #1a1a2e;
}

.ais-history-item-date {
    font-size: 12px;
    color: #94a3b8;
}

/* ===== EMPTY STATE ===== */
.ais-empty {
    text-align: center;
    padding: 60px 20px;
}

.ais-empty i {
    font-size: 48px;
    color: #00c9a7;
    opacity: 0.4;
    margin-bottom: 16px;
}

.ais-empty p {
    color: #7a7a9e;
    font-size: 15px;
    margin: 4px 0;
}

.ais-loading {
    text-align: center;
    padding: 40px;
    color: #7a7a9e;
    font-size: 14px;
}

/* ===== DARK THEME ===== */
[data-theme="dark"] .ais-header-left h2,
.dark-mode .ais-header-left h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .ais-subtitle,
.dark-mode .ais-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .ais-summary-card,
.dark-mode .ais-summary-card {
    background: linear-gradient(135deg, #0d2818 0%, #0c2a3d 50%, #1a1a2e 100%);
    border-color: #1e4d3a;
}

[data-theme="dark"] .ais-period-badge,
.dark-mode .ais-period-badge {
    background: #1a2e35;
    border-color: #1e4d3a;
    color: #34d399;
}

[data-theme="dark"] .ais-summary-text,
.dark-mode .ais-summary-text {
    color: #cbd5e1;
}

[data-theme="dark"] .ais-summary-text strong,
.dark-mode .ais-summary-text strong {
    color: #34d399;
}

[data-theme="dark"] .ais-summary-text h3,
.dark-mode .ais-summary-text h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .ais-card,
.dark-mode .ais-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ais-card ul li,
.dark-mode .ais-card ul li {
    color: #cbd5e1;
    border-color: #334155;
}

[data-theme="dark"] .ais-metric,
.dark-mode .ais-metric {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ais-metric-value,
.dark-mode .ais-metric-value {
    color: #e2e8f0;
}

[data-theme="dark"] .ais-history-item,
.dark-mode .ais-history-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ais-history-item-info,
.dark-mode .ais-history-item-info {
    color: #cbd5e1;
}

[data-theme="dark"] .ais-history-item-info strong,
.dark-mode .ais-history-item-info strong {
    color: #e2e8f0;
}

[data-theme="dark"] .ais-btn-history,
.dark-mode .ais-btn-history {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .ais-empty i,
.dark-mode .ais-empty i {
    color: #34d399;
}

[data-theme="dark"] .ais-empty p,
.dark-mode .ais-empty p {
    color: #94a3b8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ais-header {
        flex-direction: column;
    }

    .ais-grid {
        grid-template-columns: 1fr;
    }

    .ais-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}
