/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"IBM_Plex_Sans","arguments":[{"subsets":["latin"],"weight":["400","500","600","700"]}],"variableName":"plex"} ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/7b19b489dc6743ba-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/28793f5c5e3d822d-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/c9c3823090ec8b55-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/b3bf17a9041d9433-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/2801417b65625cf5-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/26d4368bf94c0ec4-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/7b19b489dc6743ba-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/28793f5c5e3d822d-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/c9c3823090ec8b55-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/b3bf17a9041d9433-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/2801417b65625cf5-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/26d4368bf94c0ec4-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/7b19b489dc6743ba-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/28793f5c5e3d822d-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/c9c3823090ec8b55-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/b3bf17a9041d9433-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/2801417b65625cf5-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/26d4368bf94c0ec4-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/7b19b489dc6743ba-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/28793f5c5e3d822d-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/c9c3823090ec8b55-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/b3bf17a9041d9433-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/2801417b65625cf5-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/26d4368bf94c0ec4-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'IBM Plex Sans Fallback';src: local("Arial");ascent-override: 101.32%;descent-override: 27.18%;line-gap-override: 0.00%;size-adjust: 101.17%
}.__className_c8daab {font-family: 'IBM Plex Sans', 'IBM Plex Sans Fallback';font-style: normal
}

/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** 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 ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f4efe7;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --surface-muted: #f0e7db;
  --text: #1f1d1a;
  --muted: #635b52;
  --border: #ded3c3;
  --primary: #10454f;
  --primary-strong: #0b343c;
  --success: #1f7a55;
  --warning: #8b5e1d;
  --danger: #b43f3f;
  --shadow: 0 18px 50px rgba(24, 20, 15, 0.08);

  /* Responsive spacing & typography tokens */
  --sidebar-width: 220px;
  --text-xs: 0.75rem;
  --text-sm: 0.82rem;
  --text-base: 0.95rem;
  --text-lg: 1.15rem;
  --text-xl: clamp(1.1rem, 1rem + 0.3vw, 1.45rem);
  --text-2xl: clamp(1.3rem, 1.2rem + 0.4vw, 1.8rem);
  --metric-label: var(--text-sm);
  --metric-value: var(--text-xl);
  --metric-value-compact: var(--text-lg);
  --heading-page: clamp(1.4rem, 1.3rem + 0.3vw, 1.75rem);
  --heading-section: clamp(1.1rem, 1rem + 0.2vw, 1.35rem);
  --heading-card: clamp(1rem, 0.95rem + 0.15vw, 1.15rem);
  --summary-value: clamp(1.1rem, 1rem + 0.2vw, 1.3rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.72),
      transparent 30%
    ),
    linear-gradient(180deg, #f8f3eb 0%, #f1e7d8 100%);
  color: var(--text);
}

body {
  font-family: inherit;
  font-size: 15px;
}

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

button,
input,
select {
  font: inherit;
}

.centered-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-page__card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid rgba(222, 211, 195, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 40px 36px 32px;
}

.auth-page__brand {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.auth-page__brand-name {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 1rem;
}

.auth-page__brand-contact {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-form__header {
  margin-bottom: 24px;
}

.auth-form__header h2 {
  margin: 0 0 8px;
  font-size: var(--text-2xl);
}

.auth-form__header p,
.muted {
  color: var(--muted);
}

.field {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.field + .field {
  margin-top: 16px;
}

.field__label {
  font-size: 0.95rem;
  font-weight: 600;
}

.field__error {
  color: var(--danger);
  font-size: 0.9rem;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  min-height: 44px;
  padding: 0 14px;
  outline: none;
}

.input:-moz-read-only {
  border-color: rgba(214, 204, 190, 0.92);
  background: rgba(238, 232, 223, 0.72);
  color: rgba(61, 56, 49, 0.72);
  box-shadow: none;
  cursor: not-allowed;
}

.input:read-only,
.input:disabled {
  border-color: rgba(214, 204, 190, 0.92);
  background: rgba(238, 232, 223, 0.72);
  color: rgba(61, 56, 49, 0.72);
  box-shadow: none;
  cursor: not-allowed;
}

.input:is(select):not(:disabled) {
  background: var(--surface-strong);
  color: inherit;
  cursor: pointer;
}

.input:-moz-read-only::placeholder {
  color: rgba(110, 101, 91, 0.62);
}

.input:read-only::placeholder,
.input:disabled::placeholder {
  color: rgba(110, 101, 91, 0.62);
}

.textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-900);
  padding: 0.8rem 0.95rem;
  font: inherit;
  line-height: 1.45;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.textarea:focus {
  outline: none;
  border-color: rgba(31, 97, 87, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 97, 87, 0.12);
  background: #ffffff;
}

.input--compact {
  min-height: 40px;
}

.input--toolbar {
  min-width: 260px;
  max-width: 360px;
}

.input--quantity {
  min-width: 84px;
  max-width: 96px;
}

.cart-qty-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-qty-unit {
  font-size: 13px;
  color: var(--muted);
}

.input--next-quantity {
  min-width: 60px;
  max-width: 72px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}

.input--product-search {
  min-width: 0;
  max-width: none;
  min-height: 46px;
  font-size: 1rem;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16, 69, 79, 0.12);
}

.input:-moz-read-only:focus {
  border-color: rgba(214, 204, 190, 0.92);
  box-shadow: none;
}

.input:read-only:focus,
.input:disabled:focus {
  border-color: rgba(214, 204, 190, 0.92);
  box-shadow: none;
}

.input--step-active {
  border-color: rgba(16, 69, 79, 0.32);
  box-shadow: 0 0 0 3px rgba(16, 69, 79, 0.08);
}

.input--step-active-primary {
  border-color: rgba(16, 69, 79, 0.42);
  box-shadow: 0 0 0 4px rgba(16, 69, 79, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.input--resolved {
  border-color: rgba(16, 69, 79, 0.18);
  box-shadow: 0 0 0 2px rgba(16, 69, 79, 0.05);
  background: rgba(252, 251, 248, 0.96);
}

.input--error {
  border-color: var(--danger);
}

.button {
  border: none;
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.button--full {
  width: 100%;
}

.button--primary {
  background: var(--primary);
  color: white;
}

.button--secondary {
  background: var(--surface-muted);
  color: var(--text);
}

.button--ghost {
  background: transparent;
  color: var(--primary);
}

.button--danger {
  background: var(--danger);
  color: white;
}

.button--compact {
  min-height: 38px;
  padding: 0 12px;
}

.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns 160ms ease;
  overflow: hidden;
}

.shell--sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.shell__sidebar {
  padding: 20px 16px;
  border-right: 1px solid rgba(222, 211, 195, 0.8);
  background: rgba(16, 69, 79, 0.96);
  color: white;
  overflow: hidden;
  transition:
    opacity 160ms ease,
    padding 160ms ease;
}

.shell--sidebar-collapsed .shell__sidebar {
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  border-right: none;
}

.brand-block {
  padding: 8px 8px 20px;
}

.brand-block__eyebrow,
.brand-block__title {
  display: block;
  margin-top: 8px;
  font-size: var(--text-2xl);
}

.metric-card__label {
  display: block;
  font-size: var(--metric-label);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.brand-block__caption {
  color: rgba(255, 255, 255, 0.72);
}

.shell__nav {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.shell__nav-link {
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.shell__nav-link--active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.shell__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.shell__topbar {
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex: 0 0 auto;
}

.shell__topbar-main {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.shell__heading {
  margin: 0;
  font-size: var(--heading-page);
}

.shell__subheading {
  margin: 4px 0 0;
  color: var(--muted);
}

.shell__subheading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shell__content {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
}

/* ── POS Launcher (dashboard home screen) ──────────────────────────────────── */

.launcher {
  padding: 28px 28px 40px;
}

.launcher__header {
  margin-bottom: 32px;
}

.launcher__greeting {
  margin: 0 0 4px;
  font-size: var(--heading-section);
  font-weight: 700;
  color: var(--text);
}

.launcher__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* 4-column grid baseline — shrinks at breakpoints below */
.launcher__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  gap: 20px;
  /* Grid hosts keyboard events but must not show a focus ring — selection
     is shown on the individual card via .launcher__card--selected */
  outline: none;
}

.launcher__card {
  /* layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  min-height: 168px;
  /* appearance */
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  text-decoration: none;
  color: var(--text);
  /* interaction */
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  /* transition */
  transition: background 0.12s ease, border-color 0.12s ease,
              box-shadow 0.12s ease, transform 0.1s ease;
}

/* hover — mouse */
.launcher__card:hover {
  background: var(--surface-strong);
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(16, 69, 79, 0.13);
}

/* selected — state-driven keyboard selection (primary visual indicator) */
.launcher__card--selected {
  background: var(--surface-strong);
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(16, 69, 79, 0.28),
    0 6px 24px rgba(16, 69, 79, 0.12);
  transform: scale(1.025);
  z-index: 1;
}

/* focus — keyboard (browser fallback, kept for accessibility) */
.launcher__card:focus-visible {
  background: var(--surface-strong);
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(16, 69, 79, 0.28),
    0 6px 24px rgba(16, 69, 79, 0.12);
  transform: scale(1.025);
  z-index: 1;
}

/* active / pressed — mouse click or touch */
.launcher__card:active {
  transform: scale(0.96);
  background: var(--surface-muted);
  border-color: var(--primary);
  box-shadow: none;
  transition-duration: 0.06s;
}

.launcher__card-icon {
  font-size: 2.6rem;
  line-height: 1;
  /* keep icon crisp on high-dpi screens */
  text-rendering: optimizeLegibility;
}

.launcher__card-label {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: var(--text);
}

/* ── Responsive breakpoints ─────────────────────────────────── */

/* medium desktop / large tablet */
@media (max-width: 1200px) {
  .launcher__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* tablet / small laptop */
@media (max-width: 760px) {
  .launcher {
    padding: 20px 16px 32px;
  }
  .launcher__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .launcher__card {
    min-height: 140px;
    padding: 28px 16px;
  }
  .launcher__card-icon {
    font-size: 2rem;
  }
}

/* mobile */
@media (max-width: 400px) {
  .launcher__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .launcher__card {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 72px;
    padding: 0 20px;
    gap: 16px;
    border-radius: 18px;
  }
  .launcher__card-label {
    text-align: left;
    font-size: 1.05rem;
  }
}

/* ── End launcher ───────────────────────────────────────────── */

.route-loading {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.route-loading__card {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  justify-items: center;
  max-width: 320px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(222, 211, 195, 0.78);
  background:
    radial-gradient(circle at top, rgba(255, 248, 236, 0.96), rgba(250, 243, 233, 0.88)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    0 24px 48px rgba(24, 20, 15, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  text-align: center;
}

.route-loading__card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.route-loading__pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.route-loading__pulse span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(182, 136, 84, 0.92);
  animation: route-loading-bounce 1.1s infinite ease-in-out;
}

.route-loading__pulse span:nth-child(2) {
  animation-delay: 0.12s;
}

.route-loading__pulse span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes route-loading-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.72);
    opacity: 0.42;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.shell__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.shell__branch-select {
  min-width: 220px;
}

.shell__avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(222, 211, 195, 0.95);
  background: rgba(255, 253, 249, 0.96);
  box-shadow:
    0 10px 22px rgba(24, 20, 15, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.shell__user-menu {
  position: relative;
}

.shell__user-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: var(--shadow);
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  z-index: 20;
}

.shell__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--primary);
}

.shell__avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateY(-0.15px);
  text-align: center;
  white-space: nowrap;
}

.shell__user-meta {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  padding: 4px 6px 8px;
}

.shell__user-meta strong {
  font-size: 0.95rem;
}

.shell__user-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.shell__user-action {
  border: none;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
}

.shell__user-action:hover {
  background: var(--surface-muted);
}

.shell__user-action--danger {
  color: var(--danger);
}

.page-grid,
.stack {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  max-width: 1400px;
}

.stack--compact {
  gap: 12px;
}

.stack--tight {
  gap: 8px;
}

.page-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.span-8 {
  grid-column: span 8;
}

.span-7 {
  grid-column: span 7;
}

.span-5 {
  grid-column: span 5;
}

.span-4 {
  grid-column: span 4;
}

.card {
  background: rgba(255, 253, 249, 0.88);
  border-radius: 20px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card__title {
  margin: 0;
  font-size: var(--heading-card);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.metric-card__value {
  margin-top: 4px;
  font-size: var(--metric-value);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

.table-wrap--modal {
  max-height: 230px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.28) transparent;
}

.table-wrap--modal::-webkit-scrollbar {
  width: 8px;
}

.table-wrap--modal::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap--modal::-webkit-scrollbar-thumb {
  background: rgba(16, 69, 79, 0.22);
  border-radius: 999px;
}

.table-wrap--modal::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 69, 79, 0.34);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.table__row--selected {
  background: rgba(16, 69, 79, 0.06);
}

.table__row--highlighted td {
  background: rgba(31, 122, 85, 0.08);
}

.table__row--highlighted td:first-child {
  box-shadow: inset 3px 0 0 rgba(31, 122, 85, 0.42);
}

.table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sales-sort__header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease;
}

.sales-sort__header:hover {
  color: var(--ink-900);
}

.sales-sort__header--active {
  color: var(--primary-strong);
  letter-spacing: 0.03em;
}

.sales-sort__header:focus-visible {
  outline: 2px solid rgba(16, 69, 79, 0.3);
  outline-offset: 2px;
  border-radius: 3px;
}

.sales-sort__indicator {
  font-size: 0.85em;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge--neutral {
  background: var(--surface-muted);
}

.badge--success {
  background: rgba(31, 122, 85, 0.12);
  color: var(--success);
}

.badge--warning {
  background: rgba(139, 94, 29, 0.12);
  color: var(--warning);
}

.badge--info {
  background: rgba(16, 69, 150, 0.1);
  color: #10458a;
}

.badge--danger {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
}

.status-panel,
.empty-state {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: rgba(255, 253, 249, 0.72);
}

.status-panel {
  display: flex;
  gap: 12px;
  align-items: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(16, 69, 79, 0.2);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.inline-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(180, 63, 63, 0.1);
  color: var(--danger);
}

/* ─── Offset paginator ──────────────────────────────────────────────────── */

.paginator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.paginator__info {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.paginator__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.paginator__btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.paginator__btn:hover:not(:disabled) {
  background: var(--surface-hover, rgba(0, 0, 0, 0.05));
}

.paginator__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.paginator__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.paginator__btn--active:hover:not(:disabled) {
  background: var(--primary);
}

.paginator__ellipsis {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

.paginator__page-size {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

/* ─── Load-more button ──────────────────────────────────────────────────── */

.load-more {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.load-more__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.load-more__btn:hover:not(:disabled) {
  background: var(--surface-hover, rgba(0, 0, 0, 0.05));
}

.load-more__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Global uppercase ──────────────────────────────────────────────────── */

input[type="text"],
input:not([type]),
textarea,
select {
  text-transform: uppercase;
}

input[type="email"] {
  text-transform: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-transfer-draft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  grid-gap: 12px;
  gap: 12px;
  align-items: end;
}

.inventory-transfer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(222, 211, 195, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
}

.inventory-transfer-card {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(255, 252, 246, 0.82);
}

.inventory-transfer-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.inventory-transfer-card__items {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.inventory-transfer-card__route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.inventory-transfer-card__arrow {
  color: var(--muted);
}

.inventory-transfer-card__summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-transfer-card__summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 69, 79, 0.06);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.inventory-transfer-item__name {
  min-width: 0;
}

.inventory-transfer-item__qty {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid rgba(16, 69, 79, 0.12);
  background: rgba(16, 69, 79, 0.08);
  color: var(--primary-strong);
}

.pill--sent {
  background: rgba(139, 94, 29, 0.12);
  border-color: rgba(139, 94, 29, 0.18);
  color: var(--warning);
}

.pill--received {
  background: rgba(31, 122, 85, 0.12);
  border-color: rgba(31, 122, 85, 0.18);
  color: var(--success);
}

.pill--in_transit {
  background: rgba(36, 99, 156, 0.12);
  border-color: rgba(36, 99, 156, 0.18);
  color: #245b91;
}

.pill--cancelled {
  background: rgba(180, 63, 63, 0.12);
  border-color: rgba(180, 63, 63, 0.18);
  color: var(--danger);
}

.inline-success {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(31, 122, 85, 0.12);
  color: var(--success);
}

.toolbar,
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toolbar {
  flex-wrap: wrap;
  align-items: end;
}

.toolbar--tight {
  gap: 8px;
}

.toolbar > * {
  flex: 1 1;
  min-width: 160px;
}

.pos-toolbar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  grid-gap: 6px;
  gap: 6px;
  align-items: center;
}

.pos-toolbar > * {
  min-width: 0;
}

.pos-toolbar__qty,
.pos-toolbar__search,
.pos-toolbar__action {
  min-width: 0;
}

.pos-toolbar__search .field,
.pos-toolbar__search .input,
.pos-toolbar__action .button {
  width: 100%;
}


.pos-workspace {
  height: calc(100dvh - 116px);
  overflow: hidden;
  align-items: stretch;
}

.split.pos-workspace {
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.45fr);
}

.pos-workspace > * {
  min-height: 0;
}

.pos-workspace .stack,
.pos-workspace .card {
  min-height: 0;
}

.pos-entry-panel,
.pos-checkout-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pos-entry-panel {
  border-color: rgba(16, 69, 79, 0.18);
  background:
    linear-gradient(180deg, rgba(244, 250, 248, 0.92) 0%, rgba(255, 253, 249, 0.9) 18%),
    rgba(255, 253, 249, 0.9);
}

.pos-entry-panel .card__header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(16, 69, 79, 0.08);
}

.pos-entry-panel .card__title {
  color: rgba(16, 69, 79, 0.92);
}

.pos-checkout-panel {
  border-color: rgba(155, 120, 64, 0.18);
  background:
    linear-gradient(180deg, rgba(250, 246, 238, 0.96) 0%, rgba(255, 253, 249, 0.92) 22%),
    rgba(255, 253, 249, 0.92);
}

.pos-checkout-panel .card__header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(155, 120, 64, 0.09);
}

.pos-checkout-panel .card__title {
  color: rgba(102, 74, 30, 0.92);
}

.pos-entry-panel .table-wrap {
  flex: 1 1;
  min-height: 0;
  max-height: none;
}

.pos-empty-state {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.cart-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.cart-panel__body {
  display: flex;
  flex: 1 1;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.2) transparent;
}

.cart-summary {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(255, 253, 249, 0.94);
}

.cart-summary--compact {
  gap: 10px;
  padding-top: 10px;
  margin-top: 0;
  align-content: start;
}

.cart-panel__body::-webkit-scrollbar {
  width: 8px;
}

.cart-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.cart-panel__body::-webkit-scrollbar-thumb {
  background: rgba(16, 69, 79, 0.18);
  border-radius: 999px;
}

.cart-panel__body::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 69, 79, 0.28);
}

.cart-summary__section,
.cart-summary__field {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.cart-summary__section--step-active,
.cart-summary__field--step-active {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(16, 69, 79, 0.16);
  background: rgba(16, 69, 79, 0.03);
}

.customer-search__results {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.customers-table__identity {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.customers-table__document {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.customers-table__document strong {
  font-size: 0.95rem;
}

.customers-table__document span {
  color: var(--muted);
  font-size: 0.82rem;
}

.customers-table__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.purchase-table__supplier {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.purchase-table__supplier strong {
  font-size: 0.95rem;
}

.purchase-table__supplier span {
  color: var(--muted);
  font-size: 0.82rem;
}

.purchase-detail-card {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(240, 231, 219, 0.45);
}

.purchase-detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-detail-card__header strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.purchase-detail-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.purchase-detail-card__grid > div {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.purchase-detail-card__note {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(222, 211, 195, 0.7);
}

.purchase-detail-card__note p {
  margin: 0;
  color: var(--muted);
}

.suppliers-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.suppliers-filters > .field,
.suppliers-filters > .field + .field,
.purchases-filters > .field,
.purchases-filters > .field + .field,
.sales-filters > .field,
.sales-filters > .field + .field {
  margin-top: 0;
}

.suppliers-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.suppliers-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-editor {
  gap: 8px;
}

.supplier-document-row {
  grid-template-columns: minmax(0, 1fr) 88px;
}

.supplier-document-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: rgba(255, 255, 255, 0.48);
}

.supplier-document-meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.supplier-document-meta strong {
  font-size: 0.92rem;
}

.purchases-filters {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 12px;
}

.purchases-filters__row {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  align-items: flex-end;
}

.purchases-filters__row--primary {
  grid-template-columns: minmax(0, 1.6fr) minmax(200px, 240px) auto;
}

.purchases-filters__row--secondary {
  grid-template-columns: repeat(2, minmax(170px, 210px)) auto;
  justify-content: flex-start;
}

.purchases-filters__search,
.purchases-filters__supplier,
.purchases-filters__date {
  min-width: 0;
  max-width: none;
}

.purchases-filters__actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.purchases-filters__toggle {
  white-space: nowrap;
}

.purchases-filters__clear {
  justify-self: start;
  align-self: flex-end;
  white-space: nowrap;
}

.purchase-entry-list {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.purchase-entry-row-card {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(255, 255, 255, 0.78);
}

.purchase-entry-row-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.purchase-entry-row-card__header strong {
  display: block;
  margin-top: 4px;
}

.purchase-entry-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.45fr) minmax(140px, 0.55fr) minmax(
      140px,
      0.6fr
    );
  grid-gap: 12px;
  gap: 12px;
  align-items: flex-end;
}

.purchase-entry-row-search {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  min-width: 0;
}

.purchase-entry-row-total {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(240, 231, 219, 0.45);
}

.purchase-entry-row-total strong {
  font-size: 1.05rem;
}

.purchase-entry-row-card__warning {
  margin: 0;
  color: var(--danger);
}

.purchase-supplier-note {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.82);
  background: rgba(240, 231, 219, 0.34);
}

.purchase-supplier-note strong {
  font-size: 0.95rem;
}

.purchase-supplier-note span,
.purchase-supplier-note__meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.purchase-supplier-note__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.purchase-summary-note {
  margin: 0;
  font-size: 0.84rem;
}

.purchase-detail-card__status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.purchase-receipt-stack {
  min-height: 0;
  overflow: hidden;
}

.purchase-slip {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.84);
  background: rgba(255, 255, 255, 0.76);
}

.purchase-slip__header,
.purchase-slip__item-head,
.purchase-slip__item-subline,
.purchase-slip__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.purchase-slip__brand {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.purchase-slip__title {
  font-size: 1.05rem;
}

.purchase-slip__status {
  font-weight: 700;
  color: var(--success);
}

.purchase-slip__summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.purchase-slip__summary-grid > div,
.purchase-slip__note {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.purchase-slip__items,
.purchase-slip__totals {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.purchase-slip__item {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.purchase-slip__item-subline {
  color: var(--muted);
  font-size: 0.88rem;
}

.purchase-slip--print-only {
  display: none;
}

.customer-lookup-card {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(240, 231, 219, 0.5);
}

.customer-lookup-card__row {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.customer-lookup-card__message {
  margin: 0;
}

.cash-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cash-metrics--compact {
  gap: 10px;
}

.cash-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(240, 231, 219, 0.42);
}

.cash-session-bar__timestamp {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card--compact {
  padding: 12px 14px;
}

.metric-card--compact .metric-card__value {
  margin-top: 2px;
  font-size: var(--metric-value-compact);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cash-open-card {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 300px;
  padding: 14px;
  height: -moz-fit-content;
  height: fit-content;
  align-self: flex-start;
}

.cash-open-card--disabled {
  background: rgba(255, 253, 249, 0.72);
  border-color: rgba(222, 211, 195, 0.72);
}

.cash-open-column {
  display: block;
  align-self: start;
}

.cash-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  align-items: flex-start;
}

.cash-layout__main,
.cash-layout__side {
  min-width: 0;
}

.cash-open-card__copy {
  margin: 0;
  font-size: 0.88rem;
}

.cash-open-card__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cash-audit-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}

.cash-panel {
  gap: 8px;
  padding: 12px;
}

.cash-panel--close {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.cash-audit-grid > .cash-panel:first-child {
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(222, 211, 195, 0.72);
  box-shadow: none;
}

.cash-panel__header {
  margin-bottom: 6px;
}

.cash-panel__caption {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(99, 91, 82, 0.86);
}

.cash-panel__section {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(222, 211, 195, 0.72);
}

.cash-panel__section--actions {
  margin-top: 0;
  padding-top: 12px;
}

.cash-panel__section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cash-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.cash-summary-tile {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 231, 219, 0.38);
}

.cash-summary-tile strong {
  font-size: 1.02rem;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cash-summary-tile--strong {
  background: rgba(240, 231, 219, 0.58);
}

.cash-summary-tile--strong strong {
  font-size: 1.16rem;
}

.cash-entry-panel {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  align-content: start;
}

.cash-entry-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  align-content: flex-start;
}

.cash-entry-hint {
  margin: 0;
  font-size: 0.88rem;
}

.cash-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  grid-gap: 12px;
  gap: 12px;
  align-items: end;
}

.cash-input-shell {
  display: grid;
  align-content: start;
}

.cash-input-shell .field {
  margin: 0;
}

.cash-input-shell .field__label {
  min-height: 18px;
}

.input--cash-count {
  width: 100%;
  min-height: 40px;
}

.cash-noncash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.cash-denominations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.cash-denomination-row {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: linear-gradient(
    180deg,
    rgba(255, 252, 246, 0.95) 0%,
    rgba(246, 238, 228, 0.78) 100%
  );
}

.cash-denomination-row__header,
.cash-denomination-row__total {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.cash-denomination-row__header {
  gap: 2px;
}

.cash-denomination-row__amount {
  font-size: 1.05rem;
  line-height: 1.1;
}

.cash-denomination-row__field {
  margin: 0;
}

.cash-count-total {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  align-content: center;
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 231, 219, 0.52);
}

.cash-count-total--modal {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: linear-gradient(
    135deg,
    rgba(246, 238, 228, 0.82) 0%,
    rgba(255, 252, 246, 0.96) 100%
  );
}

.cash-count-total strong {
  font-size: var(--metric-value-compact);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cash-denomination-modal__intro {
  max-width: 42ch;
}

.cash-denomination-modal__header,
.cash-denomination-modal__total,
.cash-denomination-modal__actions {
  margin-top: 2px;
}

.cash-denomination-modal__actions .button {
  min-width: 112px;
}

.cash-entry-row .field__label,
.cash-noncash-grid .field__label,
.cash-open-card .field__label {
  min-height: 18px;
  display: flex;
  align-items: center;
}

.cash-open-card--disabled .input {
  background: rgba(240, 231, 219, 0.7);
  color: var(--muted);
  border-color: rgba(222, 211, 195, 0.9);
}

.cash-difference--ok {
  color: var(--success);
}

.cash-difference--warning {
  color: var(--warning);
}

.cash-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cash-actions__copy {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.cash-actions__formula {
  font-size: 0.8rem;
}

.cash-close-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.72);
}

.cash-close-status--ok {
  background: rgba(231, 246, 237, 0.84);
  border-color: rgba(90, 151, 111, 0.32);
}

.cash-close-status--warning {
  background: rgba(255, 244, 228, 0.92);
  border-color: rgba(196, 131, 49, 0.3);
}

.cash-close-status--closed {
  background: rgba(240, 231, 219, 0.42);
}

.cash-close-status__title {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 700;
}

.cash-close-status__detail {
  margin: 4px 0 0;
}

.cash-close-status strong {
  font-size: 1.1rem;
  line-height: 1.2;
  text-align: right;
}

.cash-movement-type-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cash-movement-type-toggle__button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(222, 211, 195, 0.88);
  background: rgba(255, 252, 246, 0.92);
  color: var(--foreground);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cash-movement-type-toggle__button--active {
  border-color: rgba(161, 96, 32, 0.65);
  background: rgba(161, 96, 32, 0.12);
}

.cash-movement-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.cash-movement-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cash-movement-history__toggle {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cash-reason-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cash-reason-presets__button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(222, 211, 195, 0.88);
  background: rgba(255, 252, 246, 0.92);
  color: var(--foreground);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.modal-card--cash-movement {
  width: min(100%, 520px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.cash-movement-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 231, 219, 0.32);
}

.cash-movement-item__main {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.cash-movement-item__main strong {
  display: block;
}

.cash-movement-item__note {
  margin: 3px 0 0;
}

.cash-movement-item__side {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.cash-audit-grid > form,
.cash-audit-grid > .cash-panel {
  height: 100%;
}

.textarea--compact {
  min-height: 88px;
}

.textarea--xs {
  min-height: 58px;
}

.search-results {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

/* ── Product lookup component ─────────────────────────────────────── */

.pos-search {
  display: flex;
  flex-direction: column;
}

.pos-search__dropdown {
  border: 1px solid rgba(16, 69, 79, 0.16);
  border-radius: 14px;
  margin-top: 5px;
  overflow: hidden;
  background: var(--surface-strong);
  box-shadow: 0 4px 18px rgba(24, 20, 15, 0.09);
}

.pos-search__hint {
  margin: 0;
  padding: 9px 14px;
  font-size: 0.84rem;
  color: var(--muted);
}

.product-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  border-bottom: 1px solid rgba(222, 211, 195, 0.45);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 80ms ease;
}

.product-result:last-child {
  border-bottom: none;
}

.product-result:hover {
  background: rgba(16, 69, 79, 0.05);
}

.product-result--active {
  background: rgba(16, 69, 79, 0.07);
  box-shadow: inset 3px 0 0 var(--primary);
}

.product-result__body {
  flex: 1 1;
  min-width: 0;
}

.product-result__name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-result__name .customer-search__highlight {
  background: rgba(16, 69, 79, 0.18);
  color: var(--primary-strong);
  padding: 0 1px;
  border-radius: 3px;
  font-weight: 700;
}

.product-result__detail {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-result__price {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 1px;
}

.customer-search__selected,
.customer-search__result,
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(240, 231, 219, 0.42);
}

.customer-search__selection-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
}

.customer-search__selection-action:hover {
  text-decoration: underline;
}

.customer-selected {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px 0;
}

.customer-selected__identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.customer-selected__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-selected__id {
  font-size: 0.77rem;
  color: var(--muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.customer-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  grid-gap: 12px;
  gap: 12px;
}

.customer-document-row > .field + .field {
  margin-top: 0;
}

.customer-search__selected strong,
.customer-search__result strong,
.search-result strong {
  display: block;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-search__selected span,
.customer-search__result span,
.search-result span {
  display: block;
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--muted);
}

.customer-search__result,
.search-result {
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.customer-search__result:hover,
.search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 69, 79, 0.24);
  background: rgba(255, 253, 249, 0.92);
}

.search-result--active {
  transform: translateY(-1px);
  border-color: rgba(16, 69, 79, 0.28);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 0 0 1px rgba(16, 69, 79, 0.08);
}

.customer-search__highlight {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(16, 69, 79, 0.14);
  color: var(--primary-strong);
}

.customer-editor {
  gap: 6px;
}

.customer-editor .pricing-editor__section {
  padding: 6px 10px;
  gap: 4px;
}

.customer-editor .pricing-editor__section-title {
  font-size: 0.72rem;
}

.customer-form__message {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.customer-editor-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding: 10px 0 10px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.75);
}

.customer-balance-section {
  padding: 6px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
}

.customer-balance-section strong {
  font-size: 0.85rem;
}

.customer-balance-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.customer-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

.customer-editor-layout--three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.customer-editor-layout__left {
  min-width: 0;
}

.customer-editor-layout__right {
  min-width: 0;
}

.customer-credit-fields {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 6px;
  gap: 6px;
  margin: 4px 0;
}

.customer-compact-card {
  padding: 6px 0;
}

.customer-compact-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
}

.customer-detail-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}

.customer-scrollable-table {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 4px;
}

.receipt-a4__amount-box {
  text-align: right;
}

.receipt-a4__amount {
  font-size: 1.5rem;
  display: block;
}

.receipt-a4__totals {
  margin-top: 12px;
  border-top: 1px solid #ddd;
  padding-top: 8px;
}

.receipt-a4__totals-row {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 2px 0;
}

.receipt-a4__footer {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

.customer-editor-note__identity {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.customer-editor-note__identity strong {
  font-size: 0.96rem;
}

.customer-editor-note__identity span,
.customer-registry-meta,
.customer-document-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.customer-registry-meta strong,
.customer-document-meta strong {
  color: var(--foreground);
  font-size: 0.86rem;
}

.customer-registry-meta em,
.customer-document-meta em {
  font-style: normal;
}

.pricing-summary-grid.customers-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customers-summary-grid .pricing-summary-card {
  min-height: 0;
  padding: 10px 12px;
}

.customers-summary-grid .pricing-summary-card span {
  font-size: 0.8rem;
}

.customers-summary-grid .pricing-summary-card strong {
  font-size: 1.05rem;
}

/* ── Customers page layout ───────────────────────────────────────────────── */

.customers-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customers-page-header h2 {
  margin: 0;
  font-size: var(--heading-card);
  font-weight: 700;
}

.customers-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 10px;
}

.customers-filters__search {
  flex: 1 1;
}

.customers-filters__quick {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 1px;
  flex-shrink: 0;
}

.customers-table__row {
  cursor: pointer;
  transition: background 0.1s;
}

.customers-table__row td {
  padding: 13px 8px;
}

.customers-table__row:hover {
  background: rgba(16, 69, 79, 0.04);
}

.customers-table__row:focus-visible {
  outline: 2px solid rgba(16, 69, 79, 0.35);
  outline-offset: -2px;
}

.customers-table__action {
  opacity: 0;
  transition: opacity 0.1s;
}

.customers-table__row:hover .customers-table__action,
.customers-table__row:focus-visible .customers-table__action {
  opacity: 1;
}

@media (max-width: 640px) {
  .customers-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-filters__quick {
    padding-bottom: 0;
  }
}

.cart-summary__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary__section-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-summary__submit {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.payment-condition-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.toggle-option {
  flex: 1 1;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.toggle-option:hover {
  background: var(--surface-muted);
}

.toggle-option--active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.text-warning {
  color: var(--warning);
}

/* Credit Plan — POS inline */
.credit-plan-inline__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.credit-plan-summary {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(16, 69, 150, 0.05);
  border: 1px solid rgba(16, 69, 150, 0.1);
}

.credit-plan-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 1px 0;
}

/* Credit Plan — Modal */
.credit-plan-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.credit-plan-preset {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.credit-plan-preset:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.credit-plan-resumen {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
  margin-bottom: 12px;
}

.credit-plan-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
}

.credit-plan-form__plan-type {
  grid-column: 1 / -1;
}

.credit-schedule-preview {
  margin-top: 12px;
}

.inline-success {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(31, 122, 85, 0.08);
  color: var(--success);
  font-size: 0.85rem;
}

.credit-schedule-stale {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header h1 {
  margin: 0;
  font-size: var(--heading-page);
}

.receipts-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  grid-gap: 16px;
  gap: 16px;
}

.receipts-layout__list {
  min-width: 0;
}

.table-row--selected {
  background: rgba(16, 69, 150, 0.06);
}

.receipt-apply__header {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.receipt-apply__summary {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-muted);
  display: flex;
  gap: 24px;
}

.receipt-apply__summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.text-danger {
  color: var(--danger);
}

.ar-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.ar-method-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cart-summary__submit:disabled {
  opacity: 0.38;
}

.cart-summary__header-end {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Keyboard shortcut badge ── */
.kbd-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  border-radius: 5px;
  border: 1px solid rgba(16, 69, 79, 0.18);
  background: rgba(16, 69, 79, 0.05);
  color: var(--muted);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cart-summary__section--step-active .kbd-shortcut,
.cart-summary__field--step-active .kbd-shortcut,
.pos-entry-panel--step-active .kbd-shortcut {
  background: rgba(16, 69, 79, 0.12);
  border-color: rgba(16, 69, 79, 0.3);
  color: rgba(16, 69, 79, 0.8);
}

/* ── Floating shortcut helper panel ── */
.shortcut-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.shortcut-panel__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 69, 79, 0.15);
  background: rgba(255, 253, 249, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.15s;
}

.shortcut-panel__toggle:hover {
  background: rgba(16, 69, 79, 0.06);
  border-color: rgba(16, 69, 79, 0.25);
}

.shortcut-panel__toggle .kbd-shortcut {
  pointer-events: none;
}

.shortcut-panel__list {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16, 69, 79, 0.12);
  background: rgba(255, 253, 249, 0.97);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: grid;
  grid-gap: 5px;
  gap: 5px;
}

.shortcut-panel__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--muted);
}

.shortcut-panel__row .kbd-shortcut {
  flex-shrink: 0;
  min-width: 36px;
  text-align: center;
}

.cart-total {
  font-size: 2.2rem;
  font-weight: 700;
}

.cart-totals {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(240, 231, 219, 0.6);
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-totals__row strong {
  color: var(--text);
}

.cart-totals__row--total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(222, 211, 195, 0.9);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.cart-totals__row--total strong {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.cart-totals__meta {
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(222, 211, 195, 0.9);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.table__item-name {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.table__item-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.products-page__catalog-card .card__header,
.products-page__editor-card .card__header {
  align-items: flex-end;
}

.products-page__editor-card {
  background: rgba(255, 253, 249, 0.82);
}

.products-page__editor-card .muted {
  margin-bottom: 10px;
}

.product-form {
  gap: 10px;
}

.product-form__section {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.72);
}

.product-form__section--branch {
  background: rgba(240, 231, 219, 0.28);
}

.product-form__section-header {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.product-form__section-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── New product modal (npm-*) ───────────────────────────────────────────── */

.modal-card--product {
  width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 960px) {
  .modal-card--product {
    width: min(100%, 880px);
  }
}

.npm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
  flex-shrink: 0;
}

.npm-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.npm-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: 4px;
  line-height: 1;
}

.npm-close:hover {
  color: var(--fg);
  background: var(--surface-raised, #f3f4f6);
}

/* ── Form scrollable body ────────────────────────────────────────────────── */

.npm-form {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.npm-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.npm-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.npm-section__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Two-column grid ─────────────────────────────────────────────────────── */

.npm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  align-items: end;
}

.npm-grid__full {
  grid-column: 1 / -1;
}

/* ── ₲ prefix input ──────────────────────────────────────────────────────── */

.npm-prefix-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border, #e0d8d0);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface, #fff);
  transition: border-color 0.15s;
}

.npm-prefix-wrap:focus-within {
  border-color: var(--accent, #0057b7);
  box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.08);
}

.npm-prefix-wrap--error {
  border-color: var(--danger);
}

.npm-prefix-wrap__symbol {
  padding: 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  border-right: 1px solid var(--border, #e0d8d0);
  background: var(--surface-raised, #f9fafb);
  align-self: stretch;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.npm-prefix-wrap__input {
  flex: 1 1;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
}

.npm-prefix-wrap--sm .npm-prefix-wrap__input {
  padding-left: 6px;
  padding-right: 6px;
}

/* ── Net price note ──────────────────────────────────────────────────────── */

.npm-net-price {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ── Tiers card ──────────────────────────────────────────────────────────── */

.npm-tiers-card {
  background: var(--surface-raised, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
}

.npm-tiers-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.npm-tiers-card__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
}

.npm-tiers-card__subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 3px 0 0;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */

.npm-toggle {
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.npm-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.npm-toggle__track {
  width: 34px;
  height: 18px;
  background: var(--border, #d1d5db);
  border-radius: 99px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.npm-toggle__track::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.npm-toggle__input:checked + .npm-toggle__track {
  background: var(--accent, #0057b7);
}

.npm-toggle__input:checked + .npm-toggle__track::after {
  transform: translateX(16px);
}

/* ── Tier animate (grid-template-rows trick) ─────────────────────────────── */

.npm-tiers-animate {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
}

.npm-tiers-animate--open {
  grid-template-rows: 1fr;
}

.npm-tiers-body {
  overflow: hidden;
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.npm-tiers-animate--open .npm-tiers-body {
  padding-top: 12px;
}

/* ── Tier table ──────────────────────────────────────────────────────────── */

.npm-tiers-cols {
  display: grid;
  grid-template-columns: 68px 68px 1fr 20px;
  grid-gap: 6px;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 2px;
}

.npm-tier-row {
  display: grid;
  grid-template-columns: 68px 68px 1fr 20px;
  grid-gap: 6px;
  gap: 6px;
  align-items: center;
}

.npm-tier-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.1s, color 0.1s;
}

.npm-tier-remove:hover:not(:disabled) {
  color: var(--danger);
  opacity: 1;
}

.npm-tier-remove:disabled {
  opacity: 0.2;
  cursor: default;
}

.npm-tier-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin: 2px 0 0;
}

.npm-add-tier {
  background: none;
  border: 1px dashed var(--border, #d1d5db);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: var(--accent, #0057b7);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  margin-top: 2px;
}

.npm-add-tier:hover {
  background: rgba(0, 87, 183, 0.04);
  border-color: var(--accent, #0057b7);
}

/* ── Footer CTA ──────────────────────────────────────────────────────────── */

.npm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #e5e7eb);
  margin-top: 24px;
}

.product-form__price-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(240, 231, 219, 0.42);
}

.product-form__price-metric {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.product-form__price-metric span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-form__price-metric strong {
  font-size: 0.94rem;
  color: var(--foreground);
}

.products-table th,
.products-table td {
  padding: 8px 8px;
}

.products-table th {
  font-size: 0.76rem;
}

.products-table .table__item-name {
  gap: 1px;
}

.products-table .table__item-name strong {
  font-size: 0.94rem;
}

.products-table .table__item-meta {
  font-size: 0.76rem;
}

.products-table__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.products-table__actions .button {
  min-width: 0;
}

.ticket {
  padding: 18px;
  background: white;
  border-radius: 18px;
  border: 1px dashed var(--border);
}

.ticket--modal {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  min-height: 0;
}

.ticket--receipt {
  padding: 14px;
  gap: 10px;
  border-style: solid;
  border-color: rgba(222, 211, 195, 0.9);
  background: rgba(255, 255, 255, 0.86);
}

.ticket__brand {
  display: grid;
  justify-items: center;
  grid-gap: 2px;
  gap: 2px;
  text-align: center;
}

.ticket__brand-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket__brand-copy {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticket__brand-detail {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.ticket__meta,
.ticket__summary,
.ticket__header,
.ticket__summary-grid,
.ticket__totals-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.ticket__header--receipt {
  align-items: flex-start;
}

.ticket__header,
.ticket__summary-grid {
  align-items: flex-start;
}

.ticket__summary-grid {
  padding-bottom: 4px;
}

.ticket__sale-id {
  display: block;
  margin-top: 4px;
}

.ticket__status-group {
  text-align: right;
}

.ticket__status {
  display: block;
  margin-top: 4px;
  text-transform: capitalize;
}

.ticket__item-name {
  font-weight: 600;
}

.ticket__item-note {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ticket__divider {
  border-top: 1px dashed rgba(99, 91, 82, 0.4);
}

.ticket__items-wrap {
  max-height: 260px;
}

.ticket__items {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.ticket__item-row {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.ticket__item-head,
.ticket__item-subline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ticket__item-head {
  align-items: flex-start;
}

.ticket__item-line-total {
  white-space: nowrap;
}

.ticket__item-subline {
  font-size: 0.82rem;
  color: var(--muted);
}

.ticket__totals {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding-top: 4px;
}

.ticket__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.ticket__totals-row--total {
  padding-top: 8px;
  border-top: 1px solid rgba(222, 211, 195, 0.9);
}

.ticket__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.ticket__summary {
  font-size: 0.94rem;
}

.ticket__credit-info {
  padding: 8px 0;
  font-size: 0.85rem;
}

.ticket__credit-info p {
  margin: 2px 0;
}

.ticket__section-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin: 4px 0;
}

.ticket__totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 2px 0;
}

.ticket__ref {
  padding: 4px 0;
}

.ticket__footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.ticket__cancelled-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(180, 63, 63, 0.1);
  color: var(--danger);
  font-size: 0.92rem;
}

.ticket__footer {
  display: grid;
  justify-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.ticket-payment-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-muted);
}

.ticket-payment-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 800;
}

.ticket-payment-summary__change {
  text-align: right;
}

.ticket-payment-summary__change strong {
  font-size: 1.35rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 29, 26, 0.32);
  z-index: 50;
}

.modal-card {
  width: min(100%, 460px);
  border-radius: 22px;
  border: 1px solid rgba(222, 211, 195, 0.9);
  background: rgba(255, 253, 249, 0.99);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-card--narrow {
  width: min(100%, 480px);
}

.modal-card--wide {
  width: min(100%, 960px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 14px 18px;
}

.modal-card--extra-wide {
  width: min(100%, 1100px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 14px 18px;
}

.modal-card--cash-denomination {
  width: min(100%, 520px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.modal-card--receipt {
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.modal-card--sale-detail {
  width: min(100%, 660px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}

.modal-card--sale-detail > .sale-receipt-detail {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
}

.modal-card--user-create {
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.modal-card__header,
.modal-card__actions,
.cash-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-card__header {
  margin-bottom: 8px;
}

.modal-card__actions {
  justify-content: flex-end;
}

.modal-card__actions--spread {
  justify-content: space-between;
}

.modal-card__body {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.modal-card__body--registry {
  margin-top: 4px;
}

.modal-card--receipt .stack {
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

.modal-card--sale-detail > .stack {
  min-height: 0;
  overflow: auto;
  gap: 12px;
  padding-right: 4px;
}

.cash-summary {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-muted);
}

.cash-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.3rem;
}

.cash-summary__change-block {
  text-align: right;
}

.cash-summary__change-value {
  font-size: 1.55rem;
  font-weight: 800;
}

.receipt-stack .metric-card__label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.sale-detail {
  min-height: 0;
}

.sale-detail__overview {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  grid-gap: 10px;
  gap: 10px;
  align-items: stretch;
}

.sale-detail__overview-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.sale-detail__fact {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(222, 211, 195, 0.72);
}

.sale-detail__fact strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.sale-detail__item-name {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.sale-detail__item-name strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.sale-detail__item-name span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── Receipt-style sale detail (used in completion modal + sales history) ─── */

.sale-receipt-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sale-receipt-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.7);
}

.sale-receipt-detail__identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sale-receipt-detail__identity .muted {
  font-size: 0.78rem;
}

.sale-receipt-detail__doc-number {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.sale-receipt-detail__context {
  display: flex;
  gap: 18px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
  font-size: 0.8rem;
}

.sale-receipt-detail__context-row {
  display: flex;
  gap: 5px;
}

.sale-receipt-detail__section {
  padding: 6px 14px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
}

.sale-receipt-detail__section:last-child {
  border-bottom: none;
}

.sale-receipt-detail__items-scroll {
  max-height: 200px;
  overflow-y: auto;
}

.sale-receipt-detail__section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.sale-receipt-detail__section-title {
  font-weight: 700;
  font-size: 0.82rem;
}

.sale-receipt-detail__table {
  width: 100%;
  font-size: 0.8rem;
  table-layout: fixed;
}

.sale-receipt-detail__table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: rgba(255, 253, 249, 0.98);
  z-index: 1;
  font-size: 0.72rem;
  padding: 4px 6px;
  text-align: left;
}

.sale-receipt-detail__table td {
  padding: 5px 6px;
  vertical-align: middle;
}

.sale-receipt-detail__table .input--compact {
  font-size: 0.8rem;
  padding: 4px 6px;
  max-width: 60px;
}

/* Column widths for return items table (4 cols: product, unit, available, qty) */
.sale-receipt-detail__table--return th:nth-child(1),
.sale-receipt-detail__table--return td:nth-child(1) { width: 42%; }
.sale-receipt-detail__table--return th:nth-child(2),
.sale-receipt-detail__table--return td:nth-child(2) { width: 20%; }
.sale-receipt-detail__table--return th:nth-child(3),
.sale-receipt-detail__table--return td:nth-child(3) { width: 20%; text-align: center; }
.sale-receipt-detail__table--return th:nth-child(4),
.sale-receipt-detail__table--return td:nth-child(4) { width: 18%; text-align: center; }

/* Column widths for sale items table (5 cols: product, qty, unit, tax, total) */
.sale-receipt-detail__table--items th:nth-child(1),
.sale-receipt-detail__table--items td:nth-child(1) { width: 36%; }
.sale-receipt-detail__table--items th:nth-child(2),
.sale-receipt-detail__table--items td:nth-child(2) { width: 12%; text-align: center; }
.sale-receipt-detail__table--items th:nth-child(3),
.sale-receipt-detail__table--items td:nth-child(3) { width: 18%; text-align: right; }
.sale-receipt-detail__table--items th:nth-child(4),
.sale-receipt-detail__table--items td:nth-child(4) { width: 14%; text-align: center; }
.sale-receipt-detail__table--items th:nth-child(5),
.sale-receipt-detail__table--items td:nth-child(5) { width: 20%; text-align: right; }

/* Column widths for replacement items table (5 cols: product, qty, unit, total, action) */
.sale-receipt-detail__table--replace th:nth-child(1),
.sale-receipt-detail__table--replace td:nth-child(1) { width: 34%; }
.sale-receipt-detail__table--replace th:nth-child(2),
.sale-receipt-detail__table--replace td:nth-child(2) { width: 14%; text-align: center; }
.sale-receipt-detail__table--replace th:nth-child(3),
.sale-receipt-detail__table--replace td:nth-child(3) { width: 18%; text-align: right; }
.sale-receipt-detail__table--replace th:nth-child(4),
.sale-receipt-detail__table--replace td:nth-child(4) { width: 20%; text-align: right; }
.sale-receipt-detail__table--replace th:nth-child(5),
.sale-receipt-detail__table--replace td:nth-child(5) { width: 14%; text-align: center; }

.sale-receipt-detail__item-name {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
}

.sale-receipt-detail__item-name strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.sale-receipt-detail__item-name .muted {
  font-size: 0.7rem;
}

.sale-receipt-detail__totals {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  font-size: 0.84rem;
}

.sale-receipt-detail__total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.sale-receipt-detail__total-row strong {
  color: var(--text);
}

.sale-receipt-detail__total-row--grand {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(222, 211, 195, 0.9);
  color: var(--text);
}

.sale-receipt-detail__total-row--grand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sale-receipt-detail__payment {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 14px;
  background: var(--surface-muted);
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
}

.sale-receipt-detail__payment strong {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
}

.sale-receipt-detail__credit-badges {
  display: flex;
  gap: 6px;
}

.sale-receipt-detail__cancelled {
  padding: 10px 12px;
  margin: 0 16px;
  border-radius: 10px;
  background: rgba(180, 63, 63, 0.08);
  color: var(--danger);
}

.ticket--print-only {
  display: none;
}

.sale-detail__workflow {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.sale-follow-up {
  display: grid;
  grid-gap: 9px;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: rgba(255, 255, 255, 0.72);
}

.sale-follow-up__group {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  min-width: 0;
}

.sale-follow-up__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.sale-follow-up__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.sale-follow-up__header h3 {
  margin: 0;
  font-size: 0.98rem;
}

.sale-follow-up__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sale-follow-up__tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.sale-follow-up__tab:hover {
  border-color: rgba(16, 69, 79, 0.24);
  color: var(--text);
}

.sale-follow-up__tab--active {
  border-color: rgba(16, 69, 79, 0.18);
  background: rgba(255, 255, 255, 0.98);
  color: var(--primary-strong);
}

.sale-follow-up__tab--danger {
  color: var(--danger);
}

.sale-follow-up__tab--danger:hover {
  border-color: rgba(214, 109, 109, 0.3);
  color: var(--danger);
}

.sale-operation {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(222, 211, 195, 0.76);
  background: rgba(255, 255, 255, 0.76);
}

.sale-operation--active {
  border-color: rgba(222, 211, 195, 0.84);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(58, 44, 26, 0.04);
}

.sale-operation__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sale-operation__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.sale-operation__body {
  gap: 14px;
}

.sale-workflow-summary {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: rgba(255, 255, 255, 0.78);
}

.sale-workflow-summary strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.sale-workflow-summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.sale-detail__notice {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.72);
  background: rgba(255, 255, 255, 0.68);
}

.sale-detail__notice--danger {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(214, 109, 109, 0.26);
}

.sale-detail__footer {
  padding-top: 6px;
  border-top: 1px solid rgba(222, 211, 195, 0.56);
}

.sale-detail__footer-actions {
  align-items: center;
}

.sale-operation__body > .input {
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.sale-operation__body > .input--compact {
  min-height: 38px;
}

.sale-exchange-search {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.sale-exchange-search > .field,
.sale-exchange-search > .field .input {
  width: 100%;
  max-width: none;
}

.sale-exchange-search__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 180px;
  overflow: auto;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.sale-operation__body > .field {
  gap: 5px;
}

.sale-operation__body > .field .field__label {
  font-size: 0.84rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  grid-gap: 16px;
  gap: 16px;
}

.split--balanced {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.sales-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px 12px;
  background: rgba(248, 245, 240, 0.55);
  border: 1px solid rgba(222, 211, 195, 0.5);
  border-radius: 10px;
  margin-bottom: 14px;
}

.sales-filters__fields {
  flex: 1 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.sales-card {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(250, 246, 240, 0.88));
}

.sales-card__returns-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 0;
  transition: color 140ms ease;
}

.sales-card__returns-link:hover {
  color: var(--primary-strong);
}

.sales-filters__actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  flex-shrink: 0;
  min-width: 80px;
}

.sales-results-summary {
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.sales-history-viewport {
  min-height: 520px;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 6px;
  outline: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.2) transparent;
  scrollbar-gutter: stable;
}

.sales-history-viewport__fill {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-history-viewport .sales-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-strong);
  box-shadow: 0 1px 0 var(--border);
}

.sales-th--total {
  text-align: right;
  min-width: 110px;
}

.sales-td--detail {
  text-align: right;
  white-space: nowrap;
}

.sales-table th {
  padding-top: 8px;
  padding-bottom: 8px;
}

.sales-history__row td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}

.sales-history__row:hover td {
  background: rgba(16, 69, 79, 0.035);
}

.sales-history__cell {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
}

.sales-history__cell strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.3;
}

.sales-history__cell span {
  font-size: 0.72rem;
  color: rgba(103, 91, 76, 0.52);
  line-height: 1.3;
}

.sales-history__name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-900);
}

.sales-history__meta {
  font-size: 0.78rem;
  color: rgba(103, 91, 76, 0.52);
}

.sales-history__total {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-align: right;
  min-width: 110px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.sales-history__status {
  white-space: nowrap;
}

.sales-history__detail {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  background: transparent;
  border: 1px solid rgba(16, 69, 79, 0.22);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.sales-history__detail:hover {
  background: rgba(16, 69, 79, 0.07);
  color: var(--primary-strong);
  border-color: rgba(16, 69, 79, 0.4);
}

.sales-history__detail:focus-visible {
  outline: 2px solid rgba(16, 69, 79, 0.28);
  outline-offset: 1px;
  border-radius: 6px;
}

.settings-grid {
  display: grid;
  grid-gap: 0.9rem;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-admin {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-gap: 0;
  gap: 0;
  align-items: start;
}

.settings-admin__nav {
  position: -webkit-sticky;
  position: sticky;
  top: 18px;
  padding-right: 16px;
  border-right: 1px solid rgba(222, 211, 195, 0.6);
}

.settings-admin__content {
  padding-left: 24px;
  min-width: 0;
}

.user-access-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.66fr) minmax(0, 1.34fr);
  grid-gap: 0;
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(222, 211, 195, 0.65);
  border-radius: 14px;
  /* NO overflow: hidden — prevents combobox dropdown from being clipped */
}

.user-access-workspace__list {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(222, 211, 195, 0.65);
  border-radius: 14px 0 0 14px; /* clip list content to workspace corners */
}

.user-access-workspace__editor {
  min-width: 0;
  padding: 16px 20px;
}

/* ─── Branch detail panel (3-section layout) ───────────────── */
.branch-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.branch-detail__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.55);
}

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

.branch-detail__header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.branch-detail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.branch-detail__section {
  padding-top: 16px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.branch-detail__section--separated {
  padding-top: 16px;
  border-top: 1px solid rgba(222, 211, 195, 0.5);
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.branch-detail__section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.branch-detail__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-access-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.5);
  flex-shrink: 0;
}

.user-access-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 400px;
}

.user-access-list-item {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  width: 100%;
  padding: 8px 14px;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(222, 211, 195, 0.3);
  border-radius: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.1s ease;
}

.user-access-list-item:last-child {
  border-bottom: none;
}

.user-access-list-item:hover {
  background: rgba(16, 69, 79, 0.04);
}

.user-access-list-item--active {
  background: rgba(16, 69, 79, 0.11);
  box-shadow: inset 3px 0 0 rgba(16, 69, 79, 0.7);
}

.user-access-list-item--active strong {
  color: rgba(16, 69, 79, 0.9);
}

.user-access-list-item strong {
  font-size: 0.88rem;
}

.user-access-list-item span,
.user-access-list-item small {
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-access-list-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


/* Compact member rows inside branch detail */
.branch-member-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 210px;
  border: 1px solid rgba(222, 211, 195, 0.45);
  border-radius: 10px;
  background: rgba(255, 252, 248, 0.6);
}

.branch-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.3);
  min-height: 44px;
  transition: background 0.1s ease;
}

.branch-member-row:hover {
  background: rgba(16, 69, 79, 0.04);
}

.branch-member-row:last-child {
  border-bottom: none;
}

.branch-member-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.branch-member-row__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.branch-member-row__role {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Small bordered action button — for secondary actions like Disable/Enable in headers */
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  min-height: 28px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid rgba(222, 211, 195, 0.9);
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.btn-outline-sm:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(16, 69, 79, 0.3);
  background: rgba(16, 69, 79, 0.04);
}

.btn-outline-sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-outline-sm--danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}

.btn-outline-sm--danger:hover:not(:disabled) {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.55);
  background: rgba(185, 28, 28, 0.05);
}

/* Actions cluster on the right side of a warehouse row */
.warehouse-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Positive ghost action — secondary at rest, teal on hover (e.g. "Mark as main") */
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  min-height: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.branch-member-row:hover .btn-ghost-sm,
.btn-ghost-sm:focus-visible {
  opacity: 1;
}

.btn-ghost-sm:hover:not(:disabled) {
  color: var(--primary, #10454f);
  background: rgba(16, 69, 79, 0.07);
}

.btn-ghost-sm:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Lightweight remove action — secondary at rest, red on hover */
.btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  min-height: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.branch-member-row:hover .btn-remove,
.btn-remove:focus-visible {
  opacity: 1;
}

.btn-remove:hover:not(:disabled) {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
}

.btn-remove:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Searchable user combobox */
.user-combobox {
  position: relative;
}

.user-combobox__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.user-combobox__row .user-combobox__input {
  flex: 1 1;
  min-width: 0;
  width: auto;
}

.user-combobox__input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(222, 211, 195, 0.85);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}

.user-combobox__input::placeholder {
  color: var(--muted);
}

.user-combobox__input:focus {
  border-color: rgba(16, 69, 79, 0.38);
  box-shadow: 0 0 0 3px rgba(16, 69, 79, 0.06);
}

/* Shows a subtle tint when a user has been selected and is pending add */
.user-combobox__input--selected {
  border-color: rgba(16, 69, 79, 0.35);
  background: rgba(16, 69, 79, 0.03);
}

.user-combobox__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-combobox__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: white;
  border: 1px solid rgba(222, 211, 195, 0.85);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(38, 30, 22, 0.1);
  overflow-y: auto;
  max-height: 220px;
}

.user-combobox__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.1s ease;
  min-height: 48px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.25);
}

.user-combobox__option:last-child {
  border-bottom: none;
}

.user-combobox__option:hover {
  background: rgba(16, 69, 79, 0.05);
}

.user-combobox__option--highlighted {
  background: rgba(16, 69, 79, 0.07);
  box-shadow: inset 2px 0 0 rgba(16, 69, 79, 0.45);
}

.user-combobox__name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.user-combobox__role {
  font-size: 0.79rem;
  color: var(--muted);
}

.user-combobox__empty {
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}


.user-branch-check-list {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: rgba(255, 252, 248, 0.6);
  overflow: hidden;
}

.user-branch-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(222, 211, 195, 0.35);
  cursor: pointer;
}

.user-branch-check-row:last-child {
  border-bottom: none;
}

.user-branch-check-row:hover {
  background: rgba(16, 69, 79, 0.04);
}

.user-branch-check-row__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-branch-check-row__info span {
  font-size: 0.875rem;
  font-weight: 600;
}

.user-branch-check-row__info small {
  font-size: 0.78rem;
  color: var(--muted);
}


.user-access-permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(222, 211, 195, 0.68);
  background: rgba(255, 255, 255, 0.68);
}

.settings-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.settings-nav-item:hover {
  background: rgba(16, 69, 79, 0.06);
  color: var(--text);
}

.settings-nav-item--active {
  background: rgba(16, 69, 79, 0.1);
  color: var(--text);
  font-weight: 600;
}

.field--checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field--checkbox input {
  width: 16px;
  height: 16px;
}

.pricing-records {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.pricing-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}

.pricing-workspace .card {
  padding: 14px 16px;
}

.pricing-workspace .card__header {
  margin-bottom: 10px;
  gap: 12px;
}

.pricing-workspace__menu {
  position: -webkit-sticky;
  position: sticky;
  top: 2px;
  margin-top: 0;
}

.pricing-workspace__content {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
}

.pricing-section {
  gap: 14px;
}

.pricing-menu-item {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.92);
  background: rgba(255, 255, 255, 0.64);
  text-align: left;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pricing-menu-item span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.pricing-menu-item:hover,
.pricing-menu-item--active {
  border-color: rgba(16, 69, 79, 0.18);
  background: rgba(240, 231, 219, 0.4);
  transform: translateY(-1px);
}

.pricing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.pricing-summary-card {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.74);
  background: rgba(255, 255, 255, 0.48);
}

.pricing-summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.pricing-summary-card strong {
  font-size: var(--summary-value);
  color: var(--primary-strong);
}

.pricing-record {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  padding: 10px 11px;
  text-align: left;
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.72);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.pricing-record:hover,
.pricing-record--active {
  border-color: rgba(199, 176, 148, 0.82);
  box-shadow: 0 10px 22px rgba(64, 45, 23, 0.08);
  transform: translateY(-1px);
}

.pricing-record span {
  color: var(--muted);
  font-size: 0.84rem;
}

.pricing-record__header,
.pricing-record__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pricing-editor {
  gap: 8px;
}

.pricing-editor__section {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(222, 211, 195, 0.66);
  background: rgba(255, 255, 255, 0.34);
}

.pricing-editor__section-header {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.pricing-editor__section-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pricing-editor__checkbox {
  justify-content: flex-start;
}

.pricing-table th,
.pricing-table td {
  vertical-align: middle;
  padding-top: 8px;
  padding-bottom: 8px;
}

.pricing-list-card .empty-state,
.pricing-editor-card .empty-state {
  padding: 12px 14px;
  border-radius: 16px;
}

.pricing-list-card .empty-state h3,
.pricing-editor-card .empty-state h3 {
  margin: 0 0 6px;
}

.pricing-list-card .empty-state p,
.pricing-editor-card .empty-state p {
  margin: 0;
  line-height: 1.4;
}

.pricing-editor .field {
  gap: 6px;
}

.pricing-editor .field__label {
  font-size: 0.84rem;
}

.pricing-table__item {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.pricing-table__item span {
  color: var(--muted);
  font-size: 0.82rem;
}


.role-list-group-label {
  padding: 8px 14px 4px;
}

.role-list-group-label--separated {
  padding-top: 10px;
  border-top: 1px solid rgba(222, 211, 195, 0.4);
  margin-top: 4px;
}

.role-list-empty {
  padding: 10px 14px;
}

.role-list-empty span {
  color: var(--muted);
  font-size: 0.84rem;
}

.role-detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 0.88rem;
}

/* Two-column grid for permission category groups */
.role-permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  align-items: start;
}

/* Name + description side by side in role editor */
.role-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  align-items: start;
}

.admin-disable-summary {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(222, 211, 195, 0.85);
  background: rgba(255, 252, 246, 0.86);
}

.pricing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
}

.pricing-form-grid--category {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pricing-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(240, 231, 219, 0.72);
  color: var(--text);
  font-size: 0.84rem;
}

.settings-info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-gap: 8px 16px;
  gap: 8px 16px;
  align-items: baseline;
}

.settings-info-grid .field__label {
  color: var(--muted);
  white-space: nowrap;
}


.settings-preview {
  display: grid;
  grid-gap: 0.55rem;
  gap: 0.55rem;
  padding: 16px;
  background: rgba(250, 247, 242, 0.85);
  border: 1px solid rgba(222, 211, 195, 0.65);
  border-radius: 10px;
  color: var(--ink-700);
  font-size: 0.84rem;
}

.settings-preview strong {
  font-size: 1.05rem;
  color: var(--ink-900);
}

.sales-filters__field {
  min-width: 0;
  max-width: none;
}

@media (max-width: 1400px) and (min-width: 1101px) {
  :root {
    --sidebar-width: 180px;
  }

  .shell__content {
    padding: 14px 16px 16px;
  }

  .shell__nav-link {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .modal-card--wide {
    width: min(100%, 880px);
  }

  .modal-card--extra-wide {
    width: min(100%, 1020px);
  }
}

@media (max-width: 1360px) {
  .cash-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
    gap: 14px;
  }

  .cash-audit-grid {
    grid-template-columns: 1fr;
  }

  .cash-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cash-layout {
    grid-template-columns: 1fr;
  }

  .cash-layout__side {
    order: -1;
  }

  .cash-open-column {
    display: block;
  }

  .cash-open-card {
    position: static;
    max-width: none;
    width: 100%;
  }

  .cash-session-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-entry-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-actions,
  .cash-movement-item,
  .cash-movement-history__header,
  .cash-close-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-movement-item__side {
    justify-items: start;
    text-align: left;
  }

  .cash-close-status strong {
    text-align: left;
  }

  .modal-card--cash-denomination {
    width: min(100%, 500px);
  }

  .modal-card--cash-movement {
    width: min(100%, 500px);
  }
}

@media (min-width: 1200px) {
  .table-wrap {
    max-height: calc(100vh - 310px);
  }
}

@media (max-height: 840px) and (min-width: 1101px) {
  .pos-workspace {
    height: calc(100dvh - 108px);
  }

  .card {
    padding: 16px;
  }

  .card__header {
    margin-bottom: 10px;
  }

  .table th,
  .table td {
    padding: 8px 6px;
  }

  .cart-totals {
    padding: 10px;
  }
}

@media (max-height: 760px) and (min-width: 1101px) {
  .shell__topbar {
    padding-top: 10px;
  }

  .shell__subheading {
    margin-top: 2px;
    font-size: 0.88rem;
  }

  .shell__content {
    padding-top: 12px;
  }

  .pos-workspace {
    height: calc(100dvh - 92px);
    gap: 12px;
  }

  .card {
    padding: 14px;
    border-radius: 18px;
  }

  .page-grid,
  .stack,
  .metrics-grid,
  .split {
    gap: 12px;
  }

  .card__title {
    font-size: 0.98rem;
  }

  .card__header {
    margin-bottom: 10px;
    gap: 10px;
  }

  .toolbar {
    gap: 10px;
  }

  .input {
    min-height: 40px;
    padding: 0 12px;
  }

  .input--compact,
  .button,
  .button--compact {
    min-height: 36px;
  }

  .button {
    padding: 0 14px;
  }

  .field {
    gap: 6px;
  }

  .field + .field {
    margin-top: 12px;
  }

  .field__label {
    font-size: 0.88rem;
  }

  .badge {
    padding: 3px 8px;
    font-size: 0.78rem;
  }

  .table th,
  .table td {
    padding: 7px 6px;
  }

  .table th {
    font-size: 0.76rem;
  }

  .inline-error,
  .status-panel,
  .empty-state,
  .ticket,
  .cash-summary,
  .ticket-payment-summary {
    padding: 10px 12px;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card__value {
    margin-top: 4px;
    font-size: 1.15rem;
  }

  .shell__user-panel {
    min-width: 180px;
    padding: 8px;
  }

  .shell__avatar-button {
    min-height: 38px;
    width: 38px;
    box-shadow:
      0 8px 18px rgba(24, 20, 15, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .shell__avatar {
    width: 100%;
    height: 100%;
  }

  .shell__avatar-initials {
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    transform: translateY(-0.1px);
  }

  .shell__user-action {
    padding: 9px 10px;
  }

  .modal-backdrop {
    padding: 16px;
  }

  .modal-card {
    padding: 16px;
    border-radius: 18px;
  }

  .modal-card--receipt {
    padding: 14px;
  }

  .modal-card--sale-detail {
    padding: 14px;
  }

  .modal-card__header {
    margin-bottom: 10px;
  }

  .modal-card__actions,
  .cash-summary,
  .ticket__header,
  .ticket__summary-grid,
  .ticket__totals-row,
  .ticket-payment-summary {
    gap: 10px;
  }

  .ticket__sale-id,
  .ticket__status,
  .cash-summary strong,
  .ticket-payment-summary strong,
  .ticket-payment-summary__change strong {
    font-size: 1.05rem;
  }

  .auth-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
  }

  .auth-page__card {
    padding: 28px 24px 24px;
  }

  .auth-form__header {
    margin-bottom: 18px;
  }

  .cart-summary__section-title,
  .metric-card__label {
    font-size: 0.68rem;
  }

  .cart-summary--compact {
    gap: 8px;
    padding-top: 8px;
  }

  .cart-totals {
    gap: 5px;
    padding: 9px 10px;
  }

  .cart-totals__row {
    font-size: 0.9rem;
  }

  .cart-totals__row--total {
    margin-top: 2px;
    padding-top: 8px;
  }

  .cart-totals__row--total strong {
    font-size: 1.45rem;
  }

  .cart-summary__submit {
    min-height: 36px;
  }

  .sales-filters {
    gap: 10px;
  }

  .sales-filters__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 1400px) and (min-width: 1101px) {
  .sales-filters__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sale-detail__overview {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  }

  .sale-detail__overview-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .pricing-form-grid,
  .pricing-form-grid--category {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@page {
  size: 80mm auto;
  margin: 0;
}

@media print {
  html,
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 80mm;
    min-width: 80mm;
    max-width: 80mm;
    overflow: visible !important;
  }

  .shell,
  .shell__main,
  .shell__content {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .shell__sidebar,
  .shell__topbar,
  .shell__content > *:not(.modal-backdrop) {
    display: none !important;
  }

  /* Ensure wrapper divs containing modals stay visible, but hide their non-modal children */
  .shell__content > *:has(.modal-backdrop) {
    display: block !important;
  }
  .shell__content > *:has(.modal-backdrop) > *:not(.modal-backdrop) {
    display: none !important;
  }

  .modal-backdrop {
    position: static !important;
    inset: auto !important;
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .modal-card {
    display: block !important;
    width: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .modal-card__header,
  .modal-card__actions,
  .cash-summary,
  .inline-error {
    display: none !important;
  }

  /* Hide non-print content inside modal during print */
  .modal-card > .sale-receipt-detail {
    display: none !important;
  }

  .sale-detail,
  .receipt-stack,
  .purchase-receipt-stack {
    display: block !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .sale-detail > *:not(.ticket--print-only),
  .receipt-stack > *:not(.ticket--print-only),
  .purchase-receipt-stack > *:not(.purchase-slip--print-only) {
    display: none !important;
  }

  .ticket--print-only {
    display: grid !important;
    position: static !important;
    width: 76mm;
    min-width: 76mm;
    max-width: 76mm;
    margin: 0;
    padding: 3mm;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #000;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    grid-gap: 2mm;
    gap: 2mm;
  }

.purchase-slip--print-only {
  display: grid !important;
    position: static !important;
    width: 76mm;
    min-width: 76mm;
    max-width: 76mm;
    margin: 0;
    padding: 3mm;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #000;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    grid-gap: 2mm;
    gap: 2mm;
  }

  .purchase-slip__title {
    font-size: 13px;
  }

  .purchase-slip__brand span,
  .purchase-slip__item-subline,
  .purchase-slip .metric-card__label {
    font-size: 10px;
  }

  .purchase-slip__header,
  .purchase-slip__item-head,
  .purchase-slip__item-subline,
  .purchase-slip__totals > div {
    gap: 6px;
  }

  .ticket__brand-title {
    font-size: 13px;
  }

  .ticket__brand-copy,
  .ticket__brand-detail,
  .ticket__meta,
  .ticket__item-subline,
  .ticket__footer,
  .ticket__summary,
  .metric-card__label {
    font-size: 10px;
  }

  .ticket__sale-id,
  .ticket__status,
  .ticket__item-name,
  .ticket__item-line-total,
  .ticket__totals strong,
  .ticket-payment-summary strong {
    font-size: 11px;
  }

  .ticket__summary-grid,
  .ticket__header,
  .ticket__item-head,
  .ticket__item-subline,
  .ticket__totals > div,
  .ticket-payment-summary {
    gap: 6px;
  }

  .ticket__items-wrap {
    max-height: none;
    overflow: visible;
  }

  .ticket-payment-summary,
  .ticket__cancelled-note {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .ticket__divider {
    border-top-color: #000;
  }
}

/* ── Reports filter layout ──────────────────────────────────────────────── */

.reports-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.reports-filters__fields {
  flex: 1 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.reports-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Export dropdown ────────────────────────────────────────────────────── */

.export-menu {
  position: relative;
}

.export-menu__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: space-between;
}

.export-menu__trigger--open {
  background: var(--surface-hover, var(--surface-muted));
}

.export-menu__caret {
  font-size: 0.7em;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.export-menu__trigger--open .export-menu__caret {
  transform: rotate(180deg);
}

.export-menu__list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 50;
  overflow: hidden;
}

.export-menu__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.export-menu__item:hover {
  background: var(--surface-muted);
}

@media (max-width: 900px) {
  .reports-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .reports-filters__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-filters__actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (max-width: 1500px) and (min-width: 1101px) {
  .purchases-filters__row--primary {
    grid-template-columns: minmax(0, 1.3fr) minmax(190px, 220px) auto;
  }
}

@media (max-width: 1100px) {
  .auth-page,
  .split,
  .shell,
  .metrics-grid,
  .settings-admin,
  .inventory-workspace,
  .pricing-workspace {
    grid-template-columns: 1fr;
  }

  .sales-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-filters__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-filters__actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .page-grid > * {
    grid-column: span 12;
  }

  .shell,
  .shell--sidebar-collapsed {
    height: auto;
    grid-template-columns: 1fr;
  }

  .shell__sidebar,
  .shell--sidebar-collapsed .shell__sidebar {
    display: none;
  }

  .shell,
  .shell__main,
  .shell__content {
    overflow: visible;
  }

  .shell__content,
  .shell__topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pos-workspace {
    height: auto;
    overflow: visible;
  }

  .pos-entry-panel,
  .pos-checkout-panel,
  .cart-panel {
    min-height: auto;
    height: auto;
  }

  .pos-entry-panel .table-wrap,
  .cart-panel__body,
  .settings-admin__nav {
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(222, 211, 195, 0.6);
    padding-right: 0;
    padding-bottom: 8px;
    margin-bottom: 4px;
  }

  .settings-admin__content {
    padding-left: 0;
  }

  .inventory-workspace__menu {
    position: static;
    transform: none;
    border-right: none;
    border-bottom: 1px solid rgba(222, 211, 195, 0.6);
    padding-right: 0;
    padding-bottom: 8px;
  }

  .inventory-workspace__content {
    padding-left: 0;
  }

  .inventory-summary-strip {
    flex-wrap: wrap;
  }

  .inventory-summary-strip__item {
    flex: 1 1 45%;
  }

  .pricing-workspace__menu {
    position: static;
  }

  .pricing-summary-grid {
    grid-template-columns: 1fr;
  }

  .inventory-transfer-draft {
    grid-template-columns: 1fr;
  }

  .pricing-records {
    gap: 10px;
  }

  .inventory-workspace .card,
  .pricing-workspace .card {
    padding: 14px;
  }

  .inventory-transfer-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .inventory-transfer-card__summary {
    gap: 6px;
  }

  .user-access-workspace {
    grid-template-columns: 1fr;
  }

  .role-permission-grid,
  .role-fields-row {
    grid-template-columns: 1fr;
  }

  .user-access-workspace__list {
    border-right: none;
    border-bottom: 1px solid rgba(222, 211, 195, 0.65);
  }

  .user-access-workspace__editor {
    padding: 14px 16px;
  }



  .cash-audit-grid,
  .cash-metrics {
    grid-template-columns: 1fr;
  }

  .cash-entry-row,
  .cash-summary-grid,
  .cash-noncash-grid {
    grid-template-columns: 1fr;
  }

  .cash-denomination-row {
    grid-template-columns: 1fr;
  }

  .pricing-form-grid,
  .pricing-form-grid--category,
  .supplier-document-row,
  .suppliers-summary-grid {
    grid-template-columns: 1fr;
  }

  .cash-open-card {
    position: static;
    max-width: none;
  }

  .sale-detail__overview,
  .sale-detail__overview-facts {
    grid-template-columns: 1fr;
  }

  .purchase-detail-card__grid {
    grid-template-columns: 1fr;
  }

  .purchase-entry-row-grid {
    grid-template-columns: 1fr;
  }

  .purchase-entry-row-card__header {
    flex-direction: column;
  }

  .purchases-filters__row,
  .purchases-filters__row--primary,
  .purchases-filters__row--secondary {
    grid-template-columns: 1fr;
  }

  .purchases-filters__actions {
    justify-content: flex-start;
  }

  .pos-toolbar {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .pos-toolbar__action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .shell__topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  .shell__topbar-main {
    gap: 4px;
  }

  .shell__subheading {
    margin-top: 0;
  }

  .shell__actions {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .shell__branch-select {
    min-width: 0;
    width: 100%;
  }

  .modal-backdrop {
    padding: 8px;
    align-items: end;
  }

  .modal-card--cash-denomination {
    width: 100%;
    max-height: calc(100vh - 16px);
    padding: 12px;
    gap: 8px;
    border-radius: 18px 18px 0 0;
  }

  .modal-card--cash-denomination .modal-card__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
  }

  .cash-denomination-modal__intro {
    max-width: none;
    font-size: 0.82rem;
  }

  .cash-denominations {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cash-denomination-row {
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: center;
    gap: 8px 10px;
    padding: 10px;
    border-radius: 14px;
  }

  .cash-denomination-row__field .field__label {
    min-height: 0;
    margin-bottom: 4px;
  }

  .cash-denomination-row__total {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(222, 211, 195, 0.5);
  }

  .cash-denomination-row__total strong {
    text-align: right;
  }

  .cash-count-total--modal {
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
  }

  .cash-denomination-modal__actions {
    flex-wrap: wrap;
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    padding-top: 4px;
    background: rgba(255, 253, 249, 0.98);
  }

  .cash-denomination-modal__actions .button {
    flex: 1 1 100%;
  }

  .modal-card--cash-movement {
    width: 100%;
    max-height: calc(100vh - 16px);
    padding: 12px;
    border-radius: 18px 18px 0 0;
  }

  .modal-card--cash-movement .modal-card__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .pricing-workspace {
    gap: 14px;
  }

  .inventory-workspace .card,
  .pricing-workspace .card {
    padding: 12px;
  }

  .inventory-workspace__content,
  .pricing-workspace__content {
    gap: 14px;
  }

  .pricing-workspace__menu .stack {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
  }

  .pricing-workspace__menu .card__header {
    margin-bottom: 8px;
  }

  .pricing-menu-item {
    padding: 10px 12px;
  }

  .pricing-summary-grid {
    grid-template-columns: 1fr;
  }

  .inventory-transfer-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pricing-record__header,
  .pricing-record__meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .inventory-transfer-nav__item {
    width: 100%;
    text-align: center;
  }

  .inventory-transfer-item {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (max-width: 560px) {
  .shell__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shell__avatar-button {
    align-self: flex-end;
  }
}

.inventory-workspace {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-gap: 0;
  gap: 0;
  align-items: start;
}

.inventory-workspace .card {
  padding: 14px 16px;
}

.inventory-workspace .card__header {
  margin-bottom: 10px;
  gap: 12px;
}

.inventory-workspace__menu {
  position: -webkit-sticky;
  position: sticky;
  top: 88px;
  padding-right: 16px;
  border-right: 1px solid rgba(222, 211, 195, 0.6);
  transform: translateY(-88px);
}

.inventory-workspace__menu-title {
  margin: 0 0 4px;
  padding: 4px 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}

.inventory-workspace__content {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  padding-left: 24px;
}

.inventory-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 9px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.inventory-menu-item:hover {
  background: rgba(16, 69, 79, 0.06);
  color: var(--text);
}

.inventory-menu-item--active {
  background: rgba(16, 69, 79, 0.1);
  color: var(--text);
  font-weight: 600;
}

.inventory-menu-item__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(16, 69, 79, 0.06);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  flex-shrink: 0;
}

.inventory-menu-item--active .inventory-menu-item__count {
  background: rgba(16, 69, 79, 0.12);
  color: var(--primary-strong);
}

.inventory-summary-strip {
  display: flex;
  gap: 0;
  border: 1px solid rgba(222, 211, 195, 0.75);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.inventory-summary-strip__item {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 16px;
  border-right: 1px solid rgba(222, 211, 195, 0.45);
}

.inventory-summary-strip__item:last-child {
  border-right: none;
}

.inventory-summary-strip__item strong {
  font-size: var(--summary-value);
  color: var(--primary-strong);
  line-height: 1.1;
  font-weight: 800;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.inventory-summary-strip__item span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.inventory-table__location {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.84rem;
}

.inventory-table__location .muted {
  font-size: 0.72rem;
}

.product-autocomplete {
  position: relative;
}

.product-autocomplete__selected-code {
  margin: 3px 0 0;
  padding: 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.product-autocomplete__dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--surface-strong);
  border: 1px solid rgba(222, 211, 195, 0.9);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(24, 20, 15, 0.1), 0 2px 6px rgba(24, 20, 15, 0.06);
  max-height: 272px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-autocomplete__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transition: background 0.08s ease;
}

.product-autocomplete__item--active {
  background: rgba(16, 69, 79, 0.07);
}

.product-autocomplete__item-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-autocomplete__item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.product-autocomplete__item-price {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.product-autocomplete__item-code {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.2;
}

.product-autocomplete__highlight {
  background: none;
  color: var(--primary-strong);
  font-weight: 700;
}

.inventory-workspace .empty-state {
  padding: 12px 14px;
  border-radius: 16px;
}

.inventory-workspace .empty-state h3 {
  margin: 0 0 6px;
}

.inventory-workspace .empty-state p {
  margin: 0;
  line-height: 1.4;
}

.inventory-transfer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-transfer-nav__item {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(222, 211, 195, 0.92);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.inventory-transfer-nav__item--active {
  border-color: rgba(16, 69, 79, 0.18);
  background: rgba(240, 231, 219, 0.44);
  color: var(--primary-strong);
}

.inventory-table th,
.inventory-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: middle;
}

.inventory-table__product {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.inventory-history-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 10px;
  margin-bottom: 14px;
}

.inventory-history-filters__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 1px;
}

@media (max-width: 1200px) {
  .inventory-history-filters {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .inventory-history-filters__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .inventory-history-filters {
    grid-template-columns: 1fr 1fr;
  }
}

.inventory-history-viewport {
  min-height: 480px;
  max-height: 540px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 6px;
  outline: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.2) transparent;
  scrollbar-gutter: stable;
}

.inventory-history-table__row:hover td {
  background: rgba(0, 0, 0, 0.025);
}

.inventory-history__product {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.3;
}

.inventory-history__type {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.inventory-history__change {
  display: inline-block;
  font-weight: 700;
  font-size: 0.92rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.inventory-history__change--positive {
  color: var(--success);
}

.inventory-history__change--negative {
  color: var(--danger);
}

.inventory-history__stock {
  font-size: 0.92rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}

.inventory-history__reason {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 0.82rem;
  color: var(--muted);
}

.inventory-history__actor {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .inventory-workspace,
  .pricing-workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .inventory-workspace .card,
  .pricing-workspace .card {
    padding: 12px;
  }

  .inventory-workspace__menu {
    position: static;
    top: auto;
    margin-top: 0;
    transform: none;
    border-right: none;
    border-bottom: 1px solid rgba(222, 211, 195, 0.6);
    padding-right: 0;
    padding-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
  }

  .inventory-workspace__menu-title {
    display: none;
  }

  .inventory-workspace__content {
    padding-left: 0;
    gap: 14px;
  }

  .pricing-workspace__menu {
    position: static;
    top: auto;
    margin-top: 0;
    transform: none;
  }

  .pricing-workspace__content {
    gap: 14px;
  }

  .pricing-workspace__menu .card__header {
    margin-bottom: 8px;
  }

  .pricing-workspace__menu .stack {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
  }

  .pricing-menu-item {
    padding: 10px 12px;
  }

  .inventory-summary-strip {
    flex-wrap: wrap;
  }

  .inventory-summary-strip__item {
    flex: 1 1 45%;
  }

  .pricing-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell__topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
  }

  .shell__topbar-main {
    gap: 4px;
  }

  .shell__subheading {
    margin-top: 0;
  }

  .shell__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .shell__branch-select {
    min-width: 0;
    width: 100%;
  }

  .shell__avatar-button {
    align-self: flex-end;
  }

  .suppliers-filters {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
  }

  .suppliers-filters > .button,
  .suppliers-filters > .field {
    width: 100%;
  }

  .customers-summary-grid {
    grid-template-columns: 1fr;
  }

  .customer-document-row {
    grid-template-columns: 1fr;
  }

  .customer-document-meta,
  .customer-registry-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .supplier-document-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .modal-card__body--registry .customer-lookup-card {
    padding: 10px 12px;
  }
}

/* ── Inventory workspace: operational stock toolbar ─────────────────────── */

.inventory-stock-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(222, 211, 195, 0.72);
  border-radius: 10px;
  margin-bottom: 14px;
}

.inventory-stock-filters__quick {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 1px;
}

@media (max-width: 900px) {
  .inventory-stock-filters {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-stock-filters__quick {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .inventory-stock-filters {
    grid-template-columns: 1fr;
  }
}


.inventory-quickfilter {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  white-space: nowrap;
  line-height: 1.4;
}

.inventory-quickfilter:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.inventory-quickfilter--active {
  background: rgba(16, 69, 79, 0.09);
  border-color: rgba(16, 69, 79, 0.22);
  color: var(--primary-strong);
}

/* ── Warehouse stock stable viewport ────────────────────────────────────── */

.inventory-stock-viewport {
  min-height: 480px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 6px;
  outline: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.2) transparent;
  scrollbar-gutter: stable;
}

.inventory-stock-viewport::-webkit-scrollbar,
.inventory-history-viewport::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.inventory-stock-viewport::-webkit-scrollbar-track,
.inventory-history-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.inventory-stock-viewport::-webkit-scrollbar-thumb,
.inventory-history-viewport::-webkit-scrollbar-thumb {
  background: rgba(16, 69, 79, 0.2);
  border-radius: 999px;
}

.inventory-stock-viewport::-webkit-scrollbar-thumb:hover,
.inventory-history-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 69, 79, 0.34);
}

.inventory-stock-viewport__fill,
.inventory-history-viewport__fill {
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-stock-viewport .inventory-table thead th,
.inventory-history-viewport .inventory-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-strong);
  box-shadow: 0 1px 0 var(--border);
}

/* ── Table: numeric cell alignment ──────────────────────────────────────── */

.inventory-th--numeric {
  text-align: right;
}

.inventory-th--location {
  width: 140px;
}

.inventory-th--price {
  white-space: nowrap;
}

.inventory-cell--numeric {
  text-align: right;
}

.inventory-stock-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.01em;
}

.inventory-min-val {
  font-size: 0.88rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ── Price cell ──────────────────────────────────────────────────────────── */

.inventory-cell--price {
  white-space: nowrap;
}

.inventory-price-val {
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

/* ── Two-line timestamp cell ─────────────────────────────────────────────── */

.inventory-cell--timestamp-split {
  display: flex;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
}

.inventory-cell--timestamp-date {
  font-size: 0.82rem;
  color: var(--text);
}

.inventory-cell--timestamp-time {
  font-size: 0.73rem;
  color: var(--muted);
}

/* ── Table row interactivity ─────────────────────────────────────────────── */

.inventory-table__row {
  cursor: pointer;
  transition: background 0.1s;
}

.inventory-table__row:hover {
  background: rgba(0, 0, 0, 0.025);
}

.inventory-table__row:hover .inventory-row-menu__trigger {
  color: var(--fg);
}

/* ── New row highlight ───────────────────────────────────────────────────── */

@keyframes inventory-row-flash {
  0% { background: rgba(16, 69, 79, 0.14); }
  100% { background: transparent; }
}

.inventory-row--new {
  animation: inventory-row-flash 2s ease-out forwards;
}

.inventory-section-header {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 4px;
}

/* ── History link on timestamp cell ─────────────────────────────────────── */

.inventory-cell--history-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: inherit;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.inventory-cell--history-link:hover {
  color: var(--fg);
}

/* ── Clickable product name ──────────────────────────────────────────────── */

.inventory-product-name-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: inherit;
  color: inherit;
  text-align: left;
  line-height: inherit;
}

.inventory-product-name-link:hover {
  color: var(--accent, #0057b7);
  text-decoration: underline;
}

/* ── Row contextual menu ─────────────────────────────────────────────────── */

.inventory-th--menu {
  width: 44px;
  padding: 0 !important;
}

.inventory-td--menu {
  padding: 0 4px !important;
  vertical-align: middle;
}

.inventory-row-menu {
  position: relative;
  display: flex;
  justify-content: center;
}

.inventory-row-menu__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.inventory-row-menu__trigger:hover {
  background: var(--surface-raised, #f3f4f6);
  color: var(--fg);
}

.inventory-row-menu__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 176px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.inventory-row-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--fg);
  border-radius: 6px;
  white-space: nowrap;
}

.inventory-row-menu__item:hover {
  background: var(--surface-raised, #f3f4f6);
}

/* ── History breadcrumb ──────────────────────────────────────────────────── */

.inventory-history-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
}

.inventory-history-breadcrumb__back {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--accent, #0057b7);
}

.inventory-history-breadcrumb__back:hover {
  text-decoration: underline;
}

.inventory-history-breadcrumb__context {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Stock adjust drawer ─────────────────────────────────────────────────── */

.stock-adjust-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 200;
}

.stock-adjust-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: var(--surface, #fff);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.stock-adjust-drawer--open {
  transform: translateX(0);
}

.stock-adjust-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.stock-adjust-drawer__identity {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.stock-adjust-drawer__code {
  font-size: 0.78rem;
  color: var(--muted);
}

.stock-adjust-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
}

.stock-adjust-drawer__close:hover {
  color: var(--fg);
}

.stock-adjust-drawer__body {
  flex: 1 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stock-adjust-drawer__stock-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-raised, #f9fafb);
  border-radius: 6px;
}

.stock-adjust-drawer__stock-value {
  font-size: 1.5rem;
}

.stock-adjust-drawer__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-adjust-drawer__field-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stock-adjust-drawer__required {
  color: var(--danger);
}

.stock-adjust-drawer__radio-group {
  display: flex;
  gap: 12px;
}

.stock-adjust-drawer__radio-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  cursor: pointer;
}

.stock-adjust-drawer__input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-adjust-drawer__delta-input {
  width: 90px;
}

.stock-adjust-drawer__quick-btns {
  display: flex;
  gap: 4px;
}

.stock-adjust-drawer__quick-btn {
  background: var(--surface-raised, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}

.stock-adjust-drawer__quick-btn:hover {
  background: var(--border, #e5e7eb);
}

.stock-adjust-drawer__preview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  padding: 8px 10px;
  background: var(--surface-raised, #f9fafb);
  border-radius: 6px;
}

.stock-adjust-drawer__preview--negative {
  background: rgba(220, 38, 38, 0.05);
}

.stock-adjust-drawer__preview-arrow {
  color: var(--muted);
}

.stock-adjust-drawer__preview-new--positive {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--success, #1e7c45);
}

.stock-adjust-drawer__preview-new--negative {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--danger);
}

.stock-adjust-drawer__field--minimum {
  padding-top: 4px;
  border-top: 1px solid var(--border, #e5e7eb);
  margin-top: 4px;
}

/* ─── KuDE — Factura Electrónica A4 ─────────────────────────────────────────
   Hidden on screen. Shown only when body[data-print-mode="a4"] is set.
   To revert: delete this block and features/sales/sale-receipt-a4.tsx.
   ─────────────────────────────────────────────────────────────────────────── */
.kude--print-only {
  display: none;
}

/* On-screen preview mode — used by SaleReceiptA4 preview={true} */
.kude--preview {
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  color: #000;
  background: #fff;
  border: 1px solid #ddd;
  padding: 10mm 12mm;
  min-height: 297mm;
  overflow-y: auto;
  width: 210mm;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4mm;
}

.kude--preview .kude__table-wrapper {
  flex: 1 1;
}

.kude--preview .kude__verification {
  margin-top: auto;
}

@media print {
  body[data-print-mode="a4"] {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
  }

  /* Hide the 80mm ticket when printing A4 */
  body[data-print-mode="a4"] .ticket--print-only {
    display: none !important;
  }

  /* Show the A4 receipt — fill full page */
  body[data-print-mode="a4"] .kude--print-only {
    display: flex !important;
    flex-direction: column;
    position: static !important;
    width: 100%;
    min-height: 100vh;
    padding: 10mm 12mm;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    color: #000;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Items table stretches to fill available space */
  body[data-print-mode="a4"] .kude__table-wrapper {
    flex: 1 1;
  }

  /* Verification footer stays at bottom */
  body[data-print-mode="a4"] .kude__verification {
    margin-top: auto;
  }

  /* Page-break safety — keep these blocks together */
  .kude__interests-row,
  .kude__verification {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* ── Top header: logo + issuer + doc type ── */
  .kude__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #000;
    padding: 3mm 4mm;
  }

  .kude__logo {
    display: flex;
    flex-direction: column;
    gap: 2mm;
    max-width: 55%;
  }

  .kude__logo-placeholder {
    width: 38mm;
    height: 18mm;
    border: 1px dashed #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13pt;
    font-weight: bold;
    color: #aaa;
  }

  .kude__issuer-block {
    display: flex;
    flex-direction: column;
    font-size: 8pt;
    line-height: 1.5;
  }

  .kude__doc-block {
    text-align: right;
    font-size: 8pt;
    line-height: 1.5;
  }

  .kude__ruc-lines {
    display: flex;
    flex-direction: column;
  }

  .kude__doc-type {
    margin-top: 3mm;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #cc0000;
    font-size: 11pt;
    font-weight: bold;
    line-height: 1.4;
  }

  /* ── Codigo Ctl ── */
  .kude__ctl-row {
    border: 1px solid #000;
    border-top: none;
    padding: 1mm 4mm;
    font-size: 8pt;
  }

  /* ── Transaction meta: left = emission, right = buyer ── */
  .kude__meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #000;
    border-top: none;
    font-size: 8pt;
    line-height: 1.6;
  }

  .kude__meta-left {
    padding: 2mm 4mm;
    border-right: 1px solid #000;
    display: flex;
    flex-direction: column;
    gap: 1mm;
  }

  .kude__meta-right {
    padding: 2mm 4mm;
    display: flex;
    flex-direction: column;
    gap: 0.5mm;
  }

  .kude__label {
    color: #333;
  }

  /* ── Items table ── */
  .kude__table-wrapper {
    flex: 1 1;
    display: flex;
    flex-direction: column;
  }

  .kude__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
    flex: 1 1;
  }

  .kude__spacer-row td {
    height: 100%;
    border-left: 1px solid #999;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #000;
  }
  .kude__spacer-row td:first-child {
    border-left: 1px solid #000;
  }
  .kude__spacer-row td:last-child {
    border-right: 1px solid #000;
  }

  .kude__table th,
  .kude__table td {
    border: 1px solid #000;
    padding: 1mm 2mm;
    vertical-align: top;
  }

  /* Outer table border — solid box around entire table */
  .kude__table {
    border: 1px solid #000;
  }

  .kude__table thead th {
    background: #f5f5f5;
    font-weight: bold;
    text-align: center;
    font-size: 7.5pt;
    border: 1px solid #999;
  }
  .kude__table thead th:first-child {
    border-left: 1px solid #000;
  }
  .kude__table thead th:last-child {
    border-right: 1px solid #000;
  }

  .kude__table thead th[rowspan] {
    vertical-align: middle;
  }

  /* Item rows: vertical column dividers only */
  .kude__table tbody td {
    border-left: 1px solid #999;
    border-right: none;
    border-top: none;
    border-bottom: none;
    font-size: 8pt;
    padding: 0.5mm 2mm;
  }
  .kude__table tbody td:first-child {
    border-left: 1px solid #000;
  }
  .kude__table tbody td:last-child {
    border-right: 1px solid #000;
  }

  .kude__col--desc {
    text-align: left;
    word-break: break-word;
  }

  /* Column widths (referenced by <colgroup> in SaleReceiptA4) */
  .kude__col--seq   { width: 12mm; }
  .kude__col--ncm   { width: 18mm; }
  .kude__col--unit  { width: 10mm; }
  .kude__col--qty   { width: 10mm; }
  .kude__col--disc  { width: 14mm; }
  .kude__col--price { width: 20mm; }
  .kude__col--amt   { width: 20mm; }

  .kude__num {
    text-align: right;
    white-space: nowrap;
  }

  .kude__tfoot-row td {
    border: 1px solid #000;
    font-size: 8pt;
    padding: 1mm 2mm;
  }

  .kude__tfoot-row--shaded td {
    background: #f0f0f0;
  }

  .kude__tfoot-row--iva td {
    font-size: 8pt;
  }

  /* ── Interests footer row ── */
  .kude__interests-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #000;
    border-top: none;
    font-size: 7.5pt;
    min-height: 14mm;
  }

  .kude__interests-left {
    border-right: 1px solid #000;
    padding: 2mm;
  }

  .kude__interests-right {
    padding: 2mm;
  }

  /* ── CDC / QR verification block ── */
  .kude__verification {
    display: flex;
    gap: 4mm;
    align-items: flex-start;
    border: 1px solid #000;
    border-top: none;
    padding: 2mm 4mm;
    font-size: 7.5pt;
    line-height: 1.5;
  }

  .kude__qr-box {
    width: 25mm;
    height: 25mm;
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8pt;
    color: #aaa;
    flex-shrink: 0;
  }

  .kude__cdc-block {
    flex: 1 1;
    display: flex;
    flex-direction: column;
    gap: 1mm;
  }

  .kude__cdc-number {
    font-size: 9.5pt;
    font-weight: bold;
    letter-spacing: 0.5px;
  }

  .kude__legal-note {
    font-size: 6.5pt;
    font-style: italic;
    color: #444;
  }
}

/* ── Mobile Touch Foundation ─────────────────────────────────────────────── */

button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .button--compact {
    min-height: 44px;
  }

  .shell__nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .select,
  .input--compact {
    min-height: 44px;
  }
}

/* ── Hamburger + Mobile Navigation ────────────────────────────────────────── */

.shell__heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.shell__hamburger-icon,
.shell__hamburger-icon::before,
.shell__hamburger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.shell__hamburger-icon {
  position: relative;
}

.shell__hamburger-icon::before,
.shell__hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.shell__hamburger-icon::before {
  top: -6px;
}

.shell__hamburger-icon::after {
  top: 6px;
}

.shell__mobile-backdrop {
  display: none;
}

@media (max-width: 1100px) {
  .shell__hamburger {
    display: flex;
  }

  .shell__mobile-backdrop {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 150ms ease;
  }

  .shell__mobile-nav {
    display: flex;
    flex-direction: column;
    width: min(280px, 85vw);
    height: 100%;
    background: var(--primary);
    padding: 16px 12px;
    overflow-y: auto;
    animation: slideInLeft 200ms ease;
  }

  .shell__mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px 16px;
    color: white;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
  }

  .shell__mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 1rem;
    cursor: pointer;
  }

  .shell__mobile-nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
  }

  .shell__mobile-nav-link--active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Gate hover effects — only apply when device has a fine pointer (mouse) */
@media (hover: hover) and (pointer: fine) {
  .shell__nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
  }
}

/* ── POS Mobile: Floating Cart Drawer ────────────────────────────────────── */

.pos-mobile-setup {
  display: none;
}

.pos-cart-mobile {
  display: none;
}

.pos-cart-fab {
  display: none;
}

.pos-cart-drawer-backdrop {
  display: none;
}

.pos-barcode-btn {
  display: none;
}

@media (max-width: 768px) {
  .pos-cart-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 30;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
  }

  .pos-cart-fab__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pos-cart-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 150ms ease;
  }

  .split.pos-workspace {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .pos-checkout-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  }

  .pos-checkout-panel--drawer-open {
    transform: translateY(0);
  }

  .pos-checkout-panel .cart-panel__body {
    padding-bottom: env(safe-area-inset-bottom, 12px);
  }

  /* Desktop table hidden, mobile cards shown */
  .pos-cart-desktop {
    display: none;
  }

  .pos-cart-mobile {
    display: grid;
    grid-gap: 6px;
    gap: 6px;
  }

  .pos-cart-mobile__item {
    display: grid;
    grid-gap: 6px;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(222, 211, 195, 0.5);
    background: var(--surface-strong);
  }

  .pos-cart-mobile__item--highlighted {
    background: rgba(31, 122, 85, 0.06);
    border-color: rgba(31, 122, 85, 0.25);
  }

  .pos-cart-mobile__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .pos-cart-mobile__name {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
    min-width: 0;
  }

  .pos-cart-mobile__name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .pos-cart-mobile__name .muted {
    font-size: 0.78rem;
  }

  .pos-cart-mobile__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(180, 63, 63, 0.08);
    color: var(--danger);
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
  }

  .pos-cart-mobile__bottom {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .pos-cart-mobile__bottom .input--quantity {
    width: 64px;
    min-width: 0;
    flex-shrink: 0;
  }

  .pos-cart-mobile__price {
    margin-left: auto;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
  }

  /* Prevent horizontal overflow */
  .shell__main {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Barcode camera button */
  .pos-barcode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  /* Full-screen modals on mobile */
  .modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .modal-card,
  .modal-card--narrow,
  .modal-card--wide,
  .modal-card--extra-wide,
  .modal-card--receipt,
  .modal-card--sale-detail {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    overflow-y: auto;
  }

  .modal-card__header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: rgba(255, 253, 249, 0.98);
    z-index: 2;
    padding-top: 8px;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
  }

  .modal-card__actions {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    background: rgba(255, 253, 249, 0.98);
    padding: 12px 0;
    z-index: 2;
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
  }

  /* Responsive tables — horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap .table {
    min-width: 560px;
  }

  /* Topbar compaction */
  .shell__topbar {
    padding: 10px 12px 0;
  }

  .shell__subheading-row {
    display: none;
  }

  .shell__content {
    padding: 10px 12px 12px;
  }

  /* Hide keyboard shortcuts on mobile */
  .shortcut-panel,
  .shortcut-panel__toggle,
  .kbd-shortcut {
    display: none !important;
  }

  /* Product search results — larger touch targets */
  .product-result {
    padding: 12px 14px;
    min-height: 48px;
  }

  /* Safe-area insets for notched phones */
  .pos-cart-fab {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .pos-checkout-panel .cart-panel__body {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-card__actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Input toolbar — don't constrain width on mobile */
  .input--toolbar {
    min-width: 0;
  }

  /* Mobile POS setup controls (document type + customer) */
  .pos-mobile-setup {
    display: grid;
    grid-gap: 8px;
    gap: 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }

  .pos-mobile-setup__type {
    display: flex;
    gap: 6px;
  }

  .pos-mobile-setup__pill {
    flex: 1 1;
    padding: 8px;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }

  .pos-mobile-setup__pill--active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .pos-mobile-setup__customer {
    display: grid;
    grid-gap: 6px;
    gap: 6px;
  }

  .pos-mobile-setup__search-row {
    display: flex;
    gap: 6px;
  }

  .pos-mobile-setup__search-btn {
    padding: 0 14px;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
  }

  .pos-mobile-setup__new-customer {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
  }

  .pos-mobile-setup__results {
    display: grid;
    grid-gap: 2px;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
  }

  .pos-mobile-setup__result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    min-height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--surface-strong);
    cursor: pointer;
    text-align: left;
  }

  .pos-mobile-setup__selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(31, 122, 85, 0.08);
    border: 1px solid rgba(31, 122, 85, 0.2);
  }

  .pos-mobile-setup__change {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    font-size: 0.85rem;
    cursor: pointer;
  }
}

/* Landscape on mobile — reduce drawer height */
@media (max-width: 768px) and (orientation: landscape) {
  .pos-checkout-panel {
    max-height: 75vh;
  }

  .modal-card,
  .modal-card--narrow,
  .modal-card--wide,
  .modal-card--extra-wide {
    height: 100dvh;
  }
}

/* ── Impersonation banner ────────────────────────────────────────────────── */
.impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 20px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.impersonation-banner__end {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.impersonation-banner__end:hover {
  background: rgba(255,255,255,0.3);
}
.impersonation-banner + .app-shell { padding-top: 40px; }

/* ── SIFEN Dashboard ──────────────────────────────────────────────────── */

.sifen-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px 12px;
  background: rgba(248, 245, 240, 0.55);
  border: 1px solid rgba(222, 211, 195, 0.5);
  border-radius: 10px;
  margin-bottom: 14px;
}

.sifen-filters__fields {
  flex: 1 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.sifen-filters__actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  flex-shrink: 0;
  min-width: 80px;
}

.sifen-results-summary {
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.sifen-viewport {
  max-height: 560px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 6px;
  outline: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 69, 79, 0.2) transparent;
}

.sifen-viewport .table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-strong);
  box-shadow: 0 1px 0 var(--border);
}

.sifen-viewport__fill {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sifen-row td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}

.sifen-row:hover td {
  background: rgba(16, 69, 79, 0.035);
  cursor: pointer;
}

.sifen-cell {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
}

.sifen-cell span {
  font-size: 11px;
  color: var(--muted);
}

.sifen-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 960px) {
  .sifen-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .sifen-filters__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sifen-filters__actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}


