:root {
  --ink: #202633;
  --muted: #6d7480;
  --line: #dfe3e8;
  --surface: #ffffff;
  --page: #f3f5f7;
  --red: #ef2637;
  --red-dark: #b8162a;
  --red-soft: #fde9ec;
  --blue: #0d5ca8;
  --blue-dark: #083d78;
  --blue-soft: #eaf3fc;
  --shadow: 0 14px 40px rgba(35, 43, 55, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.top-stripe { height: 7px; background: linear-gradient(90deg, var(--red) 0 36%, var(--blue) 36% 68%, #24282e 68%); }
.site-header { min-height: 78px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: 156px; height: 58px; object-fit: contain; object-position: left center; }
.brand-name { color: var(--blue-dark); font-size: 20px; line-height: 1; font-weight: 900; letter-spacing: .08em; }
.brand-subtitle { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 9px; }
.archive-link { padding: 10px 14px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #bed8f1; border-radius: 8px; font-size: 13px; font-weight: 800; text-decoration: none; }
.archive-link:hover { background: #dcecfb; }
.page-shell { width: min(1180px, calc(100% - 36px)); margin: 38px auto 60px; }
.page-shell-with-menu { width: min(1370px, calc(100% - 36px)); }
.app-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 28px; }
.content-column { min-width: 0; }
.side-menu { position: sticky; top: 24px; display: grid; gap: 7px; padding: 17px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.side-menu-label { margin: 1px 9px 7px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.side-menu-link { display: block; padding: 12px 11px; color: #4b5662; border-radius: 8px; font-size: 13px; font-weight: 800; text-decoration: none; }
.side-menu-link:hover { color: var(--blue-dark); background: var(--blue-soft); }
.side-menu-link.is-active { color: #fff; background: var(--blue); }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 23px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.045em; }
.intro-copy { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.order-id-card { min-width: 208px; padding: 15px 17px; background: var(--blue-dark); color: #fff; border-radius: 13px; box-shadow: var(--shadow); }
.order-id-card span { display: block; color: #c9cdd2; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.order-id-card strong { display: block; margin-top: 7px; color: #fff; font-size: 19px; letter-spacing: .04em; }
.orders-panel { margin-bottom: 18px; padding: 20px 25px; background: var(--ink); border-radius: 15px; box-shadow: var(--shadow); }
.orders-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.orders-panel .eyebrow { margin-bottom: 5px; color: #a9c9e9; }
.orders-panel h2 { color: #fff; }
.search-field { width: min(390px, 100%); }
.search-field input { border: 1px solid #53606d; color: #fff; background: #303944; }
.search-field input::placeholder { color: #b6bec8; }
.search-field input:focus { border-color: #9ec5ed; box-shadow: 0 0 0 3px rgba(158, 197, 237, .16); }
.orders-list { display: grid; gap: 8px; margin-top: 17px; }
.order-list-item { width: 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 12px 14px; color: #fff; text-align: left; background: #303944; border: 1px solid #46525e; border-radius: 9px; }
.order-list-item:hover, .order-list-item:focus-visible { background: #3b4855; border-color: #83b2dc; outline: none; }
.order-list-main { min-width: 0; }
.order-list-customer { display: block; overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.order-list-number { display: block; margin-top: 3px; color: #b9d7f1; font-size: 11px; }
.order-list-date { color: #c3cbd3; font-size: 12px; }
.order-list-total { color: var(--yellow, #f3c62d); font-size: 14px; font-weight: 850; }
.orders-empty { padding: 15px 0 2px; color: #bfc8d1; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.archive-page { width: min(1060px, calc(100% - 36px)); margin: 38px auto 60px; }
.content-column .archive-page { width: 100%; margin: 0 0 60px; }
.archive-page .orders-panel { margin-bottom: 0; }
.archive-back { display: inline-flex; margin-bottom: 20px; color: var(--blue-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.archive-back:hover { text-decoration: underline; }
.login-shell { min-height: calc(100vh - 7px); display: grid; place-items: center; padding: 28px 18px; background: var(--page); }
.login-card { width: min(430px, 100%); padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.login-logo { display: block; width: 185px; height: 68px; object-fit: contain; object-position: left center; margin-bottom: 17px; }
.login-form { display: grid; gap: 16px; margin-top: 25px; }
.login-form select { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cfd5dc; border-radius: 8px; }
.login-error { min-height: 20px; margin: 0; color: var(--red); font-size: 13px; font-weight: 750; }
.worker-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.worker-heading h1 { margin-bottom: 8px; }
.user-chip { padding: 8px 12px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #bed8f1; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0; }
.status-filter-button { padding: 8px 12px; color: #c6ced6; background: #303944; border: 1px solid #53606d; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-filter-button.is-active { color: #fff; background: var(--blue); border-color: var(--blue); }
.worker-orders-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.worker-order-card { padding: 16px; color: #fff; background: #303944; border: 1px solid #46525e; border-radius: 10px; }
.worker-order-heading, .worker-order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.worker-order-heading strong { display: block; font-size: 16px; }
.worker-order-heading small { display: block; margin-top: 4px; color: #b9d7f1; font-size: 11px; }
.status-badge { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-e-re { color: #563d00; background: #f3c62d; }
.status-në-proces { color: #073b70; background: #9ec5ed; }
.status-përfunduar { color: #124d2c; background: #9cdeb1; }
.order-status-select { max-width: 112px; padding: 6px 8px; color: var(--ink); background: #fff; border: 1px solid #cbd4dc; border-radius: 8px; font: inherit; font-size: 11px; font-weight: 750; }
.worker-items { margin: 15px 0 12px; border-top: 1px solid #53606d; }
.worker-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #46525e; font-size: 13px; }
.worker-item b { color: #d8eafd; }
.worker-muted { display: block; padding-top: 12px; color: #bfc8d1; font-size: 12px; }
.worker-order-footer { color: #bfc8d1; font-size: 11px; }
.form-card { margin-bottom: 18px; padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading > div { display: flex; align-items: center; gap: 11px; }
.section-kicker { display: grid; place-items: center; width: 31px; height: 31px; color: #fff; background: var(--blue); border-radius: 9px; font-size: 12px; font-weight: 900; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.required-note { color: var(--muted); font-size: 12px; }
.field-grid { display: grid; gap: 16px; }
.field-grid-main { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-wide { grid-column: span 2; }
.field > span, .choice-label { color: #46505d; font-size: 13px; font-weight: 750; }
.field-hint { min-height: 16px; color: var(--muted); font-size: 12px; }
.field-hint.is-existing { color: var(--blue-dark); font-weight: 750; }
.field b { color: var(--red); }
input, textarea { width: 100%; border: 1px solid #cfd5dc; border-radius: 8px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; transition: border-color .16s, box-shadow .16s; }
input { min-height: 43px; }
textarea { resize: vertical; min-height: 114px; }
select { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cfd5dc; border-radius: 8px; outline: none; }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(181, 31, 56, .12); }
select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(181, 31, 56, .12); }
input:user-invalid { border-color: #cc394f; }
.choice-group { display: flex; align-items: flex-start; gap: 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.choice-group:first-of-type { padding-top: 0; border-top: 0; }
.choice-label { min-width: 78px; padding-top: 5px; }
.choice-list { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; color: #3c4652; background: #f7f8fa; border: 1px solid #e1e5e9; border-radius: 8px; font-size: 13px; cursor: pointer; }
.choice:has(input:checked) { color: var(--red-dark); background: var(--red-soft); border-color: #eab5bf; }
.choice input { width: 15px; min-height: 15px; accent-color: var(--red); }
.inline-input { width: 170px; min-height: 38px; padding: 8px 10px; }
.text-button { padding: 8px 0; color: var(--red); background: transparent; border: 0; font-size: 13px; font-weight: 800; }
.text-button:hover { color: var(--red-dark); text-decoration: underline; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.order-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.order-table th, .order-table td { padding: 10px 9px; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-table th:last-child, .order-table td:last-child { border-right: 0; }
.order-table thead th { color: #fff; background: var(--blue); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.order-table thead th:first-child, .order-table tbody td:first-child { width: 48px; text-align: center; }
.order-table thead th:nth-child(2), .order-table tbody td:nth-child(2) { width: 150px; min-width: 150px; }
.order-table thead th:nth-child(3), .order-table tbody td:nth-child(3), .order-table thead th:nth-child(4), .order-table tbody td:nth-child(4) { width: 100px; }
.order-table thead th:nth-child(5), .order-table tbody td:nth-child(5) { width: 78px; }
.order-table thead th:nth-child(6), .order-table tbody td:nth-child(6) { width: 105px; }
.order-table thead th:nth-child(7), .order-table tbody td:nth-child(7) { width: 120px; }
.order-table thead th:nth-child(8), .order-table tbody td:nth-child(8), .order-table thead th:nth-child(9), .order-table tbody td:nth-child(9) { width: 130px; }
.order-table tbody tr:last-child td { border-bottom: 0; }
.order-table tbody td:first-child { color: var(--muted); font-weight: 800; background: #f7f9fb; }
.order-table tbody tr.invalid-area td { background: #fff1f2; border-bottom-color: #e4a4ae; }
.order-table tbody tr.invalid-area input { border-color: #c8233d; box-shadow: 0 0 0 2px rgba(200, 35, 61, .1); }
.order-table tbody input { min-height: 37px; padding: 8px 9px; border-radius: 6px; }
.order-table tbody input[type="number"] { text-align: right; }
.amount-cell, .area-cell, .piece-total-cell { min-width: 105px; text-align: right !important; font-weight: 800; color: var(--ink); }
.order-table tfoot th, .order-table tfoot td { padding: 13px 11px; color: var(--blue-dark); background: var(--blue-soft); border-bottom: 0; font-weight: 850; }
.order-table tfoot th { text-align: right; }
.order-table output { font-size: 16px; }
.notes-card { padding-bottom: 27px; }
.signature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 17px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; }
.form-status { min-height: 24px; color: #237344; font-size: 13px; font-weight: 700; }
.action-buttons { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; }
.button { min-height: 43px; padding: 0 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 800; transition: transform .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--red); }
.button-primary:hover { background: var(--red-dark); }
.button-secondary { color: var(--red-dark); background: var(--red-soft); border-color: #f1c4cc; }
.button-ghost { color: #5f6874; background: transparent; border-color: #cfd5dc; }
.site-footer { padding: 24px; color: var(--muted); text-align: center; font-size: 12px; border-top: 1px solid var(--line); }
.management-form { margin-bottom: 18px; }
.management-list { margin-top: 18px; }
.management-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.management-list-heading h2 { margin: 0; }
.management-search { width: min(360px, 100%); }
.management-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.management-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 13px; }
.management-table th, .management-table td { padding: 11px 10px; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.management-table th:last-child, .management-table td:last-child { border-right: 0; }
.management-table thead th { color: #fff; background: var(--blue); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.management-table tbody tr:last-child td { border-bottom: 0; }
.management-table tbody tr:hover { background: #f8fafc; }
.management-empty { padding: 16px; color: var(--muted); font-size: 13px; }
.inline-status { min-height: 23px; margin: 0; color: #237344; font-size: 13px; font-weight: 750; }
.inline-status.is-error { color: #b51f38; }

/* Print layout: a paper-like FE PLAST delivery/order sheet. */
.print-sheet { display: none; }
.print-brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 8px; border-bottom: 2px solid #1b1f25; }
.print-brand-lockup { display: flex; align-items: center; gap: 10px; }
.print-brand-lockup img { width: 145px; height: 58px; object-fit: contain; object-position: left center; filter: brightness(0); }
.print-brand-name { color: #1f2328; font-size: 25px; font-weight: 900; letter-spacing: .12em; }
.print-brand-subtitle { color: #4c545d; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.print-contact { padding-top: 7px; color: #4c545d; font-size: 9px; line-height: 1.5; text-align: right; }
.print-contact span { color: #777f87; }
.print-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0 10px; }
.print-title-row h1 { margin: 0; color: #24292f; font-size: 25px; letter-spacing: .04em; }
.print-number-box { min-width: 180px; padding: 6px 9px; border: 1px solid #343a40; text-align: center; }
.print-number-box span { display: block; color: #606971; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.print-number-box strong { display: block; min-height: 17px; margin-top: 2px; color: #1d2227; font-size: 12px; }
.print-meta-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; border: 1px solid #606971; border-bottom: 0; }
.print-field { min-height: 31px; padding: 5px 8px; border-right: 1px solid #9da3a8; border-bottom: 1px solid #9da3a8; }
.print-field:nth-child(4n) { border-right: 0; }
.print-field-wide { grid-column: span 2; }
.print-field-full { grid-column: 1 / -1; border-right: 0; }
.print-field span { display: block; color: #5f6870; font-size: 8px; font-weight: 800; }
.print-field strong { display: block; min-height: 13px; margin-top: 2px; color: #24292f; font-size: 10px; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.print-choice-box { margin-top: 8px; border: 1px solid #606971; }
.print-choice-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; min-height: 31px; padding: 5px 8px; border-bottom: 1px solid #9da3a8; font-size: 9px; }
.print-choice-line:last-child { border-bottom: 0; }
.print-choice-line > b { min-width: 53px; color: #4d565e; font-size: 9px; }
.print-check-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.print-check-item i { display: inline-grid; place-items: center; width: 11px; height: 11px; border: 1px solid #596169; font-style: normal; }
.print-check-item i.is-checked::after { content: "✓"; color: #b8162a; font-size: 10px; font-weight: 900; line-height: 1; }
.print-check-item em { font-style: normal; }
.print-items-table { width: 100%; margin-top: 9px; border-collapse: collapse; color: #252a2f; font-size: 7.5px; }
.print-items-table th, .print-items-table td { min-height: 25px; padding: 4px 3px; border: 1px solid #7c848a; }
.print-items-table thead th { color: #fff; background: #2d3339; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.print-items-table tbody td:first-child, .print-items-table tbody td:nth-child(3), .print-items-table tbody td:nth-child(4), .print-items-table tbody td:nth-child(5), .print-items-table tbody td:nth-child(6), .print-items-table tbody td:nth-child(7), .print-items-table tbody td:nth-child(8), .print-items-table tbody td:nth-child(9) { text-align: center; }
.print-items-table tbody td:nth-child(2) { width: 27%; }
.print-items-table tbody tr { height: 25px; }
.print-items-table tfoot th, .print-items-table tfoot td { background: #f0f1f2; font-weight: 900; }
.print-items-table tfoot th { text-align: right; }
.print-notes-box { min-height: 116px; margin-top: 9px; padding: 8px 10px; border: 1px solid #606971; font-size: 9px; }
.print-notes-box b { display: block; margin-bottom: 7px; color: #4d565e; }
.print-notes-box span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.print-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 18px; }
.print-signatures > div { min-height: 48px; }
.print-signatures span { display: block; color: #5f6870; font-size: 9px; font-weight: 800; }
.print-signatures strong { display: block; min-height: 18px; margin-top: 5px; font-size: 10px; font-weight: 600; }
.print-signatures i { display: block; border-bottom: 1px solid #40474e; }
.print-footer { margin-top: 13px; padding-top: 6px; color: #777f87; border-top: 1px solid #b6bbc0; font-size: 8px; text-align: center; }

@media (max-width: 800px) {
  .site-header { padding: 0 18px; }
  .archive-link { padding: 8px 9px; font-size: 11px; }
  .page-shell { width: min(100% - 24px, 700px); margin-top: 25px; }
  .page-shell-with-menu { width: min(100% - 24px, 700px); }
  .app-layout { grid-template-columns: 1fr; gap: 18px; }
  .side-menu { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .side-menu-label { grid-column: 1 / -1; margin-bottom: 1px; }
  .page-intro { align-items: stretch; flex-direction: column; }
  .order-id-card { min-width: 0; }
  .orders-panel-heading { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .field-grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide { grid-column: span 2; }
  .form-card { padding: 18px; }
  .choice-group { flex-direction: column; gap: 9px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .action-buttons { justify-content: stretch; }
  .button { flex: 1; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 18px; }
  .brand-subtitle { font-size: 10px; }
  .field-grid-main, .signature-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: span 1; }
  .action-buttons { flex-direction: column; width: 100%; }
  .button { width: 100%; }
  .order-list-item { grid-template-columns: 1fr auto; }
  .order-list-date { display: none; }
  .header-tools { gap: 5px; }
  .worker-heading { align-items: stretch; flex-direction: column; }
  .worker-orders-list { grid-template-columns: 1fr; }
  .management-list-heading { align-items: stretch; flex-direction: column; }
  .management-search { width: 100%; }
}

@media print {
  @page { size: A4 portrait; margin: 9mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  .top-stripe, .site-header, .page-shell, .site-footer { display: none !important; }
  .print-sheet { display: block !important; width: 100%; color: #252a2f; }
  .print-brand-row, .print-title-row, .print-meta-grid, .print-choice-box, .print-items-table, .print-notes-box, .print-signatures { break-inside: avoid; }
}
