/* #region header */
header {
	display: grid;
	grid-template-columns: 2fr 2fr 1.5fr 1fr;
	align-items: center;
	gap: 50px;
	justify-content: center;
	padding: 10px;
	padding-top: calc(10px + env(safe-area-inset-top));
	background-color: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.logo img {
	width: auto;
	height: 40px;
}

* {
	font-family: 'Inter', sans-serif;
	box-sizing: border-box;
}
h1,
h2,
h3 {
	font-family: 'DM Sans', sans-serif;
}

.newJob {
	width: 20%;
	margin-left: auto;
	border: #000 solid 1px;
	color: black;
	padding: 8px 12px;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.2s;
}
.newJob:hover {
	background-color: #f0f0f0;
}
.ections {
	display: flex;
	align-items: center;
	gap: 8px;
}
.icon-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	color: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}
.icon-btn:hover {
	background: #f0f0f0;
}
.icon-btn:active {
	background: #e0e0e0;
}

.displayComments {
	display: flex;
	align-items: center;
	gap: 4px;
}
.displayComments .icon-btn {
	padding: 4px;
}

.comment-view-wrap {
	position: relative;
	display: flex;
	align-items: center;
}
.messageveiw {
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	background: #222;
	color: #fff;
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 6px;
	width: max-content;
	max-width: 360px;
	white-space: normal;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 20;
}
.view-comment-btn:hover + .messageveiw {
	opacity: 1;
	visibility: visible;
}
/* #endregion */

/* #region pannel */
.pannel {
	padding: 16px;
	padding-top: max(10px, env(safe-area-inset-top)); /* below a tablet's status bar in the app */
}

.pTop {
	display: flex;
	align-items: center;
	gap: 70px;
	margin-bottom: 16px;
}

.pTop .filters {
	display: flex;
	gap: 16px;
}

.search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	padding: 8px 16px;
	width: 280px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within {
	border-color: #000;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
	background: #fff;
}
.search-icon {
	color: #888;
	flex-shrink: 0;
}
.search input {
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	width: 100%;
	color: #000;
}
.search input::placeholder {
	color: #aaa;
}
.filter-btn,
.ven-btn,
.mat-btn {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 14px;
	color: #555;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-btn:hover,
.ven-btn:hover,
.mat-btn:hover {
	background: #fff;
	border-color: #000;
	color: #000;
}
.filter-btn.active {
	background: #000;
	border-color: #000;
	color: #fff;
}
.filter-divider {
	width: 1px;
	height: 24px;
	background: #e0e0e0;
	align-self: center;
}

.pBottem {
	border-top: solid 1px rgb(36, 35, 35);
	display: flex;
	height: 85vh;
}
.pBottem .list {
	overflow-y: auto;
	height: 100%;
	width: 300px;
	border-right: 1px solid #000000;
	padding: 16px;
	position: relative;
}
.pull-refresh-indicator {
	position: absolute;
	top: -32px;
	left: 50%;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border: 2px solid #ccc;
	border-top-color: #000;
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.15s;
}
.pull-refresh-indicator.visible {
	opacity: 1;
}
.pull-refresh-indicator.ready {
	border-top-color: #fab519;
}
.pull-refresh-indicator.spinning {
	opacity: 1;
	top: 8px;
	animation: pull-refresh-spin 0.6s linear infinite;
}
@keyframes pull-refresh-spin {
	to {
		transform: rotate(360deg);
	}
}
.pBottem .list::-webkit-scrollbar {
	width: 5px;
}
.pBottem .list::-webkit-scrollbar-track {
	background: transparent;
}
.pBottem .list::-webkit-scrollbar-button {
	display: none;
	width: 0;
	height: 0;
}
.pBottem .list::-webkit-scrollbar-thumb {
	background-color: #555555;
	border-radius: 0;
	min-height: 20px;
}
.pBottem .list::-webkit-scrollbar-thumb:hover {
	background-color: #333333;
}
.pBottem .display {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.displayHead {
	flex-shrink: 0;
}

.displaybottem {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.material {
	padding: 12px;
	margin-bottom: 4px;
	cursor: pointer;
	transition: background-color 0.2s;
	border-bottom: solid 1px #e0e0e0;
}
.material:hover {
	background-color: #f5f5f5;
}

/* #endregion */

.display-back-btn {
	display: none;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 8px 0;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #000;
	cursor: pointer;
}

/* #region forms */

.forms {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 20px;
	z-index: 1000;
}

.newJobForm {
	position: relative;
	width: 400px;
	background: #111;
	border-radius: 12px;
	padding: 24px 36px;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow-y: auto;
	max-height: 90vh;
	scrollbar-width: none;
}
.newJobForm::-webkit-scrollbar {
	display: none;
}

.newJobForm h2 {
	color: #f5a800;
	font-size: 28px;
	padding: 3%;
	font-weight: 700;
	margin: 0 0 4px;
	align-self: center;
	text-align: center;
}

.newJobForm p {
	color: #666;
	font-size: 12px;
	margin: 0 0 16px;
	align-self: center;
	text-align: center;
}

.newJobForm .input-group {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 10px;
}

.newJobForm .input-group label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
}

.newJobForm input {
	width: 100%;
	padding: 12px 14px;
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	font-size: 14px;
	color: #f5a800;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.newJobForm input::placeholder {
	color: #444;
}

.newJobForm input:focus {
	border-color: #f5a800;
}

/* Dropbox Number — "#" inside the box, short width, folder-number style */
.dropbox-field {
	position: relative;
	width: 140px;
}
.dropbox-prefix {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #666;
	font-weight: 700;
	pointer-events: none;
}
.newJobForm .dropbox-field input {
	padding-left: 30px;
	font-weight: 700;
	letter-spacing: 0.15em;
	font-variant-numeric: tabular-nums;
}
.dropbox-field:focus-within .dropbox-prefix {
	color: #f5a800;
}
/* red border once something is typed that isn't 3 digits */
.newJobForm .dropbox-field input:not(:placeholder-shown):invalid {
	border-color: #e5534b;
}
.dropbox-hint {
	font-size: 11px;
	color: #666;
}

/* Last row of the job form: Start Date and Dropbox Number side by side */
.newJobForm .form-row {
	display: flex;
	gap: 12px;
	width: 100%;
}
.newJobForm .form-row .input-group {
	flex: 1;
	min-width: 0;
}
.newJobForm .form-row .dropbox-field {
	width: 100%;
}
/* keep both labels on one line so the two boxes line up on phones */
.newJobForm .form-row .input-group label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* iOS/Android give an empty date input its own height — match the text inputs */
.newJobForm input[type='date'] {
	-webkit-appearance: none;
	appearance: none;
	height: 44px;
	min-width: 0;
	color-scheme: dark;
	text-align: left;
}
.newJobForm input[type='date']::-webkit-date-and-time-value {
	text-align: left;
}
.newJobForm .form-row .dropbox-field input {
	height: 44px;
}

.newJobForm button[type='submit'] {
	width: 100%;
	padding: 12px;
	margin-top: 8px;
	background: #f5a800;
	color: #000;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}

.newJobForm button[type='submit']:hover {
	background: #e09900;
}

.form-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	color: #666;
	font-size: 16px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
}
.form-close:hover {
	color: #fff;
	background: #333;
}

.loginForm {
	width: 400px;
	background: #111;
	border-radius: 12px;
	padding: 24px 36px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.logoform {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.logoform img {
	width: 10px;
}

.loginForm h2 {
	color: #f5a800;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px;
	align-self: flex-start;
}

.loginForm p {
	color: #666;
	font-size: 12px;
	margin: 0 0 24px;
	align-self: flex-start;
}

.loginForm .input-group {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 10px;
}

.loginForm .input-group label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
}

.loginForm input {
	width: 100%;
	padding: 12px 14px;
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	font-size: 14px;
	color: #f5a800;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.loginForm input::placeholder {
	color: #444;
}

.loginForm input:focus {
	border-color: #f5a800;
}

.loginForm button[type='submit'] {
	width: 100%;
	padding: 12px;
	margin-top: 8px;
	background: #f5a800;
	color: #000;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	letter-spacing: 0.05em;
	transition: background 0.2s;
}

.loginForm button[type='submit']:hover {
	background: #e09900;
}

.logoform img {
	width: 200px;
	padding: 5%;
}

.status-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	padding: 4px 28px 4px 12px;
	font-size: 12px;
	font-weight: 500;
	color: #333;
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 12px;
	font-family: 'Inter', sans-serif;
}
.status-select:hover {
	border-color: #000;
	background-color: #fff;
}
.status-select:focus {
	border-color: #000;
	background-color: #fff;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}
/* #endregion */

/* #region display */

.quote-table-wrap {
	flex: 1;
	min-height: 0;
	align-self: flex-start;
	max-width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	overflow: auto;
	scrollbar-width: none;
}
.quote-table-wrap::-webkit-scrollbar {
	display: none;
}

.quote-table {
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 13px;
}

.quote-table th,
.quote-table td {
	padding: 14px 22px;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}

.quote-table th:not(:last-child),
.quote-table td:not(:last-child) {
	border-right: 1px solid #e0e0e0;
}

.quote-table thead th {
	position: sticky;
	background: #f5f5f5;
	color: #111;
	z-index: 2;
}

.quote-table thead tr:first-child th {
	top: 0;
}

.quote-table thead tr:last-child th {
	top: 41px;
}

.qt-jobs-head {
	width: 220px;
	vertical-align: bottom;
	font-weight: 700;
}

.qt-vendor-head {
	text-align: center;
	font-weight: 700;
	white-space: nowrap;
	border-bottom: 1px solid #d5d5d5;
}

.qt-sub-head {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888;
}

.quote-table tbody tr:last-child td {
	border-bottom: none;
}

.qt-job-name {
	font-weight: 600;
	color: #111;
	background: #fafafa;
}

/* Steel pill in the bottom-right corner of each job (Steel table only) — same as the Drafting page:
   teal ✓ = approved, light red = not yet */
.qt-job-name.has-steel {
	position: relative;
	padding-bottom: 24px; /* room for the pill under the name / date */
}
.steel-badge {
	position: absolute;
	right: 6px;
	bottom: 5px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #fdecea;
	color: #b5524a;
	font-size: 11px;
	font-weight: 600;
	line-height: 14px;
	white-space: nowrap;
}
.steel-badge.done {
	background: #5b8a86;
	color: #fff;
}
.steel-badge.done::before {
	content: '✓';
}

.qt-empty {
	background-image: repeating-linear-gradient(
		135deg,
		#000 0px,
		#000 2px,
		transparent 2px,
		transparent 8px
	);
	background-color: #fafafa;
	opacity: 0.35;
}

.document-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #000;
	background: transparent;
	border: 1px solid #ccc;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}
.document-btn::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}
.document-btn:hover {
	background: #f5f5f5;
	border-color: #000;
}
.upload-btn {
	color: #888;
	border-color: #e0e0e0;
	border-style: dashed;
}
.upload-btn::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
}
.upload-btn:hover {
	color: #000;
	border-color: #000;
	border-style: dashed;
}

.quote-table .document-btn {
	font-size: 12px;
}

/* #endregion */

/* #region mobile */
@media (max-width: 1024px) {
	html,
	body {
		height: 100%;
	}

	.pannel {
		display: flex;
		flex-direction: column;
		height: 100vh;
		height: 100dvh;
		padding: 0;
	}

	.pTop {
		flex-wrap: wrap;
		flex-shrink: 0;
		row-gap: 12px;
		column-gap: 12px;
		padding: 12px 16px;
		padding-top: max(12px, env(safe-area-inset-top));
	}

	.logo {
		order: 1;
	}

	.logo img {
		width: auto;
		height: 32px;
		margin-top: 6px;
	}

	.ections {
		order: 2;
		margin-left: auto;
	}

	.search {
		order: 3;
		flex: 1 1 100%;
		min-width: 120px;
		width: auto;
	}

	.pTop .filters {
		order: 4;
		flex: 1 1 100%;
		min-width: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.pTop .filters::-webkit-scrollbar {
		display: none;
	}

	.filter-btn,
	.ven-btn,
	.mat-btn {
		white-space: nowrap;
	}

	.pTop > .filter-divider {
		display: none;
	}

	.newJob {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		margin: 0;
		border-radius: 0;
		border-width: 1px 0 0;
		padding: 16px;
		padding-bottom: max(16px, env(safe-area-inset-bottom));
		background: #fff;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
		z-index: 500;
	}

	.pBottem {
		flex: 1;
		min-height: 0;
		height: auto;
		position: relative;
	}

	.pBottem .list {
		width: 100%;
		height: 100%;
		max-height: none;
		border-right: none;
		padding-bottom: 76px;
	}

	.display {
		position: absolute;
		inset: 0;
		z-index: 1000;
		width: 100%;
		height: 100%;
		overflow-y: auto;
		background: #fff;
		padding: 16px;
	}

	.display-back-btn {
		display: flex;
	}

	.displayHead {
		width: 100%;
		grid-template-columns: 1fr;
	}

	.displaybottem {
		width: 100%;
	}

	.section-wrapper {
		gap: 8px;
	}

	.section-content {
		overflow-x: auto;
	}

	.tableHead,
	.vendor {
		min-width: 720px;
		gap: 10px;
		font-size: 12px;
	}

	.quote-table th,
	.quote-table td {
		font-size: 12px;
	}

	.newJobForm,
	.loginForm {
		width: 90%;
		padding: 20px;
	}
}
/* #endregion */
