Update public/styles.css

This commit is contained in:
JoshBaneyCS 2025-04-30 06:20:30 +00:00
parent 038b404a8c
commit 7744df85f1

View File

@ -1,44 +1,22 @@
/* ================= CSS VARIABLES ================= */ /* styles.css */
:root {
--square-size: 60px;
--gap: 8px;
--v-gap: 24px;
--warehouse-height: 200px;
}
/* ================= GLOBAL & LAYOUT ================= */ /* ─── Global & Layout ───────────────────────────────────────────────────────── */
html, body {
height: 100%; /* Reset & body */
* { box-sizing: border-box; }
body {
margin: 0; margin: 0;
padding: 0;
background: #f4f4f4;
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
} background-color: #eeeeee;
h1 { color: #333;
text-align: center;
margin-bottom: 1rem;
}
.page-container {
margin-top: 70px; /* under fixed header */
width: 95%;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
padding: 1rem;
background: #fff;
border-radius: 6px;
box-sizing: border-box;
display: flex;
flex-direction: column;
min-height: calc(100vh - 70px);
} }
/* ================= BINS HEADER & NAV BUTTONS ================= */ /* Fixed header */
.main-header { .main-header {
background-color: #232F3E; background-color: #232F3E;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0.5rem 2rem; padding: 0.5rem 1rem;
position: fixed; position: fixed;
top: 0; left: 0; right: 0; top: 0; left: 0; right: 0;
z-index: 1000; z-index: 1000;
@ -67,17 +45,52 @@ h1 {
background-color: #e48f00; background-color: #e48f00;
} }
/* ================= FORM STYLES ================= */ /* Main page container (offset under header) */
.form-input { .page-container {
width: 80%; margin-top: 70px; /* height of header */
max-width: 400px; width: 95%;
margin: 1rem auto; max-width: 1200px;
display: block; margin-left: auto;
margin-right: auto;
padding: 1rem; padding: 1rem;
font-size: 1rem; background-color: #fff;
border-radius: 6px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
/* Utility */
.hidden {
display: none !important;
}
/* ─── Forms & Buttons ───────────────────────────────────────────────────────── */
/* Text inputs & dropdowns */
.form-input,
.form-textarea,
select {
width: 90%;
margin: 0.5rem auto;
display: block;
padding: 0.75rem;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 6px; border-radius: 6px;
font-size: 1rem;
} }
/* Fieldset & legend spacing */
fieldset {
border: 1px solid #ccc;
border-radius: 6px;
margin: 1rem 0;
padding: 1rem;
}
legend {
padding: 0 0.5rem;
font-weight: bold;
}
/* Large submit button */
.big-button { .big-button {
background-color: #28a745; background-color: #28a745;
color: white; color: white;
@ -92,124 +105,133 @@ h1 {
.big-button:hover { .big-button:hover {
background-color: #218838; background-color: #218838;
} }
fieldset {
border: 1px solid #ccc; /* ─── Heat Map Page ────────────────────────────────────────────────────────── */
/* Scrollable/zoomable container */
#heatmap-container {
margin-top: 70px;
width: 95%;
height: calc(100vh - 70px);
margin-left: auto;
margin-right: auto;
position: relative;
overflow: auto;
background-color: #f9f9f9;
border-radius: 6px; border-radius: 6px;
padding: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
margin-bottom: 1.5rem;
} }
legend {
/* SVG wrapper */
.map-svg-container {
width: 2000px; /* adjust to your full map width */
height: 400px; /* adjust to your map height */
transform-origin: 0 0;
cursor: grab;
}
.map-svg-container:active {
cursor: grabbing;
}
/* Dock door squares */
.dock-door {
fill: #ccc;
stroke: #999;
stroke-width: 1;
cursor: pointer;
}
.dock-door:hover {
stroke: #FF9900;
stroke-width: 2;
}
/* Area rectangles (A-Mod, AFE-1, etc) */
.area-rect {
fill: rgba(200,200,200,0.3);
stroke: #999;
stroke-width: 1;
}
.area-rect label {
font-size: 0.85rem;
font-weight: bold; font-weight: bold;
} }
/* ================= TRENDS PAGE ================= */ /* Floor selector */
/* Controls */ .floor-selector {
#trend-controls { position: absolute;
flex: 0 0 auto; top: 1rem;
text-align: center; right: 1rem;
margin-bottom: 1rem; background: rgba(255,255,255,0.9);
} padding: 0.5rem;
/* Chart */ border-radius: 6px;
.chart-container { box-shadow: 0 1px 4px rgba(0,0,0,0.2);
flex: 1 1 auto;
width: 100%;
position: relative;
}
.chart-container canvas {
width: 100% !important;
height: 100% !important;
}
/* Table */
.table-container {
margin-top: 2rem;
overflow-x: auto;
}
table.dataTable {
width: 100% !important;
} }
/* ================= HEATMAP STYLES ================= */ /* ─── Trends Page ──────────────────────────────────────────────────────────── */
/* Scroll & pan wrapper */
.heatmap-wrapper { /* Chart container */
#chart-container {
height: 50vh;
width: 100%; width: 100%;
height: 100%; margin-bottom: 2rem;
overflow-x: auto;
overflow-y: hidden;
display: flex;
justify-content: flex-start;
align-items: center;
} }
/* Entire diagram */
.diagram-container { /* Spreadsheet-style table wrapper */
display: flex; #trends-table-container {
flex-direction: column; max-height: 40vh;
align-items: center; overflow: auto;
gap: var(--v-gap); border: 1px solid #ddd;
margin-bottom: 1rem;
} }
/* Dock-door row */
.dock-row { /* Table styling */
display: flex; #trends-table {
gap: var(--gap); width: 100%;
border-collapse: collapse;
table-layout: fixed;
} }
/* Each dock square */ #trends-table th,
.dock-square { #trends-table td {
width: var(--square-size); padding: 8px;
height: var(--square-size); text-align: center;
background: #ddd; border-bottom: 1px solid #ddd;
border-radius: 4px; font-size: 0.95rem;
display: flex; }
align-items: center; #trends-table thead th {
justify-content: center; position: sticky;
font-size: 0.75rem; top: 0;
color: #333; background: #f2f2f2;
border-bottom: 2px solid #ccc;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
} }
/* Regions below dock row */ /* Zebra striping */
.regions-container { #trends-table tbody tr:nth-child(even) {
display: flex; background: #fafafa;
width: 100%;
gap: var(--gap);
} }
.region { /* Sort arrow indicators */
flex: 1; .sortable::after {
height: 120px; content: '▲▼';
border: 2px solid #666; font-size: 0.6em;
border-radius: 4px; margin-left: 4px;
display: flex; color: #888;
align-items: center;
justify-content: center;
font-weight: bold;
user-select: none;
} }
.region-amod { background: #eef; } .sortable.asc::after {
.region-preslam { background: #efe; } content: '▲';
.region-bmod { background: #fee; }
/* Warehouse rectangle */
.warehouse {
width: calc(
(var(--square-size) * 83) + /* adjust door count if needed */
(var(--gap) * 82)
);
height: var(--warehouse-height);
background: #ccc;
border-radius: 6px;
} }
/* Hover tooltip */ .sortable.desc::after {
.tooltip { content: '▼';
position: absolute;
pointer-events: none;
background: rgba(0,0,0,0.75);
color: #fff;
padding: 8px;
border-radius: 4px;
font-size: 0.9rem;
line-height: 1.2;
display: none;
z-index: 2000;
} }
/* ================= UTILITY ================= */ /* ─── Responsive Tweaks ─────────────────────────────────────────────────────── */
.hidden {
display: none; @media (max-width: 768px) {
.form-input, .form-textarea, select {
width: 100%;
}
.nav-btn {
padding: 0.5rem;
margin-left: 0.25rem;
font-size: 0.9rem;
}
} }