.tg-login-card,
.tg-panel-shell,
.tg-login-card *,
.tg-panel-shell * {
	box-sizing: border-box;
}

.tg-login-card,
.tg-panel-shell {
	font-family: Inter, Arial, Helvetica, sans-serif;
	color: #171717;
}

.tg-login-card {
	width: calc(100% - 32px);
	max-width: 460px;
	margin: 70px auto;
	padding: 42px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .08);
}

.tg-login-card h1,
.tg-panel-header h1,
.tg-section-heading h2,
.tg-section-heading h3 {
	margin: 0;
}

.tg-login-card h1 {
	font-size: 34px;
	line-height: 1.15;
}

.tg-eyebrow {
	margin-bottom: 9px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 2px;
	color: #777;
}

.tg-muted {
	margin: 10px 0 28px;
	font-size: 15px;
	line-height: 1.6;
	color: #666;
}

.tg-login-form label,
.tg-receipt-form label,
.tg-inline-form label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #242424;
}

.tg-login-form label {
	margin: 20px 0 8px;
}

.tg-login-form input,
.tg-receipt-form input,
.tg-receipt-form select,
.tg-receipt-form textarea,
.tg-inline-form input {
	width: 100%;
	min-height: 48px;
	padding: 10px 13px;
	border: 1px solid #cfcfcf;
	border-radius: 9px;
	outline: none;
	background: #fff;
	color: #171717;
	font: inherit;
}

.tg-login-form input:focus,
.tg-receipt-form input:focus,
.tg-receipt-form select:focus,
.tg-receipt-form textarea:focus,
.tg-inline-form input:focus {
	border-color: #171717 !important;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.tg-login-form button {
	width: 100%;
	min-height: 52px;
	margin-top: 26px;
	padding: 12px 18px;
	border: 0;
	border-radius: 9px;
	background: #171717;
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.tg-alert {
	margin: 0 0 22px;
	padding: 14px 16px;
	border: 1px solid transparent;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.tg-alert-error {
	border-color: #e6bbbb;
	background: #fff1f1;
	color: #8b2424;
}

.tg-alert-success {
	border-color: #b9dcc3;
	background: #eef9f1;
	color: #216536;
}

.tg-stock-mismatch-alert {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin: 0 0 24px;
	padding: 18px;
	border: 2px solid #c62828;
	border-radius: 12px;
	background: #fff0f0;
	color: #761818;
}

.tg-stock-mismatch-alert p {
	margin: 5px 0 7px;
}

.tg-stock-mismatch-alert a {
	color: #761818;
	font-weight: 800;
	text-decoration: underline;
}

.tg-stock-mismatch-icon {
	display: inline-flex;
	flex: 0 0 34px;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #c62828;
	color: #fff;
	font-size: 24px;
	font-weight: 900;
	line-height: 1;
}

.tg-panel-shell {
	width: calc(100% - 32px);
	max-width: 1500px;
	margin: 40px auto;
	padding: 36px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 18px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .05);
}

.tg-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}

.tg-panel-header h1 {
	font-size: 31px;
	line-height: 1.2;
}

.tg-logout-form,
.tg-count-form,
.tg-action-stack form,
.tg-receipt-details form,
.tg-hidden-product-row form {
	margin: 0;
}

.tg-logout,
.tg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 15px;
	border: 1px solid #d2d2d2;
	border-radius: 8px;
	background: #fff;
	color: #171717;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.tg-button:hover,
.tg-logout:hover {
	background: #f3f3f3;
}

.tg-button-small {
	min-height: 34px;
	padding: 7px 10px;
	font-size: 12px;
}

.tg-button-primary {
	border-color: #171717;
	background: #171717;
	color: #fff;
}

.tg-button-primary:hover {
	background: #333;
}

.tg-button-secondary {
	background: #f2f2f2;
}

.tg-button-danger {
	border-color: #9b2525;
	background: #9b2525;
	color: #fff;
}

.tg-button-danger-ghost {
	border-color: #e2bcbc;
	color: #8c2626;
}

.tg-panel-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 26px;
	padding: 0;
}

.tg-panel-nav button {
	min-height: 45px;
	padding: 11px 19px;
	border: 0;
	border-radius: 9px;
	background: #eee;
	color: #343434;
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	cursor: pointer;
}

.tg-panel-nav button.is-active {
	background: #171717;
	color: #fff;
}

.tg-panel-content {
	min-height: 390px;
	padding: 32px;
	border: 1px solid #e4e4e4;
	border-radius: 13px;
	background: #fff;
}

.tg-panel-content section[hidden],
.tg-stock-editor[hidden],
.tg-hidden-products-list[hidden],
.tg-receipt-details[hidden],
tr[hidden] {
	display: none !important;
}

.tg-section-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 25px;
}

.tg-section-heading h2 {
	font-size: 27px;
	line-height: 1.25;
}

.tg-section-heading h3 {
	font-size: 22px;
}

.tg-section-heading p,
.tg-panel-content > section > p {
	max-width: 780px;
	margin: 8px 0 0;
	color: #606060;
	font-size: 15px;
	line-height: 1.7;
}

.tg-section-heading-compact {
	margin-bottom: 16px;
}

.tg-placeholder-grid,
.tg-inventory-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.tg-placeholder-card,
.tg-inventory-stat {
	min-height: 115px;
	padding: 20px;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	background: #f8f8f8;
}

.tg-placeholder-card span,
.tg-inventory-stat span {
	display: block;
	color: #676767;
	font-size: 13px;
	font-weight: 650;
}

.tg-placeholder-card strong,
.tg-inventory-stat strong {
	display: block;
	margin-top: 9px;
	font-size: 25px;
	line-height: 1.2;
}

.tg-inventory-stats {
	margin-bottom: 26px;
}

.tg-location-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 0 0 22px;
}

.tg-location-nav a.tg-button {
	border-color: #d2d2d2 !important;
	background: #fff !important;
	color: #171717 !important;
}

.tg-location-nav a.tg-button:hover,
.tg-location-nav a.tg-button:focus-visible {
	border-color: #f7b900 !important;
	background: #f7b900 !important;
	color: #171717 !important;
}

.tg-location-nav a.tg-button.is-active,
.tg-location-nav a.tg-button.is-active:hover,
.tg-location-nav a.tg-button.is-active:focus-visible {
	border-color: #171717 !important;
	background: #171717 !important;
	color: #fff !important;
}

.tg-scan-workspace {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.tg-scan-card,
.tg-batch-editor {
	padding: 22px;
	border: 1px solid #dedede;
	border-radius: 12px;
	background: #fafafa;
}

.tg-scan-card-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.tg-scan-card h3,
.tg-batch-editor h3 {
	margin: 0;
	font-size: 21px;
}

.tg-scan-card > p,
.tg-batch-editor > p {
	margin: 8px 0 16px;
	color: #666;
	font-size: 13px;
	line-height: 1.55;
}

.tg-scan-count {
	padding: 6px 9px;
	border-radius: 999px;
	background: #ececec;
	font-size: 12px;
	font-weight: 750;
	white-space: nowrap;
}

.tg-scan-input-label input,
.tg-batch-editor select,
.tg-scan-row input[type="number"],
.tg-batch-row input[type="number"] {
	width: 100%;
	min-height: 42px;
	margin-top: 6px;
	padding: 8px 11px;
	border: 1px solid #cfcfcf;
	border-radius: 8px;
	background: #fff;
	font: inherit;
}

.tg-scan-error {
	margin-top: 10px;
	padding: 9px 11px;
	border-radius: 7px;
	background: #fff1f1;
	color: #8b2424;
	font-size: 12px;
	font-weight: 650;
}

.tg-scan-items,
.tg-batch-editor [data-tg-batch-items] {
	display: grid;
	gap: 8px;
	margin: 14px 0;
}

.tg-scan-row,
.tg-batch-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 90px auto;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fff;
}

.tg-scan-row strong,
.tg-scan-row span,
.tg-batch-row strong {
	display: block;
}

.tg-scan-row span {
	margin-top: 3px;
	color: #777;
	font-size: 11px;
}

.tg-scan-row input[type="number"],
.tg-batch-row input[type="number"] {
	margin-top: 0;
}

.tg-batch-editor {
	margin-bottom: 22px;
}

.tg-batch-editor .tg-picker-row {
	margin-bottom: 12px;
}

.tg-inventory-stat small {
	display: block;
	margin-top: 8px;
	color: #777;
	font-size: 12px;
	line-height: 1.45;
}

.tg-inventory-stat-wide {
	grid-column: span 2;
}

.tg-last-updated {
	padding-top: 5px;
	color: #777;
	font-size: 13px;
	white-space: nowrap;
}

.tg-inventory-table-wrap,
.tg-receipt-items-wrap {
	width: 100%;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	background: #fff;
}

.tg-inventory-table-wrap {
	overflow-x: visible;
}

.tg-receipt-items-wrap {
	overflow-x: auto;
}

.tg-inventory-table {
	width: 100%;
	min-width: 0;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.tg-inventory-table th:nth-child(1) { width: 23%; }
.tg-inventory-table th:nth-child(2) { width: 11%; }
.tg-inventory-table th:nth-child(3) { width: 9%; }
.tg-inventory-table th:nth-child(4) { width: 8%; }
.tg-inventory-table th:nth-child(5) { width: 12%; }
.tg-inventory-table th:nth-child(6) { width: 11%; }
.tg-inventory-table th:nth-child(7) { width: 12%; }
.tg-inventory-table th:nth-child(8) { width: 14%; }

.tg-inventory-sku {
	font-size: 13px;
	white-space: nowrap;
}

.tg-inventory-table th,
.tg-inventory-table td,
.tg-receipt-items-table th,
.tg-receipt-items-table td,
.tg-receipt-details table th,
.tg-receipt-details table td {
	padding: 14px 15px;
	border: 0;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
}

.tg-inventory-table td {
	overflow-wrap: anywhere;
}

.tg-inventory-table td:last-child {
	position: relative;
	overflow: visible;
}

.tg-inventory-table th,
.tg-receipt-items-table th,
.tg-receipt-details table th {
	background: #f2f2f2;
	color: #4d4d4d;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .7px;
	text-transform: uppercase;
	white-space: nowrap;
}

.tg-inventory-table tbody tr:last-child td,
.tg-receipt-items-table tbody tr:last-child td,
.tg-receipt-details table tbody tr:last-child td {
	border-bottom: 0;
}

.tg-product-row:hover td,
.tg-variation-row:hover td {
	background: #fafafa;
}

.tg-inventory-table .tg-stock-mismatch-row td,
.tg-inventory-table .tg-stock-mismatch-row:hover td {
	background: #fff0f0;
}

.tg-stock-mismatch-note {
	display: block;
	margin-top: 6px;
	color: #b71c1c;
	font-size: 12px;
	font-weight: 800;
}

.tg-variation-row td {
	background: #fbfbfb;
}

.tg-shared-stock-row td {
	background: #f4f7fb;
}

.tg-align-right {
	text-align: right !important;
	white-space: nowrap;
}

.tg-product-title-line {
	display: flex;
	align-items: center;
	gap: 9px;
}

.tg-variant-toggle {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	background: #fff;
	font-size: 11px;
	cursor: pointer;
}

.tg-inventory-product-name,
.tg-variation-name {
	display: block;
	min-width: 0;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.4;
}

.tg-variation-name {
	padding-left: 18px;
}

.tg-inventory-product-details,
.tg-inventory-product-id,
.tg-shared-note,
.tg-muted-small,
.tg-receipt-meta,
.tg-receipt-details td span,
.tg-hidden-product-row span {
	display: block;
	margin-top: 4px;
	color: #777;
	font-size: 11px;
	line-height: 1.45;
}

.tg-inventory-price,
.tg-inventory-price * {
	white-space: nowrap;
}

.tg-inventory-price del {
	display: block;
	font-size: 11px;
}

.tg-inventory-price ins {
	background: transparent;
	font-weight: 750;
	text-decoration: none;
}

.tg-stock-status,
.tg-receipt-status {
	display: inline-block;
	padding: 6px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 750;
	line-height: 1.3;
	white-space: nowrap;
}

.tg-stock-status.is-in-stock,
.tg-receipt-status.is-active {
	background: #e8f6ec;
	color: #216a37;
}

.tg-stock-status.is-low,
.tg-stock-status.is-partial {
	background: #fff0cc;
	color: #805900;
}

.tg-stock-status.is-out {
	background: #fce8e8;
	color: #8d2929;
}

.tg-stock-status.is-backorder {
	background: #e9effb;
	color: #294d8d;
}

.tg-stock-status.is-unmanaged,
.tg-receipt-status.is-reversed {
	background: #ededed;
	color: #555;
}

.tg-action-stack {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	min-width: 0;
}

.tg-action-stack .tg-button {
	max-width: 100%;
	white-space: normal;
}

.tg-stock-editor {
	position: absolute;
	z-index: 20;
	top: calc(100% - 6px);
	right: 14px;
	width: 280px;
	margin: 0;
	padding: 14px;
	border: 1px solid #dedede;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.tg-stock-editor .tg-inline-form {
	display: block;
}

.tg-stock-editor .tg-inline-form input {
	min-height: 42px;
	margin-top: 5px;
}

.tg-stock-editor .tg-inline-form .tg-button {
	width: 100%;
	margin-top: 10px;
}

.tg-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.tg-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.tg-switch span {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #cfcfcf;
	cursor: pointer;
	transition: .15s ease;
}

.tg-switch span::before {
	content: '';
	position: absolute;
	left: 3px;
	top: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
	transition: .15s ease;
}

.tg-switch input:checked + span {
	background: #171717;
}

.tg-switch input:checked + span::before {
	transform: translateX(20px);
}

.tg-empty-state {
	padding: 30px !important;
	color: #6a6a6a;
	text-align: center !important;
}

.tg-hidden-products {
	margin-top: 22px;
}

.tg-hidden-products-list {
	margin-top: 12px;
	padding: 18px;
	border: 1px solid #e1e1e1;
	border-radius: 10px;
	background: #fafafa;
}

.tg-hidden-products-list > p {
	margin: 0 0 14px;
	color: #666;
}

.tg-hidden-product-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 12px 0;
	border-top: 1px solid #e5e5e5;
}

.tg-receipt-form {
	padding: 24px;
	border: 1px solid #e1e1e1;
	border-radius: 13px;
	background: #fafafa;
}

.tg-form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.tg-receipt-form label input,
.tg-receipt-form label textarea,
.tg-receipt-form label select {
	margin-top: 7px;
}

.tg-form-full {
	margin-top: 14px;
}

.tg-receipt-picker {
	margin-top: 20px;
}

.tg-picker-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	margin-top: 7px;
}

.tg-receipt-items-wrap {
	margin-top: 16px;
}

.tg-receipt-items-table {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
}

.tg-receipt-items-table td strong,
.tg-receipt-details td strong {
	display: block;
}

.tg-receipt-items-table input[type="number"] {
	width: 120px;
	min-height: 38px;
}

.tg-receipt-submit {
	margin-top: 18px;
}

.tg-receipt-history {
	margin-top: 34px;
}

.tg-receipt-list {
	display: grid;
	gap: 12px;
}

.tg-receipt-card,
.tg-empty-card {
	border: 1px solid #e1e1e1;
	border-radius: 11px;
	background: #fff;
}

.tg-receipt-card.is-reversed {
	opacity: .78;
}

.tg-receipt-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 17px 18px;
}

.tg-receipt-title-line {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tg-receipt-details {
	padding: 0 18px 18px;
}

.tg-receipt-details table {
	width: 100%;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	border-collapse: collapse;
	overflow: hidden;
}

.tg-receipt-details > p {
	margin: 14px 0;
	color: #555;
	font-size: 13px;
}

.tg-reversed-note {
	padding: 10px 12px;
	border-radius: 7px;
	background: #f1f1f1;
}

.tg-empty-card {
	padding: 24px;
	color: #666;
}

@media (max-width: 1050px) {
	.tg-inventory-stats,
	.tg-placeholder-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tg-form-grid {
		grid-template-columns: 1fr 1fr;
	}

	.tg-scan-workspace {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.tg-login-card {
		margin: 35px auto;
		padding: 30px 24px;
	}

	.tg-panel-shell {
		margin: 22px auto;
		padding: 24px 18px;
	}

	.tg-panel-header,
	.tg-section-heading,
	.tg-receipt-card-header,
	.tg-hidden-product-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.tg-panel-nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tg-panel-content {
		padding: 22px 16px;
	}

	.tg-inventory-stats,
	.tg-placeholder-grid,
	.tg-form-grid {
		grid-template-columns: 1fr;
	}

	.tg-inventory-stat-wide {
		grid-column: span 1;
	}

	.tg-picker-row,
	.tg-inline-form {
		grid-template-columns: 1fr;
	}

	.tg-scan-row,
	.tg-batch-row {
		grid-template-columns: 1fr;
	}

	.tg-last-updated {
		white-space: normal;
	}
}

@media (max-width: 430px) {
	.tg-panel-nav {
		grid-template-columns: 1fr;
	}

	.tg-login-card,
	.tg-panel-shell {
		width: calc(100% - 20px);
	}
}
