Files
workorders/web/styles/global.css
T

272 lines
8.0 KiB
CSS

/* ── Design Tokens — Light Mode ──────────────────────────────────────────────── */
:root {
/* Brand */
--navy: #0D2137;
--teal: #0A7EA4;
--teal-lt: #14B8D4;
--teal-dk: #075E7A;
/* Surfaces */
--bg: #F0F6FA;
--surface: #FFFFFF;
--surface-2: #E8F0F5;
--border: #D1DDE6;
--border-lt: #E8F0F5;
/* Text */
--text: #1A2E3B;
--text-muted: #64748B;
--text-inv: #FFFFFF;
/* Semantic */
--success: #1D9D6C;
--warning: #E07B39;
--danger: #C0392B;
--info: #0A7EA4;
/* Shadows */
--shadow-sm: 0 1px 3px rgba(0,0,0,.08);
--shadow-md: 0 4px 12px rgba(0,0,0,.10);
--shadow-lg: 0 8px 24px rgba(0,0,0,.12);
/* Radius */
--radius-sm: 4px;
--radius: 8px;
--radius-lg: 12px;
--radius-xl: 16px;
/* Sidebar */
--sidebar-bg: #0D2137;
--sidebar-hover: #153248;
--sidebar-active: #0A7EA4;
--sidebar-w: 260px;
--sidebar-collapsed: 64px;
/* Status colours */
--status-draft: #94A3B8;
--status-assigned: #0A7EA4;
--status-scheduled: #8B5CF6;
--status-in_progress: #E07B39;
--status-pending_review: #D97706;
--status-closed: #1D9D6C;
/* Status badge backgrounds (light tint) */
--status-draft-bg: #F1F5F9;
--status-assigned-bg: #E0F2FE;
--status-scheduled-bg: #EDE9FE;
--status-in_progress-bg: #FFF7ED;
--status-pending_review-bg: #FFFBEB;
--status-closed-bg: #DCFCE7;
/* Priority colours */
--priority-low: #64748B;
--priority-normal: #0A7EA4;
--priority-high: #E07B39;
--priority-urgent: #C0392B;
color-scheme: light;
}
/* ── Dark Mode ───────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
:root { --_dark: 1; }
}
:root[data-theme="dark"] { --_dark: 1; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--navy: #0A1929;
--teal: #29B6D8;
--teal-lt: #4DD0E8;
--teal-dk: #1A8FAD;
--bg: #081828;
--surface: #0F2336;
--surface-2: #0C1D2E;
--border: #1E3A52;
--border-lt: #1A3048;
--text: #E2EAF2;
--text-muted: #8BAABF;
--text-inv: #FFFFFF;
--success: #34D399;
--warning: #FBBF24;
--danger: #F87171;
--info: #29B6D8;
--shadow-sm: 0 1px 3px rgba(0,0,0,.3);
--shadow-md: 0 4px 12px rgba(0,0,0,.4);
--shadow-lg: 0 8px 24px rgba(0,0,0,.5);
--sidebar-bg: #061220;
--sidebar-hover: #0D1F32;
--sidebar-active: #1A5C78;
--status-draft-bg: #1E2D3D;
--status-assigned-bg: #1E3A5F;
--status-scheduled-bg: #2E1F5E;
--status-in_progress-bg: #3D2E00;
--status-pending_review-bg: #3D2800;
--status-closed-bg: #064E30;
color-scheme: dark;
}
}
:root[data-theme="dark"] {
--navy: #0A1929;
--teal: #29B6D8;
--teal-lt: #4DD0E8;
--bg: #081828;
--surface: #0F2336;
--surface-2: #0C1D2E;
--border: #1E3A52;
--border-lt: #1A3048;
--text: #E2EAF2;
--text-muted: #8BAABF;
--shadow-sm: 0 1px 3px rgba(0,0,0,.3);
--shadow-md: 0 4px 12px rgba(0,0,0,.4);
color-scheme: dark;
}
/* ── Base ────────────────────────────────────────────────────────────────────── */
body {
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ── App Layout (Light DOM — no shadow root) ─────────────────────────────────── */
app-root {
display: grid;
grid-template-columns: var(--sidebar-w) 1fr;
grid-template-rows: 1fr;
min-height: 100vh;
}
app-root.collapsed {
grid-template-columns: var(--sidebar-collapsed) 1fr;
}
.app-shell {
display: grid;
grid-template-rows: 56px 1fr;
min-height: 100vh;
overflow: hidden;
}
#main-content {
overflow-y: auto;
padding: 1.5rem;
background: var(--bg);
}
app-mobile-nav { display: none; }
@media (max-width: 768px) {
app-root,
app-root.collapsed {
grid-template-columns: 1fr;
grid-template-rows: 56px 1fr;
}
.app-shell { grid-template-rows: 56px 1fr; }
app-sidebar { display: none !important; }
app-mobile-nav { display: flex; }
#main-content { padding: 1rem; padding-bottom: calc(56px + 1rem); }
}
/* ── Sidebar (Light DOM) ──────────────────────────────────────────────────────── */
app-sidebar {
background: var(--sidebar-bg);
display: flex;
flex-direction: column;
height: 100vh;
position: sticky;
top: 0;
overflow: hidden;
transition: width .2s ease;
}
/* ── Topbar (Light DOM) ───────────────────────────────────────────────────────── */
app-topbar {
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 1.25rem;
height: 56px;
gap: 1rem;
z-index: 10;
}
/* ── Mobile Nav (Light DOM) ───────────────────────────────────────────────────── */
app-mobile-nav {
background: var(--surface);
border-top: 1px solid var(--border);
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 56px;
align-items: center;
justify-content: space-around;
z-index: 100;
padding-bottom: env(safe-area-inset-bottom);
}
/* ── Page Header ──────────────────────────────────────────────────────────────── */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1.25rem;
}
.page-header h1 {
font-size: 1.25rem;
font-weight: 700;
color: var(--text);
}
/* ── Cards ────────────────────────────────────────────────────────────────────── */
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
}
/* ── Buttons ──────────────────────────────────────────────────────────────────── */
button, .btn {
display: inline-flex;
align-items: center;
gap: .4rem;
padding: .5rem 1rem;
border: none;
border-radius: var(--radius);
font-weight: 600;
font-size: .875rem;
cursor: pointer;
transition: opacity .15s, background .15s;
background: var(--teal);
color: #fff;
}
button:hover, .btn:hover { opacity: .88; }
button.ghost, .btn-ghost {
background: transparent;
border: 1px solid var(--border);
color: var(--text);
}
button.danger, .btn-danger {
background: var(--danger);
color: #fff;
}
button:disabled { opacity: .5; cursor: not-allowed; }
/* ── Utility ──────────────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .813rem; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }