287 lines
12 KiB
CSS
287 lines
12 KiB
CSS
/* =========================================================
|
|
WEBGIS PROJECT FINAL — Design System (global.css)
|
|
========================================================= */
|
|
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
|
|
|
/* ── Light Theme (default) ── */
|
|
:root, [data-theme="light"] {
|
|
/* Colors */
|
|
--primary: #2563EB;
|
|
--primary-light: #3B82F6;
|
|
--primary-dark: #1D4ED8;
|
|
--primary-glow: rgba(37, 99, 235, 0.08);
|
|
--accent: #10B981;
|
|
--danger: #EF4444;
|
|
--warning: #F59E0B;
|
|
--info: #0EA5E9;
|
|
|
|
/* Backgrounds */
|
|
--bg-base: #F9FAFB;
|
|
--bg-surface: #FFFFFF;
|
|
--bg-elevated: #FFFFFF;
|
|
--bg-card: #FFFFFF;
|
|
|
|
/* Borders */
|
|
--border-light: #E5E7EB;
|
|
--border-hover: #D1D5DB;
|
|
|
|
/* Text */
|
|
--text-primary: #111827;
|
|
--text-secondary: #4B5563;
|
|
--text-muted: #6B7280;
|
|
|
|
/* Sidebar */
|
|
--sidebar-w: 260px;
|
|
--sidebar-bg: #FFFFFF;
|
|
--sidebar-border: #E5E7EB;
|
|
|
|
/* Misc */
|
|
--radius-sm: 4px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
--radius-xl: 16px;
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
--transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
/* ── Dark Theme ── */
|
|
[data-theme="dark"] {
|
|
--primary: #818CF8;
|
|
--primary-light: #A5B4FC;
|
|
--primary-dark: #6366F1;
|
|
--primary-glow: rgba(129, 140, 248, 0.15);
|
|
--accent: #34D399;
|
|
--danger: #F87171;
|
|
--warning: #FCD34D;
|
|
--info: #38BDF8;
|
|
|
|
--bg-base: #0F172A;
|
|
--bg-surface: #1E293B;
|
|
--bg-elevated: #293548;
|
|
--bg-card: #1E293B;
|
|
|
|
--border-light: rgba(255,255,255,0.08);
|
|
--border-hover: rgba(129,140,248,0.45);
|
|
|
|
--text-primary: #F1F5F9;
|
|
--text-secondary: #94A3B8;
|
|
--text-muted: #64748B;
|
|
|
|
--sidebar-bg: #0F172A;
|
|
--sidebar-border: rgba(255,255,255,0.07);
|
|
}
|
|
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html { scroll-behavior: smooth; }
|
|
|
|
body {
|
|
font-family: 'Inter', sans-serif;
|
|
background: var(--bg-base);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
-webkit-font-smoothing: antialiased;
|
|
transition: background 0.25s ease, color 0.25s ease;
|
|
}
|
|
|
|
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
|
|
a:hover { color: var(--primary-dark); }
|
|
|
|
/* ── Scrollbar ── */
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
|
|
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
|
|
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; }
|
|
|
|
/* ── Buttons ── */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 8px;
|
|
padding: 8px 16px; border-radius: var(--radius-md); border: 1px solid transparent;
|
|
font-size: 0.85rem; font-weight: 500; font-family: 'Inter', sans-serif;
|
|
cursor: pointer; transition: var(--transition); white-space: nowrap;
|
|
outline: none;
|
|
}
|
|
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
|
|
.btn-primary:hover { background: var(--primary-dark); }
|
|
.btn-success { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
|
|
.btn-success:hover { filter: brightness(0.95); }
|
|
.btn-danger { background: var(--danger); color: #fff; }
|
|
.btn-danger:hover { filter: brightness(0.95); }
|
|
.btn-ghost { background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary); }
|
|
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-hover); }
|
|
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
|
|
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
|
|
|
|
/* ── Cards ── */
|
|
.card {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-light);
|
|
border-radius: var(--radius-lg);
|
|
padding: 24px;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: background 0.25s ease, border-color 0.25s ease;
|
|
}
|
|
|
|
/* ── Form Elements ── */
|
|
.form-group { margin-bottom: 16px; }
|
|
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
|
|
.form-control {
|
|
width: 100%; padding: 10px 14px; border-radius: var(--radius-md);
|
|
background: var(--bg-surface); border: 1px solid var(--border-light);
|
|
color: var(--text-primary); font-size: 0.9rem; font-family: 'Inter', sans-serif;
|
|
outline: none; transition: var(--transition); box-shadow: var(--shadow-sm);
|
|
}
|
|
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
|
|
.form-control::placeholder { color: var(--text-muted); }
|
|
select.form-control {
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 12px center;
|
|
padding-right: 36px;
|
|
}
|
|
textarea.form-control { resize: vertical; min-height: 80px; }
|
|
|
|
/* ── Badges ── */
|
|
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-xl); font-size: 0.75rem; font-weight: 600; }
|
|
.badge-primary { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
|
|
.badge-success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
|
|
.badge-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
|
|
.badge-warning { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
|
|
.badge-info { background: #F0F9FF; color: #0369A1; border: 1px solid #BAE6FD; }
|
|
|
|
[data-theme="dark"] .badge-primary { background: rgba(129,140,248,0.15); color: #A5B4FC; border-color: rgba(129,140,248,0.3); }
|
|
[data-theme="dark"] .badge-success { background: rgba(52,211,153,0.15); color: #6EE7B7; border-color: rgba(52,211,153,0.3); }
|
|
[data-theme="dark"] .badge-danger { background: rgba(248,113,113,0.15); color: #FCA5A5; border-color: rgba(248,113,113,0.3); }
|
|
[data-theme="dark"] .badge-warning { background: rgba(252,211,77,0.15); color: #FDE68A; border-color: rgba(252,211,77,0.3); }
|
|
[data-theme="dark"] .badge-info { background: rgba(56,189,248,0.15); color: #7DD3FC; border-color: rgba(56,189,248,0.3); }
|
|
|
|
/* ── Tables ── */
|
|
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); background: var(--bg-surface); box-shadow: var(--shadow-sm); }
|
|
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
|
|
.data-table thead th { background: var(--bg-elevated); padding: 14px 16px; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; border-bottom: 1px solid var(--border-light); }
|
|
.data-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.15s; }
|
|
.data-table tbody tr:last-child { border-bottom: none; }
|
|
.data-table tbody tr:hover { background: var(--bg-elevated); }
|
|
.data-table td { padding: 14px 16px; color: var(--text-primary); vertical-align: middle; }
|
|
.data-table .actions { display: flex; gap: 6px; }
|
|
|
|
/* ── Modal ── */
|
|
.modal-overlay {
|
|
display: none; position: fixed; inset: 0; z-index: 9999;
|
|
background: rgba(17, 24, 39, 0.5); backdrop-filter: blur(4px);
|
|
align-items: center; justify-content: center;
|
|
}
|
|
.modal-overlay.active { display: flex; }
|
|
.modal {
|
|
background: var(--bg-surface); border: 1px solid var(--border-light);
|
|
border-radius: var(--radius-lg); padding: 32px;
|
|
width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto;
|
|
box-shadow: var(--shadow-lg);
|
|
animation: modalIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
|
|
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
|
|
.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
|
|
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; padding: 4px; border-radius: var(--radius-sm); transition: all 0.15s; }
|
|
.modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
|
|
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light); }
|
|
|
|
/* ── Toast ── */
|
|
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
|
|
.toast { padding: 14px 20px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 500; color: #fff; box-shadow: var(--shadow-md); animation: toastIn 0.3s ease; transition: opacity 0.3s; }
|
|
.toast.success { background: #10B981; }
|
|
.toast.error { background: #EF4444; }
|
|
.toast.info { background: #3B82F6; }
|
|
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
|
|
|
|
/* SPBU realtime snackbar */
|
|
.spbu-snackbar {
|
|
position: fixed;
|
|
right: 24px;
|
|
bottom: 24px;
|
|
z-index: 99998;
|
|
display: grid;
|
|
grid-template-columns: 38px minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: 12px;
|
|
width: min(360px, calc(100vw - 32px));
|
|
padding: 13px 14px;
|
|
color: var(--text-primary);
|
|
background: var(--bg-surface);
|
|
border: 1px solid #A7F3D0;
|
|
border-left: 4px solid var(--accent);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-lg);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transform: translateY(18px);
|
|
transition: opacity 0.25s ease, transform 0.25s ease;
|
|
}
|
|
.spbu-snackbar.show {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
transform: translateY(0);
|
|
}
|
|
.spbu-snackbar-icon {
|
|
width: 38px;
|
|
height: 38px;
|
|
display: grid;
|
|
place-items: center;
|
|
color: #047857;
|
|
background: #ECFDF5;
|
|
border: 1px solid #A7F3D0;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
.spbu-snackbar-title {
|
|
font-size: 0.84rem;
|
|
font-weight: 800;
|
|
line-height: 1.2;
|
|
}
|
|
.spbu-snackbar-meta {
|
|
margin-top: 3px;
|
|
color: var(--text-muted);
|
|
font-size: 0.72rem;
|
|
line-height: 1.3;
|
|
}
|
|
.spbu-snackbar-count {
|
|
min-width: 44px;
|
|
padding: 5px 8px;
|
|
color: #047857;
|
|
background: #ECFDF5;
|
|
border: 1px solid #A7F3D0;
|
|
border-radius: var(--radius-md);
|
|
text-align: center;
|
|
font-size: 1.05rem;
|
|
font-weight: 800;
|
|
}
|
|
|
|
/* ── Page header ── */
|
|
.page-header { margin-bottom: 28px; }
|
|
.page-header h1 { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
|
|
.page-header p { color: var(--text-secondary); margin-top: 6px; font-size: 0.9rem; }
|
|
.page-header .breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
|
|
.page-header .breadcrumb .sep { color: var(--border-hover); }
|
|
|
|
/* ── Utilities ── */
|
|
.text-muted { color: var(--text-muted); }
|
|
.text-secondary { color: var(--text-secondary); }
|
|
.text-success { color: var(--accent); }
|
|
.text-danger { color: var(--danger); }
|
|
.text-warning { color: var(--warning); }
|
|
.flex { display: flex; }
|
|
.flex-center { display: flex; align-items: center; justify-content: center; }
|
|
.gap-2 { gap: 8px; }
|
|
.gap-3 { gap: 12px; }
|
|
.mt-1 { margin-top: 8px; }
|
|
.mt-2 { margin-top: 16px; }
|
|
.mb-1 { margin-bottom: 8px; }
|
|
.mb-2 { margin-bottom: 16px; }
|
|
.w-full { width: 100%; }
|