/* ==== GLOBAL STYLES ==== */
body {
	background: #f4f6f9;
	color: #333;
}

/* ==== CONTAINERS ==== */
#menuDiv {
	background: #ffffff;
	border-radius: 18px;
	padding: 25px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
	width: 100%;
	position: sticky;
	top: 80px;
}

#workDiv {
	background: #ffffff;
	border-radius: 18px;
	padding: 25px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);

}

/* ==== TABLE ==== */
#worklistTable {
	margin-top: 20px;
	border-radius: 12px;
	overflow: hidden;
}

#worklistTable th {
	background-color: #f8fafc;
	font-weight: 600;
	color: #1a202c;
}

#worklistTable td {
	vertical-align: middle;
}

#worklistTable tr:hover {
	background-color: #f1f5f9;
	transition: 0.2s;
}

/* ==== BUTTONS ==== */
.btn {
	border-radius: 8px !important;
	transition: all 0.2s ease;
	font-weight: 500;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	background-color: #3b82f6;
	border-color: #3b82f6;
}

.btn-success {
	background-color: #10b981;
	border-color: #10b981;
}

.btn-warning {
	background-color: #f59e0b;
	border-color: #f59e0b;
}

.btn-outline-primary {
	border-color: #3b82f6;
	color: #3b82f6;
}

.btn-outline-primary:hover {
	background-color: #3b82f6;
	color: white;
}

.btn-outline-success {
	border-color: #10b981;
	color: #10b981;
}

.btn-outline-success:hover {
	background-color: #10b981;
	color: white;
}

/* ==== MODAL ==== */
.modal-content {
	border-radius: 18px;
	border: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
	background: linear-gradient(135deg, #3b82f6, #06b6d4);
	color: white;
	border-bottom: none;
}

.modal-body {
	background: #f9fafb;
}

.modal-footer {
	border-top: none;
}

/* ==== TABLE COLORS ==== */
.table-success td {
	background-color: #ecfdf5 !important;
}

.table-danger td {
	background-color: #fef2f2 !important;
}

.table-warning td {
	background-color: #fffbeb !important;
}

.table-info td {
	background-color: #e0f2fe !important;
}

/* === SCROLLABLE TABLE CONTAINER === */
.fixed-table-container {
	height: 69vh;
	/* 75% of viewport height */
	overflow-y: auto;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: white;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* sticky header fix */
#worklistTable {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

#worklistTable thead th {
	position: sticky;
	top: 0;
	z-index: 20;
	background: #f8fafc;
	/* light gray background */
	box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}

/* smooth scrollbar */
.fixed-table-container::-webkit-scrollbar {
	width: 10px;
}

.fixed-table-container::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 8px;
}

.fixed-table-container::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 8px;
}

.fixed-table-container::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Overlay when PLC is down */
#plcOverlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.plcOverlay-card {
	width: min(520px, 95vw);
	background: rgba(15, 23, 42, .96);
	border: 1px solid rgba(148, 163, 184, .55);
	border-radius: 16px;
	padding: 16px;
	color: #fff;
	box-shadow: 0 18px 45px rgba(0, 0, 0, .6);
}

.plcOverlay-title {
	font-weight: 800;
	font-size: 1.05rem;
	margin-bottom: 6px;
}

.plcOverlay-msg {
	color: rgba(255, 255, 255, .82);
	font-size: .9rem;
	line-height: 1.35;
}