freightdesk/webapp/src/public/css/style.css
FreightDesk 1a4eaaa040 Initial commit: FreightDesk v1.0
- Express + EJS server-rendered app
- Supabase PostgreSQL database
- Auth: username/password with bcrypt
- Dashboard with business stats
- Load CRUD with filters
- WhatsApp message parser
- Payment tracking
- Shipper & vehicle management
- Reports (monthly, top shippers, routes)
- Government-app aesthetic (tricolor theme)
- Dark mode support
- Docker + Coolify deployment ready
- Seed data from existing business ledger (88 loads, 41 shippers, 70 vehicles)
2026-06-07 18:57:24 +00:00

767 lines
15 KiB
CSS

/* ============================================================
FreightDesk — Government App Aesthetic
Tricolor: Saffron #FF9933 | White #FFFFFF | Green #138808
Navy: #000080 (Ashoka Chakra blue)
============================================================ */
:root {
/* Colors */
--saffron: #FF9933;
--saffron-dark: #E68A2E;
--green: #138808;
--green-dark: #0F6B06;
--navy: #000080;
--navy-light: #1a1a9a;
--white: #FFFFFF;
--bg: #f5f5f0;
--bg-card: #FFFFFF;
--bg-sidebar: #000080;
--text: #1a1a2e;
--text-muted: #666;
--text-light: #999;
--border: #e0ddd5;
--danger: #dc3545;
--warning: #f0ad4e;
--success: #138808;
--info: #17a2b8;
--shadow: 0 2px 8px rgba(0,0,0,0.08);
--shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
--radius: 8px;
--radius-lg: 12px;
--font-hi: 'Noto Sans Devanagari', sans-serif;
--font-en: 'Inter', -apple-system, sans-serif;
}
[data-theme="dark"] {
--bg: #1a1a2e;
--bg-card: #252540;
--bg-sidebar: #0a0a2e;
--text: #e8e8f0;
--text-muted: #a0a0b0;
--text-light: #707080;
--border: #3a3a55;
--shadow: 0 2px 8px rgba(0,0,0,0.3);
--shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: var(--font-en);
background: var(--bg);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
}
/* ============================================================
TOPBAR
============================================================ */
.topbar {
background: var(--navy);
color: var(--white);
padding: 0 24px;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.topbar::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: linear-gradient(90deg, var(--saffron) 33%, var(--white) 33%, var(--white) 66%, var(--green) 66%);
}
.topbar-brand {
display: flex;
align-items: center;
gap: 12px;
}
.emblem {
font-size: 28px;
line-height: 1;
}
.brand-text {
display: flex;
flex-direction: column;
}
.brand-hi {
font-family: var(--font-hi);
font-size: 16px;
font-weight: 700;
line-height: 1.2;
}
.brand-en {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
opacity: 0.9;
}
.brand-tagline {
font-size: 9px;
opacity: 0.7;
letter-spacing: 0.3px;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 12px;
}
.user-name {
font-size: 14px;
opacity: 0.9;
}
/* ============================================================
LAYOUT
============================================================ */
.layout {
display: flex;
min-height: calc(100vh - 64px);
}
.sidebar {
width: 240px;
background: var(--bg-sidebar);
color: var(--white);
padding: 20px 0;
flex-shrink: 0;
min-height: calc(100vh - 64px);
}
.sidebar-section {
margin-bottom: 24px;
}
.sidebar-title {
display: block;
padding: 8px 20px;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 1px;
opacity: 0.5;
font-weight: 600;
}
.sidebar-link {
display: block;
padding: 10px 20px;
color: rgba(255,255,255,0.8);
text-decoration: none;
font-size: 14px;
transition: all 0.2s;
border-left: 3px solid transparent;
}
.sidebar-link:hover {
background: rgba(255,255,255,0.1);
color: var(--white);
}
.sidebar-link.active {
background: rgba(255,255,255,0.15);
color: var(--white);
border-left-color: var(--saffron);
font-weight: 600;
}
.content {
flex: 1;
padding: 24px;
max-width: 100%;
}
/* ============================================================
CARDS
============================================================ */
.card {
background: var(--bg-card);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
border: 1px solid var(--border);
overflow: hidden;
}
.card-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.card-title {
font-size: 16px;
font-weight: 600;
}
.card-body {
padding: 20px;
}
/* ============================================================
STATS
============================================================ */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.stat-card {
background: var(--bg-card);
border-radius: var(--radius-lg);
padding: 20px;
display: flex;
align-items: center;
gap: 16px;
box-shadow: var(--shadow);
border: 1px solid var(--border);
border-left: 4px solid var(--navy);
}
.stat-card.stat-primary { border-left-color: var(--navy); }
.stat-card.stat-success { border-left-color: var(--green); }
.stat-card.stat-warning { border-left-color: var(--saffron); }
.stat-card.stat-info { border-left-color: var(--info); }
.stat-icon {
font-size: 32px;
line-height: 1;
}
.stat-info {
display: flex;
flex-direction: column;
}
.stat-value {
font-size: 22px;
font-weight: 700;
line-height: 1.2;
}
.stat-label {
font-size: 12px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* ============================================================
TABLES
============================================================ */
.table-responsive {
overflow-x: auto;
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th {
text-align: left;
padding: 12px 16px;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-muted);
border-bottom: 2px solid var(--border);
font-weight: 600;
}
.table td {
padding: 12px 16px;
border-bottom: 1px solid var(--border);
font-size: 14px;
}
.table tr:hover td {
background: rgba(0,0,128,0.02);
}
/* ============================================================
BADGES
============================================================ */
.badge {
display: inline-block;
padding: 3px 10px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
text-transform: capitalize;
}
.badge-green { background: rgba(19,136,8,0.1); color: var(--green); }
.badge-blue { background: rgba(0,0,128,0.1); color: var(--navy); }
.badge-orange { background: rgba(255,153,51,0.15); color: #c47000; }
.badge-gray { background: rgba(128,128,128,0.1); color: #666; }
.badge-red { background: rgba(220,53,69,0.1); color: var(--danger); }
.badge-purple { background: rgba(128,0,128,0.1); color: #800080; }
.badge-success { background: rgba(19,136,8,0.1); color: var(--green); }
.badge-warning { background: rgba(240,173,78,0.15); color: #c47000; }
.badge-danger { background: rgba(220,53,69,0.1); color: var(--danger); }
.badge-info { background: rgba(23,162,184,0.1); color: var(--info); }
/* ============================================================
BUTTONS
============================================================ */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
border-radius: var(--radius);
font-size: 14px;
font-weight: 500;
text-decoration: none;
border: none;
cursor: pointer;
transition: all 0.2s;
font-family: var(--font-en);
}
.btn-primary {
background: var(--navy);
color: var(--white);
}
.btn-primary:hover { background: var(--navy-light); }
.btn-secondary {
background: var(--saffron);
color: var(--white);
}
.btn-secondary:hover { background: var(--saffron-dark); }
.btn-outline {
background: transparent;
color: var(--navy);
border: 1px solid var(--navy);
}
.btn-outline:hover { background: rgba(0,0,128,0.05); }
.btn-danger {
background: var(--danger);
color: var(--white);
}
.btn-sm {
padding: 5px 12px;
font-size: 12px;
}
.btn-block {
width: 100%;
justify-content: center;
}
.btn-icon {
background: none;
border: none;
font-size: 20px;
cursor: pointer;
padding: 4px;
border-radius: 4px;
}
/* ============================================================
FORMS
============================================================ */
.form-group {
margin-bottom: 16px;
flex: 1;
}
.form-label {
display: block;
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.form-input {
width: 100%;
padding: 10px 14px;
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 14px;
font-family: var(--font-en);
background: var(--bg-card);
color: var(--text);
transition: border-color 0.2s;
}
.form-input:focus {
outline: none;
border-color: var(--navy);
box-shadow: 0 0 0 3px rgba(0,0,128,0.1);
}
.form-row {
display: flex;
gap: 12px;
align-items: flex-end;
}
.form-actions {
display: flex;
gap: 12px;
margin-top: 20px;
}
.section-title {
font-size: 14px;
font-weight: 600;
color: var(--navy);
margin: 20px 0 12px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border);
}
/* ============================================================
FILTER BAR
============================================================ */
.filter-bar {
display: flex;
gap: 12px;
align-items: flex-end;
flex-wrap: wrap;
}
.filter-bar .form-group {
margin-bottom: 0;
}
/* ============================================================
PAGE HEADER
============================================================ */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
flex-wrap: wrap;
gap: 12px;
}
.page-title {
font-size: 24px;
font-weight: 700;
}
.page-subtitle {
font-size: 14px;
color: var(--text-muted);
margin-top: 2px;
}
.page-actions {
display: flex;
gap: 8px;
}
/* ============================================================
GRID
============================================================ */
.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
@media (max-width: 900px) {
.grid-2 { grid-template-columns: 1fr; }
.sidebar { display: none; }
.stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
.stats-grid { grid-template-columns: 1fr; }
.form-row { flex-direction: column; }
.filter-bar { flex-direction: column; }
}
/* ============================================================
DETAIL LIST
============================================================ */
.detail-list {
display: grid;
grid-template-columns: 140px 1fr;
gap: 8px 16px;
}
.detail-list dt {
font-size: 12px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.3px;
font-weight: 600;
}
.detail-list dd {
font-size: 14px;
}
/* ============================================================
STATUS GRID
============================================================ */
.status-grid {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.status-item {
display: flex;
align-items: center;
gap: 8px;
}
.status-label {
font-size: 13px;
color: var(--text-muted);
}
/* ============================================================
ALERTS
============================================================ */
.alert {
padding: 12px 16px;
border-radius: var(--radius);
margin-bottom: 16px;
font-size: 14px;
}
.alert-error {
background: rgba(220,53,69,0.1);
color: var(--danger);
border: 1px solid rgba(220,53,69,0.2);
}
.alert-success {
background: rgba(19,136,8,0.1);
color: var(--green);
border: 1px solid rgba(19,136,8,0.2);
}
/* ============================================================
EMPTY STATE
============================================================ */
.empty-state {
text-align: center;
padding: 40px 20px;
color: var(--text-muted);
font-size: 14px;
}
/* ============================================================
LOGIN PAGE
============================================================ */
.auth-page {
background: linear-gradient(135deg, var(--navy) 0%, #1a1a4a 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.login-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
.login-container {
background: var(--bg-card);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
width: 100%;
max-width: 420px;
overflow: hidden;
}
.login-header {
background: var(--navy);
color: var(--white);
padding: 32px 24px 24px;
text-align: center;
position: relative;
}
.login-header::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 4px;
background: linear-gradient(90deg, var(--saffron) 33%, var(--white) 33%, var(--white) 66%, var(--green) 66%);
}
.login-emblem {
font-size: 48px;
margin-bottom: 12px;
}
.login-title-hi {
font-family: var(--font-hi);
font-size: 24px;
font-weight: 700;
}
.login-title-en {
font-size: 14px;
font-weight: 600;
opacity: 0.9;
text-transform: uppercase;
letter-spacing: 1px;
}
.login-tagline {
font-family: var(--font-hi);
font-size: 13px;
opacity: 0.8;
margin-top: 8px;
}
.login-tagline-en {
font-size: 11px;
opacity: 0.6;
margin-top: 4px;
}
.login-form {
padding: 24px;
}
.login-footer {
padding: 16px 24px;
text-align: center;
border-top: 1px solid var(--border);
font-size: 11px;
color: var(--text-muted);
}
/* ============================================================
ERROR PAGES
============================================================ */
.error-page {
text-align: center;
padding: 80px 20px;
}
.error-code {
font-size: 120px;
font-weight: 700;
color: var(--navy);
line-height: 1;
opacity: 0.3;
}
.error-page h1 {
font-size: 24px;
margin: 16px 0 8px;
}
.error-page p {
color: var(--text-muted);
}
/* ============================================================
FOOTER
============================================================ */
.govt-footer {
text-align: center;
padding: 24px;
border-top: 1px solid var(--border);
margin-top: 40px;
font-size: 12px;
color: var(--text-muted);
}
.footer-tricolor {
display: flex;
height: 4px;
border-radius: 2px;
overflow: hidden;
margin: 0 auto 16px;
max-width: 200px;
}
.footer-tricolor span:nth-child(1) { background: var(--saffron); flex: 1; }
.footer-tricolor span:nth-child(2) { background: var(--white); flex: 1; border-left: 1px solid #ddd; border-right: 1px solid #ddd; }
.footer-tricolor span:nth-child(3) { background: var(--green); flex: 1; }
.footer-muted {
opacity: 0.6;
margin-top: 4px;
}
/* ============================================================
PARSE RESULT
============================================================ */
.parse-result {
background: rgba(0,0,128,0.03);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
}
.parse-fields {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
margin-top: 12px;
}
.parse-field {
display: flex;
justify-content: space-between;
padding: 6px 10px;
background: var(--bg-card);
border-radius: 4px;
font-size: 13px;
}
.parse-key {
color: var(--text-muted);
font-weight: 500;
}
.parse-val {
font-weight: 600;
}
/* ============================================================
UTILITIES
============================================================ */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-bold { font-weight: 700; }
.text-success { color: var(--green); }
.text-danger { color: var(--danger); }
.text-warning { color: #c47000; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }