stackflow-v2 / src /App.css
harshapitla's picture
Initial clean deploy - Stackflow V2
e494a1e
Raw
History Blame Contribute Delete
12.3 kB
/* src/App.css - improved theme + spacing for better chart readability */
:root{
--bg:#f6f8fb;
--card:#ffffff;
--muted:#6b7280;
--accent:#2563eb;
--accent-2:#10a4b6;
--accent-3:#7c3aed;
--accent-4:#ff7a1a;
--shadow:0 8px 28px rgba(16,24,40,0.06);
--radius:12px;
--gap:20px;
--maxwidth:1240px;
--gridline: rgba(15,23,42,0.06);
}
*{box-sizing:border-box}
html,body,#root{height:100%;margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial;background:var(--bg);color:#0f172a}
.app-container{max-width:var(--maxwidth);margin:22px auto;padding:20px}
/* Header */
.app-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}
.app-title{font-size:22px;margin:0}
.app-sub{font-size:13px;color:var(--muted);margin-top:6px}
.app-meta-line{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:8px}
.app-icon{display:inline-flex;vertical-align:middle;color:inherit}
.header-actions{display:flex;align-items:center;gap:12px}
.meta-toggle{background:none;border:0;color:var(--accent);cursor:pointer;font-size:13px;padding:6px}
/* dataset meta */
.meta-fields{margin:12px 0;padding:12px;border-radius:10px;background:linear-gradient(180deg,#fbfdff,#fff);box-shadow:var(--shadow);font-size:13px;color:#0b1220}
.meta-fields-title{font-weight:600;margin-bottom:8px}
.meta-fields-grid{display:flex;flex-wrap:wrap;gap:8px}
.meta-field-chip{background:#eef2ff;padding:4px 10px;border-radius:999px;font-size:12px;color:#364152}
.meta-field-chip.muted{background:#f1f5f9;color:#94a3b8}
/* snapshot KPI */
.kpi-row{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}
.kpi-card{background:var(--card);padding:14px;border-radius:10px;box-shadow:var(--shadow);min-width:140px;flex:0 0 auto}
.kpi-value{font-weight:700;font-size:20px}
.kpi-label{font-size:12px;color:var(--muted);margin-top:6px}
/* sections and cards */
.section-heading{margin-top:18px;margin-bottom:8px;font-size:18px}
.row{margin-bottom:18px}
.card{
background:var(--card);
border-radius:12px;
padding:18px;
box-shadow:var(--shadow);
overflow:visible;
border:1px solid #e2e8f0;
}
.chart-card{position:relative;overflow:hidden}
.card .chart-area{min-height:360px}
.chart-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.chart-card-title{margin:0;font-size:18px}
.chart-card-subtitle{margin:4px 0 0;font-size:13px;color:#64748b}
.chart-card-actions{display:flex;gap:8px}
.chart-card-body{position:relative}
.chart-card-footer{margin-top:12px;font-size:12px;color:#475569}
/* rechart tweaks: reduce gridline intensity and tooltip z-index */
.recharts-tooltip-wrapper{pointer-events:none;z-index:200}
.recharts-cartesian-grid line{stroke:var(--gridline)!important}
/* helper */
.small{font-size:13px;color:var(--muted)}
.sample-table{width:100%;border-collapse:collapse}
.sample-table th,.sample-table td{padding:6px;border-bottom:1px solid #f3f4f6;font-size:13px}
/* responsive */
@media (max-width:1000px){
.app-header{flex-direction:column;align-items:flex-start}
.kpi-row{flex-direction:column}
}
/* Better button styling */
.meta-toggle {
background: var(--card);
border: 1px solid #d0d7e2;
color: var(--accent);
cursor: pointer;
font-size: 13px;
padding: 6px 12px;
border-radius: 8px;
transition: 0.15s ease;
}
.meta-toggle:hover {
background: #eff6ff;
}
/* Meta fields card */
.meta-fields {
margin: 16px 0;
padding: 16px;
border-radius: 12px;
background: var(--card);
box-shadow: var(--shadow);
font-size: 13px;
color: #1f2937;
}
/* Snapshot KPI section */
.kpi-row{display:flex;gap:20px;flex-wrap:wrap;margin:18px 0 10px}
.kpi-card{
flex:1;
min-width:180px;
background:linear-gradient(180deg,#f8fafc,#fff);
border-radius:16px;
padding:16px 18px 18px;
border:1px solid #e2e8f0;
display:flex;
flex-direction:column;
gap:8px;
box-shadow:0 12px 30px rgba(15,23,42,0.08);
transition:box-shadow .2s ease, transform .2s ease;
}
.kpi-card:hover{
box-shadow:0 16px 34px rgba(15,23,42,0.12);
transform:translateY(-2px);
}
.kpi-header{
display:flex;
align-items:center;
gap:8px;
font-size:13px;
color:#52607a;
font-weight:600;
}
.kpi-header .app-icon{
width:20px;
height:20px;
}
.kpi-value{
font-size:28px;
font-weight:700;
color:#0d172a;
}
.kpi-desc{
font-size:12px;
color:#7b869c;
line-height:1.35;
margin-top:2px;
}
.kpi-meter{
height:6px;
width:100%;
border-radius:999px;
background:#e2e8f0;
overflow:hidden;
margin-top:4px;
}
.kpi-meter-fill{
height:100%;
background:linear-gradient(90deg,#ff8a05,#f43f5e);
}
.kpi-meter-note{
font-size:11px;
color:#6b7280;
margin-top:4px;
}
/* Highlight cards */
.highlight-grid{
display:flex;
flex-wrap:wrap;
gap:24px;
margin-top:28px;
}
.highlight-card{
flex:1 1 260px;
border:1px solid #dbe4f0;
border-radius:16px;
padding:20px 24px 22px;
background:#ffffff;
box-shadow:0 14px 28px rgba(15,23,42,0.08);
position:relative;
border-top:3px solid var(--accent-bar,#dbeafe);
}
.highlight-card-header{
display:flex;
gap:8px;
font-weight:600;
margin-bottom:2px;
}
.highlight-card-header .app-icon{color:#475569}
.highlight-card-subtitle{
font-size:11px;
color:#9aa5bb;
margin:6px 0 20px 0;
}
.highlight-item{
display:flex;
flex-direction:column;
font-size:14px;
padding:12px 0;
border-bottom:1px solid rgba(15,23,42,0.05);
gap:8px;
}
.highlight-item:last-child{border-bottom:0;padding-bottom:0}
.highlight-item-top{display:flex;align-items:center;gap:10px;line-height:1.25;flex-wrap:nowrap}
.highlight-item-rank{width:18px;color:#94a3b8;font-weight:600;text-align:right}
.highlight-item-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.highlight-item-value{font-weight:600}
.highlight-item-bar{
width:100%;
height:6px;
border-radius:999px;
background:#edf1fb;
overflow:hidden;
}
.highlight-item-bar-fill{
height:100%;
border-radius:999px;
background:var(--accent-bar,#dbeafe);
display:block;
transition:width .2s ease;
}
.highlight-card-footer{margin-top:16px;display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--accent);text-decoration:none}
.highlight-card-footer::after{content:"→"}
.snapshot-footnote{margin-top:18px;padding:14px 18px;background:#f8fafc;border-radius:16px;color:#475569;font-size:13px;border:1px dashed #d4dae5;display:flex;gap:12px}
.snapshot-footnote-icon{color:#475569}
.quick-insights{margin-top:22px;padding:18px 20px;border:1px solid #c7ddff;border-radius:14px;background:linear-gradient(135deg,#f0f6ff,#fff);box-shadow:0 12px 28px rgba(37,99,235,0.07)}
.quick-insights h4{margin:0 0 12px;font-size:15px}
.insight-groups{display:flex;gap:32px;align-items:stretch}
.insight-group{flex:1;display:flex;flex-direction:column;gap:12px;padding:0 24px;border-left:1px solid #dbe4ff}
.insight-group:first-child{border-left:none;padding-left:0}
.insight-group.is-last{padding-right:0}
.insight-item{display:flex;gap:10px;align-items:center;font-size:14px;color:#1e293b;line-height:1.45;transition:background .15s;border-radius:8px;padding:2px 6px}
.insight-item:hover{background:rgba(148,163,184,0.15)}
.insight-icon{font-size:16px;line-height:1;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;color:#4b5563}
.status-banner{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;border:1px solid transparent;margin:16px 0}
.status-banner-icon{color:inherit}
.status-banner-content{flex:1}
.status-banner-title{font-weight:600;margin-bottom:2px}
.status-banner-message{font-size:13px;color:#475569}
.status-banner-action{background:#fff;border:1px solid #c7cfe1;border-radius:8px;padding:6px 12px;font-size:13px;cursor:pointer;color:#0f172a}
.status-banner-info{background:#eef2ff;border-color:#c7d2fe;color:#1e1b4b}
.status-banner-warning{background:#fff7ed;border-color:#fdba74;color:#7c2d12}
.status-banner-error{background:#fef2f2;border-color:#fecaca;color:#7f1d1d}
@media (max-width:900px){
.insight-groups{flex-direction:column;gap:18px}
.insight-group{border-left:none;padding:0;border-bottom:1px solid #e3e7f5;padding-bottom:14px}
.insight-group.is-last{border-bottom:none;padding-bottom:0}
.ppc-header{flex-direction:column}
.ppc-actions{align-items:stretch}
.ppc-controls{align-items:flex-start}
.coverage-card{width:100%}
}
.loading-block{display:flex;align-items:center;justify-content:center;padding:40px;font-size:15px;color:#475569;gap:12px}
.loading-title{font-weight:600;font-size:15px;margin-bottom:4px}
.loading-desc{font-size:13px;color:#6b7280}
.link-button{background:none;border:none;color:var(--accent);cursor:pointer;padding:0;margin-top:8px;font-size:13px;display:inline-flex;align-items:center;gap:6px}
.spinner{width:28px;height:28px;border:3px solid #dbe1ea;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* AIMarketShift simplified */
.ams-simple-header{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:flex-start;margin-bottom:8px}
.ams-simple-header h3{margin:0}
.ams-simple-header p{margin:4px 0 0;font-size:13px;color:#4c5667;max-width:520px}
.ams-simple-badges{display:flex;gap:10px;flex-wrap:wrap}
.ams-simple-footer{display:flex;gap:18px;align-items:center;margin-top:10px;font-size:12px;color:#475569}
.dot{display:inline-flex;width:10px;height:10px;border-radius:999px}
.dot-blue{background:#2563eb}
.dot-gray{background:#cfd5e2}
.tooltip-card{background:#fff;border:1px solid #e4e8f5;border-radius:10px;padding:10px 14px;font-size:12px;color:#0f172a;box-shadow:0 12px 24px rgba(15,23,42,0.15)}
.tooltip-title{font-weight:600;margin-bottom:4px}
.ams-simple-header{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:flex-start;margin-bottom:8px}
.ams-simple-header h3{margin:0}
.ams-simple-header p{margin:4px 0 0;font-size:13px;color:#4c5667;max-width:520px}
.ams-simple-badges{display:flex;gap:10px;flex-wrap:wrap}
.insight-badge{padding:10px 14px;border-radius:10px;border:1px solid rgba(37,99,235,0.2);background:rgba(37,99,235,0.08);font-size:12px;color:#0f172a;display:flex;flex-direction:column;gap:4px;min-width:120px;cursor:pointer;transition:box-shadow .15s ease, transform .15s ease}
.insight-badge:hover{box-shadow:0 10px 20px rgba(15,23,42,0.08);transform:translateY(-1px)}
.insight-badge-active{box-shadow:0 12px 24px rgba(37,99,235,0.25)}
.insight-badge-positive{border-color:rgba(16,185,129,0.3);background:rgba(16,185,129,0.08)}
.insight-badge-warning{border-color:rgba(248,113,113,0.3);background:rgba(248,113,113,0.1)}
.insight-badge-neutral{border-color:rgba(148,163,184,0.3);background:rgba(148,163,184,0.1)}
.ams-filter-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:12px;margin:6px 0;color:#475569}
.pill-button{border:1px solid #d6dae5;background:#fff;border-radius:999px;padding:4px 12px;font-size:12px;cursor:pointer;transition:background .15s ease,color .15s ease}
.pill-button.is-active{background:#2563eb;color:#fff;border-color:#2563eb}
.filter-group{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.filter-label{font-weight:600;color:#4b5563}
.ams-simple-footer{display:flex;gap:18px;align-items:center;margin-top:10px;font-size:12px;color:#475569}
.dot{display:inline-flex;width:10px;height:10px;border-radius:999px}
.dot-blue{background:#2563eb}
.dot-gray{background:#cfd5e2}
.feature-controls{display:flex;gap:18px;flex-wrap:wrap;justify-content:flex-end}
.ppc-header{display:flex;gap:24px;justify-content:space-between;flex-wrap:wrap;align-items:flex-start;margin-bottom:12px}
.ppc-copy h3{margin:0}
.ppc-copy p{margin:4px 0 0;font-size:13px;color:#4c5667;max-width:520px}
.ppc-actions{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end}
.ppc-controls{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.coverage-card{padding:14px 16px;border-radius:16px;border:1px solid rgba(59,130,246,0.3);background:rgba(59,130,246,0.08);min-width:220px;box-shadow:0 10px 24px rgba(59,130,246,0.12);font-size:12px;color:#1f2933;display:flex;flex-direction:column;gap:4px}
.coverage-card strong{font-size:18px}
.coverage-card span{font-size:11px;color:#6b7280}