/* ==========================================================================
   1. Reset
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
	vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
	display: block;
}

body {
	line-height: 1;
}

ol,
ul {
	list-style: none;
}

blockquote,
q {
	quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
	content: "";
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}

img {
	border-style: none;
	max-width: 100%;
	height: auto;
}

button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
	outline: none;
	box-shadow: none;
}

button,
input {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

textarea {
	overflow: auto;
}

/* ==========================================================================
   2. Base layout
   ========================================================================== */

body {
	margin: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: #f3f4f7;
	color: #111827;
}

a {
	color: inherit;
	text-decoration: none;
}

input,
textarea,
select {
	outline: none !important;
}

.page {
	margin: 0;
}

/* ==========================================================================
   3. Components & UI (Topbar, Cards, Forms, etc.)
   ========================================================================== */

/* --- Topbar --- */
.topbar {
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 40;
}

.topbar-inner {
	padding: 10px 1rem;
	display: flex;
	align-items: center;
	gap: 8px;
}

.logo {
	font-weight: 600;
	font-size: 18px;
	min-width: 144px;
}

/* Mobile Burger */
.topbar-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
}

.topbar-burger span {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background-color: #111827;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.topbar-burger span+span {
	margin-top: 4px;
}

.topbar-burger--active span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.topbar-burger--active span:nth-child(2) {
	opacity: 0;
}

.topbar-burger--active span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* Navigation Drawer */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 280px;
	padding: 1rem;
	background: #ffffff;
	transform: translateX(-100%);
	transition: transform 0.25s ease-out;
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 60;
}

.nav--open {
	transform: translateX(0);
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
}

.nav-link {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	border-radius: 999px;
	font-size: 14px;
	color: #111827;
}

.nav-logout-form {
	display: flex;
}

.nav-link--button {
	background: transparent;
	border: none;
	cursor: pointer;
}

.nav-link--active {
	background: #2563eb;
	color: #ffffff;
}

.topbar-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease-out;
	z-index: 55;
}

.topbar-nav-overlay--visible {
	opacity: 1;
	pointer-events: auto;
}

body.nav-open {
	overflow: hidden;
}

/* Global Search */
.topbar-search {
	position: relative;
	flex: 1;
	min-width: 0;
	margin-left: auto;
}

.topbar-search-input {
	width: 100%;
	padding: 8px 10px;
	padding-right: 30px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	font-size: 14px;
	min-height: 36px;
	background-color: #ffffff;
}

.topbar-search-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.topbar-search--loading::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border-radius: 999px;
	border: 2px solid rgba(148, 163, 184, 0.9);
	border-top-color: #2563eb;
	animation: topbar-spinner 0.6s linear infinite;
	pointer-events: none;
}

@keyframes topbar-spinner {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.topbar-search-results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
	max-height: 360px;
	overflow-y: auto;
	display: none;
	z-index: 70;
}

.topbar-search-results--visible {
	display: block;
}

.topbar-search-item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 14px;
	font-size: 14px;
	cursor: pointer;
	border: none;
	background-color: transparent;
}

.topbar-search-item:hover {
	background-color: #f9fafb;
}

.topbar-search-item-title {
	font-weight: 600;
	margin-bottom: 2px;
}

.topbar-search-item-subtitle {
	font-size: 13px;
	color: #6b7280;
}

.topbar-search-empty {
	padding: 10px 14px;
	font-size: 13px;
	color: #6b7280;
}

/* --- Cards, Forms, Buttons, Tables --- */
.page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.page-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0;
}

.page-header-actions,
.page-header-controls {
	display: flex;
	gap: 8px;
}

.card {
	display: flex;
	flex-direction: column;
}

.card-header {
	padding: 1rem;
	border-bottom: 1px solid #f1f5f9;
}

.card-title {
	font-weight: 600;
}

.card-title-accent {
	font-weight: 600;
	color: #2563eb;
}

.card-subtitle {
	margin-top: 8px;
	font-size: 14px;
	color: #6b7280;
}

.card-subheader {
	padding: 12px 20px 0;
	font-weight: 600;
}

/* Forms */
.form-grid:not(.form-grid--login) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px 16px;
}

.form-grid-login {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

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

.form-field-actions {
	display: flex;
	align-items: flex-end;
}

.field-label {
	display: block;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 4px;
}

.input {
	width: 100%;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	font-size: 14px;
	min-height: 36px;
	outline: none;
	background-color: #ffffff;
}

.input:not(select):focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.select-search {
	position: relative;
}

.select-search__control {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	background-color: #ffffff;
}

.select-search__value {
	flex: 1 1 auto;
	text-align: left;
}

.select-search__chevron {
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #6b7280;
}

.select-search__menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
	padding: 10px;
	display: none;
	z-index: 90;
}

.select-search__search {
	margin-bottom: 8px;
}

.select-search__options {
	max-height: 220px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.select-search__option {
	border: none;
	background: transparent;
	text-align: left;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
}

.select-search__option:hover {
	background: #f3f4f6;
}

.select-search__option--selected {
	background: #e0edff;
	color: #2563eb;
}

.select-search--open .select-search__menu {
	display: block;
}

.select-search--open .select-search__control {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: none;
	padding: 0 1rem 2px 1rem;
	font-size: 14px;
	cursor: pointer;
	min-height: 36px;
	background: #e5e7eb;
	color: #111827;
	transition: all 0.2s linear;
}

.btn:hover {
	background: #dcdde1;
}

.btn-primary {
	background: #2563eb;
	color: #ffffff;
}

.btn-primary:hover {
	background: #3972ed;
}

.btn-secondary {
	background: #eef2ff;
	color: #3730a3;
}

.btn-danger {
	background: #ef4444;
	color: #ffffff;
}

.btn-outline-danger {
	background: transparent;
	border: 1px solid #ef4444;
	color: #ef4444;
}

.btn-outline-danger:hover {
	background: #ef4444;
	border-color: #ef4444;
	color: #ffffff;
}

.btn-icon {
	display: inline-flex;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	outline: none;
	box-shadow: none;
	cursor: pointer;
	min-height: unset;
}

.btn-edit {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 511.98' fill='%232563eb'%3E%3Cpath d='M405.33,255.98c-11.8,0-21.33,9.56-21.33,21.33v170.67c0,11.75-9.56,21.33-21.33,21.33H64c-11.78,0-21.33-9.58-21.33-21.33V149.31c0-11.75,9.56-21.33,21.33-21.33h170.67c11.8,0,21.33-9.56,21.33-21.33s-9.54-21.34-21.33-21.34H64C28.72,85.31,0,114.03,0,149.31v298.67c0,35.29,28.72,64,64,64h298.67c35.29,0,64-28.71,64-64v-170.67c0-11.8-9.54-21.33-21.34-21.33Z'/%3E%3Cpath d='M200.02,236.55c-1.48,1.49-2.5,3.38-2.92,5.44l-15.08,75.44c-.7,3.5.41,7.1,2.92,9.64,2.01,2,4.72,3.12,7.55,3.11.68,0,1.39-.06,2.09-.21l75.41-15.08c2.09-.43,3.99-1.43,5.46-2.92l168.79-168.79-75.42-75.41-168.81,168.79ZM496.38,15.6c-20.8-20.8-54.63-20.8-75.41,0l-29.52,29.52,75.41,75.41,29.52-29.53c10.07-10.05,15.62-23.45,15.62-37.7s-5.55-27.65-15.62-37.71Z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 16px;
	background-position: center center;
	background-color: transparent;
}

.btn-remove {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 512' fill='%23d12923'%3E%3Cpath d='M385,60h-85v-25c0-19.3-15.7-35-35-35h-100c-19.3,0-35,15.7-35,35v25H45C20.15,60,0,80.15,0,105v12c0,8.28,6.72,15,15,15h400c8.28,0,15-6.72,15-15v-12c0-24.85-20.15-45-45-45ZM160,35c0-2.76,2.24-5,5-5h100c2.76,0,5,2.24,5,5v25h-110v-25ZM66.04,463.24c3.18,27.8,26.67,48.76,54.64,48.76h188.62c27.98,0,51.47-20.96,54.64-48.76l34.43-301.24H31.62l34.43,301.24ZM282.69,451.14l13.14-230c.47-8.27,7.56-14.59,15.83-14.12,8.27.47,14.59,7.56,14.12,15.83l-13.14,230c-.47,8.27-7.56,14.59-15.83,14.12-8.27-.47-14.59-7.56-14.12-15.83ZM200,222c0-8.28,6.72-15,15-15s15,6.72,15,15v230c0,8.28-6.72,15-15,15s-15-6.72-15-15v-230ZM118.33,207.02c8.27-.47,15.36,5.85,15.83,14.12l13.14,230c.47,8.27-5.85,15.36-14.12,15.83-8.27.47-15.36-5.85-15.83-14.12l-13.14-230c-.47-8.27,5.85-15.36,14.12-15.83h0Z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 14px;
	background-position: center center;
	background-color: transparent;
}

/* Tables */
.table-wrapper {
	width: 100%;
	overflow-x: auto;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th,
.table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	vertical-align: middle;
}

.table th {
	font-weight: 500;
	font-size: 13px;
	color: #6b7280;
	background: #f9fafb;
}

.table-sort {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	color: inherit;
	text-decoration: none;
}

.table-sort:hover {
	color: #111827;
}

.table-sort-indicator {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid transparent;
	border-bottom: 5px solid #9ca3af;
	opacity: 1;
}

.table-sort-indicator--asc {
	border-bottom-color: #9ca3af;
	border-top-color: transparent;
}

.table-sort-indicator--desc {
	border-top-color: #9ca3af;
	border-bottom-color: transparent;
}

.table-sort--active .table-sort-indicator--asc {
	border-bottom-color: #9ca3af;
	border-top-color: transparent;
}

.table-sort--active .table-sort-indicator--desc {
	border-top-color: #9ca3af;
	border-bottom-color: transparent;
}

.table-sort--active span {
	font-weight: 600;
	color: #2563eb;
}

/* Badges */
.badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 14px 4px 14px;
	border-radius: 999px;
	font-size: 12px;
	background: #e0edff;
	color: #2563eb;
	white-space: nowrap;
}

.badge--status-new {
	background: #e0edff;
	color: #2563eb;
}

.badge--status-in_transit {
	background: #fef3c7;
	color: #92400e;
}

.badge--status-partial {
	background: #fde68a;
	color: #92400e;
}

.badge--status-delivered {
	background: #dcfce7;
	color: #166534;
}

.badge--status-sold {
	background: #f3f4f6;
	color: #4b5563;
}

.badge--stock-ok {
	background: #dcfce7;
	color: #166534;
}

.badge--stock-low {
	background: #fef3c7;
	color: #92400e;
}

.badge--stock-out {
	background: #fee2e2;
	color: #b91c1c;
}

.inline-form {
	display: inline-block;
	margin: 0;
}

.field-error {
	padding: 8px 10px;
	border-radius: 8px;
	background: #fee2e2;
	color: #b91c1c;
	font-size: 13px;
}

/* Specific Component Styles (Dashboard, Dicts, Orders, Modals) - kept as is for brevity but assumed present */
.filter-card {
	padding: 12px 20px 16px;
}

.filter-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	flex-wrap: wrap;
}

.filter-field {
	min-width: 220px;
}

.filter-actions {
	display: flex;
	gap: 8px;
}

.dashboard-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.category-summary {
	font-size: 13px;
}

.category-summary-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.category-summary-table th,
.category-summary-table td {
	padding: 4px 8px;
	border-bottom: 1px solid #f3f4f6;
}

.category-summary-table th {
	background: #f9fafb;
	font-weight: 500;
	color: #6b7280;
}

.category-summary-row {
	background-color: #efefef;
}

.category-summary-items-row td {
	border-bottom: none;
	padding-top: 4px;
	padding-bottom: 8px;
}

.category-summary-items-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.category-summary-item {
	display: flex;
	padding: 0.125rem 1rem;
}

.category-summary-item-name {
	flex: 0 0 auto;
	margin-right: 8px;
}

.category-summary-item-qty {
	flex: 0 0 auto;
}

.dicts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.dict-form {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.dict-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dict-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	background: #f9fafb;
	border-radius: 8px;
}

.dict-label {
	font-size: 14px;
}

.dict-item-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.dict-edit-form {
	flex: 1 1 auto;
	min-width: 0;
}

.dict-edit-input {
	min-width: 0;
}

.dict-drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	color: #6b7280;
	cursor: grab;
	user-select: none;
}

.dict-drag-handle:active {
	cursor: grabbing;
}

.dict-item--dragging {
	opacity: 0.6;
}

.dict-item-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.orders-footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.orders-per-page-form {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: #6b7280;
}

.orders-per-page-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.orders-per-page-select {
	width: auto;
	min-width: 80px;
	padding-left: 10px;
	padding-right: 26px;
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pagination-link {
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: #4b5563;
	text-decoration: none;
}

.pagination-link:hover {
	border-color: #2563eb;
}

.pagination-link--active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

.settings-card-section {
	margin-bottom: 20px;
}

.settings-grid {
	display: grid;
	gap: 12px 16px;
}

.settings-grid--credentials {
	grid-template-columns: 1fr;
}

.settings-grid--security {
	grid-template-columns: 1fr;
}

.settings-log-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.settings-log-actions .input {
	max-width: 120px;
}

.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 80;
}

.modal--open {
	display: flex;
}

.modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.4);
}

.modal__dialog {
	position: relative;
	max-width: 1024px;
	width: 100%;
	max-height: 90vh;
	margin: 0 1rem;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 25px 50px rgba(15, 23, 42, 0.35);
	overflow: auto;
}

.modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	border: none;
	background: #f3f4f6;
	cursor: pointer;
	font-size: 20px;
	padding: 0;
	transition: all 0.2s linear;
}

.modal__close span {
	display: inline-flex;
	line-height: 1;
	position: relative;
	top: -1px;
}

.modal__close:hover {
	background-color: #2563eb;
	color: #ffffff;
}

.modal__content {
	padding: 1.25rem 1.5rem 1.5rem;
}

.modal__dialog .page-header {
	margin-top: 0;
}

.modal__dialog .page-title {
	font-size: 20px;
}

.footer {
	border-top: 1px solid #e5e7eb;
	margin-top: 24px;
}

.footer-inner {
	padding: 1rem 2rem;
	font-size: 12px;
	color: #9ca3af;
	text-align: center;
}

@media only screen and (min-width:600px) {
	.form-grid:not(.form-grid--login) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.topbar-inner {
		padding: 10px 2rem;
		justify-content: space-between;
	}

	.topbar-burger {
		display: none;
	}

	.nav {
		position: static;
		width: auto;
		height: auto;
		padding: 0;
		box-shadow: none;
		transform: none;
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 16px;
		background: transparent;
	}

	.topbar-nav-overlay {
		display: none !important;
	}

	.nav-link {
		padding: 6px 10px;
		color: #4b5563;
	}

	.nav-link--active {
		background: #2563eb;
		color: #ffffff;
	}

	.topbar-search {
		max-width: 100%;
		margin: 0 24px;
	}

	.dashboard-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.form-grid:not(.form-grid--login) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.dicts-grid {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}

	.settings-grid--credentials {
		grid-template-columns: repeat(5, minmax(140px, 1fr));
	}

	.settings-grid--security {
		grid-template-columns: repeat(4, minmax(140px, 1fr));
	}

	.orders-footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* Expandable rows */
.btn-expand {
	width: 24px;
	height: 24px;
	border: 1px solid #d1d5db;
	background: #fff;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	line-height: 0;
	color: #6b7280;
	transition: all 0.2s;
	padding: 0;
}

.btn-expand:hover {
	border-color: #2563eb;
	color: #2563eb;
}

.btn-expand.open {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.btn-expand span {
	position: relative;
	top: -1px;
}

.nested-row-content {
	background-color: #f8fafc;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nested-table {
	width: 100%;
	font-size: 13px;
}

.nested-table th {
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.05em;
	color: #94a3b8;
	padding-bottom: 8px;
	border-bottom: 1px solid #e2e8f0;
}

.nested-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #f1f5f9;
	color: #475569;
}

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

.warehouse-details {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.warehouse-details-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.warehouse-move-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 8px;
}

.warehouse-details-section .text-muted {
	margin-top: 6px;
}

.status-select-sm {
	padding: 4px 8px;
	font-size: 12px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background-color: #fff;
	outline: none;
	cursor: pointer;
}

.status-select-sm:focus {
	border-color: #2563eb;
}

/* =========================================
   1. Orders Mobile Panels
========================================= */

.orders-mobile-bar {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	display: flex;
	gap: 12px;
	padding: 6px;
	background: #ffffff;
	border-radius: 999px;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
	z-index: 50;
}

.orders-mobile-btn {
	min-width: 110px;
}

.orders-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.35);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 40;
}

.orders-mobile-overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.orders-panel {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.orders-panel-header {
	padding: 12px 16px;
}

.orders-panel-close {
	width: 32px;
	height: 32px;
}

.orders-panel-body {
	padding: 14px 16px;
}

body.orders-panel-open {
	overflow: hidden;
}

@media (min-width: 1025px) {

	.orders-mobile-bar,
	.orders-mobile-overlay,
	.orders-panel-close {
		display: none;
	}

	.orders-panel {
		background: transparent;
		box-shadow: none;
		border-radius: 0;
	}

	.orders-panel-header {
		display: none;
	}

	.orders-panel-body {
		padding: 0;
	}
}

@media (max-width: 1024px) {
	.orders-panel {
		display: none;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		margin: 0;
		border-radius: 18px 18px 0 0;
		z-index: 60;
	}

	.orders-panel.is-open {
		display: block;
	}

	.orders-panel-body {
		max-height: 70vh;
		overflow-y: auto;
	}

	.page-header-controls {
		flex-wrap: wrap;
	}
}

/* =========================================
   2. Orders Copy
========================================= */

.tracking-cell {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.btn-copy {
	position: relative;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M8 3h9a2 2 0 0 1 2 2v9h-2V5H8V3Zm-3 4h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm0 2v9h9V9H5Z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 14px;
	background-position: center center;
	background-color: transparent;
}

.copy-tooltip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	padding: 6px 12px;
	border-radius: 10px;
	background: #111827;
	color: #ffffff;
	font-size: 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
	opacity: 0;
	transform: translate(-50%, 6px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
	white-space: nowrap;
	z-index: 60;
}

.copy-tooltip.is-success::before {
	content: "\2713";
	display: inline-block;
	margin-right: 6px;
	font-size: 10px;
	line-height: 1;
	font-weight: 600;
}

.copy-tooltip::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	border-width: 6px 6px 0 6px;
	border-style: solid;
	border-color: #111827 transparent transparent transparent;
}

.btn-copy:hover .copy-tooltip,
.copy-tooltip.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* =========================================
   3. Warehouse Sales
========================================= */

.warehouse-sell {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.warehouse-sell-input {
	width: 40px;
	min-width: 40px;
	padding: 4px 6px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	font-size: 12px;
	min-height: 28px;
}

.warehouse-sell-input:disabled {
	background: #f3f4f6;
	color: #9ca3af;
}

.warehouse-sell-btn {
	min-height: 28px;
	padding: 0 10px 1px 10px;
	font-size: 12px;
}

.warehouse-sell-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* =========================================
   4. Warehouse Drag
========================================= */

.warehouse-drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	color: #6b7280;
	cursor: grab;
	font-size: 11px;
	line-height: 1;
	padding: 0;
}

.warehouse-drag-handle:active {
	cursor: grabbing;
}

.warehouse-card--dragging {
	opacity: 0.65;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

/* =========================================
   5. Stats
========================================= */

.stats-table {
	table-layout: fixed;
}

.stats-table td {
	word-break: break-word;
}

col.stats-col-qty {
	width: 110px;
}

col.stats-col-date {
	width: 140px;
}

.stats-details-toggle {
	min-height: 32px;
}

/* =========================================
   6. Procurement Drag
========================================= */

.procurement-drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	color: #6b7280;
	cursor: grab;
	font-size: 11px;
	line-height: 1;
	padding: 0;
}

.procurement-drag-handle:active {
	cursor: grabbing;
}

.procurement-card--dragging {
	opacity: 0.65;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}






