:root{--ink:#182321;--muted:#68716d;--paper:#f8f8f3;--line:#c9ceca;--accent:#b48329;--alert:#8d3030}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(120deg,#eef0ea,#faf9f5 55%,#e7ece7);color:var(--ink);font-family:Georgia,'Times New Roman',serif}
.topbar{height:64px;background:#17201d;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100% - 1160px)/2));font-family:Arial,sans-serif}
.brand{font-size:18px;color:#fff;text-decoration:none}
.brand strong{color:#e2b351}
.topbar nav{display:flex;gap:20px}
.topbar nav a{color:#e6e9e7;font-size:14px;text-decoration:none}
.page{max-width:1160px;margin:0 auto;padding:44px 24px 70px}
.heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:28px}
.eyebrow{font:700 11px Arial,sans-serif;letter-spacing:1.6px;color:var(--accent);margin:0 0 8px}
h1{font-size:36px;margin:0;font-weight:600}
h2{font-size:18px;margin:0 0 20px}
a{color:#2d5b53}
button,.button{display:inline-flex;align-items:center;justify-content:center;background:var(--ink);border:0;border-radius:3px;color:#fff;cursor:pointer;font:600 14px Arial,sans-serif;padding:12px 18px;text-decoration:none}
button:hover,.button:hover{background:#344b45}
.table-wrap,.panel,.login{background:#fff;border:1px solid var(--line);box-shadow:0 10px 24px rgba(21,35,31,.06)}
table{width:100%;border-collapse:collapse;font-family:Arial,sans-serif;font-size:14px}
th{text-align:left;color:var(--muted);font-size:11px;letter-spacing:.6px}
th,td{padding:15px;border-bottom:1px solid #e7e9e7}
.empty{text-align:center;color:var(--muted)}
.status{font-size:11px;text-transform:uppercase;font-weight:bold}
.status.new{color:#9a6816}
.status.in_progress{color:#285e79}
.status.completed{color:#34744b}
.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;background:#fff;border:1px solid var(--line);padding:28px}
label{display:grid;gap:7px;font:700 12px Arial,sans-serif;color:#4a5550}
input,select,textarea{width:100%;border:1px solid #b7beba;border-radius:2px;padding:10px;font:15px Arial,sans-serif;background:#fff;color:var(--ink)}
fieldset{grid-column:span 3;border:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);gap:14px;padding:16px}
legend{font:700 12px Arial,sans-serif;padding:0 6px}
.wide{grid-column:span 3}
.flash{padding:14px 16px;margin-bottom:22px;border-left:4px solid}
.flash.success{background:#e8f1e8;border-color:#477753}
.flash.error{background:#f8e9e8;border-color:var(--alert)}
.flash code{display:block;overflow-wrap:anywhere;margin-top:10px}
.login{max-width:420px;margin:80px auto;padding:34px}
.login form,.panel{display:grid;gap:16px}
.admin-grid{display:grid;grid-template-columns:330px 1fr;gap:22px}
.panel{padding:24px}
.order-card{background:#fff;border:1px solid #151515;max-width:860px;margin:auto}
.order-card section{border-bottom:1px solid #151515;padding:26px 30px}
.order-card span{display:block;font:13px Arial,sans-serif;margin-bottom:8px}
.order-card strong{font:700 25px Arial,sans-serif}
.order-top,.three,.weights,.stone{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.order-top{background:#fcfcfa}
.three,.weights{grid-template-columns:repeat(3,1fr);text-align:center}
.specs>div:not(:last-child),.weights>div:not(:last-child),.stone>div:not(:last-child),.order-top>div:not(:last-child){border-right:1px solid #777}
.stones h2{font:700 13px Arial,sans-serif;margin-bottom:15px}
.stone{grid-template-columns:2fr 1fr 1fr 1fr;border-top:1px solid #ddd;padding:14px 0}
.stone strong{font-size:19px}
.model-preview{text-align:center}
.model-preview img{max-width:360px;max-height:260px}
.notes p{min-height:48px;margin:0;font:15px Arial,sans-serif}
@media(max-width:720px){.topbar{height:auto;padding:16px;align-items:start;gap:12px;flex-direction:column}
.topbar nav{gap:12px;flex-wrap:wrap}
.form-grid,.admin-grid{grid-template-columns:1fr}
.form-grid fieldset,.wide{grid-column:span 1}
.form-grid fieldset{grid-template-columns:1fr}
.three,.weights{grid-template-columns:1fr}
.specs>div:not(:last-child),.weights>div:not(:last-child){border-right:0;border-bottom:1px solid #ddd;padding-bottom:14px}
.order-card section{padding:20px}
.order-top,.stone{grid-template-columns:1fr}
.order-top>div:not(:last-child),.stone>div:not(:last-child){border-right:0;border-bottom:1px solid #ddd;padding-bottom:12px}
.heading{align-items:start;gap:16px;flex-direction:column}
}
@media print{.topbar,.print-hide{display:none}
.page{padding:0}
.order-card{border:1px solid #000;box-shadow:none}
}

:root {
	--bg: #f4f6f8;
	--surface: #ffffff;
	--surface-muted: #f8fafc;
	--text: #172033;
	--text-muted: #667085;
	--border: #dfe4ea;
	--primary: #155e75;
	--primary-hover: #104e63;
	--success: #26724f;
	--warning: #9b6516;
	--danger: #aa3e3b;
	--info: #155e75;
	--shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 8px 24px rgba(23, 32, 51, .06);
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: "Segoe UI", "Helvetica Neue", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	overflow-x: hidden;
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

.app-shell { min-height: 100vh; }
.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	height: 64px;
	padding: 0 32px;
	background: #14231e;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.brand { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.brand strong { color: #cba24c; }
.topbar nav { align-items: center; gap: 4px; }
.topbar nav a {
	border-radius: 4px;
	color: #d7e2dd;
	padding: 8px 10px;
	transition: background-color .15s ease, color .15s ease;
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar nav .logout-link { margin-left: 8px; color: #b9c8c1; }
.page { max-width: 1360px; padding: 32px; }
.page--narrow { max-width: 900px; }
.page-header, .heading { align-items: center; gap: 20px; margin-bottom: 24px; }
.heading > div:first-child { min-width: 0; }
.eyebrow { color: var(--primary); font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin-bottom: 4px; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: 0; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: 0; }
h3 { font-size: 15px; font-weight: 650; }

button, .button {
	min-height: 38px;
	border-radius: 4px;
	background: var(--primary);
	font-family: inherit;
	font-size: 14px;
	font-weight: 650;
	padding: 8px 14px;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .button:hover { background: var(--primary-hover); color: #fff; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(31, 107, 87, .28); outline-offset: 2px; }
button:disabled, .button:disabled { cursor: wait; opacity: .68; }
.button--secondary, .button--ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.button--secondary:hover, .button--ghost:hover { background: var(--surface-muted); border-color: #b7c4be; color: var(--text); }

.table-wrap, .panel, .login, .order-card {
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: var(--shadow);
}
.table-wrap { overflow: hidden; }
table { font-family: inherit; font-size: 14px; }
th { background: var(--surface-muted); color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
th, td { border-color: #e7ece9; padding: 13px 16px; vertical-align: middle; }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: #f8fbf9; }
td a { color: var(--text); font-weight: 650; text-decoration: none; }
td a:hover { color: var(--primary); text-decoration: underline; }
.empty { color: var(--text-muted); padding: 36px 16px; }

.status { display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; font-weight: 650; letter-spacing: 0; padding: 3px 8px; text-transform: none; white-space: nowrap; }
.status.new { background: #fff4dc; color: #815510; }
.status.in_progress { background: #e7f2f6; color: #1c5c76; }
.status.completed { background: #e8f5ed; color: #246947; }
.status.cancelled, .status.error { background: #fbeaea; color: #963a37; }

.form-grid { gap: 20px; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 28px; }
label { color: #35463f; font-family: inherit; font-size: 13px; font-weight: 650; gap: 6px; }
input, select, textarea { border-color: #c7d1cc; border-radius: 4px; color: var(--text); font-family: inherit; font-size: 14px; min-height: 40px; padding: 9px 10px; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8a9691; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 107, 87, .12); outline: 0; }
input:disabled, select:disabled, textarea:disabled { background: #eef2ef; color: var(--text-muted); }
fieldset { border-color: var(--border); border-radius: 4px; padding: 18px; }
legend { color: var(--text); font-family: inherit; font-size: 13px; font-weight: 650; }
.flash { border: 1px solid; border-left-width: 4px; border-radius: 4px; font-size: 14px; margin-bottom: 20px; padding: 12px 14px; }
.flash.success { background: #edf8f1; border-color: #7ab991; color: #1e573b; }
.flash.error { background: #fff0ef; border-color: #d9908d; color: #7e302d; }

.panel { padding: 24px; }
.panel h2 { margin-bottom: 4px; }
.admin-grid { align-items: start; gap: 24px; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
.login { background: var(--surface); margin: 72px auto; padding: 32px; }
.login form { gap: 16px; }
.login button { margin-top: 4px; width: 100%; }

.order-card { border-color: var(--border); max-width: 1000px; }
.order-card section { border-color: var(--border); padding: 22px 26px; }
.order-card span { color: var(--text-muted); font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.order-card strong { color: var(--text); font-family: inherit; font-size: 20px; font-weight: 650; }
.order-top { background: var(--surface-muted); }
.specs > div:not(:last-child), .weights > div:not(:last-child), .stone > div:not(:last-child), .order-top > div:not(:last-child) { border-color: var(--border); }
.stones h2 { font-family: inherit; font-size: 16px; }
.stone { border-color: var(--border); }
.stone strong { font-size: 16px; }
.notes p { color: var(--text); font-family: inherit; font-size: 14px; }
.model-preview img { border: 1px solid var(--border); border-radius: 4px; max-width: min(100%, 420px); }

@media (max-width: 768px) {
	.topbar { align-items: center; height: auto; padding: 12px 16px; }
	.topbar nav { gap: 2px; }
	.topbar nav a { padding: 7px 8px; }
	.topbar nav .logout-link { margin-left: 0; }
	.page { padding: 24px 16px 48px; }
	.page-header, .heading { align-items: flex-start; }
	.form-grid { padding: 20px; }
	th, td { padding: 12px; }
	.table-wrap { overflow-x: auto; }
}

@media (max-width: 520px) {
	.topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
	.topbar nav { width: 100%; }
	.topbar nav a { font-size: 13px; }
	.heading { align-items: stretch; }
	.heading .button { width: 100%; }
	.form-grid { padding: 16px; }
	.login { margin: 32px auto; padding: 24px; }
}

.page-description { color: var(--text-muted); font-size: 14px; margin: 6px 0 0; }
.list-summary { color: var(--text-muted); font-size: 13px; margin: 0 0 10px; }
.list-summary strong { color: var(--text); }
.form-section-title { border-bottom: 1px solid var(--border); font-size: 15px; margin: 4px 0 -4px; padding-bottom: 10px; }
.form-hint { color: var(--text-muted); font-size: 13px; margin: -8px 0 4px; }
.form-actions, .header-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.empty-section { color: var(--text-muted); margin: 0; }
.stone-section-header { align-items: flex-end; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 14px; }
.stone-section-header .form-section-title { margin: 4px 0 0; }
.stone-section-header .form-hint { margin: 6px 0 0; }
.stone-list { display: grid; gap: 12px; }
.stone-fields { background: var(--surface-muted); display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px; position: relative; }
.stone-fields legend { padding-right: 62px; }
.stone-remove { background: transparent; border: 0; color: var(--danger); font-size: 12px; min-height: auto; padding: 2px 0; position: absolute; right: 18px; top: 10px; }
.stone-remove:hover { background: transparent; color: #7e302d; text-decoration: underline; }
.page--profile { max-width: 1120px; }
.profile-stack { display: grid; gap: 16px; }
.profile-panel { padding: 24px; }
.profile-panel-heading { border-bottom: 1px solid var(--border); margin-bottom: 20px; padding-bottom: 14px; }
.profile-panel-heading h2 { margin: 0; }
.profile-panel-heading p { color: var(--text-muted); font-size: 13px; margin: 5px 0 0; }
.profile-form { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-form small { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.profile-actions { grid-column: 1 / -1; }
.admin-tabs { border-bottom: 1px solid var(--border); display: flex; gap: 4px; margin: 0 0 20px; }
.admin-tabs a { border-bottom: 2px solid transparent; color: var(--text-muted); font-size: 14px; font-weight: 650; padding: 10px 14px; text-decoration: none; }
.admin-tabs a:hover { color: var(--primary); }
.admin-tabs a[aria-current="page"] { border-color: var(--primary); color: var(--primary); }
.admin-users-list { margin-bottom: 16px; }
.table-section-header { border-bottom: 1px solid var(--border); padding: 20px 20px 16px; }
.table-section-header h2 { margin: 0; }
.table-section-header p { color: var(--text-muted); font-size: 13px; margin: 5px 0 0; }
.user-name, .user-email { display: block; }
.user-name { color: var(--text); font-size: 14px; }
.user-email { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.account-role { background: #eaf2ff; border-radius: 999px; color: #235daf; display: inline-flex; font-size: 12px; font-weight: 650; padding: 3px 8px; white-space: nowrap; }
.account-role--superadmin { background: #f1eaff; color: #663cac; }
.account-role--administrator { background: #eaf2ff; color: #235daf; }
.account-role--pracownik { background: #eef3f5; color: #405667; }
.user-create-form small { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.user-create-form { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-backdrop { align-items: center; background: rgba(23, 32, 51, .52); display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 50; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 18px 48px rgba(23, 32, 51, .24); max-width: 620px; padding: 24px; width: 100%; }
.modal--compact { max-width: 500px; }
.modal-header { margin-bottom: 20px; }
.modal-header h2 { margin: 0; }
.modal-header p { color: var(--text-muted); font-size: 13px; margin: 5px 0 0; }
.modal-actions { display: flex; gap: 10px; grid-column: 1 / -1; }
.modal-form { display: grid; gap: 20px; }
.dymo-preview-modal { max-width: 430px; }
.dymo-preview-image { background: #fff; border: 1px solid var(--border); display: block; margin: 0 auto 20px; max-height: 70vh; max-width: 100%; }
.dymo-settings-grid { align-items: start; display: grid; gap: 20px; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); }
.dymo-settings-form { display: grid; gap: 18px; }
.dymo-test-panel { display: grid; gap: 18px; }
.checkbox-field { align-items: center; display: flex; font-size: 14px; font-weight: 500; }
.checkbox-field input { flex: 0 0 auto; min-height: auto; width: auto; }
.dymo-test-result { background: var(--surface-muted); border-left: 3px solid var(--border); color: var(--text-muted); font-size: 13px; margin: 0; padding: 10px 12px; }
.dymo-test-result.is-success { border-color: var(--success); color: #1e573b; }
.dymo-test-result.is-error { border-color: var(--danger); color: #7e302d; }

@media (max-width: 520px) {
	.orders-table .optional-column { display: none; }
	.header-actions { width: 100%; }
	.header-actions > * { flex: 1; }
	.form-actions > * { flex: 1; }
}

.app-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
	background: #0d3040;
	color: #d7e7ed;
	display: flex;
	flex-direction: column;
	gap: 28px;
	height: 100vh;
	padding: 24px 16px 18px;
	position: sticky;
	top: 0;
}
.sidebar .brand { display: grid; gap: 2px; padding: 2px 10px 8px; text-decoration: none; }
.sidebar .brand-company { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.sidebar .brand strong { color: #9ed4e2; font-size: 13px; font-weight: 700; line-height: 1.2; }
.sidebar .brand-subtitle { color: #8fb4c0; font-size: 10px; font-weight: 600; letter-spacing: .06em; margin-top: 4px; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 4px; }
.nav-section { color: #8fb4c0; font-size: 10px; font-weight: 700; letter-spacing: .08em; margin: 10px 12px 2px; text-transform: uppercase; }
.sidebar nav a {
	border-left: 3px solid transparent;
	border-radius: 4px;
	color: #cfdee4;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 12px;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a[aria-current="page"] { background: #1d657f; border-left-color: #8ed2e2; color: #fff; }
.sidebar-footer { border-top: 1px solid rgba(207, 232, 239, .16); display: grid; gap: 5px; margin-top: auto; padding: 14px 10px 0; }
.sidebar-footer span { color: #d7e7ed; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.sidebar .logout-link { color: #9fc2cd; font-size: 13px; text-decoration: none; }
.sidebar .logout-link:hover { color: #fff; text-decoration: underline; }
.app-layout .page { margin: 0 auto; width: 100%; }
.empty-state { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; margin-top: 16px; min-height: 300px; padding: 40px 24px; text-align: center; }
.empty-state-mark { background: #edf7f2; border: 1px solid #b9dbc8; border-radius: 4px; height: 34px; margin-bottom: 16px; position: relative; width: 34px; }
.empty-state-mark::after { background: var(--primary); content: ""; height: 2px; left: 9px; position: absolute; top: 15px; width: 14px; }
.empty-state-mark::before { background: var(--primary); content: ""; height: 14px; left: 15px; position: absolute; top: 9px; width: 2px; }
.empty-state h2 { font-size: 18px; margin: 0; }
.empty-state p { color: var(--text-muted); font-size: 14px; margin: 7px 0 20px; max-width: 420px; }

@media (max-width: 768px) {
	.app-layout { display: block; }
	.sidebar { gap: 10px; height: auto; padding: 14px 16px; position: static; }
	.sidebar .brand { display: flex; align-items: baseline; gap: 5px; padding: 0; }
	.sidebar .brand-company { font-size: 16px; }
	.sidebar .brand strong { font-size: 12px; }
	.sidebar .brand-subtitle { display: none; }
	.sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; }
	.nav-section { display: none; }
	.sidebar nav a { border-left: 0; padding: 7px 9px; }
	.sidebar nav a[aria-current="page"] { border-left: 0; }
	.sidebar-footer { align-items: center; border-top: 0; display: flex; gap: 10px; margin-top: 0; padding: 0; }
	.sidebar-footer span { display: none; }
	.stone-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.profile-form { grid-template-columns: 1fr; }
	.user-create-form { grid-template-columns: 1fr; }
	.dymo-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
	.stone-section-header { align-items: stretch; flex-direction: column; }
	.stone-section-header > button { width: 100%; }
	.stone-fields { grid-template-columns: 1fr; }
}

.page--label { max-width: 920px; }
.order-page-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 26px; }
.order-page-heading__eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; margin: 0 0 5px; text-transform: uppercase; }
.order-page-heading h1 { font-size: 27px; margin: 0; }
.order-page-heading p:not(.order-page-heading__eyebrow) { color: var(--text-muted); font-size: 13px; margin: 7px 0 0; }
.order-tabs { border-bottom: 1px solid var(--border); display: flex; gap: 4px; margin-bottom: 20px; }
.order-tabs button, .order-tabs a { align-items: center; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--text-muted); display: inline-flex; font-size: 14px; min-height: 42px; padding: 9px 12px; text-decoration: none; }
.order-tabs button:hover, .order-tabs a:hover { background: transparent; color: var(--primary); }
.order-tabs button.is-active, .order-tabs a.is-active { border-bottom-color: var(--primary); color: var(--primary); }
.order-information, .order-history { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.order-information { overflow: hidden; }
.order-information h2, .order-history h2 { font-size: 16px; margin: 0; padding: 22px 20px 18px; }
.order-information__status { align-items: center; border-bottom: 1px solid var(--border); display: flex; gap: 12px; padding: 0 20px 18px; }
.order-information__status > span { color: var(--text-muted); font-size: 12px; }
.order-information .status { justify-self: start; }
.order-information .order-card { border: 0; border-radius: 0; box-shadow: none; margin: 0; max-width: none; }
.order-information .order-card section { padding: 20px 22px; }
.order-information .order-top { background: #fbfcfd; }
.order-information .model-preview { background: #fbfcfd; }
.order-information .model-preview img { background: #fff; max-height: 240px; padding: 10px; }
.order-history { padding-bottom: 12px; }
.order-history__list { list-style: none; margin: 0; padding: 0 20px; }
.order-history__list li { display: grid; gap: 14px; grid-template-columns: 14px 1fr; min-height: 74px; position: relative; }
.order-history__list li:not(:last-child)::after { background: var(--border); bottom: 0; content: ""; left: 6px; position: absolute; top: 14px; width: 1px; }
.order-history__marker { background: var(--primary); border: 3px solid #e1f0ed; border-radius: 50%; height: 14px; margin-top: 3px; position: relative; width: 14px; z-index: 1; }
.order-history__list time { color: var(--text-muted); display: block; font-size: 12px; margin: 0 0 5px; }
.order-history__list strong { color: var(--text); display: block; font-size: 14px; }
.order-history__list p { color: var(--text-muted); font-size: 13px; margin: 5px 0 0; }
.print-order { background: #fff; border: 1px solid #171717; border-radius: 7px; color: #111; font-family: Arial, sans-serif; margin: 0 auto; overflow: hidden; }
.print-order section, .print-order__header { border-bottom: 1px solid #171717; }
.print-order span { display: block; font-size: 14px; font-weight: 400; text-transform: uppercase; }
.print-order strong { display: block; font-size: 28px; font-weight: 700; line-height: 1.15; margin-top: 16px; overflow-wrap: anywhere; }
.print-order__header { display: grid; grid-template-columns: 190px 1fr 1fr; min-height: 190px; }
.print-order__qr { align-self: center; height: 150px; justify-self: center; width: 150px; }
.print-order__header-value { align-self: center; min-width: 0; padding: 24px 28px; }
.print-order__header-value + .print-order__header-value { border-left: 1px solid #171717; }
.print-order__header-value strong { font-size: 38px; margin-top: 22px; }
.print-order__row { display: grid; padding: 28px 0; text-align: center; }
.print-order__row--three { grid-template-columns: repeat(3, 1fr); }
.print-order__row > div + div, .print-order__stone > div + div, .print-order__weights > div + div, .print-order__previews > div + div, .print-order__start > div + div { border-left: 1px solid #555; }
.print-order__stone { display: grid; grid-template-columns: 2.1fr 1.25fr 1.25fr .9fr; padding: 30px 0; }
.print-order__stone > div { min-width: 0; padding: 0 22px; }
.print-order__stone strong { font-size: 23px; margin-top: 20px; }
.print-order__stone-name { align-items: center; display: flex; gap: 18px; }
.print-order__gem, .print-order__gems { font-size: 45px !important; line-height: .65; text-align: center; }
.print-order__gems { font-size: 29px !important; line-height: .85; }
.print-order__start { display: grid; grid-template-columns: 1fr 1.35fr; padding: 28px 0; }
.print-order__start > div { min-height: 86px; padding: 0 54px; }
.print-order__start strong { font-size: 30px; }
.print-order__initials { border: 1px solid #171717; height: 54px; margin-top: 9px; }
.print-order__weights { display: grid; grid-template-columns: repeat(3, 1fr); padding: 24px 0 35px; text-align: center; }
.print-order__weights > div { padding: 0 28px; }
.print-order__weights strong { align-items: flex-end; border: 1px solid #171717; display: flex; font-size: 24px; height: 60px; justify-content: flex-end; margin: 14px 0 0; padding: 8px; text-align: right; }
.print-order__weights b { font-size: 25px; margin-left: 4px; }
.print-order__previews { display: grid; grid-template-columns: 1.35fr 1fr; text-align: center; }
.print-order__previews > div { min-height: 280px; padding: 20px; }
.print-order__model { align-items: center; display: flex; height: 225px; justify-content: center; margin-top: 8px; }
.print-order__model img { max-height: 100%; max-width: 100%; object-fit: contain; }
.print-order__model > span { color: #777; font-size: 13px; text-transform: none; }
.print-order__model-qr { height: 205px; margin-top: 18px; width: 205px; }
.print-order__notes { min-height: 110px; padding: 18px 26px; }
.print-order__notes p { font-size: 16px; margin: 12px 0 0; min-height: 45px; white-space: pre-wrap; }
.page--station { max-width: 980px; }
.production-station, .scan-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); margin: 40px auto; max-width: 760px; padding: 42px; text-align: center; }
.production-station h1, .scan-panel h1 { margin: 0; }
.production-actions { display: grid; gap: 12px; margin-top: 32px; }
.production-action { align-items: center; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 5px; color: var(--text); display: flex; justify-content: space-between; padding: 19px 20px; text-align: left; text-decoration: none; }
.production-action:hover { background: #edf7f5; border-color: #9cc2b5; color: var(--text); }
.production-action strong { font-size: 16px; }
.production-action span, .scan-panel > p:not(.eyebrow) { color: var(--text-muted); font-size: 14px; }
.scan-panel > p:not(.eyebrow) { margin: 10px auto 24px; max-width: 510px; }
.scan-form { display: grid; gap: 14px; margin: 0 auto 16px; max-width: 480px; text-align: left; }
.scan-form button, .scan-form .button { width: 100%; }

@media (max-width: 640px) {
	.order-page-heading { flex-direction: column; gap: 16px; }
	.order-page-heading .header-actions { width: 100%; }
	.order-page-heading .header-actions > * { flex: 1; }
	.order-tabs { overflow-x: auto; }
	.order-tabs button, .order-tabs a { flex: 0 0 auto; }
	.order-history__list { padding: 0 16px; }
	.print-order__header { grid-template-columns: 120px 1fr; }
	.print-order__qr { height: 95px; width: 95px; }
	.print-order__header-value { padding: 18px; }
	.print-order__header-value:last-child { border-left: 0; border-top: 1px solid #171717; grid-column: 1 / -1; }
	.print-order__header-value strong { font-size: 26px; }
	.print-order__row--three, .print-order__weights, .print-order__previews, .print-order__start { grid-template-columns: 1fr; }
	.print-order__row > div + div, .print-order__stone > div + div, .print-order__weights > div + div, .print-order__previews > div + div, .print-order__start > div + div { border-left: 0; border-top: 1px solid #555; margin-top: 18px; padding-top: 18px; }
	.print-order__stone { grid-template-columns: 1fr; gap: 18px; }
	.print-order__start > div, .print-order__weights > div { padding: 0 24px; }
}

@media print {
	@page { size: 51.5mm 93.9mm; margin: 0; }
	html, body { height: 93.9mm; width: 51.5mm; }
	body { background: #fff; }
	.sidebar, .print-hide { display: none !important; }
	.app-layout { display: block; }
	.page, .page--label { height: 93.9mm; max-width: none; overflow: hidden; padding: 0; width: 51.5mm; }
	.print-order { border-color: #000; border-radius: 0; box-shadow: none; height: 117.375mm; overflow: hidden; transform: scale(.8); transform-origin: top left; width: 64.375mm; }
	.print-order[hidden] { display: block !important; }
	.print-order span { font-size: 5px; }
	.print-order strong { font-size: 10px; margin-top: 3px; }
	.print-order__header { grid-template-columns: 13mm 1fr 1fr; min-height: 14mm; }
	.print-order__qr { height: 10mm; width: 10mm; }
	.print-order__header-value { padding: 2mm; }
	.print-order__header-value strong { font-size: 10px; margin-top: 3px; }
	.print-order__row { padding: 2mm 0; }
	.print-order__stone { min-height: 10mm; padding: 2mm 0; }
	.print-order__stone > div { padding: 0 2mm; }
	.print-order__stone strong { font-size: 7px; margin-top: 3px; }
	.print-order__stone-name { gap: 2mm; }
	.print-order__gem { font-size: 14px !important; }
	.print-order__gems { font-size: 9px !important; }
	.print-order__start { padding: 2mm 0; }
	.print-order__start > div { min-height: 8mm; padding: 0 4mm; }
	.print-order__start strong { font-size: 9px; }
	.print-order__initials { height: 6mm; margin-top: 2px; }
	.print-order__weights { padding: 2mm 0 3mm; }
	.print-order__weights > div { padding: 0 2mm; }
	.print-order__weights strong { font-size: 8px; height: 8mm; margin-top: 3px; padding: 1mm; }
	.print-order__weights b { font-size: 8px; }
	.print-order__previews > div { min-height: 25mm; padding: 2mm; }
	.print-order__model { height: 20mm; margin-top: 2px; }
	.print-order__model-qr { height: 18mm; margin-top: 2mm; width: 18mm; }
	.print-order__notes { min-height: 8mm; padding: 2mm; }
	.print-order__notes p { font-size: 6px; margin-top: 2px; min-height: 0; }
}

@media (max-width: 640px) {
	.production-station, .scan-panel { margin: 12px auto; padding: 28px 20px; }
	.production-action { align-items: flex-start; flex-direction: column; gap: 4px; }
}

.page--station { align-items: center; display: flex; max-width: 980px; min-height: calc(100vh - 64px); padding-bottom: 72px; padding-top: 40px; }
.production-station, .scan-panel { margin: 0 auto; max-width: 700px; padding: 46px; width: 100%; }
.production-station__header { border-bottom: 1px solid var(--border); padding-bottom: 25px; }
.production-actions { gap: 10px; margin-top: 24px; }
.production-action { background: var(--surface); border-left: 4px solid var(--primary); display: grid; gap: 16px; grid-template-columns: 38px minmax(0, 1fr) 22px; justify-content: initial; min-height: 84px; padding: 16px 18px; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.production-action:hover { background: #f4faf8; border-color: #a7cbc0; border-left-color: var(--primary); box-shadow: 0 4px 12px rgba(21, 94, 117, .10); }
.production-action--complete { border-left-color: var(--success); }
.production-action--complete:hover { border-left-color: var(--success); }
.production-action--preview { border-left-color: #62768a; }
.production-action--preview:hover { border-left-color: #62768a; }
.production-action__index { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.production-action__content { display: grid; gap: 3px; }
.production-action__content strong { font-size: 16px; }
.production-action__content span, .scan-panel > p:not(.eyebrow) { color: var(--text-muted); font-size: 14px; }
.production-action__arrow { color: var(--primary); font-size: 22px; font-weight: 400; text-align: right; }
.scan-panel { max-width: 620px; }
.scan-panel__indicator { align-items: center; color: var(--primary); display: inline-flex; font-size: 12px; font-weight: 700; gap: 7px; margin-bottom: 22px; text-transform: uppercase; }
.scan-panel__indicator span { background: var(--primary); border-radius: 50%; box-shadow: 0 0 0 4px rgba(21, 94, 117, .12); height: 8px; width: 8px; }
.scan-panel__indicator--complete { color: var(--success); }
.scan-panel__indicator--complete span { background: var(--success); box-shadow: 0 0 0 4px rgba(38, 114, 79, .12); }
.scan-form input { font-size: 16px; min-height: 48px; text-align: center; }

@media (max-width: 640px) {
	.page--station { min-height: auto; padding-top: 24px; }
	.production-station, .scan-panel { padding: 28px 20px; }
	.production-action { gap: 12px; grid-template-columns: 32px minmax(0, 1fr) 18px; padding: 15px; }
}
