Files
ExportDXF/FabWorks.Api/wwwroot/css/styles.css
AJ Isaacs b9e84de7c0 feat: move revision tracking to ExportRecord, add perceptual hash comparison, cut list modal, and auto-start API
- Move Revision from Drawing to ExportRecord so each export captures its own revision snapshot
- Add Hamming distance comparison for perceptual hashes (tolerance of 10 bits) to avoid false revision bumps
- Replace CoenM.ImageHash with inline DifferenceHash impl (compatible with ImageSharp 3.x)
- Increase PDF render DPI from 72 to 150 for better hash fidelity
- Add download-dxfs-by-drawing endpoint for cross-export DXF zip downloads
- Prefix DXF filenames with equipment number when no drawing number is present
- Pass original filename to storage service for standalone part exports
- Auto-start FabWorks.Api from ExportDXF client if not already running
- Add cut list modal with copy-to-clipboard in the web UI
- Update PDF hash on existing export records after upload
- Bump static asset cache versions to v3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:48:28 -05:00

825 lines
17 KiB
CSS

:root {
--bg-deep: #f0f1f3;
--bg: #f8f9fa;
--surface: #ffffff;
--surface-raised: #ffffff;
--border: #d0d5dd;
--border-subtle: #e4e7ec;
--text: #1a1a1a;
--text-secondary: #475467;
--text-dim: #667085;
--cyan: #0975b0;
--cyan-dim: rgba(9, 117, 176, 0.1);
--cyan-glow: rgba(9, 117, 176, 0.2);
--amber: #b54708;
--amber-dim: rgba(181, 71, 8, 0.08);
--green: #067647;
--green-dim: rgba(6, 118, 71, 0.08);
--red: #d92d20;
--sidebar-w: 64px;
--font-display: 'Outfit', sans-serif;
--font-body: 'IBM Plex Sans', sans-serif;
--font-mono: 'IBM Plex Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: var(--font-body);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
overflow-x: hidden;
}
/* ─── Sidebar ─── */
.sidebar {
width: var(--sidebar-w);
background: var(--bg-deep);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
align-items: center;
position: fixed;
top: 0; left: 0; bottom: 0;
z-index: 50;
padding-top: 8px;
}
.sidebar-brand {
width: 40px; height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 24px;
position: relative;
}
.sidebar-brand::after {
content: '';
position: absolute;
bottom: -12px;
left: 8px; right: 8px;
height: 1px;
background: var(--border);
}
.sidebar-brand svg {
width: 26px; height: 26px;
color: var(--cyan);
}
.sidebar-nav {
display: flex;
flex-direction: column;
gap: 4px;
padding-top: 16px;
width: 100%;
}
.nav-item {
display: flex;
align-items: center;
justify-content: center;
width: 44px; height: 44px;
margin: 0 auto;
color: var(--text-dim);
text-decoration: none;
cursor: pointer;
border-radius: 8px;
transition: all 0.2s;
position: relative;
}
.nav-item:hover {
color: var(--text-secondary);
background: var(--surface);
}
.nav-item.active {
color: var(--cyan);
background: var(--cyan-dim);
}
.nav-item.active::before {
content: '';
position: absolute;
left: -10px;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 20px;
background: var(--cyan);
border-radius: 0 2px 2px 0;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-tooltip {
position: absolute;
left: calc(100% + 12px);
top: 50%;
transform: translateY(-50%);
background: var(--text);
border: 1px solid var(--border);
color: #fff;
padding: 4px 10px;
border-radius: 4px;
font-size: 13px;
font-family: var(--font-body);
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.15s;
z-index: 100;
}
.nav-item:hover .nav-tooltip { opacity: 1; }
/* ─── Main ─── */
.main {
margin-left: var(--sidebar-w);
flex: 1;
display: flex;
flex-direction: column;
min-height: 100vh;
position: relative;
z-index: 1;
}
.topbar {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
padding: 0 32px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 40;
}
.topbar-left {
display: flex;
align-items: center;
gap: 12px;
}
.topbar h2 {
font-family: var(--font-display);
font-size: 18px;
font-weight: 600;
letter-spacing: -0.01em;
}
.topbar-tag {
font-family: var(--font-mono);
font-size: 12px;
color: var(--cyan);
background: var(--cyan-dim);
padding: 2px 8px;
border-radius: 3px;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.page-content {
padding: 28px 32px;
flex: 1;
}
/* ─── Animations ─── */
@keyframes fadeSlideIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-in {
animation: fadeSlideIn 0.3s ease forwards;
opacity: 0;
}
.animate-in:nth-child(1) { animation-delay: 0.04s; }
.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.12s; }
.animate-in:nth-child(4) { animation-delay: 0.16s; }
/* ─── Cards ─── */
.card {
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 6px;
overflow: hidden;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.card-header {
padding: 14px 18px;
border-bottom: 1px solid var(--border-subtle);
font-family: var(--font-display);
font-weight: 600;
font-size: 14px;
letter-spacing: 0.02em;
display: flex;
align-items: center;
justify-content: space-between;
text-transform: uppercase;
color: var(--text-secondary);
}
.card-body { padding: 18px; }
/* ─── Stats ─── */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
margin-bottom: 24px;
}
.stat-card {
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 6px;
padding: 18px 20px;
position: relative;
overflow: hidden;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.stat-card::before {
content: '';
position: absolute;
top: 0; left: 0;
width: 100%; height: 3px;
background: linear-gradient(90deg, var(--cyan), transparent);
opacity: 0.5;
}
.stat-label {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 1.5px;
}
.stat-value {
font-family: var(--font-display);
font-size: 32px;
font-weight: 700;
margin-top: 4px;
color: var(--text);
letter-spacing: -0.02em;
}
.stat-value.stat-sm {
font-size: 15px;
font-weight: 500;
font-family: var(--font-mono);
}
/* ─── Tables ─── */
table { width: 100%; border-collapse: collapse; }
th {
text-align: left;
padding: 10px 16px;
background: var(--bg);
border-bottom: 1px solid var(--border);
font-family: var(--font-mono);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-dim);
font-weight: 600;
white-space: nowrap;
}
td {
padding: 12px 16px;
border-bottom: 1px solid var(--border-subtle);
font-size: 14px;
}
tbody tr { transition: background 0.1s; }
tbody tr:hover td { background: var(--cyan-dim); }
tbody tr:last-child td { border-bottom: none; }
/* ─── Badges ─── */
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 10px;
border-radius: 3px;
font-family: var(--font-mono);
font-size: 12px;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); }
.badge-amber { background: var(--amber-dim); color: var(--amber); }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-count {
background: var(--bg);
color: var(--text-secondary);
border: 1px solid var(--border);
}
/* ─── Buttons ─── */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border-radius: 4px;
font-family: var(--font-body);
font-size: 13px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text-secondary);
transition: all 0.15s;
white-space: nowrap;
}
.btn:hover {
background: var(--bg);
color: var(--text);
border-color: var(--text-dim);
}
.btn svg { width: 14px; height: 14px; }
.btn-cyan {
background: var(--cyan-dim);
color: var(--cyan);
border-color: rgba(9, 117, 176, 0.25);
}
.btn-cyan:hover {
background: rgba(9, 117, 176, 0.15);
border-color: rgba(9, 117, 176, 0.4);
color: var(--cyan);
}
.btn-amber {
background: var(--amber-dim);
color: var(--amber);
border-color: rgba(181, 71, 8, 0.25);
}
.btn-amber:hover {
background: rgba(181, 71, 8, 0.15);
border-color: rgba(181, 71, 8, 0.4);
color: var(--amber);
}
.btn-red {
background: rgba(217, 45, 32, 0.08);
color: var(--red);
border-color: rgba(217, 45, 32, 0.25);
}
.btn-red:hover {
background: rgba(217, 45, 32, 0.15);
border-color: rgba(217, 45, 32, 0.4);
color: var(--red);
}
.btn-sm { padding: 4px 10px; font-size: 12px; }
/* ─── Search ─── */
.search-box {
display: flex;
align-items: center;
gap: 8px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0 12px;
height: 36px;
width: 300px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
border-color: var(--cyan);
box-shadow: 0 0 0 2px var(--cyan-dim);
}
.search-box svg {
width: 16px; height: 16px;
color: var(--text-dim);
flex-shrink: 0;
}
.search-box input {
border: none;
outline: none;
font-family: var(--font-body);
font-size: 14px;
width: 100%;
background: transparent;
color: var(--text);
}
.search-box input::placeholder { color: var(--text-dim); }
/* ─── Clickable ─── */
.clickable { cursor: pointer; }
/* ─── Detail sections ─── */
.detail-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
}
.detail-field label {
display: block;
font-family: var(--font-mono);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 1.2px;
color: var(--text-dim);
margin-bottom: 4px;
}
.detail-field .value {
font-size: 15px;
font-weight: 500;
word-break: break-all;
}
.detail-field .value.mono {
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-secondary);
}
/* ─── Back link ─── */
.back-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--text-dim);
text-decoration: none;
font-size: 13px;
cursor: pointer;
margin-bottom: 20px;
font-family: var(--font-mono);
text-transform: uppercase;
letter-spacing: 0.5px;
transition: color 0.15s;
}
.back-link:hover { color: var(--cyan); }
.back-link svg { width: 14px; height: 14px; }
/* ─── BOM Expansion ─── */
.bom-expand-row td {
padding: 0 !important;
background: var(--bg) !important;
}
.bom-expand-content {
padding: 16px 16px 16px 48px;
border-left: 3px solid var(--cyan-dim);
margin-left: 16px;
}
.bom-expand-content .info-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 6px 24px;
}
.bom-expand-content .info-item {
font-size: 13px;
padding: 2px 0;
}
.bom-expand-content .info-item .lbl {
color: var(--text-dim);
font-family: var(--font-mono);
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-right: 6px;
}
.bom-expand-content .info-item .val {
font-family: var(--font-mono);
color: var(--text);
}
.bom-section-title {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1.5px;
color: var(--cyan);
margin: 14px 0 8px;
display: flex;
align-items: center;
gap: 8px;
}
.bom-section-title svg { width: 14px; height: 14px; flex-shrink: 0; }
.bom-section-title:first-child { margin-top: 0; }
.bom-section-title::after {
content: '';
flex: 1;
height: 1px;
background: var(--border-subtle);
}
/* ─── File Browser ─── */
.breadcrumb {
display: flex;
align-items: center;
gap: 6px;
font-family: var(--font-mono);
font-size: 13px;
margin-bottom: 16px;
flex-wrap: wrap;
padding: 8px 14px;
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 4px;
}
.breadcrumb a {
color: var(--cyan);
text-decoration: none;
cursor: pointer;
transition: opacity 0.15s;
}
.breadcrumb a:hover { opacity: 0.7; }
.breadcrumb .sep { color: var(--text-dim); font-size: 11px; }
.breadcrumb .current { color: var(--text); font-weight: 500; }
.file-name-cell {
display: flex;
align-items: center;
gap: 10px;
}
.file-name-cell svg { width: 18px; height: 18px; flex-shrink: 0; }
.file-name-cell a {
color: var(--text);
text-decoration: none;
cursor: pointer;
transition: color 0.15s;
}
.file-name-cell a:hover { color: var(--cyan); }
/* ─── Loading / Empty ─── */
.loading, .empty {
text-align: center;
padding: 60px 24px;
color: var(--text-dim);
font-size: 14px;
font-family: var(--font-mono);
}
.loading::before {
content: '';
display: block;
width: 24px;
height: 24px;
border: 2px solid var(--border);
border-top-color: var(--cyan);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto 12px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ─── Chevron toggle ─── */
.chevron-toggle {
display: inline-flex;
width: 18px; height: 18px;
align-items: center;
justify-content: center;
transition: transform 0.2s;
color: var(--text-dim);
}
.chevron-toggle.open {
transform: rotate(90deg);
color: var(--cyan);
}
/* ─── Drawing cards grid ─── */
.drawings-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 12px;
}
.drawing-card {
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 6px;
padding: 18px 20px;
cursor: pointer;
transition: all 0.2s;
position: relative;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.drawing-card:hover {
border-color: var(--cyan);
background: var(--cyan-dim);
box-shadow: 0 2px 8px rgba(9, 117, 176, 0.1);
}
.drawing-card-title {
font-family: var(--font-display);
font-size: 16px;
font-weight: 600;
margin-bottom: 2px;
}
.drawing-card-sub {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 1px;
}
/* ─── Equipment Groups ─── */
.equip-group {
margin-bottom: 16px;
}
.equip-group:last-child { margin-bottom: 0; }
.equip-header {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 6px 6px 0 0;
cursor: pointer;
transition: all 0.15s;
user-select: none;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.equip-header:hover { background: var(--cyan-dim); }
.equip-header .chevron-toggle { flex-shrink: 0; }
.equip-header-title {
font-family: var(--font-display);
font-size: 16px;
font-weight: 600;
}
.equip-header-number {
font-family: var(--font-mono);
font-size: 15px;
color: var(--cyan);
font-weight: 600;
}
.equip-header-meta {
margin-left: auto;
display: flex;
align-items: center;
gap: 12px;
}
.equip-header-stat {
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-dim);
}
.equip-header-stat strong {
color: var(--text-secondary);
}
.equip-body {
border: 1px solid var(--border-subtle);
border-top: none;
border-radius: 0 0 6px 6px;
overflow: hidden;
}
.equip-body table { margin: 0; }
.equip-group.collapsed .equip-body { display: none; }
.equip-group.collapsed .equip-header { border-radius: 6px; }
/* ─── Modal ─── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
width: 90%;
max-width: 640px;
max-height: 80vh;
display: flex;
flex-direction: column;
animation: fadeSlideIn 0.2s ease forwards;
}
.modal-header {
padding: 14px 18px;
border-bottom: 1px solid var(--border-subtle);
font-family: var(--font-display);
font-weight: 600;
font-size: 14px;
letter-spacing: 0.02em;
display: flex;
align-items: center;
gap: 10px;
text-transform: uppercase;
color: var(--text-secondary);
}
.modal-header svg { width: 16px; height: 16px; }
.modal-body {
overflow-y: auto;
flex: 1;
}
.btn-green {
background: var(--green-dim);
color: var(--green);
border-color: rgba(6, 118, 71, 0.25);
}
.btn-green:hover {
background: rgba(6, 118, 71, 0.15);
border-color: rgba(6, 118, 71, 0.4);
color: var(--green);
}
/* ─── Toast ─── */
.toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
background: var(--text);
color: #fff;
padding: 8px 20px;
border-radius: 4px;
font-family: var(--font-mono);
font-size: 13px;
z-index: 300;
animation: fadeSlideIn 0.2s ease, fadeOut 0.3s ease 2s forwards;
}
@keyframes fadeOut { to { opacity: 0; } }
/* ─── Responsive ─── */
@media (max-width: 768px) {
.sidebar { display: none; }
.main { margin-left: 0; }
.search-box { width: 100%; }
.topbar { padding: 0 16px; }
.page-content { padding: 16px; }
}