/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* Design tokens. Text colours all reach WCAG AA on white: --text for data, --text-2 for labels and secondary data, --text-3 only for hints. */
:root {
  color-scheme: light;
  --cyan: #36b8e4; --blue: #206bab; --blue-dark: #175a92; --blue-soft: #eaf3fb; --red: #e51f36;
  --ink: #1f2f3d; --text: #1f2f3d; --text-2: #55677a; --text-3: #647587; --muted: #647587; --placeholder: #8494a3;
  --line: #e3e9ef; --line-soft: #edf1f5; --line-strong: #cfd9e3;
  --surface: #fff; --surface-2: #f7f9fb; --bg: #f3f6f9;
  --ok: #1d7a66; --ok-bg: #e7f6f0; --warn: #8a6410; --warn-bg: #fbf3df; --danger: #a81d33; --danger-bg: #fff1f3;
  --radius-sm: 8px; --radius: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 2px #1f2f3d0a; --shadow-md: 0 8px 24px -12px #1f2f3d33;
  --focus-ring: 0 0 0 3px #36b8e447;
  --header-h: 60px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f3f6f8; font-family: "Avenir Next", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
.login-shell { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; max-width: 1440px; margin: auto; padding: 64px 72px 28px; }
.login-card { display: grid; grid-template-columns: 1.04fr 1fr; min-height: 740px; background: #fff; padding: 12px; border: 1px solid #e9eef1; border-radius: 28px; box-shadow: 0 24px 80px -40px #294b6a42; overflow: hidden; animation: enter .55s ease-out; }
.login-panel { display: flex; flex-direction: column; padding: 36px 52px 25px; }
.brand { text-decoration: none; width: -moz-fit-content; width: fit-content; display: flex; flex-direction: column; align-items: center; }
.brand-crop { position: relative; display: block; width: 224px; height: 71px; overflow: hidden; }
.brand-crop img { position: absolute; width: 554px; max-width: none; height: auto; left: -55px; top: -21px; filter: brightness(1.04); }
.form-content { margin: auto 0; padding: 58px 0 56px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 650; letter-spacing: 1.8px; margin-bottom: 20px; }
.eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
h1 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.2; font-weight: 550; letter-spacing: -1.4px; margin: 0 0 13px; }
.intro { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0 0 37px; }
.field { margin-bottom: 23px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.input-wrap { display: flex; align-items: center; gap: 12px; min-height: 54px; border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; padding: 0 15px; color: #8494a3; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px #36b8e417; background: white; }
.input-wrap > svg { flex-shrink: 0; width: 18px; }
.input-wrap input { border: 0; outline: 0; background: transparent; color: var(--ink); width: 100%; min-width: 0; padding: 16px 0; font-size: 16px; }
.input-wrap input::placeholder { color: var(--placeholder); }
.password-toggle { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 40px; padding: 0; margin-right: -8px; background: none; border: 0; color: #8193a1; cursor: pointer; border-radius: 5px; }
.password-toggle:hover { color: var(--blue); }
.submit-button { width: 100%; min-height: 53px; padding: 14px 19px; margin-top: 8px; display: flex; justify-content: center; align-items: center; gap: 18px; color: #fff; background: var(--blue); border: 0; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 14px #206bab18; transition: background .2s, transform .2s; }
.submit-button:hover:not(:disabled) { background: #175b95; transform: translateY(-1px); }
.submit-button:disabled { opacity: .65; cursor: wait; }
.submit-button svg { width: 17px; }
.access-note { margin: 21px 0 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 13px; }
.access-note svg { width: 12px; height: 12px; }
.panel-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 13px; color: var(--muted); padding-top: 20px; border-top: 1px solid #edf0f3; }
.panel-footer a { text-decoration: none; color: var(--blue); font-weight: 550; display: inline-flex; align-items: center; min-height: 32px; }
.panel-footer a:hover { text-decoration: underline; }
.visual-panel { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; color: #fff; background: var(--blue); display: flex; flex-direction: column; padding: 35px; }
.textile-art { position: absolute; width: 100%; height: 100%; inset: 0; z-index: -2; }
.visual-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #103d6320, transparent 25%, #08355800 48%, #103f6cdd 100%); }
.visual-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; font-weight: 550; letter-spacing: 2px; }
.decorative-star { font-size: 33px; line-height: 1; }
.visual-copy { margin-top: auto; padding-bottom: 48px; }
.small-rule { display: block; width: 32px; height: 3px; background: #fb5363; margin-bottom: 22px; }
.visual-copy p { font-size: clamp(27px, 2.6vw, 38px); line-height: 1.25; font-weight: 500; letter-spacing: -1px; margin: 0 0 17px; text-shadow: 0 2px 20px #0b4b7850; }
.visual-copy em { font-family: Georgia, serif; font-weight: 400; }
.visual-copy > span:last-child { color: #e4eff8; font-size: 12px; }
.visual-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 20px; border-top: 1px solid #ffffff40; font-size: 12px; letter-spacing: 1.3px; }
.visual-bottom > span:last-child { font-size: 20px; }
.page-footer { display: flex; justify-content: space-between; align-items: center; padding: 25px 6px 0; color: #85919b; font-size: 12px; }
.palette { display: flex; gap: 5px; }
.palette i { display: block; width: 19px; height: 4px; border-radius: 3px; background: var(--cyan); }
.palette i:nth-child(2) { background: var(--blue); }
.palette i:nth-child(3) { background: var(--red); }
.error { background: var(--danger-bg); border: 1px solid #f3c7cf; border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--danger); line-height: 1.5; }
.success-check { width: 48px; height: 48px; display: grid; place-items: center; background: #eaf6fc; color: var(--blue); font-size: 24px; border-radius: 50%; }
.success p { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.success strong { display: block; }
.spinner { width: 17px; height: 17px; border: 2px solid #ffffff50; border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1500px) { .login-shell { max-width: 1320px; } }
@media (max-width: 1100px) { .login-shell { padding: 32px; } .login-panel { padding: 30px; } .login-card { min-height: 690px; } .visual-panel { padding: 27px; } }
@media (max-width: 760px) {
  .login-shell { padding: 24px 18px; }
  .login-card { grid-template-columns: 1fr; min-height: 0; padding: 8px; border-radius: 23px; max-width: 480px; width: 100%; margin: auto; }
  .login-panel { padding: 26px 22px 22px; }
  .form-content { padding: 44px 0 34px; }
  h1 { font-size: 29px; }
  .intro { margin-bottom: 30px; }
  .visual-panel { min-height: 150px; padding: 22px; border-radius: 15px; }
  .textile-art { height: 330%; top: -150%; }
  .visual-top, .visual-bottom { display: none; }
  .visual-copy { padding: 0; }
  .visual-copy p { font-size: 25px; margin-bottom: 9px; }
  .visual-copy > span:last-child { font-size: 12px; }
  .small-rule { margin-bottom: 12px; width: 24px; }
  .page-footer { width: 100%; max-width: 480px; margin: auto; font-size: 12px; gap: 15px; line-height: 1.6; }
  .visual-copy > span:last-child { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/dashboard.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/* App shell (top bar, module menu, launcher) and the base components shared by every module: buttons, list panels, tables, forms.
   Colours, radii and shadows come from the tokens in globals.css. Type scale: 14px data, 13px labels / secondary, 12px hints (never smaller). */
.workspace { min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
.workspace button, .workspace select { cursor: pointer; }
.workspace button:disabled { cursor: not-allowed; opacity: .5; }
.workspace h1, .workspace h2, .workspace h3 { color: var(--text); }
.workspace h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }

/* ---- top bar ---- */
.workspace-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 30; height: var(--header-h); flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.workspace-brand { border: 0; background: none; padding: 0; width: 126px; height: 40px; overflow: hidden; flex-shrink: 0; border-radius: 6px; }
.workspace-brand .brand-crop { transform: scale(.56); transform-origin: top left; }
.header-home { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-2); font-size: 14px; font-weight: 550; }
.header-home svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-home:hover, .header-home[aria-current=page] { background: var(--blue-soft); color: var(--blue); }
.header-account { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.company-switch { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 300px; margin-right: 6px; }
.company-switch > span { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .6px; white-space: nowrap; }
.avatar, .table-avatar { display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 10px; width: 36px; height: 36px; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.account-name { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; min-width: 0; }
.account-name strong { font-weight: 600; color: var(--text); }
.account-name > span { color: var(--text-3); font-size: 12px; }
.quiet-button { border: 0; background: none; padding: 8px 12px; color: var(--text-2); font-size: 13px; font-weight: 550; border-radius: var(--radius-sm); }
.quiet-button:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue); }
.logout-button { border: 1px solid var(--line); min-height: 36px; }

/* ---- launcher (home) ---- */
.launcher { max-width: 1180px; width: 100%; padding: 44px 32px 56px; margin: 0 auto; flex: 1 1; }
.launcher-heading { margin-bottom: 28px; }
.launcher-heading .eyebrow { font-size: 12px; letter-spacing: 1.6px; margin-bottom: 10px; }
.launcher-heading h1 { font-size: 32px; letter-spacing: -1px; margin-bottom: 6px; }
.greeting-dot { color: var(--cyan); }
.launcher-heading > p { color: var(--text-2); font-size: 15px; margin: 0; }
.launcher > .error { margin-bottom: 16px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-gap: 14px; gap: 14px; }
.module-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; min-height: 88px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.module-card:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #a9d3ea; }
.module-card:active:not(:disabled) { transform: none; }
.teal { --module-color: #0f8a85; --module-bg: #e4f7f3; }
.blue { --module-color: #1f7fc0; --module-bg: #e9f4ff; }
.rose { --module-color: #cf4f6b; --module-bg: #fff0f3; }
.amber { --module-color: #a37612; --module-bg: #fcf5e4; }
.purple { --module-color: #7559c0; --module-bg: #f1edfb; }
.module-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: var(--module-color); background: var(--module-bg); flex-shrink: 0; }
.module-icon svg { width: 26px; height: 26px; }
.module-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1; }
.module-text > strong { color: var(--text); font-size: 16px; font-weight: 600; }
.module-description { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.module-action { flex-shrink: 0; color: var(--text-3); font-size: 12px; font-weight: 600; }
.module-action > span[aria-hidden] { display: block; color: var(--module-color); font-size: 24px; line-height: 1; transition: transform .15s; }
.module-card:hover:not(:disabled) .module-action > span[aria-hidden] { transform: translateX(3px); }
.module-card:disabled .module-action { background: #eef2f6; border-radius: 20px; padding: 4px 9px; grid-column: 2; justify-self: start; }
/* no permission: the badge takes the place of the description, so the module name always fits */
.module-card:disabled { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-column-gap: 14px; column-gap: 14px; grid-row-gap: 6px; row-gap: 6px; align-content: center; }
.module-card:disabled .module-icon { grid-row: 1 / span 2; }
.module-card:disabled .module-description { display: none; }
.launcher-bottom { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; margin-top: 28px; }
.launcher-bottom > span:last-child { margin-left: auto; }
.tiny-dot { background: #2f9e86; border-radius: 50%; width: 7px; height: 7px; }
.workspace-footer { margin-top: auto; padding: 16px 32px; color: var(--text-3); border-top: 1px solid var(--line); font-size: 12px; display: flex; justify-content: space-between; }

/* ---- module layout: menu on the left, content on the right ---- */
.management-layout { display: flex; flex: 1 1; align-items: flex-start; }
.settings-sidebar { position: -webkit-sticky; position: sticky; top: var(--header-h); width: 224px; height: calc(100svh - var(--header-h)); overflow-y: auto; flex-shrink: 0; padding: 16px 12px 24px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.sidebar-section-label { margin: 6px 12px 8px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; }
.settings-section-label { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.settings-sidebar nav { display: grid; grid-gap: 2px; gap: 2px; }
.settings-sidebar nav button { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 12px; font-size: 14px; color: var(--text-2); border: 0; background: none; border-radius: var(--radius-sm); text-align: left; }
.settings-sidebar nav button > svg { width: 19px; height: 19px; flex-shrink: 0; }
.settings-sidebar nav button > span { margin-left: auto; color: var(--text-3); }
.settings-sidebar nav button:hover:not(:disabled):not(.selected) { background: var(--surface-2); color: var(--text); }
.settings-sidebar nav button.selected { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.management-main { display: flex; flex-direction: column; padding: 18px 32px 56px; min-width: 0; flex: 1 1; max-width: 1600px; }
.management-main > button, .management-main > a { align-self: flex-start; }
/* Route trail (Inicio / Ventas / OV-000025 / Entregas / EN-000020): every step but the last is a link; long trails wrap (never wider than the page). */
.breadcrumb { order: -2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; color: var(--text-3); margin-bottom: 12px; min-width: 0; max-width: 100%; }
.breadcrumb > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.breadcrumb button { background: none; border: 0; color: var(--text-2); padding: 0; font-size: inherit; text-align: left; }
.breadcrumb button:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }
/* The page title: the module tabs always sit above it (see modules.css), in lists and in record screens alike. */
.management-title { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; }
.management-title > div:first-child { min-width: 0; }
.management-title .eyebrow { display: none; }
.management-title h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.5px; margin: 0 0 4px; }
.management-title p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; max-width: 78ch; }
/* a screen with its own title (record, editor, import) replaces the generic title of the module */
.management-main > .management-title:has(~ .management-title) { display: none; }

/* ---- buttons ---- */
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--radius-sm); min-height: 40px; padding: 9px 16px; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.primary-button { background: var(--blue); color: #fff; box-shadow: 0 1px 2px #206bab40; }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); }
.secondary-button { color: var(--text); border-color: var(--line-strong); background: #fff; }
.secondary-button:hover:not(:disabled) { border-color: #9fb3c6; background: var(--surface-2); }
.edit-button { border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 600; white-space: nowrap; padding: 6px 10px; border-radius: 6px; }
.edit-button:hover:not(:disabled) { background: var(--blue-soft); }
.workspace button:focus-visible, .workspace a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---- form controls: one look for every text field and select of the app ---- */
.workspace.workspace :is(input:not([type=checkbox], [type=radio], [type=file], [type=range]), select, textarea) { font-size: 14px; color: var(--text); background-color: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); min-height: 40px; transition: border-color .15s, box-shadow .15s; }
.workspace.workspace :is(input:not([type=checkbox], [type=radio], [type=file], [type=range]), select, textarea):hover:not(:disabled):not(:focus) { border-color: #a9b9c8; }
.workspace.workspace :is(input:not([type=checkbox], [type=radio], [type=file], [type=range]), select, textarea):focus { outline: none; border-color: var(--cyan); box-shadow: var(--focus-ring); }
.workspace.workspace :is(input, select, textarea):disabled { background-color: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.workspace input::placeholder, .workspace textarea::placeholder { color: var(--placeholder); opacity: 1; }
.workspace input[type=checkbox], .workspace input[type=radio] { accent-color: var(--blue); }
.workspace input[type=checkbox]:focus-visible, .workspace input[type=radio]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.workspace.workspace .company-switch select { min-height: 36px; max-width: 100%; min-width: 0; padding: 6px 10px; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }

/* ---- list panels and tables ---- */
.list-panel, .settings-form { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: relative; }
.list-panel { overflow: hidden; }
.settings-form { overflow: clip; margin-bottom: 18px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
.list-count { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.list-count > span { background: #eef2f6; color: var(--text-2); border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.search-input { width: 285px; max-width: 100%; padding: 9px 12px; }
.table-scroll { overflow-x: auto; position: relative; }
.list-panel table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.list-panel th { background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; padding: 10px 16px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.list-panel td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.list-panel tbody tr:last-child td { border-bottom: 0; }
.management-main tbody tr { transition: background .1s; }
.list-panel tbody tr:hover, .detail-card table:not(.line-table) tbody tr:hover { background: #f4f8fc; }
/* a click anywhere on these rows opens the record (dashboard.tsx, openRow) */
.management-main table:not(.line-table) tbody tr:has(> td:first-child button.record-name, > td:first-child button.link-button) { cursor: pointer; }
.record-name { display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text); background: none; border: none; padding: 0; font-size: 14px; font-weight: 600; }
.record-name:hover { color: var(--blue); }
.table-avatar { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.table-avatar svg { width: 19px; height: 19px; }
.you-badge { color: var(--text-3); font-size: 12px; font-weight: 400; }
.company-pill { display: inline-block; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); padding: 3px 9px; border-radius: 6px; font-size: 13px; }
.list-footer { padding: 10px 16px; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line-soft); }
.list-footer:empty { display: none; }
.empty-state { text-align: center; padding: 44px 20px; font-size: 14px; color: var(--text-2); }
.empty-state h1 { font-size: 20px; margin: 0 0 8px; }
.empty-state p { margin: 0 0 18px; }
.empty-state[role=status]::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 12px; border: 2.5px solid #d5e3ef; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---- forms ---- */
.settings-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section { padding: 22px 24px 24px; border-bottom: 1px solid var(--line-soft); }
.form-section:last-child { border-bottom: 0; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.section-heading > span { display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 8px; width: 30px; height: 30px; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.section-heading > span svg { width: 20px; height: 20px; }
.section-heading h2 { font-size: 16px; margin: 0 0 3px; font-weight: 600; }
.section-heading p { color: var(--text-2); font-size: 13px; margin: 0; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 16px 20px; gap: 16px 20px; }
.form-grid > * { min-width: 0; }
.form-grid > label, .field-title { color: var(--text-2); font-size: 13px; font-weight: 600; }
.form-grid > label > span, .field-title > span { color: #c8354c; }
.form-grid > label > input, .form-grid select { display: block; width: 100%; padding: 9px 12px; margin-top: 6px; }
.form-grid small, .pos-fields small, .form-help { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); line-height: 1.5; margin-top: 6px; }
.company-checkboxes { margin-top: 6px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); max-height: 200px; overflow: auto; }
.checkbox-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 14px; font-weight: 400; color: var(--text); min-height: 36px; }
.checkbox-row input { width: 16px; height: 16px; }
.checkbox-row small { margin: 0 0 0 auto; font-size: 12px; }
.permissions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px; gap: 10px; }
.permission-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; }
.permission-row:hover { border-color: #a9d3ea; }
.permission-row:has(input:checked) { border-color: #a9d3ea; background: #f6fbff; }
.permission-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--module-color); background: var(--module-bg); flex-shrink: 0; }
.permission-icon svg { width: 21px; height: 21px; }
.permission-row strong { font-size: 14px; font-weight: 600; display: block; overflow-wrap: anywhere; color: var(--text); }
.permission-row small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.permission-row input { -webkit-appearance: none; -moz-appearance: none; appearance: none; flex-shrink: 0; width: 38px; height: 22px; margin-left: auto; border-radius: 12px; background: #c9d4df; position: relative; cursor: pointer; transition: background .2s; }
.permission-row input::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0003; transition: transform .2s; }
.permission-row input:checked { background: var(--blue); }
.permission-row input:checked::before { transform: translateX(16px); }
.permission-row input:disabled { opacity: .5; cursor: not-allowed; }
.form-help { margin: 12px 0 0; }
/* company letterhead: stored file with its actions on one wrapping row */
.letterhead-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; font-size: 14px; color: var(--text); }
.letterhead-file > strong { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
/* the save bar stays in sight while the form is longer than the window */
.form-actions { position: -webkit-sticky; position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 24px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -14px #1f2f3d40; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.form-actions > span { margin-right: auto; color: var(--text-3); font-size: 12px; }

/* ---- messages ---- */
.workspace .error, .saved-notice { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px; font-size: 14px; font-weight: 550; line-height: 1.5; scroll-margin: calc(var(--header-h) + 16px) 0 16px; }
.workspace .error { flex-wrap: wrap; }
.workspace .error::before { content: "!"; display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.workspace .error > .quiet-button { margin: -5px 0 -5px auto; }
.saved-notice { color: var(--ok); background: var(--ok-bg); border: 1px solid #b9e2d2; }
.module-placeholder { text-align: center; padding: 65px 20px; }
.module-placeholder .module-icon { margin: 0 auto 20px; }
.status-pill { display: inline-block; font-size: 12px; background: #eaf1f7; color: var(--text-2); padding: 6px 10px; border-radius: 20px; margin-bottom: 18px; }
.module-placeholder p { color: var(--text-2); font-size: 14px; }
.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; }
.session-loading { min-height: 100svh; display: grid; place-items: center; font-size: 15px; color: var(--text-2); }
.workspace a[href].link-button { display: inline-flex; align-items: center; text-decoration: none; }
.detail-card { position: relative; }

/* ---- responsive layout ---- */
@media (max-width: 1150px) {
  .workspace-header { padding: 0 20px; gap: 12px; }
  .account-name { display: none; }
  .launcher { padding: 36px 24px 48px; }
  .management-layout { flex-direction: column; align-items: stretch; }
  .management-main { padding: 16px 24px 48px; }
  /* the module menu becomes a bar above the content (tablets): chips that wrap */
  .settings-sidebar { position: static; width: 100%; height: auto; overflow: visible; padding: 10px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-section-label:not(.settings-section-label) { display: none; }
  .settings-section-label { margin: 10px 0 6px; padding-top: 10px; }
  .settings-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .settings-sidebar nav button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); }
  .settings-sidebar nav button.selected { border-color: #b9d7ee; }
  .settings-sidebar nav button > span { display: none; }
}
@media (max-width: 767px) {
  :root { --header-h: 56px; }
  .workspace-header { padding: 0 12px; gap: 8px; }
  .workspace-brand { width: 100px; height: 36px; }
  .workspace-brand .brand-crop { transform: scale(.44); margin-top: 3px; }
  .header-home { position: relative; width: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .header-home > span { display: none; }
  .avatar, .account-name, .company-switch > span { display: none; }
  .header-account { flex: 1 1; gap: 8px; }
  .company-switch { flex: 1 1; max-width: none; margin: 0; }
  .workspace.workspace .company-switch select { width: 100%; min-height: 40px; font-size: 16px; }
  .logout-button { margin: 0; min-height: 40px; }
  .launcher { padding: 22px 14px 36px; }
  .launcher-heading { margin-bottom: 18px; }
  .launcher-heading h1 { font-size: 26px; letter-spacing: -.6px; }
  .launcher-heading > p { font-size: 14px; }
  .module-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .module-card { padding: 12px 14px; min-height: 72px; }
  .module-icon { width: 44px; height: 44px; }
  .launcher-bottom { line-height: 1.6; flex-wrap: wrap; }
  .launcher-bottom > span:last-child { width: 100%; margin-left: 0; }
  .workspace-footer { padding: 14px; }
  .workspace-footer > span { display: none; }
  /* module menu: one scrollable row, the open module always stays in sight */
  .settings-sidebar { padding: 8px 14px 4px; }
  .settings-sidebar nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 6px; scrollbar-width: none; scroll-padding: 0 14px; }
  .settings-sidebar nav::-webkit-scrollbar { display: none; }
  .settings-sidebar nav button { white-space: nowrap; min-height: 40px; }
  .settings-sidebar nav button.selected { order: -1; }
  .management-main { padding: 12px 14px 40px; }
  .breadcrumb { margin-bottom: 8px; gap: 0 6px; }
  .breadcrumb button, .breadcrumb [aria-current="page"] { display: inline-flex; align-items: center; min-height: 32px; padding: 0 2px; }
  .management-title { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .management-title h1 { font-size: 21px; }
  .list-toolbar { align-items: stretch; flex-direction: column; padding: 12px 14px; gap: 10px; }
  .list-panel th, .list-panel td { padding: 10px 14px; white-space: nowrap; }
  .form-section { padding: 18px 14px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .permissions-grid { grid-template-columns: minmax(0, 1fr); }
  .form-actions { flex-wrap: wrap; padding: 10px 14px; }
  .form-actions > span { display: none; }
  .form-actions > button { flex: 1 1 140px; }
  /* touch targets, and 16px text in fields so iOS does not zoom the page on focus */
  .workspace button, .workspace a[href] { min-height: 36px; min-width: 36px; }
  .workspace.workspace :is(input:not([type=checkbox], [type=radio], [type=file], [type=range]), select, textarea) { font-size: 16px; min-height: 44px; }
  .primary-button, .secondary-button { min-height: 44px; }
  .quiet-button { min-height: 40px; }
  .edit-button, .icon-button, .link-button { min-height: 36px; min-width: 36px; }
  .record-name { min-height: 44px; }
}

/* Desktop: the module menu hides itself to an icon rail and opens over the page while the pointer is moving over it (.rail-open, set by React from a real mousemove: a page that appears under a resting pointer must not open it) or keyboard focus is on it; choosing a module closes it at once (.just-used until the pointer leaves). */
@media (min-width: 1151px) {
  .settings-sidebar { width: 60px; padding-left: 10px; padding-right: 10px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; z-index: 20; transition: width .16s ease, box-shadow .16s ease; }
  .settings-sidebar::-webkit-scrollbar { display: none; }
  .settings-sidebar:not(.just-used):is(.rail-open, :has(:focus-visible)) { width: 224px; margin-right: -164px; padding-left: 12px; padding-right: 12px; scrollbar-width: auto; box-shadow: 10px 0 28px -14px #1f2f3d55; }
  .settings-sidebar:is(.just-used, :not(.rail-open):not(:has(:focus-visible))) nav button { font-size: 0; gap: 0; justify-content: center; padding: 8px 0; }
  .settings-sidebar:is(.just-used, :not(.rail-open):not(:has(:focus-visible))) nav button > span { display: none; }
  .settings-sidebar:is(.just-used, :not(.rail-open):not(:has(:focus-visible))) .sidebar-section-label { visibility: hidden; white-space: nowrap; overflow: hidden; margin-left: 0; margin-right: 0; }
}

/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/modules/modules.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/
.title-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Volver with the Odoo-style record pager next to it: ‹ 3 / 22 › */
.record-nav { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.record-pager { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.record-pager button { min-width: 36px; min-height: 36px; border: 0; background: none; color: var(--text-2); font-size: 18px; line-height: 1; }
.record-pager button:hover:not(:disabled) { background: #e9eef3; color: var(--blue); }
.record-pager button:disabled { opacity: .4; }
.record-pager-count { padding: 0 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.module-tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.module-tabs button { white-space: nowrap; border: 0; background: none; padding: 12px 16px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.module-tabs button.selected { color: #206bab; border-bottom-color: #206bab; font-weight: 600; }
.toolbar-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-controls select, .inline-select, .line-table input, .line-table select, .plain-input { padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; color: var(--text); background: #fbfcfd; max-width: 100%; }
.workspace textarea { font: inherit; }
.form-grid > label > textarea { display: block; width: 100%; min-height: 80px; padding: 12px; font-size: 12px; border: 1px solid var(--line-strong); background: #fff; border-radius: 7px; color: var(--text); margin-top: 9px; resize: vertical; }
.form-grid > label.wide, .form-grid > .wide { grid-column: 1 / -1; }
.form-grid > label.check { display: flex; align-items: center; gap: 10px; }
.form-grid > label.check input { width: 16px; height: 16px; accent-color: #206bab; margin: 0; }
.status-badge { display: inline-block; font-size: 12px; padding: 4px 9px; border-radius: 20px; background: #eef3f8; color: var(--text-2); white-space: nowrap; }
.status-confirmed, .status-pending, .status-unpaid { background: #fcf5e4; color: #9a7416; }
.status-partial { background: #e9f4ff; color: #2275b3; }
.status-received, .status-validated, .status-paid, .status-delivered, .status-converted { background: #eaf8f2; color: #267d6c; }
.link-button { border: 0; background: none; color: #206bab; font-size: 14px; font-weight: 550; padding: 0; text-align: left; }
.link-button:hover { text-decoration: underline; }
.num { text-align: right !important; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); font-size: 13px; }
.chip { display: inline-block; border: 1px solid var(--line); background: #f8fafd; color: var(--text-2); padding: 3px 8px; border-radius: 5px; font-size: 12px; margin: 2px 4px 2px 0; }
.detail-card { border: 1px solid var(--line); background: #fff; border-radius: 13px; margin-bottom: 20px; overflow: hidden; }
.detail-card > h2 { font-size: 13px; font-weight: 600; margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.detail-card > .pad { padding: 20px 22px; }
.detail-card table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.detail-card th { background: #fafbfd; color: var(--text-2); font-size: 12px; font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.detail-card td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: top; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 18px; gap: 18px; padding: 20px 22px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.kv dt { font-size: 12px; letter-spacing: 1.2px; color: var(--text-3); margin-bottom: 6px; }
.kv dd { margin: 0; font-size: 14px; color: var(--text); font-weight: 550; }
.totals { margin-left: auto; width: 100%; max-width: 290px; padding: 16px 22px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text); }
.totals div.grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px; color: var(--text); font-weight: 650; font-size: 14px; }
.totals div.cost { color: #9a7416; }
.line-table td { vertical-align: middle; }
.line-table input.qty { width: 90px; text-align: right; }
.line-table select { max-width: 100%; }
.line-table input.wide { width: 100%; min-width: 130px; }
.row-actions { display: flex; gap: 8px; padding: 16px 22px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-gap: 20px; gap: 20px; align-items: start; }
.pos-layout > * { min-width: 0; }
.pos-layout.single { grid-template-columns: minmax(0, 1fr); }
.pos-search { display: flex; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.pos-search input { flex: 1 1; min-width: 0; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 13px; }
.pos-results { max-height: 520px; overflow: auto; }
.pos-item { display: flex; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; padding: 13px 22px; text-align: left; font-size: 14px; color: var(--text); }
.pos-item:hover { background: #f6fafe; }
.pos-item small { display: block; color: var(--text-3); font-size: 13px; margin-top: 4px; }
.pos-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.pos-fields label { font-size: 13px; color: var(--text-2); display: block; min-width: 0; }
.pos-fields label.full { grid-column: 1 / -1; }
.pos-fields select, .pos-fields input { display: block; width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; background: #fff; color: var(--text); }
.icon-button { border: 0; background: none; color: #c1566b; font-size: 14px; padding: 4px 8px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-list label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font-size: 14px; color: var(--text-2); }
.bar-total { font-size: 13px; color: var(--text); }
.stock-total td { background: #fafbfd; border-top: 1px solid var(--line-soft); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.check-inline input { accent-color: #206bab; margin: 0; }
.chip .plain-input { padding: 4px 6px; font-size: 12px; }
.chip .icon-button { padding: 0 4px; font-size: 12px; }
.import-columns { margin: 10px 0 16px; padding-left: 18px; font-size: 14px; color: var(--text-2); line-height: 1.8; }
.pos-pay-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pos-pay-row select, .pos-pay-row input { width: auto; flex: 1 1; min-width: 0; margin-top: 0; }
.pos-pay-row .secondary-button { min-height: 38px; padding: 8px 14px; }
.pos-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pos-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: min(190px, 100%); max-width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font-size: 14px; color: var(--text-2); }
.pos-card strong { font-size: 13px; color: var(--text); }
.pos-card.selected { border-color: #206bab; box-shadow: 0 0 0 2px #206bab22; }
.pos-item:disabled { cursor: not-allowed; }

/* Multi-company (shared) warehouses: badge with the owner company, shown next to the warehouse name in lists and documents. */
.status-shared { background: #efe9fb; color: #6a4aa8; margin-left: 6px; }
.shared-note { margin: 6px 0 0; font-size: 13px; color: #6a4aa8; }

/* ---- tables inside forms (child contacts, document lines, variants) share the look of the list / detail tables ---- */
.settings-form table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.settings-form th { background: #fafbfd; color: var(--text-2); font-size: 12px; font-weight: 600; padding: 12px 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); text-align: left; }
.settings-form td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: middle; }
.tap-check { display: inline-flex; align-items: center; justify-content: center; }
input[type=file]::-webkit-file-upload-button { font: inherit; font-size: 12px; padding: 8px 14px; margin-right: 12px; border: 1px solid #dfe6ed; border-radius: 8px; background: #fff; color: var(--text-2); cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-size: 12px; padding: 8px 14px; margin-right: 12px; border: 1px solid #dfe6ed; border-radius: 8px; background: #fff; color: var(--text-2); cursor: pointer; }

/* ---- responsive layout -------------------------------------------------------------------------------------------------------------- */
/* sale / cash screens: the action bar of the sale stays at the bottom of the screen while the cart is longer than the window */
.pos-checkout { overflow: clip; }
.pos-checkout > .row-actions { position: -webkit-sticky; position: sticky; bottom: 0; z-index: 2; background: #fff; box-shadow: 0 -8px 16px -12px #204c7155; }
@media (max-width: 960px) { .pos-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .totals { max-width: none; } }
@media (max-width: 767px) {
  .title-actions { width: 100%; }
  .title-actions > button, .title-actions > a { flex: 1 1 auto; }
  .title-actions > .record-nav { width: 100%; }
  .record-nav .secondary-button { flex: 1 1 auto; min-height: 40px; }
  .record-pager button { min-width: 40px; min-height: 40px; }
  .module-tabs { gap: 2px; margin-bottom: 18px; }
  .module-tabs button { padding: 10px 12px; min-height: 44px; }
  .toolbar-controls { width: 100%; }
  .toolbar-controls > * { flex: 1 1 150px; min-width: 0; }
  .toolbar-controls > .primary-button, .toolbar-controls > .secondary-button { flex-basis: auto; }
  .toolbar-controls > .search-input { flex-basis: 100%; width: auto; }
  .toolbar-controls > .check-inline { flex-basis: 100%; }
  .toolbar-controls select, .inline-select, .plain-input { min-height: 40px; }
  .check-inline { min-height: 36px; }
  .form-grid > label.check { min-height: 40px; }
  .tap-check { min-width: 36px; min-height: 36px; }
  .pick-list label { min-height: 36px; padding: 6px 12px; }
  .detail-card > h2 { padding: 16px; }
  .detail-card > .pad { padding: 16px; }
  .detail-card th { padding: 10px 14px; }
  .detail-card td { padding: 12px 14px; }
  .kv { padding: 16px; gap: 16px 14px; }
  .totals { padding: 14px 16px; }
  .row-actions { padding: 14px 16px; }
  .row-actions > button, .row-actions > a { flex: 1 1 auto; justify-content: center; }
  .pos-search { padding: 12px 16px; }
  .pos-results { max-height: 300px; }
  .pos-item { padding: 12px 16px; }
  .pos-fields { padding: 16px; gap: 12px; }
  .pos-pay-row select { flex: 1 1 130px; min-width: 120px; }
  .pos-pay-row input { flex: 1 1 110px; }
  .pos-pay-row .secondary-button { min-height: 40px; }
  .pos-cards { gap: 8px; }
  .pos-card { flex: 1 1 100%; }
  .detail-card input[type=file] { width: 100%; min-height: 44px; }
  /* document lines become one card per line: product on top, the figures below with their column title (data-label) */
  .line-table, .line-table tbody { display: block; }
  .line-table thead { display: none; }
  .line-table tr { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-gap: 10px 12px; gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .line-table tr:last-child { border-bottom: 0; }
  .line-table td { display: block; min-width: 0; padding: 0 !important; border: 0 !important; text-align: left !important; }
  .line-table td:empty { display: none; }
  .line-table td:first-child { grid-column: 1 / -1; padding-right: 40px !important; }
  .line-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text-2); font-size: 12px; font-weight: 600; }
  .line-table td:has(> .icon-button) { position: absolute; top: 6px; right: 8px; }
  .line-table input.qty, .line-table input.wide, .line-table input.plain-input, .line-table select, .line-table textarea { width: 100% !important; min-width: 0 !important; }
  .line-table input.qty { text-align: left; }
  .line-table .pick-list label { min-width: 0; }
  /* wide list tables scroll sideways inside their own box; a soft edge shows that there is more */
  .table-scroll { background: linear-gradient(to right, #fff 30%, #fff0), linear-gradient(to left, #fff 30%, #fff0) 100% 0, radial-gradient(farthest-side at 0 50%, #1d3b5a26, #0000), radial-gradient(farthest-side at 100% 50%, #1d3b5a26, #0000) 100% 0; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 12px 100%, 12px 100%; background-attachment: local, local, scroll, scroll; }
  .chip { margin: 3px 4px 3px 0; }
}

/* Producción: statuses, progress bars, route editor and the scanner screen. */
.status-approved, .status-ready, .status-done { background: #eaf8f2; color: #267d6c; }
.status-in_progress { background: #e9f4ff; color: #2275b3; }
.status-rejected { background: #fdeef0; color: #af2036; }
.status-skipped { background: #f1f3f5; color: var(--text-3); }
.progress-bar { display: inline-block; width: 110px; height: 8px; border-radius: 6px; background: #e8eef4; overflow: hidden; vertical-align: middle; }
.progress-bar > span { display: block; height: 100%; background: #36b8e4; border-radius: 6px; }
.progress-bar.full > span { background: #2f9e86; }
.progress-label { margin-left: 8px; font-size: 12px; color: var(--text-2); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.row-short td { background: var(--danger-bg); }
.bom-kv { padding: 8px 0; }
.route-list { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-gap: 6px; gap: 6px; }
.route-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfcfd; font-size: 14px; }
.route-list li .route-index { width: 22px; height: 22px; border-radius: 50%; background: #eaf1f7; color: #206bab; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.route-list li .route-name { flex: 1 1; min-width: 120px; font-weight: 550; color: var(--text); }
.route-list li label { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; color: var(--text-2); }
.route-list li label input { flex: none; width: 18px; height: 18px; margin: 0; }
.step-grid td, .step-grid th { white-space: nowrap; }
.step-grid tr.step-skipped td { opacity: .55; }
.scan-box { max-width: 520px; display: grid; grid-gap: 10px; gap: 10px; padding: 20px 22px; }
.scan-box input { padding: 14px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: 8px; width: 100%; }
.pos-fields label.check { display: flex; align-items: center; gap: 8px; }
.pos-fields label.check input { display: inline-block; width: 16px; height: 16px; margin: 0; accent-color: #206bab; }
.sheet-upload { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.sheet-upload label { font-size: 13px; color: var(--text-2); min-width: 0; }
.sheet-upload label.full { grid-column: 1 / -1; }
.sheet-upload input { display: block; width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; background: #fff; color: var(--text); }
@media (max-width: 700px) { .sheet-upload { grid-template-columns: 1fr; padding: 16px; } }

/* Producción, talleres y entregas: statuses, stage summary, timeline and inline forms. */
.status-sent { background: #e9f4ff; color: #2275b3; }
.status-accepted, .status-invoiced { background: #eaf8f2; color: #267d6c; }
.status-closed { background: #e4ebf2; color: #4c6379; }
.status-cancelled { background: #f1f3f5; color: var(--text-3); }
.stage-line { font-size: 13px; color: var(--text-2); margin-top: 4px; white-space: nowrap; }
.stage-line b { color: var(--text); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 14px 22px 18px; display: grid; grid-gap: 10px; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; grid-gap: 12px; gap: 12px; font-size: 14px; color: var(--text); }
.timeline li time { color: var(--text-3); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.timeline li span.muted { margin-left: 6px; }
.inline-form { padding: 6px 22px 18px; }
.inline-form h3 { margin: 12px 0 8px; font-size: 13px; color: var(--text); }
.qty-input { width: 92px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; text-align: right; }
.doc-links { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 22px 16px; }
.report-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.report-filters label { font-size: 13px; color: var(--text-2); display: grid; grid-gap: 4px; gap: 4px; }
.report-filters input, .report-filters select { padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; background: #fff; color: var(--text); }
.num-neg { color: #af2036; }

/* ==== Shared look of the module screens (loaded after the rules above, which keep the layout of each component) ==== */
/* Page structure: breadcrumb → module tabs → title → content, the same in lists and in record / editor screens.
   The tabs are rendered after the title in some screens and before it in others, so their place is fixed here. */
.management-main > .module-tabs { order: -1; }
.management-main > .module-tabs ~ .module-tabs { order: 0; }
.management-main > .sub-tabs { order: -1; }
.sub-tabs { display: inline-flex; align-self: flex-start; gap: 2px; max-width: 100%; margin: -4px 0 18px; padding: 3px; background: #e9eef3; border-radius: 9px; overflow-x: auto; scrollbar-width: none; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs button { flex: 0 0 auto; min-height: 32px; padding: 6px 14px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-size: 13px; font-weight: 550; white-space: nowrap; transition: color .15s, background .15s; }
.sub-tabs button:hover:not(.selected) { color: var(--text); }
.sub-tabs button.selected { background: #fff; color: var(--blue); font-weight: 600; box-shadow: var(--shadow-sm); }
@media (max-width: 767px) { .sub-tabs button { min-height: 40px; } }
.module-tabs { gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.module-tabs button { padding: 10px 14px; margin-bottom: 0; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--text-2); font-weight: 550; transition: color .15s, background .15s; }
.module-tabs button:hover:not(.selected) { color: var(--text); background: #e9eef3; }
.module-tabs button.selected { color: var(--blue); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }

/* cards of a record */
.detail-card { border-color: var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.detail-card > h2 { font-size: 16px; padding: 13px 18px; border-bottom-color: var(--line-soft); }
.detail-card > .pad { padding: 16px 18px; }
.detail-card th, .settings-form th { background: var(--surface-2); color: var(--text-2); font-size: 12px; padding: 9px 16px; border-bottom-color: var(--line); white-space: nowrap; }
.detail-card td, .settings-form td { padding: 10px 16px; color: var(--text); font-size: 14px; }
.kv { gap: 14px 18px; padding: 16px 18px; }
.kv dt { font-size: 12px; font-weight: 600; letter-spacing: .6px; color: var(--text-3); margin-bottom: 3px; }
.kv dd { font-weight: 600; }
.totals { padding: 12px 18px; color: var(--text); }
.totals div { color: var(--text-2); }
.totals div.grand { color: var(--text); font-size: 17px; border-top-color: var(--line); }
.totals div.cost { color: var(--warn); }
.row-actions { padding: 12px 18px; border-top-color: var(--line-soft); }
.status-badge { font-weight: 600; padding: 3px 10px; color: var(--text-2); background: #eef2f6; }
.status-confirmed, .status-pending, .status-unpaid { background: var(--warn-bg); color: var(--warn); }
.status-partial, .status-in_progress, .status-sent { background: #e6f1fb; color: #1c68a3; }
.status-received, .status-validated, .status-paid, .status-delivered, .status-converted, .status-approved, .status-ready, .status-done, .status-accepted, .status-invoiced { background: var(--ok-bg); color: var(--ok); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-cancelled, .status-skipped { background: #eef1f4; color: var(--text-3); }
.status-shared { background: #efe9fb; color: #5c3f99; }
.chip { color: var(--text-2); border-color: var(--line); background: var(--surface-2); border-radius: 6px; }
.link-button { font-weight: 600; }
.icon-button { border-radius: 6px; color: #b23a52; }
.icon-button:hover:not(:disabled) { background: var(--danger-bg); }
.muted { color: var(--text-3); }
.progress-label { color: var(--text-2); }
.workspace.workspace .chip :is(input, select) { min-height: 32px; padding: 4px 8px; font-size: 13px; }

/* sale screens (Nueva venta, Cotizaciones, Punto de venta): product list on the left, checkout on the right */
.pos-search { padding: 12px 18px; border-bottom-color: var(--line-soft); }
.workspace.workspace .pos-search input { font-size: 15px; min-height: 44px; }
.pos-item { align-items: center; padding: 10px 18px; border-bottom-color: var(--line-soft); color: var(--text); transition: background .1s; }
.pos-item > span:first-child { flex: 1 1; min-width: 0; font-weight: 550; }
.pos-item small { font-weight: 400; margin-top: 2px; }
.pos-item > strong { white-space: nowrap; }
.pos-item::after { content: "+"; display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--blue); font-size: 18px; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.pos-item:hover:not(:disabled) { background: var(--blue-soft); }
.pos-item:hover:not(:disabled)::after { background: var(--blue); border-color: var(--blue); color: #fff; }
.pos-item:disabled::after { visibility: hidden; }
.pos-fields { gap: 12px 14px; padding: 14px 18px; border-bottom-color: var(--line-soft); }
.pos-fields label, .sheet-upload label, .report-filters label { color: var(--text-2); font-weight: 600; }
.pos-fields select, .pos-fields input, .sheet-upload input { padding: 9px 11px; }
.pos-checkout > .empty-state { padding: 28px 20px; }
.pos-checkout > .empty-state:not([role=status])::after { content: "Agrega productos desde la lista."; display: block; margin-top: 4px; font-size: 13px; color: var(--text-3); }
.pos-checkout > .row-actions { box-shadow: 0 -8px 16px -14px #1f2f3d55; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pos-checkout > .row-actions .primary-button { flex: 1 1; min-height: 44px; font-size: 15px; }
.pos-card { border-color: var(--line); border-radius: var(--radius); color: var(--text-2); transition: border-color .15s, box-shadow .15s; }
.pos-card:hover:not(.selected) { border-color: #a9d3ea; }
.pos-card strong { font-size: 15px; color: var(--text); }
.pos-card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px #206bab33; }
.workspace.workspace .scan-box input { font-size: 16px; min-height: 48px; }
.report-filters { padding: 14px 18px; border-bottom-color: var(--line-soft); }
.timeline { padding: 14px 18px 18px; }
.timeline li { color: var(--text); }
.timeline li time { color: var(--text-3); }
.inline-form { padding: 6px 18px 18px; }
.inline-form h3 { font-size: 14px; color: var(--text); }
.doc-links { padding: 4px 18px 16px; }
.route-list li { border-color: var(--line); }
.stock-total td { background: var(--surface-2); font-weight: 600; }

@media (max-width: 767px) {
  /* tabs: one row that scrolls sideways instead of wrapping into several rows */
  .module-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 -14px 14px; padding: 0 14px; }
  .module-tabs::-webkit-scrollbar { display: none; }
  .module-tabs button { flex: 0 0 auto; }
  .detail-card > h2 { padding: 12px 14px; }
  .detail-card > .pad { padding: 14px; }
  .detail-card th, .settings-form th { padding: 9px 14px; }
  .detail-card td, .settings-form td { padding: 10px 14px; }
  .kv { padding: 14px; }
  .pos-checkout > .row-actions .secondary-button { flex: 0 0 auto; }
}

/* Productos: smart buttons on top of the product form and the variant traceability screen. */
.smart-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.title-actions > .smart-buttons { margin-bottom: 0; }
.smart-button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 150px; min-height: 52px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s; }
.smart-button:hover { border-color: #a9d3ea; box-shadow: 0 2px 8px #204c7112; }
.smart-button strong { font-size: 15px; font-weight: 650; color: var(--blue); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.smart-button span { font-size: 12px; color: var(--text-2); }
.smart-button.with-icon { flex-direction: row; align-items: center; gap: 12px; min-width: 132px; }
.smart-button.with-icon svg { flex-shrink: 0; color: var(--blue); }
.smart-button .smart-text { display: flex; flex-direction: column; gap: 2px; }
.num-pos { color: #267d6c; }
.trace-scope { margin: -6px 0 14px; }
.trace-note { margin: 0; padding: 12px 22px 16px; }
.variant-trace[aria-busy=true] { opacity: .6; }
.detail-card > h2 .toolbar-controls { font-weight: 400; }
@media (max-width: 767px) { .smart-button { flex: 1 1 140px; } .trace-note { padding: 12px 16px 14px; } }

/* ---- searchable select (fields that point to another record) ---- */
.search-select { position: relative; display: block; min-width: 0; }
.workspace.workspace .search-select > input { display: block; width: 100%; margin: 0; padding: 9px 30px 9px 12px; text-overflow: ellipsis; cursor: text; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6b7b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.workspace.workspace .search-select > input::placeholder { color: var(--text-3); opacity: 1; }
.form-grid .search-select, .pos-fields .search-select { margin-top: 6px; }
.toolbar-controls .search-select, .report-filters .search-select, .search-select.inline { display: inline-block; width: 230px; max-width: 100%; vertical-align: middle; }
.line-table .search-select { min-width: 220px; }
.search-select-list { position: fixed; z-index: 60; display: block; overflow-y: auto; padding: 4px; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 28px rgba(15, 35, 55, .18); }
.search-select-list > [role=option] { display: block; padding: 9px 10px; border-radius: 6px; font-size: 14px; font-weight: 400; line-height: 1.3; color: var(--text); cursor: pointer; white-space: normal; text-align: left; }
.search-select-list > [role=option].active { background: var(--blue-soft); }
.search-select-list > [role=option][aria-selected=true] { font-weight: 600; color: var(--blue); }
.search-select-note { display: block; padding: 9px 10px; font-size: 13px; color: var(--text-3); }
@media (max-width: 760px) {
  .toolbar-controls .search-select, .report-filters .search-select, .search-select.inline { display: block; width: 100%; }
  .line-table .search-select { min-width: 0; }
}

/* ---- tax and discount of a document line ---- */
.line-table .tax-select { min-width: 132px; }

/* ---- partial delivery / receipt ---- */
.confirm-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(15, 30, 45, .45); }
.confirm-box { width: min(520px, 100%); padding: 22px; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(15, 35, 55, .3); }
.confirm-box h2 { margin: 0 0 8px; font-size: 18px; }
.confirm-box p { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.confirm-box .row-actions { flex-wrap: wrap; }
tr.backorder-row > td:first-child { padding-left: 30px; }

/* Camera scanner dialog, reference mode choice, barcode preview and sequence settings. */
.scanner-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.scanner-dialog { width: min(480px, 100%); max-height: 100%; overflow: auto; padding: 20px; border-radius: 10px; background: #fff; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.scanner-dialog h2 { margin: 0 0 12px; font-size: 16px; }
.scanner-video { display: block; width: 100%; max-height: 60vh; border-radius: 8px; background: #000; }
.scanner-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.barcode-field { display: flex; flex-direction: column; gap: 6px; }
.barcode-field .barcode-row { display: flex; gap: 8px; align-items: flex-end; }
.barcode-field .barcode-row label { flex: 1 1 160px; min-width: 0; }
.barcode-field .barcode-row label input { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 480px) { .barcode-field .barcode-row { flex-wrap: wrap; } .barcode-field .barcode-row label { flex-basis: 100%; } }
.ref-mode { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ref-mode legend { padding: 0; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ref-mode .ref-options { display: flex; gap: 16px; flex-wrap: wrap; }
.ref-mode .ref-options label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; min-height: 40px; }
.barcode-preview { display: inline-block; max-width: 100%; overflow-x: auto; padding: 6px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; }
.barcode-preview svg { display: block; height: 56px; width: auto; max-width: 100%; }
.barcode-preview.qr-preview svg { height: 112px; }
.sequence-grid { display: grid; grid-gap: 10px; gap: 10px; }
.sequence-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) repeat(3, minmax(90px, 1fr)) minmax(120px, 1.2fr) auto; grid-gap: 10px; gap: 10px; align-items: end; }
.sequence-row .sequence-name { font-weight: 600; align-self: center; }
.sequence-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.sequence-row label input { width: 100%; min-width: 0; box-sizing: border-box; }
.sequence-row .sequence-preview { align-self: center; font-family: ui-monospace, monospace; font-size: 13px; }
@media (max-width: 760px) { .sequence-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sequence-row .sequence-name, .sequence-row .sequence-preview { grid-column: 1 / -1; } }

/* ---- list views: "Filtros" / "Agrupar por" menus, active chips and collapsible group rows ---- */
.list-menu { position: relative; display: inline-block; min-width: 0; }
.list-menu-button { gap: 8px; }
.list-menu-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 20px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 650; line-height: 18px; text-align: center; }
.list-menu-popup { position: fixed; z-index: 60; overflow-y: auto; padding: 4px; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 28px rgba(15, 35, 55, .18); outline: none; }
.list-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 6px; background: none; padding: 9px 10px; font-size: 14px; line-height: 1.3; color: var(--text); text-align: left; cursor: pointer; }
.list-menu-item:hover, .list-menu-item:focus-visible { background: var(--blue-soft); outline: none; }
.list-menu-item[aria-checked=true] { font-weight: 600; color: var(--blue); }
.list-menu-mark { flex: 0 0 14px; font-size: 12px; text-align: center; }
.list-menu-sep { height: 1px; margin: 4px 6px; background: var(--line-soft); }
.list-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0 16px 12px; }
.list-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 1px solid var(--line); border-radius: 20px; background: var(--blue-soft); color: var(--text); padding: 3px 4px 3px 10px; font-size: 12px; overflow-wrap: anywhere; }
.list-chip.group { background: #f1ecfa; }
.list-chip button { border: 0; background: none; color: var(--text-2); font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 50%; cursor: pointer; }
.list-chip button:hover { color: #c1566b; }
.list-chips .link-button { font-size: 12px; }
.list-panel tr.group-row > td { padding: 0; background: #f3f6fa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 4px 16px 4px 8px; }
.group-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 8px; min-height: 36px; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.group-caret { width: 12px; color: var(--text-2); }
.group-count { background: #e3e9f0; color: var(--text-2); border-radius: 20px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.group-summary { font-size: 13px; font-weight: 600; color: var(--text-2); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .toolbar-controls > .list-menu { flex: 1 1 150px; }
  .list-menu-button { width: 100%; justify-content: space-between; }
  .list-chips { padding: 0 14px 12px; }
  .group-toggle { min-height: 44px; }
}

/* Responsive fixes found by the extended audit (production screens). */
.workspace fieldset { min-width: 0; } /* a fieldset defaults to min-content width: a wide table inside pushed the whole form off screen */
.cell-check { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; cursor: pointer; }
.kv .stage-line { white-space: normal; }
.doc-links .edit-button { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
/* Progress form opened inside the (horizontally scrolling) steps table: keep it as wide as the screen, not as wide as the table. */
.step-grid td > form { width: min(100%, calc(100vw - 64px)); white-space: normal; }
/* POS editor: cashier checkboxes stack in one column so long names wrap instead of overflowing at 360px. */
.ref-mode .ref-options.pos-users { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.ref-mode .ref-options.pos-users label { min-width: 0; overflow-wrap: anywhere; }

/* Form actions (Guardar / Cancelar / Eliminar) always at the top of the form, pinned under the app header while scrolling. */
.settings-form, .settings-form > fieldset { display: flex; flex-direction: column; }
.settings-form .form-actions { order: -1; top: var(--header-h); bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px -14px #1f2f3d40; border-radius: 0; }
/* The bar is now the first child, so the last section is no longer `:last-child`: drop its bottom rule (the form border closes the card). */
.settings-form > fieldset > .form-section:has(+ .form-actions) { border-bottom: 0; }

/* POS launcher: responsive grid of register cards (each opens a small action menu); a register opened on its own has a bar to go back. */
.pos-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); grid-gap: 12px; gap: 12px; margin-bottom: 18px; }
.pos-card { width: 100%; min-width: 0; min-height: 88px; box-sizing: border-box; cursor: pointer; overflow-wrap: anywhere; }
.pos-card[aria-expanded=true] { border-color: var(--blue); box-shadow: 0 0 0 2px #206bab33; }
.pos-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pos-section-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 16px; }
.pos-crumb { min-width: 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.pos-crumb strong { color: var(--text); font-weight: 650; }
@media (max-width: 767px) { .pos-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* Search box + camera "Escanear" button (sales, POS): the button drops below the input on narrow screens. */
.pos-search { flex-wrap: wrap; }
.pos-search input { flex: 1 1 200px; }

/* Inventario → Stock por cliente: the client's stock matrix (same colours as the Excel). Tables scroll inside .table-scroll; the N.º and garment columns stick on wide screens only. */
.stock-sheet { padding: 4px 16px 16px; }
.sm-title { margin: 8px 0 14px; font-size: 18px; }
.sm-block { margin-bottom: 22px; }
.sm-block h3 { margin: 0 0 8px; font-size: 15px; text-align: center; letter-spacing: .04em; }
.sm-block .table-scroll { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; }
.list-panel table.stock-matrix { width: auto; min-width: 100%; font-size: 13px; }
.stock-matrix th, .stock-matrix td { border: 1px solid var(--line); text-align: center; padding: 7px 10px; font-size: 13px; }
.stock-matrix td { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.stock-matrix .sm-index { width: 44px; min-width: 44px; background: #fff; }
.stock-matrix th.sm-index, .stock-matrix th.sm-name { background: #d9d9d9; color: #1b2733; font-weight: 700; }
.stock-matrix td.sm-name { min-width: 160px; max-width: 260px; text-align: left; background: #fff; }
.stock-matrix th.sm-size { color: #fff; font-weight: 700; font-size: 13px; }
.stock-matrix th.sm-size0 { background: #9c1c1c; }
.stock-matrix th.sm-size1 { background: #1f3864; }
.stock-matrix th.sm-wh0 { background: #a9d08e; } .stock-matrix td.sm-wh0 { background: #e2efda; }
.stock-matrix th.sm-wh1 { background: #f4b183; } .stock-matrix td.sm-wh1 { background: #fce4d6; }
.stock-matrix th.sm-wh2 { background: #b4a7d6; } .stock-matrix td.sm-wh2 { background: #e8e4f3; }
.stock-matrix th.sm-wh3 { background: #ffe699; } .stock-matrix td.sm-wh3 { background: #fff2cc; }
.stock-matrix th.sm-total { background: #9dc3e6; color: #1b2733; font-weight: 700; } .stock-matrix td.sm-total { background: #ddebf7; font-weight: 700; }
.stock-matrix th.sm-cost { background: #bfbfbf; color: #1b2733; font-weight: 700; } .stock-matrix td.sm-cost { background: #ededed; }
.stock-matrix tbody tr:hover td { filter: brightness(.97); }
.stock-matrix tfoot tr.sm-sum td { background: #d9d9d9; font-weight: 700; }
.stock-matrix tfoot td.sm-name { text-align: left; }
@media (min-width: 768px) {
  .stock-matrix .sm-index, .stock-matrix .sm-name { position: -webkit-sticky; position: sticky; z-index: 1; }
  .stock-matrix .sm-index { left: 0; }
  .stock-matrix .sm-name { left: 44px; }
}

/* Action bar of a document screen that is not a form (sale, delivery, quotation): the same bar as `.settings-form .form-actions`, first on the screen and pinned under the app header. */
.form-actions.action-bar { top: var(--header-h); bottom: auto; flex-wrap: wrap; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.form-actions.action-bar > span { display: block; flex: 1 1 220px; margin-right: auto; line-height: 1.4; }
.form-actions.action-bar > a { text-decoration: none; }
@media (max-width: 767px) { .form-actions.action-bar > a { flex: 1 1 140px; } .form-actions.action-bar > span { order: 9; flex-basis: 100%; } }
/* Phones: long action labels wrap inside their button / link (and long names inside row actions) instead of overflowing it; the 44px tap height stays. */
@media (max-width: 767px) {
  .form-actions > :is(button, a) { min-width: 0; white-space: normal; text-align: center; overflow-wrap: anywhere; }
  .row-actions > :is(a, span, button) { min-width: 0; overflow-wrap: anywhere; }
  .row-actions > :is(button, a) { white-space: normal; }
  .row-actions > input[type=file] { flex: 1 1 100%; min-width: 0; }
  .produce-box .check { min-height: 40px; }
}

/* Sale form: the «Fabricar este pedido» switch and its hint stack inside the header section. */
.produce-box { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7fafc; }
.produce-box .check { display: flex; align-items: center; gap: 8px; }
.produce-box .check input { width: 16px; height: 16px; margin: 0; accent-color: #206bab; flex: 0 0 auto; }

/* Production order form: the steps a product will generate, under its selector. */
.route-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.route-chips .chip { font-size: 12px; margin-left: 0; }

/* ---- Mi trabajo: the work board of stage operators (tablet / phone on the shop floor, readable from a distance) ---- */
/* The global phone rules (`.workspace button`, `.workspace.workspace input`) are more specific than a single class: the finger-sized controls of the board restate their size with enough weight. */
.work-board .title-actions .secondary-button { min-height: 48px; }
.work-updated { align-self: center; color: var(--text-3); font-size: 13px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.work-chips { display: flex; gap: 8px; margin: 0 0 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.work-chips button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--text-2); font-size: 15px; font-weight: 600; }
.work-chips button span { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: #eef3f8; color: var(--text-2); font-size: 13px; text-align: center; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.work-chips button.selected { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 1px 2px #206bab40; }
.work-chips button.selected span { background: #ffffff2e; color: #fff; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); grid-gap: 18px; gap: 18px; align-items: start; }
.work-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-top: 5px solid var(--cyan); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); min-width: 0; }
.work-card.overdue { border-top-color: var(--red); background: linear-gradient(180deg, var(--danger-bg), #fff 120px); }
.work-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.work-stage { font-size: 20px; font-weight: 700; color: var(--blue); letter-spacing: .2px; }
.work-stage small { font-size: 13px; font-weight: 550; color: var(--text-3); }
.work-order { font-size: 16px; color: var(--text); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.work-product { display: grid; grid-gap: 3px; gap: 3px; min-width: 0; }
.work-product strong { font-size: 18px; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.work-product span { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.work-figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.work-figure strong { font-size: 52px; line-height: 1; font-weight: 750; color: var(--text); }
.work-figure span { font-size: 28px; font-weight: 600; color: var(--text-2); }
.work-figure small { font-size: 14px; color: var(--text-3); margin-left: 2px; }
.work-bar { display: block; height: 14px; border-radius: 8px; background: #e8eef4; overflow: hidden; }
.work-bar > span { display: block; height: 100%; border-radius: 8px; background: var(--cyan); transition: width .3s ease; }
.work-bar.full > span { background: #2f9e86; }
.work-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px 14px; gap: 10px 14px; }
.work-facts > span { display: grid; grid-gap: 2px; gap: 2px; min-width: 0; }
.work-facts > span:last-child { grid-column: 1 / -1; }
.work-facts small { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.work-facts strong { font-size: 18px; color: var(--text); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.work-facts .late strong { color: var(--danger); }
.work-limit { margin: 0; padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 1.45; }
.work-link { font-size: 15px; font-weight: 600; color: var(--blue); }
.work-board .work-primary { min-height: 60px; font-size: 18px; font-weight: 700; border-radius: 12px; width: 100%; }
.work-form fieldset { display: grid; grid-gap: 12px; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.work-form-title { font-size: 16px; font-weight: 650; color: var(--text); }
.work-stepper { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-gap: 10px; gap: 10px; }
.work-board .work-step-button { min-height: 64px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--blue); font-size: 34px; font-weight: 500; line-height: 1; touch-action: manipulation; }
.work-step-button:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--blue); }
.work-step-button:disabled { color: var(--placeholder); background: var(--surface-2); }
.workspace.workspace .work-stepper input { min-width: 0; width: 100%; min-height: 64px; padding: 6px 10px; border: 2px solid var(--line-strong); border-radius: 12px; font-size: 34px; font-weight: 700; text-align: center; color: var(--text); background: #fff; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.work-stepper input:focus { outline: none; border-color: var(--cyan); box-shadow: var(--focus-ring); }
.work-form-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; color: var(--text-2); }
.work-board .work-complete { min-height: 48px; padding: 8px 16px; border: 1px solid var(--blue); border-radius: 10px; background: var(--blue-soft); color: var(--blue-dark); font-size: 15px; font-weight: 650; touch-action: manipulation; }
.work-complete:hover { background: #dcecf9; }
.work-warning { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.workspace.workspace input.work-note { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 16px; width: 100%; min-width: 0; background: #fff; color: var(--text); }
.work-form-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-gap: 10px; gap: 10px; }
.work-form-actions .primary-button, .work-form-actions .secondary-button { min-height: 56px; font-size: 16px; font-weight: 650; border-radius: 12px; }
.work-entries { display: grid; grid-gap: 6px; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.work-entries-title { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.work-entries ul, .work-recent ul { list-style: none; margin: 0; padding: 0; display: grid; grid-gap: 6px; gap: 6px; }
.work-entries li, .work-recent li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; font-size: 15px; color: var(--text); }
.work-entries li small, .work-recent li small { display: block; color: var(--text-3); font-size: 13px; }
.work-entries li strong { font-size: 17px; }
.work-board .work-undo { flex: none; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--danger); font-size: 14px; font-weight: 650; touch-action: manipulation; }
.work-undo:hover:not(:disabled) { background: var(--danger-bg); border-color: #f0b5be; }
.work-recent { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.work-recent h2 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.work-recent p { margin: 0 0 12px; font-size: 14px; color: var(--text-2); }
.work-recent li { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.work-empty { display: grid; justify-items: center; grid-gap: 10px; gap: 10px; padding: 56px 20px; }
.work-empty h2 { margin: 0; font-size: 24px; color: var(--text); }
.work-empty p { margin: 0 0 6px; max-width: 460px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
@media (max-width: 767px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .work-card { padding: 16px; }
  .work-figure strong { font-size: 46px; }
  .work-updated { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .work-bar > span { transition: none; } }

/* Multi-select of users (stage operators of a process) and of stages (user editor). */
.stage-assign { display: grid; grid-gap: 8px; gap: 8px; }
.stage-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--text-2); font-size: 14px; font-weight: 550; cursor: pointer; }
.stage-chip input { width: 16px; height: 16px; margin: 0; accent-color: #206bab; flex: none; }
.stage-chip small { color: var(--text-3); font-size: 12px; font-weight: 400; }
.stage-chip.selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }

/* Materials editor (bill of materials): the search box stacks like the other fields, quantities and waste are short right-aligned numbers. */
.bom-search { display: grid; grid-gap: 6px; gap: 6px; max-width: 440px; margin: 8px 0; color: var(--text-2); font-size: 13px; font-weight: 600; }
.bom-lines input.qty { width: 96px; text-align: right; }
.bom-lines td.num { white-space: nowrap; }
.bom-lines td:first-child { min-width: 170px; }

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/print/print.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
.print-root { background: #e9eef3; min-height: 100svh; padding: 20px 0 40px; font-family: "Avenir Next", "Segoe UI", Arial, sans-serif; }
.print-root .print-bar { max-width: 210mm; margin: 0 auto 12px; display: flex; gap: 10px; align-items: center; }
.print-root .print-bar button { border: 0; border-radius: 8px; background: #206bab; color: #fff; padding: 11px 18px; font-size: 13px; font-weight: 550; cursor: pointer; }
.print-root .print-bar span { font-size: 12px; color: #627484; }
.print-root .paper { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 14mm; background: #fff; color: #111; font-size: 12px; box-shadow: 0 10px 40px rgba(20, 40, 60, 0.25); }
.print-root .paper p { margin: 2px 0; }
.print-root .paper-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.print-root .company { flex: 1 1; font-size: 11.5px; }
.print-root .company h2 { margin: 0 0 6px; font-size: 18px; color: #0b1f4f; text-transform: uppercase; }
.print-root .doc-box { width: 70mm; }
.print-root .doc-box h1 { margin: 0 0 8px; font-size: 24px; text-align: right; color: #0b1f4f; letter-spacing: 0; }
.print-root .paper table { width: 100%; border-collapse: collapse; }
.print-root .navy-table th { background: #0b1f4f; color: #fff; text-align: left; padding: 4px 8px; width: 32mm; font-weight: 600; border: 1px solid #0b1f4f; }
.print-root .navy-table td { padding: 4px 8px; border: 1px solid #0b1f4f; }
.print-root .client-block { margin-bottom: 14px; }
.print-root .items-table th { background: #0b1f4f; color: #fff; padding: 6px; font-size: 11px; border: 1px solid #0b1f4f; }
.print-root .items-table td { padding: 6px; border: 1px solid #0b1f4f; vertical-align: top; }
.print-root .item-name { font-weight: 700; text-transform: uppercase; }
.print-root .item-desc { font-weight: 700; text-transform: uppercase; font-size: 11px; }
.print-root .center { text-align: center; }
.print-root .right { text-align: right; }
.print-root .paper .sum-table { width: 70mm; margin: 10px 0 14px auto; }
.print-root .sum-table th { background: #0b1f4f; color: #fff; text-align: left; padding: 5px 8px; border: 1px solid #0b1f4f; }
.print-root .sum-table td { text-align: right; padding: 5px 8px; border: 1px solid #0b1f4f; }
.print-root .image-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 6mm; gap: 6mm; margin-bottom: 14px; }
.print-root .image-grid img { display: block; width: 100%; height: 62mm; object-fit: contain; border: 1px solid #ddd; break-inside: avoid; page-break-inside: avoid; }
.print-root .paper-foot { font-size: 11.5px; overflow-wrap: anywhere; }
.print-root .signature { margin-top: 28mm; width: 70mm; text-align: center; }
.print-root .signature .line { border-top: 1px solid #111; margin-bottom: 4px; }
.print-root .print-error { max-width: 210mm; margin: 40px auto; }
/* Screen only (the A4 rules above and the print rules below are untouched): readable text and a fluid sheet on small screens. */
@media screen {
  .print-root .company, .print-root .items-table th, .print-root .item-desc, .print-root .paper-foot { font-size: 12px; }
  .print-root .print-bar { flex-wrap: wrap; }
}
@media screen and (max-width: 880px) {
  .print-root { padding: 12px 0 28px; }
  .print-root .print-bar { padding: 0 12px; }
  .print-root .print-bar button { min-height: 44px; }
  .print-root .paper { width: auto; min-height: 0; margin: 0 12px; padding: 20px 16px; }
  .print-root .paper-head { flex-direction: column; gap: 14px; }
  .print-root .doc-box { width: 100%; }
  .print-root .doc-box h1 { text-align: left; font-size: 22px; }
  .print-root .navy-table th { width: 38%; }
  .print-root .paper .sum-table { width: 100%; max-width: 70mm; }
  .print-root .print-scroll { overflow-x: auto; margin-bottom: 4px; }
  .print-root .items-table { min-width: 520px; }
  .print-root .image-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .print-root .image-grid img { height: 45mm; }
  .print-root .signature { margin-top: 18mm; width: 100%; max-width: 70mm; }
  .print-root .print-error { margin: 24px 12px; }
}

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .print-root { background: #fff; padding: 0; }
  .print-root .no-print { display: none !important; }
  .print-root .paper { box-shadow: none; margin: 0; width: auto; min-height: 0; }
}

/* QR labels: a grid of cards, one per copy. */
.print-root .print-bar label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.print-root .print-bar input[type="number"] { width: 70px; padding: 8px; }
.print-root .qr-grid { max-width: 210mm; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(70mm, 1fr)); grid-gap: 4mm; gap: 4mm; padding: 0 12px; }
.print-root .qr-label { display: flex; gap: 3mm; align-items: flex-start; padding: 3mm; background: #fff; border: 1px dashed #8a99a8; border-radius: 2mm; color: #111; break-inside: avoid; page-break-inside: avoid; }
.print-root .qr-code { flex: 0 0 28mm; width: 28mm; height: 28mm; }
.print-root .qr-code svg { width: 100%; height: 100%; display: block; }
.print-root .qr-text { flex: 1 1; min-width: 0; display: flex; flex-direction: column; gap: 1mm; font-size: 10px; overflow-wrap: anywhere; }
.print-root .qr-text strong { font-size: 12px; }
.print-root .qr-text p { margin: 0; font-size: 9px; color: #333; }
/* Product label with a Code 128 barcode of the SKU: the bars span the label, the text goes below. */
.print-root .qr-label.code-label { flex-direction: column; align-items: stretch; gap: 2mm; }
.print-root .label-barcode { width: 100%; height: 14mm; }
.print-root .label-barcode svg { width: 100%; height: 100%; display: block; }
@media print {
  .print-root .qr-grid { max-width: none; padding: 8mm; grid-template-columns: repeat(2, 1fr); }
}

/* Production order: step tables and cut-out process vales (QR with the step code PS-<id>). */
.print-root .items-table th.left { text-align: left; }
.print-root .production-table { margin-bottom: 10px; break-inside: avoid; page-break-inside: avoid; }
.print-root .vale-title { margin: 18px 0 8px; font-size: 14px; color: #0b1f4f; }
.print-root .vale-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 4mm; gap: 4mm; }
.print-root .vale { display: flex; gap: 3mm; padding: 3mm; border: 1px dashed #8a99a8; border-radius: 2mm; break-inside: avoid; page-break-inside: avoid; }
.print-root .vale-code { flex: 0 0 26mm; width: 26mm; height: 26mm; }
.print-root .vale-code svg { width: 100%; height: 100%; display: block; }
.print-root .vale-text { flex: 1 1; min-width: 0; display: flex; flex-direction: column; gap: 1mm; font-size: 10px; overflow-wrap: anywhere; }
.print-root .vale-text strong { font-size: 12px; }
.print-root .vale-fill { margin-top: 1mm; }
@media screen and (max-width: 880px) {
  .print-root .vale-grid { grid-template-columns: 1fr; }
}

/* Code 128 barcodes (process vales, service orders, delivery vales) and the signature rows of the workshop / delivery documents. */
.print-root .vale-barcode { height: 9mm; margin-top: 1mm; }
.print-root .vale-barcode svg, .print-root .doc-barcode svg { width: 100%; height: 100%; display: block; }
.print-root .doc-barcode { width: 62mm; height: 14mm; margin: 0 0 6px auto; }
.print-root .doc-barcode + .doc-barcode-text { text-align: right; font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
.print-root .fill-block { margin: 14px 0; display: grid; grid-gap: 10px; gap: 10px; }
.print-root .fill-block p { margin: 0; }
.print-root .signature-row { display: flex; gap: 14mm; margin-top: 24mm; }
.print-root .signature-row .signature { margin-top: 0; flex: 1 1; width: auto; }
.print-root .box { border: 1px solid #0b1f4f; padding: 6px 10px; margin: 10px 0; }
.print-root .box h4 { margin: 0 0 6px; font-size: 12px; color: #0b1f4f; }
.print-root .paper .items-table td.num, .print-root .paper .items-table th.num { text-align: right; }
@media screen and (max-width: 880px) {
  .print-root .signature-row { flex-direction: column; gap: 18mm; margin-top: 18mm; }
  .print-root .doc-barcode { width: 100%; max-width: 62mm; margin-left: 0; }
}

/* Quotation with the company letterhead (only /print/quote, class .lh-print): the header and footer strips of the company PDF frame every sheet. */
.lh-print .print-bar button:disabled { opacity: .65; cursor: wait; }
.lh-print .print-bar .lh-warning { color: #9a5b00; }
.lh-print.has-letterhead .paper { display: flex; flex-direction: column; padding: 0; }
.lh-print.has-letterhead .lh-header, .lh-print.has-letterhead .lh-footer { display: block; width: 100%; height: auto; flex: none; }
.lh-print.has-letterhead .lh-footer { margin-top: auto; }
.lh-print.has-letterhead .paper .lh-frame { flex: none; border: 0; }
.lh-print.has-letterhead .lh-frame > thead, .lh-print.has-letterhead .lh-frame > tfoot { display: none; }
.lh-print.has-letterhead .lh-frame > tbody > tr > .lh-content { padding: 6mm 14mm; border: 0; vertical-align: top; }
.lh-print.has-letterhead .paper-head { justify-content: flex-end; }
@media screen and (max-width: 880px) {
  .lh-print.has-letterhead .paper { padding: 0; }
  .lh-print.has-letterhead .lh-frame > tbody > tr > .lh-content { padding: 16px; }
}
@media print {
  .lh-print.has-letterhead .paper { display: block; padding: 0; }
  /* fixed boxes repeat on every printed sheet; the header / footer groups of the frame reserve their height on each one */
  .lh-print.has-letterhead .lh-header, .lh-print.has-letterhead .lh-footer { position: fixed; left: 0; width: 210mm; margin: 0; }
  .lh-print.has-letterhead .lh-header { top: 0; height: var(--lh-header); }
  .lh-print.has-letterhead .lh-footer { bottom: 0; height: var(--lh-footer); }
  .lh-print.has-letterhead .lh-frame > thead { display: table-header-group; }
  .lh-print.has-letterhead .lh-frame > tfoot { display: table-footer-group; }
  .lh-print.has-letterhead .lh-frame > thead > tr > td, .lh-print.has-letterhead .lh-frame > tfoot > tr > td { padding: 0; border: 0; }
  .lh-print.has-letterhead .lh-space-top { height: calc(var(--lh-header) + 4mm); }
  .lh-print.has-letterhead .lh-space-bottom { height: calc(var(--lh-footer) + 4mm); }
  .lh-print.has-letterhead .lh-frame > tbody > tr > .lh-content { padding: 0 14mm; }
}

