mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
291 lines
8.2 KiB
CSS
291 lines
8.2 KiB
CSS
:root {
|
|
--bg: #f7f7fb;
|
|
--panel: #ffffff;
|
|
--text: #9aa3b2;
|
|
--muted: #6b7280;
|
|
--primary: #6f49fe;
|
|
--primary-600: #5a37fb;
|
|
--border: #e5e7eb;
|
|
--radius: 12px;
|
|
--shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.08);
|
|
|
|
font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
|
|
color: var(--text);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body, #root { height: 100%; }
|
|
|
|
body { background: var(--bg); margin: 0; display: block; }
|
|
|
|
/* Dark theme variables */
|
|
body[data-theme="dark"] {
|
|
--bg: #161a2b;
|
|
--panel: #283046;
|
|
--text: #283046;
|
|
--muted: #cbd5e1;
|
|
--primary: #8b7bff;
|
|
--primary-600: #7b69ff;
|
|
--border: #283046;
|
|
}
|
|
|
|
/* Layout */
|
|
.app-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); height: 100vh; }
|
|
.sidebar { background: #15172a; color: #e5e7eb; display: flex; flex-direction: column; padding: 20px 12px; }
|
|
.sidebar .logo { color: #fff; font-weight: 700; font-size: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
|
|
.nav { margin-top: 12px; display: grid; gap: 4px; }
|
|
.nav a, .nav button { color: #cbd5e1; text-align: left; background: transparent; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
|
|
.nav a.active, .nav a:hover, .nav button:hover { background: rgba(255,255,255,0.08); color: #fff; }
|
|
|
|
.content { display: flex; flex-direction: column; overflow-y: auto; min-width: 0; width: 100%; }
|
|
.topbar { height: 64px; display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--border); }
|
|
.topbar .user { color: var(--muted); }
|
|
.page { padding: 24px; }
|
|
|
|
/* Cards */
|
|
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
|
|
.card h3 { margin: 0 0 12px; }
|
|
|
|
/* Forms */
|
|
/* Common field styles (no custom arrow here) */
|
|
.input, textarea {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background-color: var(--panel);
|
|
color: var(--muted);
|
|
}
|
|
|
|
/* Select-only: show custom dropdown arrow */
|
|
select.input {
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
|
|
padding-right: 32px; /* room for the arrow */
|
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
background-position: right 0.5rem center;
|
|
background-repeat: no-repeat;
|
|
background-size: 1.5em 1.5em;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pie-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 16px;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.pie-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* Make charts scale nicely within the cards */
|
|
.pie-card canvas, .pie-card svg {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.input:focus, select:focus, textarea:focus {
|
|
outline: 2px solid var(--primary);
|
|
outline-offset: 2px;
|
|
border-color: var(--primary);
|
|
}
|
|
.form-row { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0,1fr)); }
|
|
.form-row > * { min-width: 140px; }
|
|
.form-row > .btn {
|
|
justify-self: start;
|
|
}
|
|
.actions { display: flex; align-items: center; gap: 8px; }
|
|
|
|
/* Buttons */
|
|
.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 10px 14px; border-radius: 10px; cursor: pointer; }
|
|
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
|
.btn.primary:hover { background: var(--primary-600); }
|
|
.btn.ghost { background: transparent; color: var(--muted); }
|
|
.btn, .input, select, textarea, .nav a, .nav button, .segmented button {
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
.btn.small {
|
|
padding: 4px 10px;
|
|
font-size: 0.875rem; /* 14px */
|
|
}
|
|
|
|
/* Tables */
|
|
.table { width: 100%; border-collapse: collapse; }
|
|
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--border); }
|
|
.table th { text-align: left; color: var(--muted); font-weight: 600; }
|
|
.table td.amount { text-align: right; font-variant-numeric: tabular-nums; }
|
|
.table-controls {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px; /* Adds some space above the table */
|
|
}
|
|
|
|
/* Segmented control */
|
|
.segmented { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 4px; border: 1px solid var(--border); }
|
|
.segmented button { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; }
|
|
.segmented button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
|
|
|
|
/* Auth layout */
|
|
body.auth-page #root {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Utility */
|
|
.muted { color: var(--muted); }
|
|
.space-y > * + * { margin-top: 12px; }
|
|
|
|
/* Modal mock bank */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal-content {
|
|
background: var(--panel);
|
|
padding: 24px;
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.connection-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
|
|
/* Responsive enhancements */
|
|
|
|
/* Off-canvas sidebar + hamburger for mobile */
|
|
@media (max-width: 900px) {
|
|
.app-layout {
|
|
grid-template-columns: 1fr;
|
|
min-height: 100dvh;
|
|
position: relative;
|
|
}
|
|
.sidebar {
|
|
position: fixed;
|
|
inset: 0 auto 0 0;
|
|
width: 80vw;
|
|
max-width: 320px;
|
|
transform: translateX(-100%);
|
|
transition: transform 200ms ease;
|
|
z-index: 1000;
|
|
overflow-y: auto;
|
|
}
|
|
.app-layout.sidebar-open .sidebar {
|
|
transform: translateX(0);
|
|
}
|
|
.hamburger {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 40px;
|
|
height: 40px;
|
|
margin-right: 8px;
|
|
}
|
|
.topbar { position: sticky; top: 0; z-index: 500; }
|
|
}
|
|
|
|
@media (min-width: 901px) {
|
|
.hamburger { display: none; }
|
|
}
|
|
|
|
/* Backdrop when sidebar is open */
|
|
.backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.45);
|
|
z-index: 900;
|
|
}
|
|
|
|
/* Responsive table: convert to card list on small screens */
|
|
.table.responsive { width: 100%; }
|
|
@media (max-width: 700px) {
|
|
.table.responsive thead { display: none; }
|
|
.table.responsive tbody tr {
|
|
display: block;
|
|
border: 1px solid var(--border, #2a2f45);
|
|
border-radius: 8px;
|
|
margin-bottom: 12px;
|
|
overflow: hidden;
|
|
background: var(--panel);
|
|
}
|
|
.table.responsive tbody td {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
text-align: left !important; /* override any right align */
|
|
}
|
|
.table.responsive tbody td:last-child { border-bottom: 0; }
|
|
.table.responsive tbody td::before {
|
|
content: attr(data-label);
|
|
font-weight: 600;
|
|
color: var(--muted);
|
|
}
|
|
.table.responsive .actions { width: 100%; justify-content: flex-end; }
|
|
.table.responsive .amount { font-weight: 600; }
|
|
}
|
|
|
|
/* Filters and controls wrapping */
|
|
@media (max-width: 900px) {
|
|
.form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
}
|
|
@media (max-width: 700px) {
|
|
.form-row { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
.table-controls { gap: 12px; }
|
|
@media (max-width: 700px) {
|
|
.table-controls { flex-direction: column; align-items: stretch; }
|
|
.table-controls .actions { width: 100%; }
|
|
.table-controls .actions .btn { flex: 1 0 auto; }
|
|
}
|
|
|
|
/* Touch-friendly sizes */
|
|
.btn, .input, select.input { min-height: 40px; }
|
|
.btn.small { min-height: 36px; }
|
|
|
|
/* Connection rows on mobile */
|
|
@media (max-width: 700px) {
|
|
.connection-row { flex-direction: column; align-items: stretch; gap: 8px; }
|
|
.connection-row .btn { width: 100%; }
|
|
}
|
|
|
|
/* Charts should scale to container */
|
|
.card canvas, .card svg { max-width: 100%; height: auto; display: block; }
|
|
|
|
|
|
/* Horizontal scroll container for wide charts */
|
|
.chart-scroll {
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
|
|
}
|
|
.chart-inner { min-width: 900px; }
|