assets-tracker-api / web-app /src /app /globals.css
somilsadana
Initial commit of full-stack assets tracker bot
83bcbe3
Raw History Blame Contribute Delete
4.67 kB
:root {
--bg: #0f172a;
--card-bg: #1e293b;
--primary: #3b82f6;
--accent: #10b981;
--text: #f1f5f9;
--text-muted: #94a3b8;
--border: #334155;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border);
}
h1 {
font-size: 1.5rem;
font-weight: 700;
}
.status-badge {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--card-bg);
border-radius: 9999px;
font-size: 0.875rem;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--accent);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 0.75rem;
padding: 1.25rem;
transition: border-color 0.2s;
}
.card:hover {
border-color: var(--primary);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.asset-name {
font-size: 1.125rem;
font-weight: 600;
}
.asset-price {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary);
margin-bottom: 0.5rem;
}
.range-info {
font-size: 0.875rem;
color: var(--text-muted);
}
.state-indicator {
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
}
.state-outside { background: #374151; color: #9ca3af; }
.state-inside { background: #065f46; color: #34d399; }
.add-form {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 0.75rem;
padding: 1.5rem;
margin-bottom: 2rem;
}
.form-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 1rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr auto;
gap: 1rem;
align-items: end;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
label {
font-size: 0.875rem;
color: var(--text-muted);
}
input, select {
padding: 0.625rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 0.5rem;
color: var(--text);
font-size: 1rem;
}
input:focus, select:focus {
outline: none;
border-color: var(--primary);
}
button {
padding: 0.625rem 1.25rem;
background: var(--primary);
color: white;
border: none;
border-radius: 0.5rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
}
button:hover {
opacity: 0.9;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
button.remove {
background: #dc2626;
padding: 0.5rem;
font-size: 0.875rem;
}
.alerts-section {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 0.75rem;
padding: 1.5rem;
}
.section-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 1rem;
}
.alert-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
background: var(--bg);
border-radius: 0.5rem;
margin-bottom: 0.5rem;
}
.alert-icon {
font-size: 1.5rem;
}
.alert-details {
flex: 1;
}
.alert-title {
font-weight: 600;
margin-bottom: 0.25rem;
}
.alert-meta {
font-size: 0.875rem;
color: var(--text-muted);
}
.empty-state {
text-align: center;
padding: 2rem;
color: var(--text-muted);
}
@media (max-width: 768px) {
.container { padding: 1rem; }
.form-row { grid-template-columns: 1fr; }
}
/* ── Form feedback ───────────────────────────────────────────────────────── */
.form-error {
margin-top: 0.75rem;
padding: 0.625rem 0.875rem;
background: #451a1a;
border: 1px solid #dc2626;
border-radius: 0.5rem;
color: #fca5a5;
font-size: 0.875rem;
}
.form-success {
margin-top: 0.75rem;
padding: 0.625rem 0.875rem;
background: #052e16;
border: 1px solid #16a34a;
border-radius: 0.5rem;
color: #86efac;
font-size: 0.875rem;
}
/* ── In-range card highlight ─────────────────────────────────────────────── */
.card-in-range {
border-color: #10b981;
box-shadow: 0 0 0 1px #10b98140;
}