SMTP: - Add connection/greeting/socket timeouts so a stalled Gmail connection no longer hangs sign-up - Wrap sendMail in try/catch and fall back to logging the code - Derive secure from port (465 implicit TLS vs 587 STARTTLS) - Strip whitespace from the Gmail app password - Document SMTP_HOST/SMTP_PORT in .env.example and environment.d.ts Password reset (new): - POST /(api)/auth/forgot-password emails a 6-digit code and does not reveal whether the address is registered - POST /(api)/auth/reset-password validates the code, sets the new password, verifies the email, and signs the user in - password_reset_codes table added to seed-db.mjs - "Forgot password?" flow on the mobile sign-in screen User deletion (new): - DELETE /(api)/admin/users/[id], owner-only, blocks self-deletion - Delete button with confirmation on the dashboard Users page Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
270 lines
4.0 KiB
CSS
270 lines
4.0 KiB
CSS
:root {
|
|
--bg: #0f1117;
|
|
--panel: #171a23;
|
|
--border: #262b38;
|
|
--text: #e8eaf0;
|
|
--muted: #8a91a5;
|
|
--accent: #4f7cff;
|
|
--danger: #e5484d;
|
|
--success: #30a46c;
|
|
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
#root {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 220px;
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--border);
|
|
padding: 20px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.sidebar h1 {
|
|
font-size: 16px;
|
|
margin: 0 8px 18px;
|
|
}
|
|
|
|
.sidebar a {
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
padding: 9px 12px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.sidebar a.active,
|
|
.sidebar a:hover {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.main {
|
|
flex: 1;
|
|
padding: 28px 32px;
|
|
max-width: 1200px;
|
|
}
|
|
|
|
.main h2 {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 14px;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 18px;
|
|
}
|
|
|
|
.card .label {
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.card .value {
|
|
font-size: 26px;
|
|
font-weight: 600;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
font-size: 14px;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
text-align: left;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
th {
|
|
color: var(--muted);
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
}
|
|
|
|
tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 2px 9px;
|
|
border-radius: 999px;
|
|
font-size: 12px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.badge.owner { color: #b088ff; }
|
|
.badge.driver { color: #4f7cff; }
|
|
.badge.rider { color: #8a91a5; }
|
|
.badge.paid { color: var(--success); border-color: var(--success); }
|
|
.badge.unpaid { color: var(--danger); border-color: var(--danger); }
|
|
|
|
button,
|
|
select,
|
|
input {
|
|
font: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
button {
|
|
background: var(--accent);
|
|
border: none;
|
|
border-radius: 8px;
|
|
padding: 8px 14px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button.secondary {
|
|
background: transparent;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
button.danger {
|
|
background: transparent;
|
|
border: 1px solid var(--danger);
|
|
color: var(--danger);
|
|
}
|
|
|
|
input,
|
|
select {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
}
|
|
|
|
.toolbar {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 14px;
|
|
align-items: center;
|
|
}
|
|
|
|
.error {
|
|
color: var(--danger);
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.muted {
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.card .sub {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.card.warn .value {
|
|
color: var(--danger);
|
|
}
|
|
|
|
.pager {
|
|
margin-top: 14px;
|
|
}
|
|
|
|
.login-wrap {
|
|
margin: auto;
|
|
width: 340px;
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 28px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.login-wrap h2 {
|
|
margin: 0;
|
|
}
|
|
|
|
.chart {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 6px;
|
|
height: 160px;
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.chart .bar {
|
|
flex: 1;
|
|
background: var(--accent);
|
|
border-radius: 4px 4px 0 0;
|
|
min-height: 2px;
|
|
position: relative;
|
|
}
|
|
|
|
.chart .bar span {
|
|
position: absolute;
|
|
bottom: -22px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
font-size: 10px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.modal {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 24px;
|
|
width: 420px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.modal input {
|
|
width: 100%;
|
|
}
|
|
|
|
.row-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|