538 lines
11 KiB
CSS
538 lines
11 KiB
CSS
/* ========================================
|
|
goCarLog — Modern Dark Theme
|
|
======================================== */
|
|
|
|
/* --- Reset & Variables --- */
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
:root {
|
|
--bg-primary: #0f1117;
|
|
--bg-secondary: #1a1d27;
|
|
--bg-tertiary: #252836;
|
|
--bg-hover: #2d3142;
|
|
--text-primary: #e4e6f0;
|
|
--text-secondary: #9498ab;
|
|
--text-muted: #5f6378;
|
|
--accent: #6c63ff;
|
|
--accent-hover: #7b73ff;
|
|
--accent-glow: rgba(108, 99, 255, 0.15);
|
|
--success: #34d399;
|
|
--warning: #fbbf24;
|
|
--danger: #f87171;
|
|
--border: #2d3142;
|
|
--radius: 10px;
|
|
--radius-sm: 6px;
|
|
--shadow: 0 4px 24px rgba(0,0,0,0.3);
|
|
--transition: 0.2s ease;
|
|
--sidebar-width: 260px;
|
|
}
|
|
|
|
html { font-size: 15px; }
|
|
body {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* --- Layout --- */
|
|
.app-container {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* --- Sidebar --- */
|
|
.sidebar {
|
|
width: var(--sidebar-width);
|
|
background: var(--bg-secondary);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.sidebar-header {
|
|
padding: 24px 20px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.sidebar-header h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: var(--accent);
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
.sidebar-header .subtitle {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.nav-menu {
|
|
list-style: none;
|
|
padding: 12px 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.nav-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 20px;
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
font-size: 0.95rem;
|
|
transition: var(--transition);
|
|
border-left: 3px solid transparent;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.nav-link.active {
|
|
background: var(--accent-glow);
|
|
color: var(--accent);
|
|
border-left-color: var(--accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.nav-icon { font-size: 1.2rem; width: 24px; text-align: center; }
|
|
|
|
.sidebar-footer {
|
|
padding: 16px 20px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* --- Main Content --- */
|
|
.main-content {
|
|
margin-left: var(--sidebar-width);
|
|
flex: 1;
|
|
padding: 32px;
|
|
max-width: 1400px;
|
|
}
|
|
|
|
.view { display: none; }
|
|
.view.active { display: block; animation: fadeIn 0.25s ease; }
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.view-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.view-header h2 { font-size: 1.5rem; font-weight: 700; }
|
|
|
|
/* --- Dashboard --- */
|
|
.dashboard-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.stat-card:hover {
|
|
border-color: var(--accent);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.stat-icon { font-size: 2rem; }
|
|
|
|
.stat-info { display: flex; flex-direction: column; }
|
|
.stat-value { font-size: 1.6rem; font-weight: 700; }
|
|
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
|
|
|
|
/* --- Buttons --- */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 10px 18px;
|
|
border: none;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: var(--transition);
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
.btn-primary:hover { background: var(--accent-hover); }
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
border: 1px solid var(--border);
|
|
color: var(--text-secondary);
|
|
}
|
|
.btn-outline:hover {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
|
|
.btn-danger { background: var(--danger); color: #fff; }
|
|
.btn-danger:hover { background: #ef4444; }
|
|
|
|
/* --- Filters --- */
|
|
.filters-bar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin-bottom: 20px;
|
|
align-items: center;
|
|
}
|
|
|
|
/* --- Inputs --- */
|
|
.input, select.input {
|
|
padding: 9px 14px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-primary);
|
|
font-size: 0.9rem;
|
|
transition: var(--transition);
|
|
min-width: 160px;
|
|
}
|
|
|
|
.input:focus, select.input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-glow);
|
|
}
|
|
|
|
select.input { cursor: pointer; }
|
|
|
|
/* --- Table --- */
|
|
.table-container {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.table th {
|
|
text-align: left;
|
|
padding: 14px 16px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: var(--text-muted);
|
|
border-bottom: 1px solid var(--border);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
white-space: nowrap;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.table th:hover { color: var(--accent); }
|
|
|
|
.table th .sort-icon { margin-left: 4px; font-size: 0.7rem; }
|
|
|
|
.table td {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.table tbody tr { cursor: pointer; transition: var(--transition); }
|
|
.table tbody tr:hover { background: var(--bg-hover); }
|
|
.table tbody tr:last-child td { border-bottom: none; }
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
padding: 40px !important;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* --- Cost Summary --- */
|
|
.cost-summary {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
margin-bottom: 20px;
|
|
padding: 16px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.cost-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.cost-label { color: var(--text-secondary); }
|
|
.cost-value { font-weight: 700; color: var(--text-primary); }
|
|
|
|
/* --- Detail View --- */
|
|
.detail-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
|
|
gap: 24px;
|
|
}
|
|
|
|
.detail-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
}
|
|
|
|
.detail-card h3 {
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
margin-bottom: 16px;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.detail-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.detail-row:last-child { border-bottom: none; }
|
|
.detail-label { color: var(--text-muted); }
|
|
.detail-value { font-weight: 600; }
|
|
|
|
.consumption-stat {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 8px;
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.consumption-value {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: var(--success);
|
|
}
|
|
|
|
.consumption-unit { font-size: 1rem; color: var(--text-muted); }
|
|
|
|
/* --- Table Consumption Cell --- */
|
|
.consumption-cell {
|
|
font-weight: 600;
|
|
color: var(--success) !important;
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.consumption-cell .consumption-value {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* --- Modal --- */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
backdrop-filter: blur(4px);
|
|
z-index: 200;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.modal.open { display: flex; }
|
|
|
|
.modal-content {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
width: 90%;
|
|
max-width: 540px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
transition: var(--transition);
|
|
line-height: 1;
|
|
}
|
|
|
|
.modal-close:hover { color: var(--text-primary); }
|
|
|
|
.modal-content form { padding: 24px; }
|
|
|
|
.form-group { margin-bottom: 16px; }
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select,
|
|
.form-group textarea {
|
|
width: 100%;
|
|
padding: 10px 14px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-primary);
|
|
font-size: 0.9rem;
|
|
font-family: inherit;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus,
|
|
.form-group textarea:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-glow);
|
|
}
|
|
|
|
.form-group textarea { resize: vertical; min-height: 80px; }
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
/* --- Toast --- */
|
|
.toast {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-left: 4px solid var(--accent);
|
|
border-radius: var(--radius-sm);
|
|
padding: 14px 20px;
|
|
font-size: 0.9rem;
|
|
box-shadow: var(--shadow);
|
|
transform: translateX(120%);
|
|
transition: transform 0.3s ease;
|
|
z-index: 300;
|
|
}
|
|
|
|
.toast.show { transform: translateX(0); }
|
|
.toast.success { border-left-color: var(--success); }
|
|
.toast.error { border-left-color: var(--danger); }
|
|
|
|
/* --- Responsive --- */
|
|
@media (max-width: 768px) {
|
|
.sidebar {
|
|
width: 100%;
|
|
position: relative;
|
|
border-right: none;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.app-container { flex-direction: column; }
|
|
|
|
.main-content {
|
|
margin-left: 0;
|
|
padding: 16px;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: flex;
|
|
overflow-x: auto;
|
|
padding: 8px 12px;
|
|
gap: 4px;
|
|
}
|
|
|
|
.nav-link {
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 10px 14px;
|
|
border-left: none;
|
|
border-bottom: 3px solid transparent;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.nav-link.active {
|
|
border-left-color: transparent;
|
|
border-bottom-color: var(--accent);
|
|
}
|
|
|
|
.sidebar-footer { display: none; }
|
|
|
|
.form-row { grid-template-columns: 1fr; }
|
|
|
|
.detail-grid { grid-template-columns: 1fr; }
|
|
|
|
.dashboard-grid { grid-template-columns: 1fr 1fr; }
|
|
|
|
.filters-bar { flex-direction: column; }
|
|
.filters-bar .input,
|
|
.filters-bar select.input { width: 100%; min-width: unset; }
|
|
|
|
.modal-content { width: 95%; }
|
|
|
|
.table { font-size: 0.8rem; }
|
|
.table th, .table td { padding: 8px 10px; }
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.dashboard-grid { grid-template-columns: 1fr; }
|
|
}
|