StockGuard / frontend /static /css /main.css
Anant0712's picture
Create frontend/static/css/main.css
bb84d85 verified
Raw History Blame Contribute Delete
7.22 kB
<style>
:root {
--primary: #3b82f6;
--danger: #ef4444;
--success: #10b981;
--dark: #1e293b;
--light: #f8fafc;
--gray: #94a3b8;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f1f5f9;
color: var(--dark);
}
.dashboard {
display: grid;
grid-template-columns: 240px 1fr;
min-height: 100vh;
}
/* Sidebar Styles */
.sidebar {
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px 0;
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary);
padding: 0 20px 20px;
border-bottom: 1px solid #e2e8f0;
margin-bottom: 20px;
}
.nav-item {
display: flex;
align-items: center;
padding: 12px 20px;
cursor: pointer;
transition: all 0.2s;
}
.nav-item:hover {
background-color: #f1f5f9;
}
.nav-item.active {
background-color: #e0f2fe;
border-left: 4px solid var(--primary);
}
.nav-item i {
margin-right: 12px;
color: var(--gray);
}
.nav-item.active i {
color: var(--primary);
}
/* Main Content Styles */
.main-content {
padding: 20px;
overflow-y: auto;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 10px;
}
.stock-selector {
padding: 8px 12px;
border: 1px solid #cbd5e1;
border-radius: 6px;
background-color: white;
min-width: 200px;
}
/* Chart Container */
.chart-container {
background-color: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
margin-bottom: 20px;
position: relative;
height: 400px;
}
#stockChart {
width: 100%;
height: 100%;
}
/* Cards Grid */
.cards-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 20px;
}
.card {
background-color: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.card h3 {
margin-bottom: 15px;
font-size: 1.1rem;
}
/* Anomalies List */
.anomaly-item {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #e2e8f0;
}
.anomaly-item:last-child {
border-bottom: none;
}
.anomaly-severity {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
}
.high {
background-color: #fee2e2;
color: var(--danger);
}
.medium {
background-color: #fef3c7;
color: #d97706;
}
/* News Items */
.news-item {
padding: 12px 0;
border-bottom: 1px solid #e2e8f0;
}
.news-item:last-child {
border-bottom: none;
}
.news-sentiment {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
margin-top: 8px;
}
.bullish {
background-color: #dcfce7;
color: var(--success);
}
.bearish {
background-color: #fee2e2;
color: var(--danger);
}
/* Settings Form */
.settings-form {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 8px 12px;
border: 1px solid #cbd5e1;
border-radius: 4px;
}
/* Portfolio Table */
.portfolio-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.portfolio-table th,
.portfolio-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e2e8f0;
}
.portfolio-table th {
background-color: #f1f5f9;
font-weight: 600;
}
/* Tabs Content */
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Mobile Menu */
.mobile-menu-btn {
display: none;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
padding: 10px;
}
/* Responsive Design */
@media (max-width: 1024px) {
.cards-grid {
grid-template-columns: repeat(2, 1fr);
}
.settings-form {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr;
}
.sidebar {
position: fixed;
left: -100%;
top: 0;
width: 80%;
height: 100vh;
z-index: 100;
transition: all 0.3s;
}
.sidebar.active {
left: 0;
}
.mobile-menu-btn {
display: block;
}
.cards-grid {
grid-template-columns: 1fr;
}
.main-content {
padding: 15px;
}
}
</style>