/* ===== REPORTS / REVENUE / MARKETING — SHARED STYLES ===== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    font-size: 1.2rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.page-header h1 i { color: #3b82f6; }

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary-action {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    box-shadow: 0 3px 10px rgba(59,130,246,0.25);
}
.btn-primary-action:hover { transform: translateY(-2px); }

.btn-success-action {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    box-shadow: 0 3px 10px rgba(16,185,129,0.2);
}
.btn-success-action:hover { transform: translateY(-2px); }

.btn-outline-action {
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}
.btn-outline-action:hover { border-color: #3b82f6; color: #3b82f6; }

/* KPI row */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.kpi-card {
    background: white;
    padding: 13px 13px;
    border-radius: 9px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 11px;
    transition: transform 0.2s;
    border-left: 3px solid transparent;
}
.kpi-card:hover { transform: translateY(-3px); }
.kpi-card.blue   { border-left-color: #3b82f6; }
.kpi-card.green  { border-left-color: #10b981; }
.kpi-card.amber  { border-left-color: #f59e0b; }
.kpi-card.purple { border-left-color: #8b5cf6; }
.kpi-card.red    { border-left-color: #ef4444; }
.kpi-card.teal   { border-left-color: #06b6d4; }

.kpi-icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; color: white; flex-shrink: 0;
}
.kpi-icon.blue   { background: linear-gradient(135deg,#3b82f6,#6366f1); }
.kpi-icon.green  { background: linear-gradient(135deg,#10b981,#06b6d4); }
.kpi-icon.amber  { background: linear-gradient(135deg,#f59e0b,#f97316); }
.kpi-icon.purple { background: linear-gradient(135deg,#8b5cf6,#ec4899); }
.kpi-icon.red    { background: linear-gradient(135deg,#ef4444,#f97316); }
.kpi-icon.teal   { background: linear-gradient(135deg,#06b6d4,#3b82f6); }

.kpi-body { flex: 1; min-width: 0; }
.kpi-body label { font-size: 0.68rem; color: #64748b; font-weight: 500; display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.kpi-value { font-size: 1.25rem; font-weight: 700; color: #1e293b; line-height: 1.1; }
.kpi-delta { font-size: 0.68rem; font-weight: 600; margin-top: 2px; }
.kpi-delta.up   { color: #10b981; }
.kpi-delta.down { color: #ef4444; }

/* Grid panels */
.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 18px 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-header h3 {
    font-size: 0.92rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}
.panel-header h3 i { color: #3b82f6; }

.panel-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Table inside panel */
.panel table { width: 100%; border-collapse: collapse; }
.panel thead th { padding: 8px 10px; text-align: left; font-size: 0.72rem; color: #94a3b8; font-weight: 600; border-bottom: 1px solid #f1f5f9; text-transform: uppercase; letter-spacing: 0.5px; }
.panel tbody td { padding: 10px 10px; font-size: 0.84rem; color: #1e293b; border-bottom: 1px solid #f8fafc; }
.panel tbody tr:last-child td { border-bottom: none; }
.panel tbody tr:hover td { background: #f8fafc; }

/* Status pills */
.pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
}
.pill-green  { background: #d1fae5; color: #065f46; }
.pill-amber  { background: #fef3c7; color: #92400e; }
.pill-blue   { background: #dbeafe; color: #1e40af; }
.pill-red    { background: #fee2e2; color: #991b1b; }
.pill-purple { background: #ede9fe; color: #5b21b6; }

/* Progress bar */
.progress-wrap { margin-top: 4px; }
.progress-bar-bg { height: 6px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }

/* Marketing planner */
.planner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.campaign-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 18px;
    border-top: 3px solid #3b82f6;
    transition: transform 0.2s, box-shadow 0.2s;
}
.campaign-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.09); }
.campaign-card.green  { border-top-color: #10b981; }
.campaign-card.amber  { border-top-color: #f59e0b; }
.campaign-card.purple { border-top-color: #8b5cf6; }
.campaign-card.red    { border-top-color: #ef4444; }

.campaign-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.campaign-title { font-size: 0.95rem; font-weight: 700; color: #1e293b; margin-bottom: 3px; }
.campaign-sub   { font-size: 0.78rem; color: #64748b; }

.campaign-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.meta-item label { font-size: 0.68rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.meta-item span  { font-size: 0.84rem; font-weight: 600; color: #1e293b; }

.campaign-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #f1f5f9; }

/* Download section */
.download-section {
    background: linear-gradient(135deg, #1e293b 0%, #1e3c72 100%);
    border-radius: 12px;
    padding: 22px 24px;
    color: white;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.download-section h3 { font-size: 1.05rem; margin-bottom: 4px; }
.download-section p  { font-size: 0.82rem; color: rgba(255,255,255,0.7); }

.download-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-download {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 7px;
    font-family: inherit; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; border: none; transition: all 0.2s; text-decoration: none;
}
.btn-download.pdf   { background: #ef4444; color: white; }
.btn-download.csv   { background: #10b981; color: white; }
.btn-download.xlsx  { background: #3b82f6; color: white; }
.btn-download.print { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); }
.btn-download:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* Full-width panel */
.panel-full { grid-column: 1 / -1; }

/* Month calendar strip */
.month-strip {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.month-cell {
    background: white;
    border-radius: 7px;
    padding: 10px 6px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748b;
}
.month-cell:hover  { border-color: #3b82f6; color: #3b82f6; }
.month-cell.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.month-cell.has-event::after { content: '●'; display: block; font-size: 0.5rem; color: #f59e0b; margin-top: 2px; }

/* Channel row */
.channel-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f8fafc; }
.channel-row:last-child { border-bottom: none; }
.channel-icon { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: white; flex-shrink: 0; }
.channel-name  { font-weight: 600; font-size: 0.85rem; color: #1e293b; flex: 1; }
.channel-pct   { font-weight: 700; font-size: 0.85rem; color: #64748b; width: 36px; text-align: right; }

/* Budget bar row */
.budget-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.budget-label   { width: 120px; font-size: 0.82rem; font-weight: 600; color: #1e293b; flex-shrink: 0; }
.budget-bar-wrap { flex: 1; }
.budget-amount  { width: 65px; text-align: right; font-size: 0.82rem; font-weight: 700; color: #1e293b; }

/* Responsive */
@media (max-width: 1024px) {
    .panels-grid, .planner-grid { grid-template-columns: 1fr; }
    .month-strip { grid-template-columns: repeat(6,1fr); }
    .kpi-row { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 640px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .kpi-row { grid-template-columns: 1fr; }
    .month-strip { grid-template-columns: repeat(4,1fr); }
    .download-section { flex-direction: column; }
}
