:root {
  color-scheme: light;
  --ink: #191d31;
  --muted: #5c6378;
  --line: #e4e6ee;
  --canvas: #f6f7fb;
  --paper: #fff;
  --blue: #3e4fc4;
  --blue-strong: #2e3da6;
  --sidebar: 222px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; font-family: inherit; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
img { vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid #394ab8; outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 10; background: white; padding: 10px; }
.icon { display: inline-block; flex: 0 0 auto; width: 17px; height: 17px; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); padding: 24px 12px 18px; z-index: 2; overflow-y: auto; scrollbar-gutter: stable; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 44px 5px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; line-height: 1.2; letter-spacing: -.035em; }
.brand small { color: var(--muted); font-size: 7.5px; font-weight: 700; letter-spacing: .055em; margin-top: 4px; white-space: nowrap; }
.nav-label { padding-left: 11px; margin-bottom: 9px; font-size: 10px; letter-spacing: .12em; font-weight: 750; color: var(--muted); }
.portal-admin-link { display: flex; justify-content: space-between; padding: 11px; font-size: 12px; color: var(--blue-strong); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.portal-admin-link:hover { background: #edf0fd; }
nav { display: grid; gap: 4px; }
nav a { min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 7px; font-size: 13.5px; font-weight: 570; color: #4f566c; }
nav a .icon { opacity: .66; }
nav a:hover { background: #f3f4f8; }
nav a[aria-current] { color: #2e3c9c; background: #edf0fd; font-weight: 700; }
nav a[aria-current] .icon { opacity: .92; }
#navigation { grid-template-columns: minmax(0, 1fr); }
.workspace-group > summary { min-height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border-radius: 7px; color: #394258; font-size: 13.5px; font-weight: 650; cursor: pointer; list-style: none; white-space: nowrap; }
.workspace-group > summary > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.workspace-group > summary::-webkit-details-marker { display: none; }
.workspace-group > summary:hover { background: #f3f4f8; }
.workspace-group > summary > .icon { opacity: .72; }
.workspace-group[data-current]:not([open]) > summary { background: #edf0fd; color: #2e3c9c; }
.workspace-chevron { flex: 0 0 auto; width: 7px; height: 7px; margin-inline-start: auto; margin-inline-end: 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.workspace-group[open] .workspace-chevron { transform: translateY(-2px) rotate(45deg); }
.workspace-links { display: grid; gap: 2px; margin: 1px 0 4px 19px; border-inline-start: 1px solid var(--line); padding-inline-start: 7px; }
#navigation .workspace-links a { min-height: 40px; font-size: 13px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 15px 8px 0; }
.mode-copy { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: #a26d18; }
[data-mode=live] .mode-dot { background: #308059; }
.mode-link { padding: 0; min-height: 36px; font-size: 12px; color: var(--blue-strong); background: none; border: 0; text-align: left; }
.mode-link:hover { text-decoration: underline; }

.layout { margin-left: var(--sidebar); }
.topbar { min-height: 62px; padding: 0 30px; border-bottom: 1px solid var(--line); background: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.business-contact-bar { background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px clamp(14px, 3vw, 30px); }
.business-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; color: var(--muted); font-size: 12px; font-style: normal; }
.business-contact > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 9px; }
.business-contact :is(img, svg) { flex: none; align-self: center; vertical-align: middle; }
.business-contact a { white-space: nowrap; }
.business-contact a:hover { text-decoration: underline; }
.breadcrumb, .top-actions { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #eceefb; color: #374599; font-weight: 750; font-size: 11px; }
main { max-width: 1440px; padding: 26px 30px 40px; margin: 0 auto; }
main:focus { outline: 0; }
.page-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 19px; }
.page-heading h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.055em; font-weight: 760; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.heading-actions { flex: 0 0 auto; }
.transaction-header .page-heading { flex-wrap: wrap; }
.transaction-header .heading-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; border-radius: 7px; border: 1px solid transparent; font-size: 13px; font-weight: 680; white-space: nowrap; }
.primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 1px 2px #26377923; }
.primary .icon { filter: invert(1); }
.primary:hover:not(:disabled) { background: var(--blue-strong); }
.secondary { background: var(--paper); color: var(--ink); border-color: #d9dce7; }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f0f1f7; }
.quiet { background: transparent; color: var(--blue-strong); }
.icon-button { border: 0; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; background: transparent; flex: 0 0 auto; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 0; padding: 3px 0; color: var(--blue-strong); background: transparent; font-size: 12.5px; font-weight: 690; white-space: nowrap; }
.text-button .icon { width: 14px; height: 14px; opacity: .74; }
.text-button:hover { text-decoration: underline; }

.hero { min-height: 178px; display: flex; align-items: center; position: relative; isolation: isolate; overflow: hidden; border-radius: 10px; padding: 24px 28px; background: #222848; color: #fff; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0 0 0 38%; background: url("/plates.svg") right center / auto 120% no-repeat; mask-image: linear-gradient(to right, transparent, black 27%); }
.hero-label { color: #e2ddad; display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .18em; font-weight: 740; }
.hero-label span { height: 7px; width: 7px; border: 1px solid #e7d671; transform: rotate(45deg); }
.hero h2 { font-size: clamp(31px, 4vw, 44px); letter-spacing: -.065em; line-height: 1.1; margin: 7px 0 9px; }
.hero p { color: #d9def1; font-size: 13.5px; }
.metrics { margin: 16px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { text-align: left; min-width: 0; display: grid; gap: 1px; min-height: 115px; background: var(--paper); padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
.metric:hover { border-color: #adb7e2; }
.metric-top { display: flex; gap: 4px; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 690; color: var(--muted); }
.metric strong { font-size: clamp(22px, 2.3vw, 31px); line-height: 1.1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { font-size: 11px; line-height: 1.35; color: var(--muted); }
.metric-icon, .stage-glyph { background: var(--tone-bg); color: var(--tone-text); width: 30px; height: 30px; border-radius: 6px; flex: 0 0 auto; display: grid; place-items: center; }
.metric-icon .icon, .stage-glyph .icon { width: 15px; height: 15px; opacity: .74; }
.tone-slate { --tone-bg: #eef0f4; --tone-text: #485066; }
.tone-blue { --tone-bg: #e9efff; --tone-text: #2e4b9d; }
.tone-violet { --tone-bg: #f0ebfb; --tone-text: #60439a; }
.tone-amber { --tone-bg: #f8f0df; --tone-text: #77530d; }
.tone-pink { --tone-bg: #faedf4; --tone-text: #8a3d65; }
.tone-teal { --tone-bg: #e5f3f5; --tone-text: #215f69; }
.tone-green { --tone-bg: #e7f4ed; --tone-text: #286044; }
.tone-red { --tone-bg: #fbecef; --tone-text: #923846; }
.tone-light-orange { --tone-bg: #fff0df; --tone-text: #85420b; }
.tone-orange { --tone-bg: #ffcc91; --tone-text: #6d3100; }
.tone-light-green { --tone-bg: #e3f4cd; --tone-text: #355912; }

.panel { min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 9px; overflow: hidden; }
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 17px 12px; }
.panel-title h2 { font-size: 17px; letter-spacing: -.03em; line-height: 1.25; }
.panel-title p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pipeline-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pipeline-stage { display: flex; text-align: left; align-items: center; gap: 8px; background: none; min-height: 65px; border: 0; color: var(--ink); padding: 8px 9px; }
.pipeline-stage + .pipeline-stage { border-left: 1px solid var(--line); }
.pipeline-stage:hover { background: #f6f7fd; }
.stage-text { display: grid; line-height: 1.2; gap: 3px; }
.stage-text strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.stage-text span { font-size: 11px; color: var(--muted); }
.table-wrap { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 11px 15px; border-bottom: 1px solid #eceef3; vertical-align: middle; overflow-wrap: anywhere; }
thead th { background: #f7f8fc; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
tbody th { font-weight: 660; }
tbody tr:last-child :is(th, td) { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
th small, td small { display: block; font-size: 11px; font-weight: 520; color: var(--muted); margin-top: 2px; }
.record-link { color: var(--blue-strong); background: none; border: 0; padding: 2px 0; text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.record-link:hover { text-decoration: underline; }
[data-open-row]:has(button[data-action]:not(:disabled)) { cursor: pointer; }
[data-open-row]:has(button[data-action]:not(:disabled)):hover { background: #f0f3fa; }
.order-message-link { display: flex; align-items: center; width: fit-content; min-height: 30px; gap: 5px; margin-top: 2px; color: var(--blue-strong); font-size: 12px; font-weight: 650; }
.order-message-link:hover { text-decoration: underline; }
.order-message { margin-top: 10px; }
.artwork-preview { margin: 18px 0; min-height: 240px; background: #f1f3f7; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.artwork-preview iframe { display: block; width: 100%; height: min(70dvh,700px); border: 0; }
.artwork-preview > img { display: block; max-width: 100%; max-height: 70dvh; object-fit: contain; margin: auto; }
.line-editor > .field:has(textarea) { grid-column: 1/-1; }
.line-editor .remove-line { grid-column: -2; grid-row: 1; }
.product-line-note { display: block; white-space: pre-wrap; font-weight: 400; }
.employee-alert { margin-bottom: 18px; padding: 16px; background: #fff2e8; border: 1px solid #dfbe9b; border-radius: 8px; }
.employee-alert h2 { font-size: 18px; margin: 8px 0; }
.employee-alert p { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
.portal-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.portal-check input { width: 18px; height: 18px; }
body[data-role="employee"] [data-action="new-product"],
body[data-role="employee"] [data-action="new-invoice"],
body[data-role="employee"] [data-action="restore-order"],
body[data-role="employee"] [data-action="remove-order"] { display: none; }
@media (max-width: 900px) {
  .sidebar nav { grid-template-columns: repeat(auto-fit,minmax(64px,1fr)); }
}
.recent-order-table thead th { background: #171d29; color: #fff; border-color: #171d29; font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
.recent-order-table tbody tr:hover { background: #e9eef8; }
.recent-order-table :is(th,td) { border-right: 1px solid #dce0e7; padding: 13px 12px; }
.recent-order-table :is(th,td):last-child { border-right: 0; }
.recent-order-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.recent-order-description { max-width: 300px; }
.recent-order-table .details-button { background: #20703e; border-color: #20703e; color: #fff; min-height: 36px; padding: 7px 13px; }
.details-button:hover { background: #175b31; }
.attachment-indicator { display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid #b9dac2; border-radius: 50%; background: #e6f3e9; color: #226239; font-size: 11px; font-weight: 700; }
.attachment-indicator:hover { background: #cee8d6; }
dialog.order-dialog, #portal-detail.order-dialog { inset: 0; margin: auto; width: min(1060px,calc(100% - 32px)); height: fit-content; max-height: calc(100dvh - 32px); border-radius: 14px; overscroll-behavior: contain; }
.order-dialog .dialog-body { padding: 24px; }
.order-specifications { margin-top: 18px; }
.order-specifications h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0 0 20px; }
.order-specifications h3 .icon { filter: invert(35%) sepia(79%) saturate(1516%) hue-rotate(235deg) brightness(91%) contrast(93%); }
.order-specifications dl { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f8f9fc; }
.order-specifications dl > div { display: grid; grid-template-columns: minmax(130px,1fr) minmax(0,1.6fr); gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.order-specifications dl > div:last-child { border-bottom: 0; }
.order-specifications dt { color: #5d687c; font-size: 13px; font-weight: 600; }
.order-specifications dd { margin: 0; text-align: right; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; white-space: pre-wrap; }
.order-specifications .order-spec-person { color: #7942cd; }
.order-specifications .order-spec-total { color: #12745a; font-size: 20px; }
.order-print-specs { margin-top: 12px; }
.order-print-specs summary { cursor: pointer; min-height: 44px; padding: 12px 0; color: var(--blue-strong); font-size: 13px; font-weight: 650; }
.order-view-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.order-view-actions .button { flex: 1 1 160px; min-height: 58px; gap: 10px; padding: 14px 22px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; white-space: normal; text-align: center; }
.order-view-actions .icon { flex: none; filter: invert(1); }
.order-action-production { background: linear-gradient(115deg,#6654dc,#8841cf); border-color: #7950d6; }
.order-action-production:hover { background: linear-gradient(115deg,#5545c5,#7534b7); }
.order-action-files { background: #334155; border-color: #334155; }
.order-action-files:hover { background: #263448; }
.order-view-actions .order-action-download { flex-grow: 1.35; background: #d9232b; border-color: #d9232b; }
.order-view-actions .order-action-download:hover { background: #bd1720; }
.order-dialog .inline-form > .field:has(textarea) { grid-column: 1/-1; grid-row: 2; }
.order-dialog .inline-form > button { grid-column: 2; grid-row: 1; }
.production-log { list-style: none; margin: 24px 0 0; padding: 0; }
.production-log > li { position: relative; padding: 0 0 16px 32px; }
.production-log > li::before { content: ""; position: absolute; left: 6px; top: 20px; bottom: -4px; width: 1px; background: #d5dce7; }
.production-log > li:last-child::before { display: none; }
.production-log-dot { position: absolute; top: 20px; left: 0; width: 13px; height: 13px; border: 3px solid var(--tone-text); border-radius: 50%; background: var(--paper); }
.production-log-entry { display: grid; grid-template-columns: minmax(170px,1.1fr) minmax(145px,.8fr) minmax(180px,1.5fr); align-items: center; gap: 16px; padding: 18px; background: #f8f9fc; border: 1px solid var(--line); border-left: 3px solid var(--tone-text); border-radius: 8px; }
.production-log-entry h3 { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 750; }
.production-log-entry .icon { flex: none; }
.production-log-entry time { color: var(--muted); font-size: 12px; }
.production-log-note { padding: 10px 12px; background: var(--tone-bg); color: var(--tone-text); border-radius: 5px; overflow-wrap: anywhere; }
.production-log-note p { white-space: pre-wrap; font-size: 13px; }
.production-log-note span { display: block; margin-top: 4px; font-size: 12px; }
.order-file-history { margin: 22px 0; padding: 0; list-style: none; }
.order-file-history li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.order-file-history li > div { flex: 1 1 200px; min-width: 0; }
.order-file-history strong { margin-left: 8px; overflow-wrap: anywhere; }
.order-file-history small { display: block; color: var(--muted); margin-top: 5px; }
@media (max-width: 760px) {
  .recent-order-table :is(th,td) { border-right: 0; }
  .recent-order-table td[data-label="Order detail"] { grid-column: 1/-1; max-width: none; }
  .order-dialog .dialog-body { padding: 16px; }
  .order-specifications dl > div { grid-template-columns: minmax(100px,1fr) minmax(0,1.3fr); gap: 12px; padding: 14px; }
  .order-specifications dd { font-size: 13px; }
  .production-log-entry { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .production-log > li { padding-left: 24px; }
}
.number { text-align: right; font-variant-numeric: tabular-nums; }
.late, .late small { color: #923846; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 0; border-radius: 99px; color: var(--tone-text); background: var(--tone-bg); font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.table-foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding: 11px 17px; }

.toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; }
.search-box { display: flex; width: min(100%, 340px); gap: 7px; align-items: center; border: 1px solid #cdd2e0; background: var(--paper); border-radius: 7px; padding: 0 10px; }
.search-box .icon { opacity: .68; }
.search-box:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search-box input { min-width: 0; width: 100%; min-height: 38px; border: 0; background: transparent; color: var(--ink); outline: 0; }
.filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.filter select, .field :is(input, select, textarea) { min-width: 0; background: var(--paper); color: var(--ink); border: 1px solid #cdd2e0; border-radius: 6px; padding: 7px 8px; min-height: 39px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 5px; color: var(--ink); padding: 32px 12px; }
.empty-icon { display: grid; place-items: center; width: 39px; height: 39px; background: #edf0fd; border-radius: 8px; margin-bottom: 4px; }
.empty p, .muted, .loading { color: var(--muted); font-size: 13px; }
.empty .button { margin-top: 8px; }

dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 490px); max-width: 100%; height: 100%; max-height: 100%; padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: -8px 0 35px #17213c2a; }
dialog.wide { width: min(100%, 650px); }
dialog::backdrop { background: #151b3b66; }
dialog[data-draft],
#discard-draft {
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100dvh - 24px);
  border-radius: 14px;
  box-shadow: 0 18px 56px #1117294d;
  overscroll-behavior: contain;
}
dialog[data-draft] { width: min(500px, calc(100% - 24px)); }
dialog[data-draft="order"] { width: min(680px, calc(100% - 24px)); }
dialog[data-draft]::backdrop { background: #151b3b80; }
#discard-draft {
  width: min(400px, calc(100% - 32px));
  padding: 24px;
}
#discard-draft h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
#discard-draft p { margin-top: 8px; color: var(--muted); }
#discard-draft form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#discard-draft .button { min-height: 44px; }
.discard-button { color: #fff; background: #a82d43; }
.discard-button:hover { background: #8e2439; }
.dialog-head { position: sticky; z-index: 1; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; gap: 10px; }
.dialog-head p { color: var(--muted); letter-spacing: .1em; font-size: 10.5px; font-weight: 720; }
.dialog-head h2 { font-size: 24px; letter-spacing: -.045em; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.dialog-body { padding: 20px; }
form { display: grid; gap: 15px; }
.field { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.field :is(input, select, textarea) { width: 100%; min-width: 0; font-weight: 450; }
.field > .iti { display: block; width: 100%; min-width: 0; font-weight: 450; }
.iti input.iti__tel-input { width: 100%; min-width: 0; }
.iti__selected-country { min-width: 82px; min-height: 44px; font-size: 13px; }
.iti__selected-country-primary { border-radius: 6px 0 0 6px; }
.iti__selected-dial-code { padding-right: 8px; }
.iti__country-selector { color: var(--ink); font-size: 14px; font-weight: 450; text-align: left; }
.iti--inline-country-selector .iti__country-selector { border-radius: 8px; }
.iti__country { min-height: 44px; }
.iti__search-input { min-height: 44px; font-size: 16px; color: var(--ink); }
.iti--detached-country-selector { max-width: calc(100vw - 24px); }
.iti--fullscreen-popup.iti--detached-country-selector { max-width: none; }
.iti__selected-country:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.field textarea { resize: vertical; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-label-icon { display: flex; align-items: center; gap: 7px; }
.field-label-icon .icon { width: 15px; height: 15px; opacity: .72; }
.order-customer { display: grid; gap: 10px; }
.order-customer-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
#customer-search-status:empty { display: none; }
@media (max-width: 460px) {
  .customer-contact-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .order-customer-search { grid-template-columns: minmax(0, 1fr); }
  .order-customer-search .button { justify-self: start; }
}
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px 11px 11px; margin: 0; }
legend { padding: 0 5px; font-size: 13px; font-weight: 720; }
.line-editor { display: grid; grid-template-columns: minmax(110px, 1.5fr) minmax(110px, 1.5fr) minmax(62px, .65fr) minmax(94px, .9fr) 36px; align-items: end; gap: 8px; }
.line-editor + .line-editor { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.line-actions, .form-actions, .detail-status { display: flex; gap: 8px; align-items: center; }
.line-actions { justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }
.form-total { color: var(--muted); font-size: 12px; }
.form-total strong { color: var(--ink); margin-left: 6px; }
.form-actions { justify-content: end; flex-wrap: wrap; margin-top: 6px; }
.form-error { color: #8a2435; font-weight: 600; font-size: 13px; }
.detail-status { justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 16px; }
.facts dt { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.facts dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.detail-section { border-top: 1px solid var(--line); padding-top: 13px; margin: 14px 0; }
.detail-section h3 { font-size: 14px; margin-bottom: 8px; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.detail-list li:last-child { border-bottom: 0; }
.history time { font-size: 11px; color: var(--muted); text-align: right; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.inline-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.inline-form .form-error { grid-column: 1 / -1; }
.invoice-lines { border: 1px solid var(--line); border-radius: 6px; }
.invoice-lines thead th { border-top: 0; }

dialog.invoice-preview { width: min(100%, 760px); }
.invoice-preview .dialog-head h2 { font-size: 18px; letter-spacing: -.025em; }
.invoice-preview .dialog-body { padding: 22px; background: var(--canvas); }
.invoice-paper { border: 1px solid var(--line); border-top: 3px solid #252b53; background: var(--paper); padding: 26px; }
.invoice-masthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.invoice-brand { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.invoice-brand > img { flex: none; }
.invoice-brand strong, .invoice-brand span { display: block; }
.invoice-brand strong { font-size: 16px; line-height: 1.2; letter-spacing: -.025em; }
.invoice-brand span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.invoice-brand .business-contact { display: grid; gap: 0; margin-top: 3px; }
.invoice-brand .business-contact > span { display: block; }
.invoice-brand .business-contact :is(img, a) { margin-right: 7px; }
.invoice-identity { flex: none; text-align: right; }
.invoice-identity :is(h1,h3) { font-size: 29px; line-height: 1.05; letter-spacing: -.035em; }
.invoice-identity p { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.invoice-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 11px; margin-top: 15px; }
.invoice-demo { color: #77530d; font-size: 12px; font-weight: 700; }
.invoice-details { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin: 17px 0 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.invoice-details dt, .invoice-section-title { color: var(--muted); font-size: 12px; font-weight: 720; }
.invoice-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.invoice-details dd + dt { margin-top: 10px; }
.invoice-recipient strong { font-size: 15px; }
.invoice-recipient span { display: block; color: var(--muted); white-space: pre-line; margin-top: 3px; }
.invoice-paper .invoice-lines { border: 0; border-radius: 0; overflow: visible; }
.invoice-paper table { table-layout: fixed; }
.invoice-paper table :is(th,td) { padding: 10px 7px; }
.invoice-paper thead th { color: var(--ink); font-size: 12px; }
.invoice-paper thead th:nth-child(2) { width: 13%; }
.invoice-paper thead th:nth-child(3) { width: 23%; }
.invoice-paper thead th:nth-child(4) { width: 24%; }
.invoice-paper tbody tr:last-child :is(th,td) { border-bottom: 1px solid var(--line); }
.bill-summary { max-width: 275px; margin: 14px 0 0 auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.bill-summary > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; }
.bill-summary dd { margin: 0; font-weight: 700; text-align: right; }
.bill-summary .balance { margin-top: 5px; padding: 8px; background: #eef0fa; border-top: 1px solid #d6d9ed; color: #252b53; font-size: 15px; font-weight: 750; }
.invoice-payments { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.invoice-payments ul { margin: 5px 0 0; padding: 0; list-style: none; }
.invoice-payments li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 13px; }
.invoice-payments li + li { border-top: 1px solid var(--line); }
.invoice-payments time, .invoice-payments .muted { color: var(--muted); }
.invoice-payments .muted { margin-top: 5px; }
.invoice-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media screen and (max-width: 540px) {
  .invoice-preview .dialog-body { padding: 10px; }
  .invoice-paper { padding: 14px; }
  .invoice-masthead { flex-direction: column; }
  .invoice-brand { gap: 7px; }
  .invoice-brand > img { width: 32px; height: 32px; }
  .invoice-brand strong { font-size: 14px; }
  .invoice-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; text-align: left; }
  .invoice-identity :is(h1,h3) { font-size: 23px; }
  .invoice-details { gap: 12px; }
  .invoice-paper table :is(th,td) { padding: 8px 3px; }
}
.payment-balance { display: flex; justify-content: space-between; padding: 9px 11px; background: #f1f3fa; font-size: 13px; }
.form-error:not([hidden]) { padding: 8px 10px; border: 1px solid #efd0d6; border-radius: 6px; background: #fbecef; }
#print-area { display: none; }

@media (max-width: 1100px) {
  :root { --sidebar: 212px; }
  .workspace-group > summary { gap: 5px; padding-inline: 6px; }
  main, .topbar { padding-left: 21px; padding-right: 21px; }
  .pipeline-stage { gap: 5px; padding-left: 6px; padding-right: 5px; }
  .stage-glyph { width: 25px; height: 25px; }
  .stage-glyph .icon { width: 13px; height: 13px; }
}
@media (max-width: 900px) {
  .pipeline-stage { flex-direction: column; align-items: start; padding-left: 9px; gap: 5px; }
  .stage-text { gap: 1px; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; padding: 11px 14px 0; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px; scrollbar-gutter: auto; }
  .brand { margin: 0; }
  .brand img { width: 34px; height: 34px; }
  .nav-label { display: none; }
  .sidebar .portal-admin-link { grid-column: 1 / -1; grid-row: 3; margin: 0; }
  nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  nav a { flex-direction: column; justify-content: center; text-align: center; padding: 4px 1px; min-height: 47px; font-size: 10.5px; gap: 4px; line-height: 1.1; }
  nav a .icon { width: 14px; height: 14px; }
  #navigation a { flex-direction: row; justify-content: flex-start; gap: 9px; text-align: start; font-size: 13.5px; padding: 0 11px; min-height: 44px; }
  #navigation .workspace-links { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; gap: 4px; }
  #navigation .workspace-links a { min-height: 44px; padding-inline: 6px; gap: 6px; justify-content: center; text-align: center; line-height: 1.25; }
  #navigation .workspace-links .icon { display: none; }
  .sidebar-foot { margin: 0; padding: 0; border: 0; align-self: center; text-align: right; }
  .mode-copy { justify-content: end; font-size: 10px; }
  .mode-link { min-height: 32px; font-size: 10px; }
  .topbar { min-height: 45px; padding: 0 15px; }
  .top-actions .avatar { display: none; }
  main { padding: 17px 14px 26px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading p { font-size: 12px; }
  .button, .icon-button, .text-button, .filter select, .search-box input, .field :is(input, select, textarea) { min-height: 44px; }
  .field :is(input, select, textarea), .search-box input { font-size: 16px; }
  .hero { min-height: 145px; padding: 16px; }
  .hero::after { opacity: .44; inset-inline-start: 26%; }
  .hero p { max-width: 250px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 11px 0; }
  .metric { min-height: 94px; padding: 9px 11px; }
  .pipeline-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipeline-stage { flex-direction: row; min-height: 54px; align-items: center; padding: 5px; }
  .pipeline-stage:nth-child(n+5) { border-top: 1px solid var(--line); }
  .pipeline-stage:nth-child(5) { border-left: 0; }
  .stage-glyph { width: 22px; height: 22px; }
  .stage-text span { font-size: 10px; }
  .panel-title { padding: 11px 12px; }
  .responsive, .responsive tbody { display: block; }
  .responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .responsive tr { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 11px; padding: 10px 12px; border-top: 1px solid var(--line); }
  .responsive :is(th, td) { display: block; border: 0; padding: 0; min-width: 0; text-align: left; }
  .responsive tbody th { grid-column: 1 / -1; }
  .responsive .record-link { min-height: 32px; }
  .responsive td[data-label]::before { display: block; content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; }
  .toolbar { padding: 10px 12px; }
  .search-box { width: 100%; }
  .dialog-head, .dialog-body { padding-left: 13px; padding-right: 13px; }
  .invoice-lines :is(th,td) { padding: 8px 6px; }
}
@media (max-width: 400px) {
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-stage { flex-direction: column; align-items: start; padding-left: 8px; }
  .line-editor { grid-template-columns: 1fr 1fr auto; }
  .line-editor .field:first-child { grid-column: 1 / -1; }
  .hero::after { opacity: .3; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  html, body { background: #fff; }
  body > :not(#print-area) { display: none !important; }
  #print-area { display: block; color: #17191d; print-color-adjust: exact; }
  #print-area .invoice-paper { border: 0; border-top: 3px solid #252b53; padding: 14px 0 0; }
  #print-area .invoice-masthead, #print-area .invoice-details, #print-area .bill-summary { break-inside: avoid; }
  #print-area thead { display: table-header-group; }
  #print-area tr, #print-area .invoice-payments li { break-inside: avoid; }
  #print-area .invoice-section-title { break-after: avoid; }
  #print-area .invoice-paper tr:hover { background: transparent; }
}

body.sign-in {
  --ink: #f4f3f8;
  --muted: #c1c8dd;
  --ribbon-yellow: #e9d88c;
  color-scheme: dark;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 24px clamp(20px, 5vw, 84px) 36px;
  background: #192238;
}
.sign-in :focus-visible { outline-color: var(--ribbon-yellow); }
.sign-in-brand { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid #53617e; }
.sign-in-brand .brand { margin: 0; }
.sign-in-brand .business-contact { row-gap: 4px; }
.sign-in-main {
  width: min(100%, 1220px);
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 7vw, 110px);
  align-items: center;
  padding: 48px 0;
}
.sign-in-content { width: min(100%, 375px); }
.sign-in-content h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.045em; line-height: 1.08; }
.sign-in-intro { color: var(--muted); margin: 8px 0 24px; }
.sign-in-content form { gap: 16px; }
.sign-in-content .field input { min-height: 48px; color: var(--ink); background: #222b46; border-color: #667292; font-size: 16px; }
.sign-in-content .button { min-height: 48px; margin-top: 4px; color: #202743; background: var(--ribbon-yellow); border-color: transparent; box-shadow: none; font-size: 14px; }
.sign-in-content .button:hover:not(:disabled) { background: #f6e5a3; }
.sign-in-type { font: 700 clamp(3.7rem, 8vw, 8.25rem)/.94 Georgia, serif; letter-spacing: -.045em; }
.sign-in-type span { color: var(--ribbon-yellow); }
.sign-in-ribbon { display: grid; gap: 4px; margin-top: clamp(25px, 4vw, 62px); padding-right: 4%; transform: skewY(-4deg); transform-origin: left; }
.sign-in-ribbon i { --ink-width: 1; height: clamp(7px, 1.25vw, 15px); background: #8bc9df; transform: scaleX(var(--ink-width)); transform-origin: left; }
.sign-in-ribbon i:nth-child(2) { --ink-width: .91; background: #d88ca8; }
.sign-in-ribbon i:nth-child(3) { --ink-width: .82; background: var(--ribbon-yellow); }
.sign-in-ribbon i:nth-child(4) { --ink-width: .73; background: #697895; }
.sign-in-services { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.session-feedback { padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.session-success { color: #a6e1bd; background: #203932; border: 1px solid #557a67; }
.sign-in-error { color: #ffd1d7; background: #3b2635; border: 1px solid #9d6172; }
.sign-out { margin: 0; }
.sign-out .button { min-height: 36px; }
.action-feedback {
  --feedback-accent: #e9d88c;
  inset: 0;
  margin: auto;
  width: min(380px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100% - 32px);
  padding: 32px 22px 0;
  border-radius: 14px;
  background: #222b46;
  color: #f4f3f8;
  box-shadow: 0 18px 56px #070b1690;
  text-align: center;
}
.action-feedback::backdrop { background: #0b1127a3; }
.action-feedback[data-state="success"] { --feedback-accent: #a6e1bd; }
.action-feedback[data-state="error"] { --feedback-accent: #ffd1d7; }
.action-feedback-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #151e34;
  color: var(--feedback-accent);
}
.action-feedback-icon svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.action-feedback-icon path { display: none; }
[data-state="success"] .feedback-check,
[data-state="error"] .feedback-error,
[data-state="next"] .feedback-arrow { display: block; }
[data-state="pending"] .action-feedback-icon::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid #586480;
  border-top-color: currentColor;
  border-radius: 50%;
}
.action-feedback-status { outline: none; overflow-wrap: anywhere; }
.action-feedback h2 { font-size: clamp(20px, 6vw, 26px); line-height: 1.2; letter-spacing: -.025em; }
.action-feedback p { margin-top: 7px; color: #d2d8e8; }
.action-feedback p:empty { display: none; }
.action-feedback form { justify-content: center; margin-top: 18px; }
.action-feedback .button { min-width: 100px; min-height: 44px; background: #e9d88c; color: #202743; }
.action-feedback .button:hover { background: #f6e5a3; }
.action-feedback .button:focus-visible { outline-color: #e9d88c; }
.action-feedback-ink {
  margin: 27px -22px 0;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.action-feedback-ink span { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; transform-origin: left; }
.action-feedback[data-timed] .action-feedback-ink { background: #151e34; }
.action-feedback-ink i { height: 5px; background: #8bc9df; transform-origin: left; }
.action-feedback-ink i:nth-child(2) { background: #d88ca8; }
.action-feedback-ink i:nth-child(3) { background: #e9d88c; }
.action-feedback-ink i:nth-child(4) { background: #8292b0; }
[data-state="pending"] .action-feedback-ink i { opacity: .4; }
@media (max-width: 760px) {
  body.sign-in { padding-top: 14px; padding-bottom: 12px; }
  .sign-in-main { max-width: 430px; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 30px; padding: 25px 0 12px; }
  .sign-in-content { width: 100%; }
  .sign-in-art { grid-row: 1; }
  .sign-in-type { font-size: clamp(1.8rem, 8vw, 2.9rem); }
  .sign-in-type br { display: none; }
  .sign-in-ribbon { margin-top: 18px; gap: 3px; transform: skewY(-3deg); }
  .sign-in-ribbon i { height: 5px; }
  .sign-in-services { display: none; }
  .sign-out .button { min-height: 44px; }
  .top-actions #date-label { display: none; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .session-arrival main { animation: settle-in 220ms cubic-bezier(.2, .8, .2, 1) both; }
  dialog[open] { animation: drawer-in 180ms cubic-bezier(.2, .8, .2, 1) both; }
  dialog[data-draft][open] { animation: none; }
  dialog[data-draft][open]::backdrop { animation: feedback-dim 240ms ease-out both; }
  #discard-draft[open] { animation: feedback-in 180ms cubic-bezier(.16, 1, .3, 1) both; }
  .action-feedback[open] { animation: feedback-in 260ms cubic-bezier(.16, 1, .3, 1) both; }
  .action-feedback[open]::backdrop { animation: feedback-dim 200ms ease-out both; }
  [data-state="pending"] .action-feedback-icon::before { animation: pending-turn 740ms linear infinite; }
  [data-state="success"] .feedback-check { stroke-dasharray: 1; animation: feedback-check 380ms cubic-bezier(.16, 1, .3, 1) both; }
  [data-state="success"]:not([data-timed]) .action-feedback-ink i { animation: feedback-print 300ms cubic-bezier(.16, 1, .3, 1) both; }
  .action-feedback[data-timed] .action-feedback-ink span { animation: feedback-countdown var(--feedback-duration) linear both; }
  [data-state="success"] .action-feedback-ink i:nth-child(2) { animation-delay: 45ms; }
  [data-state="success"] .action-feedback-ink i:nth-child(3) { animation-delay: 90ms; }
  [data-state="success"] .action-feedback-ink i:nth-child(4) { animation-delay: 135ms; }
  [data-state="next"] .feedback-arrow { animation: feedback-forward 320ms cubic-bezier(.16, 1, .3, 1) both; }
  [data-state="error"] .feedback-error { animation: settle-in 200ms ease-out both; }
  .session-feedback { animation: settle-in 180ms ease-out both; }
  .form-error:not([hidden]) { animation: settle-in 150ms ease-out both; }
  .updated-feedback { animation: record-confirm 300ms ease-out; }
}
@keyframes feedback-in { from { opacity: 0; transform: translateY(9px) scale(.96); } }
@keyframes feedback-dim { from { opacity: 0; } }
@keyframes feedback-check { from { stroke-dashoffset: 1; } }
@keyframes feedback-print { from { transform: scaleX(.1); } }
@keyframes feedback-countdown { from { transform: scaleX(0); } }
@keyframes feedback-forward { from { opacity: 0; transform: translateX(-7px); } }
@keyframes settle-in { from { opacity: .65; transform: translateY(5px); } }
@keyframes drawer-in { from { opacity: .82; transform: translateX(12px); } }
@keyframes record-confirm { 45% { transform: scale(1.035); } }
@keyframes pending-turn { to { transform: rotate(1turn); } }
