/* ============================================================
   Hog Processing Manager — Public Styles
   ============================================================ */

.hpm-wrap {
	max-width: 760px;
	margin: 0 auto;
	font-family: inherit;
	line-height: 1.6;
}

/* Alerts ----------------------------------------------------- */
.hpm-alert {
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 15px;
}

.hpm-alert-error   { background: #fde8e8; border-left: 4px solid #e53e3e; color: #742a2a; }
.hpm-alert-success { background: #e6f7ed; border-left: 4px solid #38a169; color: #22543d; }
.hpm-alert-info    { background: #ebf8ff; border-left: 4px solid #3182ce; color: #2a4365; }

/* Form sections ---------------------------------------------- */
.hpm-form-section {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin-bottom: 24px;
	overflow: hidden;
}

.hpm-form-section h2 {
	margin: 0;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 700;
	background: #f7fafc;
	border-bottom: 1px solid #e2e8f0;
}

.hpm-form-section-body {
	padding: 20px;
}

/* Field groups ----------------------------------------------- */
.hpm-field-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.hpm-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.hpm-field.hpm-full {
	grid-column: 1 / -1;
}

.hpm-field label {
	font-weight: 600;
	font-size: 14px;
	color: #2d3748;
}

.hpm-field input[type="text"],
.hpm-field input[type="email"],
.hpm-field input[type="tel"],
.hpm-field input[type="password"],
.hpm-field input[type="number"],
.hpm-field select,
.hpm-field textarea {
	padding: 9px 12px;
	border: 1px solid #cbd5e0;
	border-radius: 5px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	transition: border-color .15s;
	background: #fff;
	color: #2d3748;
}

.hpm-field input:focus,
.hpm-field select:focus,
.hpm-field textarea:focus {
	outline: none;
	border-color: #3182ce;
	box-shadow: 0 0 0 3px rgba(49, 130, 206, .15);
}

.hpm-field-note {
	font-size: 12px;
	color: #718096;
}

/* Cut sheet grid -------------------------------------------- */
.hpm-cut-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

/* Add-ons ---------------------------------------------------- */
.hpm-addon-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #fafafa;
}

.hpm-addon-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex-shrink: 0;
}

.hpm-addon-item .hpm-addon-label {
	font-weight: 600;
	font-size: 14px;
}

.hpm-addon-item .hpm-addon-detail {
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.hpm-addon-item .hpm-addon-detail input,
.hpm-addon-item .hpm-addon-detail select {
	padding: 5px 8px;
	border: 1px solid #cbd5e0;
	border-radius: 4px;
	font-size: 13px;
	width: 80px;
}

.hpm-addon-item .hpm-addon-detail select {
	width: auto;
}

.hpm-addon-price {
	font-size: 12px;
	color: #718096;
}

.hpm-addons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

/* Submit button --------------------------------------------- */
.hpm-submit-row {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
}

.hpm-btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	text-decoration: none;
	text-align: center;
	transition: background .15s;
}

.hpm-btn-primary {
	background: #276749;
	color: #fff;
}

.hpm-btn-primary:hover {
	background: #1e4d35;
	color: #fff;
}

.hpm-btn-secondary {
	background: #edf2f7;
	color: #2d3748;
}

.hpm-btn-secondary:hover {
	background: #e2e8f0;
}

/* Dashboard -------------------------------------------------- */
.hpm-dashboard h1 {
	font-size: 22px;
	margin-bottom: 8px;
}

/* Progress bar */
.hpm-progress {
	display: flex;
	gap: 0;
	margin-bottom: 28px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.hpm-progress-step {
	flex: 1;
	padding: 10px 6px;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	background: #f7fafc;
	color: #a0aec0;
	line-height: 1.3;
	border-right: 1px solid #e2e8f0;
}

.hpm-progress-step:last-child {
	border-right: none;
}

.hpm-progress-step.done {
	background: #bee3f8;
	color: #2a4365;
}

.hpm-progress-step.current {
	background: #276749;
	color: #fff;
}

/* Info cards */
.hpm-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 24px;
}

.hpm-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 18px 20px;
}

.hpm-card h3 {
	margin: 0 0 12px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #718096;
	font-weight: 700;
}

.hpm-card .hpm-big-value {
	font-size: 26px;
	font-weight: 800;
	color: #2d3748;
}

.hpm-card .hpm-sub-value {
	font-size: 13px;
	color: #718096;
	margin-top: 4px;
}

.hpm-card-full {
	grid-column: 1 / -1;
}

/* Price table */
.hpm-price-table {
	width: 100%;
	border-collapse: collapse;
}

.hpm-price-table td {
	padding: 7px 0;
	border-bottom: 1px solid #edf2f7;
	font-size: 14px;
}

.hpm-price-table td:last-child {
	text-align: right;
	font-weight: 600;
}

.hpm-price-table .hpm-total-row td {
	border-top: 2px solid #e2e8f0;
	border-bottom: none;
	padding-top: 10px;
	font-size: 16px;
	font-weight: 800;
}

.hpm-price-table .hpm-balance-row td {
	color: #c53030;
}

/* Payments table */
.hpm-payments-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.hpm-payments-table th,
.hpm-payments-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #edf2f7;
	text-align: left;
}

.hpm-payments-table th {
	font-weight: 700;
	color: #718096;
	font-size: 12px;
	text-transform: uppercase;
}

/* Cut-sheet summary */
.hpm-cs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
}

.hpm-cs-item {
	font-size: 13px;
}

.hpm-cs-item .hpm-cs-label {
	color: #718096;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.hpm-cs-item .hpm-cs-value {
	font-weight: 600;
	color: #2d3748;
}

/* Login prompt */
.hpm-login-prompt {
	text-align: center;
	padding: 40px 20px;
}

.hpm-login-prompt p {
	font-size: 16px;
	margin-bottom: 16px;
}

/* Dashboard header row */
.hpm-dashboard-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.hpm-dashboard-header h1 {
	margin: 0 0 4px;
}

.hpm-refresh-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.hpm-last-checked {
	font-size: 12px;
	color: #718096;
}

.hpm-btn-sm {
	padding: 6px 14px;
	font-size: 13px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	background: #e2e8f0;
	color: #2d3748;
	font-weight: 600;
	transition: background .15s;
}

.hpm-btn-sm:hover {
	background: #cbd5e0;
}

/* Add-ons table (Processing Preferences edit form) */
.hpm-addons-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	margin-bottom: 20px;
	table-layout: fixed;
}

.hpm-addons-table col.hpm-col-check  { width: 36px; }
.hpm-addons-table col.hpm-col-item   { width: auto; }
.hpm-addons-table col.hpm-col-qty    { width: 180px; }
.hpm-addons-table col.hpm-col-price  { width: 140px; }

.hpm-addons-table th {
	text-align: left;
	font-weight: 600;
	color: #718096;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 6px 10px;
	border-bottom: 2px solid #e2e8f0;
}

.hpm-addons-table td {
	padding: 10px;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: middle;
	overflow: hidden;
}

.hpm-addons-table tr:last-child td {
	border-bottom: none;
}

.hpm-addons-table label {
	font-weight: 600;
	color: #2d3748;
}

.hpm-addons-table input[type="number"],
.hpm-addons-table input.hpm-addon-qty {
	width: 80px !important;
	min-width: 80px !important;
	max-width: 80px !important;
	box-sizing: border-box !important;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 5px 8px;
}

.hpm-addons-table select {
	max-width: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 5px 8px;
}

/* Update banner */
.hpm-update-banner {
	background: #ebf8ff;
	border: 1px solid #90cdf4;
	color: #2a4365;
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-weight: 600;
}

.hpm-update-banner a {
	color: #276749;
	text-decoration: underline;
}

/* Locked preferences notice */
.hpm-prefs-locked {
	background: #fffbeb;
	border: 1px solid #f6e05e;
	color: #744210;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 16px;
}

/* Responsive ------------------------------------------------- */
@media ( max-width: 600px ) {
	.hpm-field-group,
	.hpm-cards {
		grid-template-columns: 1fr;
	}

	.hpm-cut-grid {
		grid-template-columns: 1fr;
	}

	.hpm-addons-grid {
		grid-template-columns: 1fr;
	}

	.hpm-progress-step {
		font-size: 9px;
		padding: 8px 4px;
	}
}
