feat(report): CSS for report page, form, and preview panel

This commit is contained in:
fahed
2026-04-28 14:43:37 +03:00
parent 640538bcbd
commit d59af22329
+365
View File
@@ -2854,6 +2854,371 @@ html[dir="rtl"] .exportable-chart-wrapper .chart-export-btn.visible {
.alt-chart-header { flex-direction:column; }
}
/* ========================================
Report Builder page
======================================== */
.report-page {
max-width: 1400px;
margin: 0 auto;
padding: 32px 24px 100px;
}
.report-header {
margin-bottom: 28px;
}
.report-title {
font-family: var(--alt-display-font, 'DM Serif Display', serif);
font-size: 2rem;
font-weight: 400;
color: var(--text-primary);
margin: 0 0 6px;
letter-spacing: -0.03em;
}
.report-sub {
font-size: 0.9375rem;
color: var(--text-muted);
margin: 0;
}
.report-body {
display: grid;
grid-template-columns: 420px 1fr;
gap: 32px;
align-items: start;
}
.report-form-col {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.report-preview-col {}
.report-preview-sticky {
position: sticky;
top: 80px;
}
/* Generate button bar */
.report-footer-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--surface);
border-top: 1px solid var(--border);
padding: 12px 24px;
padding-bottom: max(12px, env(safe-area-inset-bottom));
display: flex;
justify-content: flex-end;
z-index: 100;
box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.report-generate-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 24px;
background: var(--accent);
color: var(--text-inverse);
border: none;
border-radius: 8px;
font-size: 0.9375rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s;
}
.report-generate-btn:hover { opacity: 0.88; }
.report-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.report-generate-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes report-spin { to { transform: rotate(360deg); } }
.report-spin { animation: report-spin 0.8s linear infinite; }
/* ── Report Form ── */
.report-form {
padding: 20px;
display: flex;
flex-direction: column;
gap: 14px;
}
.rf-section-title {
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
padding-top: 8px;
border-top: 1px solid var(--border);
margin-top: 4px;
}
.rf-section-title:first-child {
border-top: none;
margin-top: 0;
padding-top: 0;
}
.rf-field {
display: flex;
flex-direction: column;
gap: 5px;
}
.rf-label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
}
.rf-input {
padding: 7px 10px;
border: 1px solid var(--border);
border-radius: 7px;
font-size: 0.875rem;
background: var(--surface);
color: var(--text-primary);
width: 100%;
box-sizing: border-box;
}
.rf-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
.rf-date-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.rf-toggle {
display: inline-flex;
border: 1px solid var(--border);
border-radius: 8px;
overflow: hidden;
}
.rf-toggle-opt {
padding: 6px 12px;
font-size: 0.8125rem;
font-weight: 500;
background: var(--surface);
color: var(--text-muted);
border: none;
cursor: pointer;
transition: background 0.1s, color 0.1s;
}
.rf-toggle-opt--on {
background: var(--accent);
color: var(--text-inverse);
}
.rf-check-row {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.875rem;
color: var(--text-primary);
cursor: pointer;
}
.rf-checkbox {
width: 16px;
height: 16px;
accent-color: var(--accent);
cursor: pointer;
flex-shrink: 0;
}
.rf-color-row {
display: flex;
align-items: center;
gap: 10px;
}
.rf-color-input {
width: 40px;
height: 36px;
padding: 2px;
border: 1px solid var(--border);
border-radius: 7px;
cursor: pointer;
}
.rf-color-val {
font-size: 0.8125rem;
color: var(--text-muted);
font-family: var(--alt-mono-font, monospace);
}
.rf-logo-row {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.rf-upload-btn {
padding: 6px 12px;
border: 1px dashed var(--border);
border-radius: 7px;
background: var(--bg);
color: var(--text-secondary);
font-size: 0.8125rem;
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.rf-upload-btn:hover { border-color: var(--accent); color: var(--accent); }
.rf-logo-preview {
height: 32px;
max-width: 80px;
object-fit: contain;
border: 1px solid var(--border);
border-radius: 5px;
padding: 2px;
}
.rf-remove-btn {
width: 24px;
height: 24px;
border: none;
background: var(--danger-light, #fee2e2);
color: var(--danger, #dc2626);
border-radius: 50%;
font-size: 0.75rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
/* ── Report Preview ── */
.report-preview {
display: flex;
flex-direction: column;
gap: 12px;
}
.report-preview-label {
font-size: 0.75rem;
color: var(--text-muted);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.rp-page {
background: white;
border: 1px solid var(--border);
border-radius: 6px;
box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08));
overflow: hidden;
aspect-ratio: 210 / 297;
display: flex;
flex-direction: column;
font-size: 7px;
padding: 16px;
box-sizing: border-box;
color: #0f172a;
}
.rp-cover-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: auto;
}
.rp-brand { font-weight: 700; color: #2563eb; font-size: 8px; }
.rp-brand-small { font-weight: 700; font-size: 6px; }
.rp-client-logo {
height: 20px;
max-width: 50px;
object-fit: contain;
}
.rp-cover-body {
padding: 24px 0 16px;
}
.rp-cover-title {
font-size: 13px;
font-weight: 700;
margin-bottom: 8px;
color: #0f172a;
line-height: 1.3;
}
.rp-cover-for, .rp-cover-contact, .rp-cover-period {
font-size: 7px;
color: #64748b;
margin-bottom: 3px;
}
.rp-cover-bar { height: 4px; margin-top: auto; width: calc(100% + 32px); margin-left: -16px; }
.rp-placeholder-text { color: #cbd5e1; font-style: italic; }
.rp-page--content { padding: 12px 16px; }
.rp-page-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #e2e8f0;
padding-bottom: 4px;
margin-bottom: 10px;
}
.rp-page-title-small, .rp-page-num { font-size: 5px; color: #94a3b8; }
.rp-section { margin-bottom: 10px; }
.rp-section-heading {
color: white;
font-size: 6px;
font-weight: 700;
padding: 2px 6px;
border-radius: 2px;
margin-bottom: 6px;
}
.rp-placeholder-lines { display: flex; flex-direction: column; gap: 3px; }
.rp-ph-line { height: 4px; background: #e2e8f0; border-radius: 2px; }
.rp-ph-table { display: flex; flex-direction: column; gap: 2px; }
.rp-ph-row {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 0;
border-bottom: 1px solid #f1f5f9;
}
.rp-ph-row-label { font-size: 5.5px; color: #334155; flex: 1.5; }
.rp-ph-row-val { flex: 1; height: 4px; background: #e2e8f0; border-radius: 2px; }
.rp-ph-row-val--sm { flex: 0.8; }
.rp-ph-chart { height: 40px; background: #f8fafc; border-radius: 3px; border: 1px solid #e2e8f0; }
@media (max-width: 900px) {
.report-body { grid-template-columns: 1fr; }
.report-preview-sticky { position: static; }
.report-page { padding: 20px 16px 90px; }
}
/* ========================================
Reduced Motion
======================================== */