:root {
    color-scheme: light;
    --ink: #182b3b;
    --muted: #788897;
    --line: #e5ebef;
    --surface: #fff;
    --canvas: #f4f7f9;
    --primary: #14675e;
    --primary-dark: #104f49;
    --accent: #e6f4f1;
    --shadow: 0 14px 34px rgb(25 47 62 / 7%);
    font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
a { color: inherit; }

.login-shell { display: grid; grid-template-columns: minmax(350px, .88fr) minmax(470px, 1.12fr); min-height: 100vh; }
.login-brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(32px, 6vw, 76px); color: #fff; background: radial-gradient(circle at 70% 70%, rgb(59 146 126 / 36%), transparent 34%), linear-gradient(145deg, #0f514b, #123c49 75%); }
.brand-mark, .sidebar-brand { position: relative; z-index: 2; display: inline-flex; width: fit-content; align-items: center; gap: 12px; color: inherit; font-size: 22px; font-weight: 750; text-decoration: none; }
.brand-symbol { display: inline-grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; object-fit: contain; background: #fff; border: 1px solid rgb(255 255 255 / 23%); border-radius: 14px; font-size: 21px; font-weight: 800; box-shadow: 0 8px 20px rgb(4 36 37 / 18%); }
.brand-message { position: relative; z-index: 2; max-width: 490px; margin-block: auto; padding-block: 70px; }
.brand-message h1 { max-width: 430px; margin: 16px 0; font-size: clamp(38px, 5vw, 62px); line-height: 1.08; letter-spacing: -.04em; }
.brand-message p { max-width: 390px; color: rgb(255 255 255 / 76%); font-size: 16px; line-height: 1.8; }
.eyebrow { margin: 0; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.login-brand-panel .eyebrow { color: #79d0bb; }
.brand-decoration { position: absolute; inset-inline-end: -80px; bottom: -120px; display: grid; width: 390px; height: 390px; grid-template-columns: 1fr 1fr; gap: 16px; transform: rotate(-19deg); opacity: .3; }
.brand-decoration i { border: 1px solid rgb(177 236 224 / 65%); border-radius: 32px; }
.brand-decoration i:nth-child(2), .brand-decoration i:nth-child(3) { background: rgb(116 208 188 / 12%); }
.login-form-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 88px 36px 58px; background: #fbfcfd; }
.language-row { position: absolute; top: 30px; inset-inline-end: 38px; }
.language-switch { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 650; text-decoration: none; transition: border-color .18s, color .18s, background .18s; }
.language-switch:hover { color: var(--primary); background: var(--accent); border-color: #b8dcd5; }
.login-card { width: min(100%, 440px); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 44px; font-size: 22px; }
.login-card > .eyebrow { margin-bottom: 11px; }
.login-card h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; }
.form-hint { margin: 12px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-card form { display: grid; gap: 11px; }
.login-card label { margin-top: 8px; font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; min-height: 50px; padding: 12px 14px; color: var(--ink); background: #fff; border: 1px solid #dce4e9; border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s; }
.login-card input:focus { border-color: #63a99a; box-shadow: 0 0 0 4px rgb(20 103 94 / 11%); }
.primary-button { display: flex; min-height: 52px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 17px; color: #fff; background: var(--primary); border: 0; border-radius: 10px; cursor: pointer; font-weight: 750; box-shadow: 0 8px 18px rgb(20 103 94 / 18%); transition: background .18s, transform .18s; }
.primary-button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.primary-button span { font-size: 20px; }
.alert { margin: 0 0 16px; padding: 12px 14px; color: #9b342d; background: #fff0ee; border: 1px solid #f5d1cd; border-radius: 9px; font-size: 13px; line-height: 1.55; }
.login-footer { position: absolute; bottom: 22px; color: #9aa7b1; font-size: 12px; }

.app-shell { display: grid; width: 100%; min-height: 100dvh; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100dvh; min-height: 0; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 26px 16px 16px; background: var(--surface); border-inline-end: 1px solid var(--line); scrollbar-color: #c5d1d8 transparent; scrollbar-width: thin; }
.sidebar-brand { padding: 0 10px 25px; color: var(--ink); }
.sidebar-brand .brand-symbol { width: 37px; height: 37px; flex-basis: 37px; border-radius: 12px; }
.nav-caption { margin: 5px 10px 10px; color: #9aa7b1; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.side-nav { display: grid; gap: 5px; }
.nav-link { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 10px 12px; color: #627483; border-radius: 10px; font-size: 13px; font-weight: 650; text-decoration: none; transition: color .16s, background .16s; }
.nav-link:hover { color: var(--primary); background: #f2f8f7; }
.nav-link.is-active { color: var(--primary-dark); background: var(--accent); }
.nav-icon { display: inline-grid; width: 23px; place-items: center; color: var(--primary); font-size: 18px; }
.sidebar-company { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 17px 9px 4px; border-top: 1px solid var(--line); }
.company-avatar { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: var(--primary); background: var(--accent); border-radius: 12px; font-weight: 800; }
.company-meta { display: grid; min-width: 0; gap: 3px; }
.company-meta strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.company-meta small { color: var(--muted); font-size: 11px; }
.main-panel { display: flex; min-width: 0; min-height: 100dvh; flex-direction: column; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; min-height: 72px; align-items: center; gap: 16px; padding: 12px clamp(18px, 3vw, 38px); background: rgb(255 255 255 / 94%); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { display: grid; gap: 3px; }
.topbar-kicker { color: var(--muted); font-size: 10px; }
.topbar-title strong { font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.logout-link { padding: 8px 13px; color: #596c7b; border-radius: 9px; font-size: 12px; font-weight: 650; text-decoration: none; }
.logout-link:hover { color: #a33b34; background: #fff2f0; }
.menu-toggle { display: none; width: 39px; height: 39px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.page-content { width: 100%; max-width: 1600px; min-width: 0; margin-inline: auto; padding: clamp(22px, 3vw, 42px); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-heading h1 { margin: 8px 0 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.04em; }
.date-chip { padding: 9px 12px; color: #647684; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { display: grid; min-width: 0; min-height: 175px; align-content: start; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.metric-icon { display: inline-grid; width: 39px; height: 39px; place-items: center; color: var(--primary); background: var(--accent); border-radius: 11px; font-size: 18px; font-weight: 800; }
.metric-card p { overflow: hidden; margin: 17px 0 6px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card strong { overflow: hidden; font-size: clamp(20px, 2.5vw, 28px); letter-spacing: -.04em; text-overflow: ellipsis; }
.metric-card small { margin-top: 9px; color: #9aa7b1; font-size: 10px; }
.welcome-panel, .empty-panel { position: relative; display: flex; min-height: 220px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; margin-top: 22px; padding: clamp(24px, 4vw, 42px); background: linear-gradient(110deg, #fff, #eff8f6); border: 1px solid var(--line); border-radius: 16px; }
.welcome-panel h2, .empty-panel h2 { margin: 10px 0; font-size: clamp(21px, 2.6vw, 29px); }
.welcome-panel p:not(.eyebrow), .empty-panel p { max-width: 580px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.welcome-art { display: grid; width: clamp(110px, 17vw, 180px); height: clamp(110px, 17vw, 180px); flex: 0 0 auto; place-items: center; color: rgb(20 103 94 / 17%); border: 1px solid rgb(20 103 94 / 17%); border-radius: 36px; font-size: clamp(70px, 11vw, 125px); font-weight: 850; transform: rotate(8deg); }
.empty-panel { min-height: 300px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; color: var(--primary); background: var(--accent); border-radius: 16px; font-size: 23px; }
.product-workspace { display: grid; gap: 18px; }
.page-heading-actions { display: flex; align-items: center; gap: 10px; }
.product-add-button { min-height: 42px; margin: 0; gap: 8px; padding-inline: 15px; text-decoration: none; }
.product-add-button span { font-size: 18px; line-height: 1; }
.product-columns { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 18px; }
.data-panel { min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.data-panel h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 18px; font-size: 16px; }
.data-panel h2 small { color: var(--muted); font-size: 11px; font-weight: 500; }
.search-form { display: flex; gap: 9px; }
.search-form input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #dce4e9; border-radius: 9px; }
.product-filter-panel { padding: 16px 20px; }
.product-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(150px, .75fr) minmax(190px, .9fr) auto; gap: 12px; align-items: end; }
.product-filter-actions { display: flex; min-height: 44px; align-items: stretch; gap: 8px; }
.product-filter-actions .secondary-button { min-height: 44px; white-space: nowrap; }
.product-filter-actions .small-action { min-height: 44px; }
.product-editor-toolbar { display: flex; justify-content: flex-start; }
.product-list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-list-heading h2 { margin-bottom: 4px; }
.product-list-heading p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.products-table { min-width: 880px; }
.product-status { display: inline-flex; min-height: 25px; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.product-status-active { color: #176044; background: #eaf8f1; }
.product-status-inactive { color: #8b4b25; background: #fff3e8; }
.product-action-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; color: var(--primary); background: var(--accent); border: 1px solid #c7e2dc; border-radius: 9px; font-size: 18px; font-weight: 750; line-height: 1; text-decoration: none; }
.product-action-icon:hover { color: var(--primary-dark); background: #dff0ec; }
.product-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.quick-add-panel { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: end; }
.quick-add-panel h2 { margin-bottom: 6px; }
.quick-add-panel .unit-help { margin: 0; }
.quick-add-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .5fr) auto; gap: 12px; align-items: end; }
.quick-add-form .primary-button { min-height: 44px; margin: 0; white-space: nowrap; }
.secondary-button { padding: 0 14px; color: var(--primary); background: var(--accent); border: 1px solid #c7e2dc; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; }
.product-form { grid-template-columns: minmax(0, 1fr); }
.product-form .form-field { gap: 7px; }
.product-form .form-submit { grid-column: 1 / -1; width: 100%; }
.product-editor-form { width: 100%; }
.unit-help { margin: -5px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.unit-name-input, .unit-factor-input { min-width: 110px; min-height: 38px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #dce4e9; border-radius: 8px; }
.unit-factor-input { width: 130px; background: #f5f7f8; }
.new-units { display: grid; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.new-units h3 { margin: 0; font-size: 13px; }
.new-unit-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.new-unit-row .form-field { min-width: 0; }
.small-action { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 11px; color: var(--primary); background: var(--accent); border: 1px solid #c7e2dc; border-radius: 8px; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.small-action:hover { color: var(--primary-dark); background: #e2f2ee; }
.danger-action { color: #a3443d; background: #fff7f6; border-color: #f0d0cc; }
.danger-action:hover { color: #812d27; background: #fce9e6; }
.product-delete-form { margin-top: -8px; }
.unit-editor-panel .table-responsive { margin-top: 8px; }
.unit-editor-panel td:last-child, .unit-editor-panel th:last-child { text-align: center; }
.unit-catalog-panel { margin-top: 18px; }
.unit-catalog-heading h2 { margin-bottom: 5px; }
.unit-catalog-create { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto; gap: 12px; align-items: end; margin: 16px 0; }
.unit-catalog-table input { min-width: 130px; width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.unit-catalog-actions { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.unit-default-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px; color: var(--primary); background: var(--accent); border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.success-alert { margin-bottom: 14px; padding: 12px 14px; color: #176044; background: #eaf8f1; border: 1px solid #cbead9; border-radius: 9px; font-size: 13px; }
.empty-table-message { padding: 20px 8px; color: var(--muted); font-size: 13px; text-align: center; }

/* Public marketplace */
.showcase-page { background: #f8fafb; }
.showcase-header { position: sticky; z-index: 15; top: 0; display: flex; min-height: 76px; align-items: center; gap: 38px; padding: 12px clamp(18px, 6vw, 88px); background: rgb(255 255 255 / 94%); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.showcase-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 800; text-decoration: none; }
.showcase-brand .brand-symbol { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }
.showcase-nav { display: flex; align-items: center; gap: 25px; margin-inline-start: 18px; }
.showcase-nav a { color: #657887; font-size: 13px; font-weight: 650; text-decoration: none; }
.showcase-nav a:hover { color: var(--primary); }
.showcase-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.showcase-login { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 17px; color: #fff; background: var(--primary); border-radius: 9px; font-size: 12px; font-weight: 750; text-decoration: none; transition: background .18s, transform .18s; }
.showcase-login:hover { color: #fff; background: var(--primary-dark); transform: translateY(-1px); }
.showcase-hero { position: relative; display: flex; min-height: 350px; align-items: center; justify-content: space-between; overflow: hidden; padding: 44px clamp(22px, 8vw, 120px); color: #fff; background: linear-gradient(110deg, #103f49 0%, #11564f 54%, #19766a 100%); }
.showcase-hero::after { position: absolute; inset: auto -8% -310px auto; width: 650px; height: 650px; border: 1px solid rgb(210 244 233 / 18%); border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 2; max-width: 540px; }
.hero-overline { color: #9bdfca; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero-copy h1 { margin: 17px 0 11px; font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -.045em; }
.hero-copy p { max-width: 430px; color: rgb(255 255 255 / 75%); font-size: 15px; line-height: 1.8; }
.hero-link { display: inline-flex; align-items: center; gap: 20px; margin-top: 16px; padding: 11px 15px; color: #fff; border: 1px solid rgb(255 255 255 / 30%); border-radius: 9px; font-size: 12px; font-weight: 700; text-decoration: none; }
.hero-link:hover { background: rgb(255 255 255 / 9%); }
.hero-art { position: relative; width: min(35vw, 370px); height: 260px; flex: 0 0 auto; margin-inline-end: 4vw; }
.hero-art-card { position: absolute; display: block; width: 160px; height: 205px; background: linear-gradient(150deg, #f9fffd, #d3ede5); border: 1px solid rgb(255 255 255 / 60%); border-radius: 20px; box-shadow: 0 25px 50px rgb(8 38 41 / 28%); }
.hero-art-card-one { top: 19px; inset-inline-start: 18px; transform: rotate(-12deg); }
.hero-art-card-two { top: 36px; inset-inline-start: 127px; background: linear-gradient(150deg, #dbf3ed, #92cfc0); transform: rotate(10deg); }
.hero-art-orbit { position: absolute; z-index: 1; top: 61px; inset-inline-start: 88px; width: 160px; height: 160px; border: 1px solid rgb(27 125 108 / 28%); border-radius: 50%; }
.hero-art-g { position: absolute; z-index: 2; top: 58px; inset-inline-start: 90px; display: grid; width: 156px; height: 156px; place-items: center; color: #126458; font-size: 92px; font-weight: 850; }
.catalog-section { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { margin: 7px 0 0; font-size: 28px; letter-spacing: -.035em; }
.catalog-count { display: inline-grid; min-width: 36px; height: 34px; place-items: center; color: var(--primary); background: var(--accent); border-radius: 9px; font-size: 12px; font-weight: 750; }
.showcase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.showcase-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e7edf0; border-radius: 15px; box-shadow: 0 8px 24px rgb(25 47 62 / 4%); transition: transform .22s ease, box-shadow .22s ease; }
.showcase-card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px rgb(25 47 62 / 11%); }
.card-image-link { display: block; overflow: hidden; text-decoration: none; }
.product-card-image { display: block; width: 100%; height: 225px; object-fit: cover; background: #edf3f2; transition: transform .3s ease; }
.showcase-card:hover .product-card-image { transform: scale(1.035); }
.product-image-frame { position: relative; overflow: hidden; }
.ad-badge { position: absolute; z-index: 2; top: 12px; inset-inline-start: 12px; padding: 6px 9px; color: #fff; background: rgb(16 79 73 / 88%); border: 1px solid rgb(255 255 255 / 25%); border-radius: 7px; font-size: 9px; font-weight: 750; backdrop-filter: blur(6px); }
.product-art { position: relative; display: grid; min-height: 225px; place-items: center; overflow: hidden; background: linear-gradient(145deg, #e8f2f0, #d5e7e4); }
.product-art::before, .product-art::after { position: absolute; width: 190px; height: 190px; border: 1px solid rgb(24 103 94 / 13%); border-radius: 50%; content: ""; }
.product-art::before { transform: translate(-30px, 35px); }
.product-art::after { width: 130px; height: 130px; transform: translate(34px, -28px); }
.product-art-1 { background: linear-gradient(145deg, #f0eee7, #e1ded0); }
.product-art-2 { background: linear-gradient(145deg, #e7ebf5, #d6dced); }
.product-art-3 { background: linear-gradient(145deg, #f2e9e5, #ead7cf); }
.product-art-mark { position: relative; z-index: 1; display: grid; width: 104px; height: 104px; place-items: center; color: rgb(20 103 94 / 72%); background: rgb(255 255 255 / 68%); border: 1px solid rgb(255 255 255 / 80%); border-radius: 30px; box-shadow: 0 15px 30px rgb(25 47 62 / 9%); font-size: 55px; font-weight: 800; }
.image-note { position: absolute; inset-inline-end: 11px; bottom: 10px; color: #758791; font-size: 9px; }
.showcase-card-body { padding: 16px; }
.vendor-name { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: var(--primary); font-size: 11px; font-weight: 750; }
.vendor-logo { width: 32px; height: 32px; flex-shrink: 0; object-fit: contain; border-radius: 6px; background: #fff; }
.showcase-card h3 { overflow: hidden; margin: 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.showcase-card h3 a { color: var(--ink); text-decoration: none; }
.showcase-card h3 a:hover { color: var(--primary); }
.card-description { display: -webkit-box; min-height: 38px; overflow: hidden; margin: 9px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.product-price { font-size: 17px; letter-spacing: -.03em; }
.detail-link { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.detail-link:hover { color: var(--primary-dark); }
.catalog-message { display: grid; min-height: 260px; align-content: center; justify-items: center; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.catalog-message h3 { margin: 15px 0 6px; }
.catalog-message p { max-width: 440px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.error-message { color: #9b342d; }
.showcase-footer { display: flex; min-height: 84px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px clamp(18px, 6vw, 88px); background: #fff; border-top: 1px solid var(--line); }
.showcase-footer > span { color: var(--muted); font-size: 11px; }
.detail-page { width: min(1180px, calc(100% - 40px)); min-height: 70vh; margin: 0 auto; padding: 34px 0 70px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 23px; color: #5d7180; font-size: 12px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--primary); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); align-items: start; gap: clamp(24px, 5vw, 60px); padding: clamp(18px, 3vw, 34px); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.detail-image { min-height: 440px; border-radius: 14px; }
.detail-image-real { display: block; width: 100%; min-height: 440px; max-height: 640px; object-fit: cover; background: #edf3f2; border-radius: 14px; }
.detail-image .product-art-mark { width: 150px; height: 150px; border-radius: 40px; font-size: 78px; }
.detail-image .image-note { font-size: 11px; }
.detail-copy { min-width: 0; padding: 9px 0; }
.detail-copy h1 { margin: 8px 0 12px; font-size: clamp(27px, 4vw, 40px); line-height: 1.12; letter-spacing: -.04em; }
.detail-description { color: var(--muted); font-size: 13px; line-height: 1.8; }
.detail-price { display: flex; align-items: baseline; gap: 11px; margin: 22px 0; padding: 16px 0; border-block: 1px solid var(--line); }
.detail-price strong { font-size: 30px; letter-spacing: -.04em; }
.detail-price span { color: var(--muted); font-size: 11px; }
.spec-panel { margin-top: 18px; }
.spec-panel h2 { margin: 0 0 10px; font-size: 14px; }
.spec-panel dl { display: grid; gap: 0; margin: 0; }
.spec-panel dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #edf1f3; font-size: 12px; }
.spec-panel dt { color: var(--muted); }
.spec-panel dd { margin: 0; font-weight: 650; text-align: end; overflow-wrap: anywhere; }
.spec-panel dd a { color: var(--primary); text-decoration: none; }
.contact-panel { margin-top: 23px; padding: 15px; background: #f8fbfa; border: 1px solid var(--line); border-radius: 12px; }
.contact-panel dl > div:last-child { border-bottom: 0; }
.company-description { color: var(--muted); font-size: 12px; line-height: 1.8; }
.feature-list { display: grid; gap: 8px; margin: 0; padding-inline-start: 21px; color: #526876; font-size: 12px; line-height: 1.6; }
.additional-gallery { margin-top: 24px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.additional-gallery h2 { margin: 0 0 14px; font-size: 15px; }
.additional-gallery > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.additional-gallery img { width: 100%; height: 110px; object-fit: cover; background: #edf3f2; border: 1px solid var(--line); border-radius: 10px; }
html[dir="rtl"] .hero-copy, html[dir="rtl"] .section-heading { text-align: right; }
html[dir="rtl"] .hero-art-card-one { transform: rotate(12deg); }
html[dir="rtl"] .hero-art-card-two { transform: rotate(-10deg); }

@media (max-width: 1080px) {
    .showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-art { margin-inline-end: 0; transform: scale(.85); transform-origin: center; }
}
@media (max-width: 820px) {
    .showcase-header { min-height: 66px; gap: 14px; padding-inline: 18px; }
    .showcase-nav { margin-inline-start: 5px; }
    .showcase-hero { min-height: 310px; padding-inline: 28px; }
    .hero-art { width: 240px; margin-inline-end: -25px; transform: scale(.72); }
    .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .product-art { min-height: 190px; }
    .product-card-image { height: 190px; }
    .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .detail-image { min-height: 340px; }
    .detail-image-real { min-height: 340px; }
}
@media (max-width: 560px) {
    .showcase-header { flex-wrap: wrap; gap: 9px; padding: 10px 13px; }
    .showcase-brand { font-size: 17px; }
    .showcase-brand .brand-symbol { width: 34px; height: 34px; flex-basis: 34px; }
    .showcase-nav { display: none; }
    .showcase-actions { gap: 6px; }
    .showcase-actions .language-switch { min-height: 36px; padding-inline: 10px; font-size: 11px; }
    .showcase-login { min-height: 36px; padding-inline: 12px; font-size: 11px; }
    .showcase-hero { min-height: 285px; padding: 37px 21px; }
    .hero-copy h1 { font-size: 44px; }
    .hero-copy p { max-width: 300px; font-size: 13px; }
    .hero-art { position: absolute; inset-inline-end: -95px; bottom: -45px; width: 240px; opacity: .3; transform: scale(.72); }
    .catalog-section { width: calc(100% - 28px); padding: 36px 0 50px; }
    .section-heading h2 { font-size: 23px; }
    .showcase-grid { gap: 10px; }
    .product-art { min-height: 145px; }
    .product-card-image { height: 145px; }
    .product-art-mark { width: 72px; height: 72px; border-radius: 22px; font-size: 38px; }
    .showcase-card-body { padding: 12px; }
    .showcase-card h3 { font-size: 13px; }
    .card-description { font-size: 10px; }
    .card-footer { align-items: start; flex-direction: column; }
    .showcase-footer { min-height: 72px; padding-inline: 14px; }
    .showcase-footer .showcase-brand { font-size: 15px; }
    .detail-page { width: calc(100% - 24px); padding-top: 22px; }
    .detail-layout { gap: 20px; padding: 13px; }
    .detail-image { min-height: 260px; }
    .detail-image-real { min-height: 260px; }
    .detail-image .product-art-mark { width: 110px; height: 110px; font-size: 60px; }
}
.table-responsive { width: 100%; max-width: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; text-align: start; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { color: #6e7f8d; background: #f8fafb; font-size: 11px; font-weight: 750; }
.data-table td { font-size: 13px; }
.stock-quantities-table th, .stock-quantities-table td { border: 1px solid var(--line); }

/* Public marketplace home: isolated from product details and the authenticated application. */
.marketplace-home { background: #eef5fd; color: #143a63; }
.marketplace-home .showcase-header { min-height: 48px; gap: 14px; padding: 6px clamp(12px, 3vw, 34px); background: #eef5fd; border: 0; box-shadow: none; }
.marketplace-home .marketplace-brand { gap: 8px; color: #0756a6; font-size: 14px; }
.marketplace-home .marketplace-brand .brand-symbol { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; font-size: 16px; }
.marketplace-home .marketplace-brand > span:last-child { display: grid; gap: 1px; line-height: 1; }
.marketplace-home .marketplace-brand strong { font-size: 14px; font-weight: 800; }
.marketplace-home .marketplace-brand small { color: #6780a0; font-size: 7px; font-weight: 650; letter-spacing: .02em; }
.marketplace-home .showcase-actions { gap: 8px; }
.marketplace-home .language-switch { min-height: 31px; padding: 5px 9px; color: #1261ae; background: #fff; border: 0; border-radius: 10px; box-shadow: 0 2px 8px rgb(17 63 119 / 7%); font-size: 10px; }
.marketplace-home .showcase-login { min-height: 31px; padding: 0 12px; background: #0756a6; border-radius: 10px; box-shadow: none; font-size: 10px; }
.marketplace-home .showcase-login:hover { background: #084984; }
.marketplace-hero, .marketplace-empty-hero { position: relative; width: min(1280px, calc(100% - 28px)); min-height: 460px; overflow: hidden; margin: 0 auto 16px; background: #0756a6; border: 1px solid rgb(255 255 255 / 68%); border-radius: 14px; box-shadow: 0 12px 30px rgb(12 58 117 / 13%); }
.marketplace-slides { position: relative; min-height: 460px; }
.marketplace-slide { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .38s ease, visibility .38s ease; }
.marketplace-slide.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.marketplace-hero-image { display: grid; min-height: 0; place-items: center; overflow: hidden; padding: clamp(14px, 2.4vw, 30px); background: radial-gradient(circle at 38% 25%, #e8f3ff, #d9e9fa 50%, #c4d9ee); text-decoration: none; }
.marketplace-hero-image img { display: block; width: 100%; height: 100%; max-height: 310px; object-fit: contain; filter: drop-shadow(0 14px 16px rgb(15 48 81 / 13%)); transition: transform .35s ease; }
.marketplace-hero-image:hover img { transform: scale(1.025); }
.marketplace-hero-fallback { display: grid; width: 136px; height: 136px; place-items: center; color: #1a64a9; background: rgb(255 255 255 / 74%); border: 1px solid #fff; border-radius: 36px; box-shadow: 0 16px 30px rgb(21 71 120 / 12%); font-size: 68px; font-weight: 800; }
.marketplace-hero-copy { display: grid; gap: 5px; min-height: 112px; padding: 14px clamp(16px, 2.8vw, 30px) 17px; color: #fff; background: linear-gradient(110deg, #0756a6, #0d4b90); }
.marketplace-hero-copy p { margin: 0; color: rgb(255 255 255 / 72%); font-size: 11px; font-weight: 650; }
.marketplace-hero-copy h2 { overflow: hidden; margin: 0; color: #fff; font-size: clamp(18px, 2.2vw, 27px); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-hero-copy > span:not(.marketplace-sponsored) { overflow: hidden; color: rgb(255 255 255 / 80%); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-hero-copy a { justify-self: start; margin-top: 3px; padding: 8px 12px; color: #0756a6; background: #fff; border-radius: 9px; font-size: 11px; font-weight: 800; text-decoration: none; }
.marketplace-hero-copy a b { display: inline-block; margin-inline-start: 7px; font-size: 14px; line-height: 0; }
.marketplace-sponsored { justify-self: start; padding: 3px 7px; color: #dceeff; background: rgb(255 255 255 / 13%); border: 1px solid rgb(255 255 255 / 22%); border-radius: 6px; font-size: 8px; font-weight: 750; }
.marketplace-carousel-controls { position: absolute; z-index: 4; bottom: 20px; inset-inline-end: clamp(16px, 2.8vw, 30px); display: flex; align-items: center; gap: 8px; }
.marketplace-carousel-arrow { display: grid; width: 25px; height: 25px; place-items: center; color: #fff; background: rgb(255 255 255 / 15%); border: 1px solid rgb(255 255 255 / 28%); border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.marketplace-carousel-arrow:hover { background: rgb(255 255 255 / 26%); }
.marketplace-carousel-dots { display: flex; align-items: center; gap: 5px; }
.marketplace-carousel-dots button { width: 5px; height: 5px; padding: 0; background: rgb(255 255 255 / 45%); border: 0; border-radius: 50%; cursor: pointer; transition: width .2s ease, background .2s ease; }
.marketplace-carousel-dots button[aria-selected="true"] { width: 17px; background: #fff; border-radius: 5px; }
.marketplace-empty-hero { display: grid; min-height: 230px; place-items: center; padding: 24px; color: #fff; text-align: center; }
.marketplace-empty-hero p { max-width: 420px; margin: 0; font-size: 15px; line-height: 1.8; }
.marketplace-home .marketplace-catalog { width: min(1280px, calc(100% - 28px)); padding: 0 0 32px; }
.marketplace-home .marketplace-section-heading { align-items: center; margin: 2px 0 11px; }
.marketplace-home .marketplace-section-heading .eyebrow { display: none; }
.marketplace-home .section-heading h2 { color: #245a91; font-size: 15px; font-weight: 750; letter-spacing: 0; }
.marketplace-home .catalog-count { min-width: 26px; height: 26px; color: #2366a4; background: #fff; border-radius: 8px; box-shadow: 0 1px 5px rgb(26 68 110 / 6%); font-size: 10px; }
.marketplace-home .showcase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.marketplace-home .showcase-card { overflow: hidden; padding: 7px; background: #fff; border: 1px solid #e4edf7; border-radius: 14px; box-shadow: 0 5px 14px rgb(31 86 143 / 5%); }
.marketplace-home .showcase-card:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgb(31 86 143 / 12%); }
.marketplace-home .product-image-frame { aspect-ratio: 1.23; background: #fff; border: 1px solid #e5eaf0; border-radius: 10px; }
.marketplace-home .product-card-image { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.marketplace-home .product-art { min-height: 100%; border: 1px solid #e5eaf0; border-radius: 10px; }
.marketplace-home .ad-badge, .marketplace-home .card-description { display: none; }
.marketplace-home .showcase-card-body { padding: 8px 4px 2px; text-align: start; }
.marketplace-home .vendor-name { margin: 0 0 5px; color: #7d91a5; font-size: 9px; font-weight: 600; }
.marketplace-home .vendor-logo { width: 30px; height: 30px; }
.marketplace-home .showcase-card h3 { font-size: 13px; line-height: 1.35; white-space: normal; }
.marketplace-home .card-footer { align-items: center; padding-top: 5px; border: 0; }
.marketplace-home .product-price { color: #0c579f; font-size: 12px; }
.marketplace-home .detail-link { color: #0a64bd; font-size: 10px; }
.marketplace-home .showcase-footer { min-height: 70px; margin-top: 2px; padding: 12px clamp(14px, 3vw, 34px); background: #fff; border: 0; }
.marketplace-home .showcase-footer .showcase-brand { color: #0756a6; font-size: 15px; }
.marketplace-home .showcase-footer .brand-symbol { width: 28px; height: 28px; flex-basis: 28px; font-size: 14px; }
html[dir="rtl"] .marketplace-home .marketplace-hero-copy, html[dir="rtl"] .marketplace-home .marketplace-section-heading { text-align: right; }
html[dir="rtl"] .marketplace-home .marketplace-hero-copy a b { transform: scaleX(-1); }

@media (min-width: 860px) {
    .marketplace-hero, .marketplace-empty-hero { min-height: 480px; }
    .marketplace-slides { min-height: 480px; }
    .marketplace-slide { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); grid-template-rows: 1fr; }
    .marketplace-hero-copy { align-content: center; min-height: 0; padding: clamp(28px, 4vw, 52px); }
    .marketplace-hero-copy h2 { white-space: normal; }
    .marketplace-hero-copy > span:not(.marketplace-sponsored) { white-space: normal; }
    .marketplace-carousel-controls { bottom: 24px; }
}
@media (max-width: 1040px) {
    .marketplace-home .showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .marketplace-home .showcase-header { min-height: 44px; padding: 6px 11px; }
    .marketplace-home .marketplace-brand small { display: none; }
    .marketplace-home .showcase-login { padding-inline: 10px; }
    .marketplace-hero, .marketplace-empty-hero, .marketplace-slides { min-height: 410px; }
    .marketplace-hero-image { min-height: 0; padding: 14px 20px; }
    .marketplace-hero-image img { max-height: 260px; }
    .marketplace-hero-copy { min-height: 128px; padding: 13px 16px 18px; }
    .marketplace-hero-copy h2 { font-size: 17px; }
    .marketplace-hero-copy > span:not(.marketplace-sponsored) { max-width: 82%; }
    .marketplace-carousel-controls { bottom: 18px; inset-inline-end: 15px; }
    .marketplace-home .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .marketplace-home .showcase-card h3 { font-size: 12px; }
    .marketplace-home .card-footer { align-items: flex-start; flex-direction: column; gap: 3px; }
    .marketplace-home .product-price { font-size: 11px; }
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: grid; min-width: 0; gap: 7px; }
.form-field label { font-size: 12px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #dce4e9; border-radius: 9px; }
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #63a99a; outline: 3px solid rgb(20 103 94 / 11%); }

.sales-toolbar, .sales-pagination, .invoice-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.sales-toolbar { margin-block:4px 16px; }
.sales-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); align-items:end; gap:12px; }
.sales-filters .form-field input,.sales-filters .form-field select { min-height:42px; }
.inventory-report .sales-filters > button,.inventory-report .sales-filters > a { min-height:42px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; }
.movement-filter-actions { grid-column:1 / -1; }
.movement-filter-actions .secondary-button,.movement-filter-actions .small-action { min-height:42px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; }
.lookup-field{position:relative}.lookup-field .lookup-clear{position:absolute;inset-inline-end:5px;bottom:6px;border:0;background:transparent;cursor:pointer}.lookup-results{position:absolute;z-index:8;inset-inline:0;top:100%;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 18px #0002;max-height:220px;overflow:auto}.lookup-results button{display:block;width:100%;text-align:start;border:0;background:transparent;padding:9px;cursor:pointer}.lookup-results button:hover{background:var(--surface-alt)}.movement-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.movement-filter-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end;margin-top:12px}.movement-filter-actions .date-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;grid-column:span 2}@media(max-width:720px){.movement-filter-grid,.movement-filter-actions{grid-template-columns:1fr 1fr}.movement-filter-actions .date-pair{grid-column:span 2}}
.sales-pagination { margin-top:16px; justify-content:flex-end; color:var(--muted); font-size:13px; }
.sales-pagination a { min-width:74px; text-align:center; }
.invoice-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; padding:16px 0; color:var(--muted); }
.invoice-summary strong { display:block; color:var(--ink); margin-top:4px; }
.table-subtext { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.invoice-header { grid-template-columns:repeat(2,minmax(0,1fr)); margin-block:18px; }
.picker-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.product-picker { position:relative; margin-block:14px 18px; }
.sales-search-results { position:absolute; z-index:12; inset-inline:0; top:100%; max-height:280px; overflow:auto; padding:8px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 35px rgb(24 43 59 / 14%); }
.sales-result { display:block; width:100%; padding:11px 12px; text-align:start; color:var(--ink); background:#fff; border:0; border-radius:8px; cursor:pointer; }
.sales-result:hover,.sales-result:focus { background:#f0f7f5; }
.sales-lines-table input,.sales-lines-table select { min-height:38px; min-width:95px; padding:7px 9px; border:1px solid #dce4e9; border-radius:8px; color:var(--ink); background:#fff; }
.sales-lines-table { width:100%; table-layout:auto; }
.sales-lines-table th,.sales-lines-table td { padding:9px 8px; }
.sales-lines-table .line-warehouse,.sales-lines-table .line-unit { min-width:105px; max-width:170px; }
.sales-lines-table .line-quantity,.sales-lines-table .line-price { width:92px; min-width:78px; }
.sales-lines-table:not(.sales-new-lines) td:first-child,
.sales-new-lines td:nth-child(3) { min-width:145px; }
html.sales-quick-purchase-open { overflow:hidden; }
.sales-modal.sales-quick-purchase {
    position:fixed;
    inset:0;
    margin:auto;
    box-sizing:border-box;
    width:min(560px,calc(100% - 32px));
    max-height:calc(100vh - 32px);
    max-height:calc(100dvh - 32px);
    overscroll-behavior:contain;
    border:0;
    color:var(--ink);
}
.sales-product-picker { position:fixed; width:min(560px,calc(100% - 32px)); border:0; color:var(--ink); }
.sales-product-picker #picker-stock,
.sales-product-picker #picker-price { grid-column:1 / -1; margin:0; }
.sales-product-picker::backdrop,
.sales-quick-purchase::backdrop { background:rgb(19 35 45 / 48%); }
.sales-quick-purchase-details { display:grid; grid-template-columns: auto minmax(0, 1fr); gap:8px 16px; }
.sales-quick-purchase-details dd { margin:0; overflow-wrap:anywhere; }
.sales-quick-purchase .sales-toolbar { margin-top:16px; }
.sales-lines-table td:nth-child(7) { min-width:120px; }
.sales-lines-table td:last-child { width:1%; white-space:nowrap; }
.sales-lines-table .stock-warning { background:#fff8f4; }
.sales-new-lines tr.stock-shortage > td {
    background:#000;
    color:#ffeb3b;
}
.sales-new-lines tr.stock-shortage .table-subtext,
.sales-new-lines tr.stock-shortage .stock-availability { color:#ffeb3b; }
.sales-new-lines tr.stock-shortage input,
.sales-new-lines tr.stock-shortage select { background:#fff; color:#17232e; }
.sales-new-lines .sales-manual-price-note { white-space:normal; }
.sales-quick-purchase .sales-toolbar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.sales-quick-purchase .sales-toolbar button { min-height:44px; white-space:normal; }
@media (max-width:360px) {
    .sales-quick-purchase .sales-toolbar { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
    .sales-lines-table { min-width:780px; }
    .sales-lines-table .line-warehouse,.sales-lines-table .line-unit { max-width:none; }
}
.stock-availability { display:inline-block; padding:4px 7px; color:#176c58; background:#eaf7f1; border-radius:20px; font-size:11px; }
.stock-warning .stock-availability { color:#a73b24; background:#ffebe5; }
.invoice-footer { justify-content:flex-end; margin-top:16px; padding:14px; background:#f8fafb; border-radius:10px; }
.invoice-footer strong { font-size:18px; }
.sales-modal-backdrop { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:20px; background:rgb(19 35 45 / 48%); }
.sales-modal { position:relative; width:min(560px,100%); max-height:90vh; overflow:auto; padding:24px; background:#fff; border-radius:16px; box-shadow:0 25px 80px rgb(0 0 0 / 22%); }
.sales-modal h2 { margin:0 38px 4px 0; }
.sales-modal>p { color:var(--muted); margin:0 0 18px; }
.sales-modal-close { position:absolute; top:14px; inset-inline-end:14px; width:36px; height:36px; border:0; border-radius:50%; background:#f0f3f5; color:var(--ink); font-size:23px; cursor:pointer; }
.sales-modal .primary-button:disabled { opacity:.6; cursor:not-allowed; }
html[dir="rtl"] .sales-modal h2 { margin:0 0 4px 38px; }
.employee-modal-backdrop { position:fixed; z-index:110; inset:0; display:grid; place-items:center; padding:20px; background:rgb(12 29 51 / 58%); backdrop-filter:blur(3px); }
.employee-modal-backdrop[hidden] { display:none !important; }
body.modal-open { overflow:hidden; }
.employee-modal { position:relative; width:min(660px,100%); max-height:min(90dvh,820px); overflow:auto; padding:clamp(21px,3vw,32px); color:var(--ink); background:#fff; border:1px solid rgb(255 255 255 / 78%); border-radius:20px; box-shadow:0 26px 78px rgb(9 33 76 / 32%); }
.employee-modal header { padding-inline-end:48px; }
.employee-modal header .eyebrow { margin:0 0 5px; color:var(--primary); font-weight:750; }
.employee-modal header h2 { margin:0; color:#0b3d91; font-size:clamp(22px,2.2vw,29px); }
.employee-modal header p:last-child { margin:8px 0 22px; color:var(--muted); }
.employee-modal-close { position:absolute; top:15px; inset-inline-end:15px; display:grid; width:36px; height:36px; place-items:center; padding:0; color:#31537e; background:#eef5fd; border:0; border-radius:50%; cursor:pointer; font-size:25px; line-height:1; }
.employee-modal-close:hover,.employee-modal-close:focus-visible { color:#083d95; background:#dcecff; outline:none; }
.employee-modal-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.employee-modal-form .form-field { min-width:0; }
.employee-modal-form input,.employee-modal-form select { min-height:44px; }
.employee-modal-actions { display:flex; grid-column:1/-1; align-items:center; justify-content:flex-end; gap:10px; margin-top:5px; padding-top:18px; border-top:1px solid #e7edf5; }
.user-management-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.user-management-actions h2 { margin:0 0 4px; }
.user-management-actions .unit-help { margin:0; }
.plan-limit-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; color:#8b360f; background:#fff8ed; border:1px solid #f6d7ad; }
.plan-limit-notice p { margin:0; font-weight:650; }
.user-action-group { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; white-space:nowrap; }
.user-action-group form { margin:0; }
.users-table { min-width:680px; }
.users-table th:last-child,.users-table td:last-child { width:1%; white-space:nowrap; }
.user-icon-action { display:inline-grid; width:36px; height:36px; flex:0 0 36px; place-items:center; padding:0; color:#165aa7; background:#eef6ff; border:1px solid #d5e5f8; border-radius:9px; cursor:pointer; text-decoration:none; transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease; }
.user-icon-action:hover,.user-icon-action:focus-visible { color:#083f8f; background:#dfeeff; border-color:#a8caef; outline:none; transform:translateY(-1px); }
.user-icon-action svg { width:18px; height:18px; fill:currentColor; }
.danger-icon-action { color:#b73a31; background:#fff0ee; border-color:#f4d0cb; }
.danger-icon-action:hover,.danger-icon-action:focus-visible { color:#96291f; background:#ffe1dc; border-color:#eeb1a8; }
@media (max-width:560px) {
    .employee-modal-backdrop { align-items:end; padding:0; }
    .employee-modal { width:100%; max-height:92dvh; border-bottom-right-radius:0; border-bottom-left-radius:0; }
    .employee-modal-form { grid-template-columns:minmax(0,1fr); }
    .employee-modal-actions,.user-management-actions,.plan-limit-notice { align-items:stretch; flex-direction:column; }
    .employee-modal-actions .primary-button,.employee-modal-actions .secondary-button,.user-management-actions .primary-button { width:100%; justify-content:center; }
    .plan-limit-notice .secondary-button { width:100%; justify-content:center; }
    .user-icon-action { width:40px; height:40px; flex-basis:40px; }
}
.purchase-header { grid-template-columns:repeat(2,minmax(0,1fr)); }
.purchase-header .purchase-notes { grid-column:1/-1; }
.supplier-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.supplier-form .supplier-address { grid-column:1/-1; }
.purchase-lines-table { width:100%; table-layout:auto; }
.purchase-lines-table th,.purchase-lines-table td { padding:9px 8px; }
.purchase-lines-table input,.purchase-lines-table select { min-height:38px; min-width:78px; padding:7px 9px; border:1px solid #dce4e9; border-radius:8px; color:var(--ink); background:#fff; }
.purchase-lines-table .purchase-warehouse,.purchase-lines-table .purchase-unit { min-width:105px; max-width:175px; }
.purchase-lines-table .purchase-quantity,.purchase-lines-table .purchase-cost { width:92px; min-width:78px; }
.purchase-lines-table td:first-child { min-width:145px; }
.purchase-lines-table td:last-child { width:1%; white-space:nowrap; }
@media (max-width: 760px) {
    .purchase-header,.supplier-form { grid-template-columns:1fr; }
    .purchase-header .purchase-notes,.supplier-form .supplier-address { grid-column:auto; }
    .purchase-lines-table { min-width:700px; }
    .purchase-lines-table .purchase-warehouse,.purchase-lines-table .purchase-unit { max-width:none; }
}

html[dir="rtl"] .brand-message h1, html[dir="rtl"] .page-heading, html[dir="rtl"] .welcome-panel { text-align: right; }
html[dir="rtl"] .primary-button span { transform: scaleX(-1); }
html[dir="rtl"] .metric-card strong, html[dir="rtl"] .date-chip { direction: ltr; text-align: right; }

@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: minmax(300px, .78fr) minmax(430px, 1.22fr); }
    .login-brand-panel { padding: 46px; }
    .product-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; width: min(82vw, 290px); height: 100dvh; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 32px rgb(24 43 59 / 10%); }
    html[dir="rtl"] .sidebar { right: 0; left: auto; transform: translateX(105%); }
    .sidebar.is-open { transform: translateX(0); }
    html[dir="rtl"] .sidebar.is-open { transform: translateX(0); }
    .menu-toggle { display: inline-grid; flex: 0 0 39px; place-items: center; }
    .login-shell { display: block; }
    .login-brand-panel { display: none; }
    .login-form-panel { min-height: 100dvh; padding: 90px 24px 60px; }
    .mobile-brand { display: flex; }
    .product-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-search-field, .product-filter-actions { grid-column: 1 / -1; }
    .quick-add-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .topbar { min-height: 64px; gap: 10px; padding-inline: 12px; }
    .topbar-actions { gap: 4px; }
    .topbar-actions .language-switch, .logout-link { padding-inline: 9px; font-size: 11px; }
    .page-content { padding: 23px 14px; }
    .page-heading { align-items: start; flex-direction: column; margin-bottom: 20px; }
    .metric-grid { gap: 10px; }
    .metric-card { min-height: 158px; padding: 14px; }
    .metric-card p { font-size: 11px; }
    .metric-card strong { font-size: 21px; }
    .welcome-panel { min-height: 190px; padding: 22px; }
    .welcome-art { width: 78px; height: 78px; border-radius: 20px; font-size: 56px; }
    .login-form-panel { padding-inline: 20px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .new-unit-row, .unit-catalog-create, .quick-add-panel, .quick-add-form { grid-template-columns: minmax(0, 1fr); }
    .search-form { flex-direction: column; }
    .page-heading-actions { width: 100%; justify-content: space-between; }
    .product-filters { grid-template-columns: minmax(0, 1fr); }
    .product-filter-actions { min-height: 42px; }
    .secondary-button { min-height: 42px; }
    .invoice-header,.picker-row { grid-template-columns:minmax(0,1fr); }
    .sales-pagination { justify-content:center; }
    .sales-modal { padding:19px; }
}

/* OrViX login: deliberately scoped to the public authentication screen. */
.login-page { min-height: 100dvh; padding: clamp(16px, 3.7vw, 60px); color: #0b3a8d; background: radial-gradient(circle at 12% 13%, rgb(255 255 255 / 92%), transparent 24%), radial-gradient(circle at 86% 88%, #9fe4ff 0, transparent 32%), linear-gradient(135deg, #c4e7ff, #edf9ff 53%, #b9dcff); font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
.login-page .login-shell { display: grid; grid-template-areas: "brand form"; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); width: min(100%, 1520px); min-height: min(820px, calc(100dvh - clamp(32px, 7.4vw, 120px))); margin: 0 auto; overflow: hidden; direction: ltr; background: #fff; border: 1px solid rgb(255 255 255 / 78%); border-radius: clamp(24px, 2.4vw, 38px); box-shadow: 0 28px 70px rgb(7 63 142 / 18%); }
.login-page .login-brand-panel, .login-page .login-form-panel { direction: ltr; }
html[dir="rtl"] .login-page .login-brand-panel, html[dir="rtl"] .login-page .login-form-panel { direction: rtl; }
.login-page .login-brand-panel { grid-area: brand; display: flex; min-height: 0; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(30px, 4vw, 62px); color: #fff; background: radial-gradient(circle at 82% 25%, rgb(36 157 255 / 79%), transparent 33%), radial-gradient(circle at 34% 92%, rgb(21 224 255 / 35%), transparent 36%), linear-gradient(135deg, #09277f 0%, #064bc0 54%, #078adc 100%); }
.login-page .login-brand-lockup { display: inline-flex; width: fit-content; align-items: center; gap: 15px; color: #fff; text-decoration: none; }
.login-page .login-brand-lockup img { width: clamp(56px, 4.7vw, 72px); height: clamp(56px, 4.7vw, 72px); flex: 0 0 auto; padding: 3px; object-fit: contain; background: #fff; border: 1px solid rgb(255 255 255 / 74%); border-radius: 50%; box-shadow: 0 10px 22px rgb(0 26 101 / 24%); }
.login-page .login-brand-lockup span { display: grid; gap: 5px; }
.login-page .login-brand-lockup strong { font-size: clamp(28px, 3.7vw, 52px); font-weight: 800; letter-spacing: -.045em; line-height: .94; }
.login-page .login-brand-lockup small { color: rgb(255 255 255 / 89%); font-size: clamp(10px, 1.05vw, 16px); font-weight: 600; }
.login-page .login-brand-content { display: grid; flex: 1; align-content: center; justify-items: center; min-height: 0; padding: clamp(8px, 1.5vw, 24px) 0; }
.login-page .login-business-illustration { display: block; width: min(100%, 660px); max-width: 100%; aspect-ratio: 3 / 2; max-height: min(43vh, 435px); object-fit: contain; object-position: center; filter: drop-shadow(0 22px 25px rgb(0 25 106 / 20%)); }
.login-page .login-module-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 650px); gap: clamp(8px, 1.4vw, 20px); margin: 0 auto; padding: 0; list-style: none; }
.login-page .login-module-list li { display: grid; justify-items: center; gap: 9px; color: #fff; font-size: clamp(10px, 1.1vw, 15px); font-weight: 700; text-align: center; }
.login-page .login-module-icon { display: grid; width: clamp(42px, 4.4vw, 67px); height: clamp(42px, 4.4vw, 67px); place-items: center; color: #fff; background: linear-gradient(145deg, rgb(111 218 255 / 34%), rgb(37 96 226 / 41%)); border: 1px solid rgb(188 245 255 / 24%); border-radius: 17px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%); font-size: clamp(23px, 2.4vw, 34px); line-height: 1; }
.login-page .login-form-panel { grid-area: form; position: relative; display: flex; min-height: 0; flex-direction: column; align-items: center; justify-content: center; padding: clamp(95px, 9vw, 132px) clamp(30px, 5vw, 84px) 54px; background: radial-gradient(circle at 83% 15%, #eef8ff, transparent 30%), #fff; border-top-left-radius: clamp(78px, 10vw, 155px); border-bottom-left-radius: clamp(42px, 6vw, 92px); }
.login-page .language-row { position: absolute; z-index: 1; top: clamp(24px, 3vw, 38px); inset-inline-end: clamp(24px, 3.2vw, 50px); }
.login-page .login-language-switch { gap: 7px; min-height: 43px; padding: 8px 15px; color: #17458e; background: rgb(255 255 255 / 86%); border: 1px solid #c8dcfb; border-radius: 999px; box-shadow: 0 4px 14px rgb(15 78 170 / 5%); font-size: 14px; font-weight: 750; }
.login-page .login-language-switch:hover { color: #063a9c; background: #edf6ff; border-color: #91baf0; }
.login-page .login-card { width: min(100%, 530px); text-align: center; }
.login-page .login-avatar { display: inline-grid; width: clamp(72px, 7.1vw, 102px); height: clamp(72px, 7.1vw, 102px); place-items: center; margin-bottom: 14px; color: #0b62ca; background: linear-gradient(145deg, #e7f4ff, #c7e4ff); border: 1px solid #d5e9ff; border-radius: 50%; box-shadow: inset 0 1px 1px #fff; }
.login-page .login-avatar svg { width: 51%; height: 51%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.login-page .login-card > .eyebrow { margin-bottom: 6px; color: #0a56be; font-size: 12px; letter-spacing: .08em; }
.login-page .login-card h2 { margin: 0; color: #0b3d91; font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -.045em; line-height: 1.13; }
.login-page .form-hint { max-width: 430px; margin: 11px auto 30px; color: #6075a4; font-size: clamp(13px, 1.25vw, 17px); line-height: 1.7; }
.login-page .login-card form { display: grid; gap: 15px; }
.login-page .login-field { position: relative; display: flex; align-items: center; }
.login-page .login-field input { width: 100%; min-height: clamp(54px, 4.7vw, 66px); padding: 13px 54px; color: #123d86; background: #fff; border: 1.5px solid #cdddf4; border-radius: 18px; box-shadow: 0 2px 6px rgb(14 82 172 / 2%); font-size: clamp(14px, 1.3vw, 17px); outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.login-page .login-field input::placeholder { color: #8292b2; opacity: 1; }
.login-page .login-field input:focus { background: #fbfdff; border-color: #2287e6; box-shadow: 0 0 0 4px rgb(33 133 234 / 12%); }
.login-page .login-field-icon { position: absolute; z-index: 1; inset-inline-start: 18px; display: grid; width: 23px; height: 23px; place-items: center; color: #0c469b; pointer-events: none; font-size: 22px; line-height: 1; }

/* Company Dashboard — phase one: visual shell only. */
.app-page { --dashboard-blue:#0b61c9; --dashboard-blue-dark:#084899; --dashboard-blue-soft:#eaf4ff; --dashboard-ink:#17324f; min-width:320px; overflow-x:hidden; color:var(--dashboard-ink); background:#f4f7fb; }
.app-page .app-shell { display:flex; min-height:100dvh; }
/* Flex already follows document direction: first item is right in RTL and left in LTR. */
html[dir="rtl"] .app-page .app-shell { flex-direction:row; }
.app-page .sidebar { width:276px; height:100dvh; flex:0 0 276px; padding:22px 14px 15px; color:#53677e; background:linear-gradient(180deg,#fff 0%,#fbfdff 66%,#eef6ff 100%); border:0; border-inline-end:1px solid #dce7f4; box-shadow:8px 0 26px rgb(30 72 128 / 4%); }
html[dir="rtl"] .app-page .sidebar { border-inline-end:0; border-inline-start:1px solid #dce7f4; box-shadow:-8px 0 26px rgb(30 72 128 / 4%); }
.app-page .company-brand { display:flex; min-width:0; align-items:center; gap:11px; padding:0 8px 22px; color:var(--dashboard-ink); text-decoration:none; }
.app-page .company-brand-logo { display:grid; width:48px; height:48px; flex:0 0 48px; place-items:center; overflow:hidden; background:#f2f7ff; border:1px solid #d8e7f8; border-radius:15px; box-shadow:0 5px 13px rgb(21 83 157 / 8%); }
.app-page .company-brand-logo img { display:block; width:100%; height:100%; object-fit:contain; }
.app-page .company-brand-copy { display:grid; min-width:0; gap:3px; }
.app-page .company-brand-copy strong { overflow:hidden; color:#173b68; font-size:14px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.app-page .company-brand-copy small { color:#7890ab; font-size:10px; font-weight:700; letter-spacing:.06em; }
.app-page .nav-caption { margin:4px 10px 11px; color:#93a6ba; font-size:10px; letter-spacing:.1em; }
.app-page .side-nav { gap:5px; }
.app-page .nav-link { min-height:46px; gap:11px; padding:10px 12px; color:#61778f; border:1px solid transparent; border-radius:12px; font-size:13px; }
.app-page .nav-link:hover { color:var(--dashboard-blue); background:#f3f8ff; border-color:#e0ecfa; }
.app-page .nav-link.is-active { color:#0a4d9d; background:linear-gradient(90deg,#eaf4ff,#f6faff); border-color:#d7e8fb; box-shadow:inset 3px 0 0 var(--dashboard-blue); }
html[dir="rtl"] .app-page .nav-link.is-active { box-shadow:inset -3px 0 0 var(--dashboard-blue); }
.app-page .nav-icon { width:22px; color:var(--dashboard-blue); font-size:17px; }
.app-page .sidebar-user { display:flex; min-width:0; align-items:center; gap:10px; margin-top:auto; padding:15px 8px 4px; border-top:1px solid #dce7f4; }
.app-page .user-avatar { display:inline-grid; width:36px; height:36px; flex:0 0 36px; place-items:center; overflow:hidden; color:#0d57ae; background:linear-gradient(145deg,#e7f3ff,#d5eaff); border:1px solid #c6dff8; border-radius:12px; font-size:13px; font-weight:850; }
.app-page .user-meta,.app-page .topbar-user-copy { display:grid; min-width:0; gap:3px; }
.app-page .user-meta strong,.app-page .topbar-user-copy strong { overflow:hidden; color:#264462; font-size:12px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.app-page .user-meta small,.app-page .topbar-user-copy small { overflow:hidden; color:#7e92a8; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.app-page .main-panel { min-width:0; flex:1 1 auto; background:#f4f7fb; }
.app-page .topbar { min-height:76px; gap:16px; padding:12px clamp(18px,3vw,38px); background:rgb(255 255 255 / 92%); border-bottom:1px solid #e0e9f4; box-shadow:0 3px 16px rgb(23 66 112 / 3%); }
.app-page .topbar-company { display:flex; min-width:0; align-items:center; gap:10px; }
.app-page .topbar-company-logo { display:grid; width:38px; height:38px; flex:0 0 38px; place-items:center; overflow:hidden; background:#f2f7ff; border:1px solid #dce9f8; border-radius:12px; }
.app-page .topbar-company-logo img { display:block; width:100%; height:100%; object-fit:contain; }
.app-page .topbar-title strong { display:block; overflow:hidden; max-width:min(31vw,360px); color:#1b3d62; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.app-page .topbar-kicker { color:#8498ad; font-size:10px; font-weight:750; letter-spacing:.05em; }
.app-page .topbar-actions { min-width:0; gap:9px; }
.app-page .topbar-icon-link { display:inline-grid; width:38px; height:38px; flex:0 0 38px; place-items:center; color:#55718f; background:#f7faff; border:1px solid #dce8f5; border-radius:11px; text-decoration:none; transition:background .16s ease,color .16s ease,border-color .16s ease; }
.app-page .topbar-icon-link:hover,.app-page .topbar-icon-link:focus-visible { color:var(--dashboard-blue); background:#ecf5ff; border-color:#b9d7f5; outline:none; }
.app-page .topbar-icon-link svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.app-page .topbar-actions .language-switch { min-height:38px; color:#365777; background:#fff; border-color:#dce8f5; border-radius:11px; font-size:12px; }
.app-page .topbar-user { display:flex; min-width:0; align-items:center; gap:8px; padding-inline:3px; }
.app-page .logout-link { min-height:38px; padding:8px 12px; color:#61758b; border:1px solid transparent; border-radius:11px; }
.app-page .logout-link:hover { color:#b13e37; background:#fff5f4; border-color:#fde0dd; }
.app-page .page-content { max-width:1680px; padding:clamp(21px,3vw,40px); }
.app-page .page-heading { align-items:center; margin-bottom:24px; }
.app-page .page-heading .eyebrow { color:#4d7fb7; font-size:10px; line-height:1.4; }
.app-page .page-heading h1 { color:#173b62; font-size:clamp(25px,3vw,34px); }
.app-page .date-chip { flex:0 0 auto; padding:9px 12px; color:#4d6f92; background:#fff; border-color:#dbe7f4; border-radius:10px; box-shadow:0 4px 12px rgb(24 76 134 / 4%); }
.app-page .dashboard-welcome { display:flex; min-height:174px; align-items:center; justify-content:space-between; gap:28px; overflow:hidden; margin-bottom:19px; padding:clamp(23px,3.5vw,37px); color:#fff; background:radial-gradient(circle at 88% 15%,rgb(122 204 255 / 50%),transparent 27%),radial-gradient(circle at 15% 110%,rgb(2 191 255 / 32%),transparent 35%),linear-gradient(125deg,#0a489e,#0b6bcf 57%,#087abf); border:1px solid rgb(255 255 255 / 25%); border-radius:20px; box-shadow:0 16px 30px rgb(17 86 175 / 14%); }
.app-page .dashboard-welcome-copy { min-width:0; }
.app-page .dashboard-welcome .eyebrow { color:#bde6ff; font-size:10px; }
.app-page .dashboard-welcome h2 { margin:7px 0 9px; color:#fff; font-size:clamp(22px,2.7vw,31px); letter-spacing:-.035em; }
.app-page .dashboard-welcome p:not(.eyebrow) { max-width:650px; margin:0; color:rgb(255 255 255 / 87%); font-size:13px; line-height:1.8; }
.app-page .dashboard-welcome-brand { display:grid; width:112px; height:112px; flex:0 0 112px; place-items:center; padding:10px; background:rgb(255 255 255 / 15%); border:1px solid rgb(255 255 255 / 27%); border-radius:28px; box-shadow:inset 0 1px 0 rgb(255 255 255 / 26%); transform:rotate(4deg); }
.app-page .dashboard-welcome-brand img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 8px 10px rgb(0 39 101 / 16%)); }
.app-page .metric-grid { gap:15px; }
.app-page .metric-card { position:relative; min-height:168px; padding:18px; background:#fff; border-color:#deebf6; border-radius:16px; box-shadow:0 9px 20px rgb(26 69 120 / 5%); }
.app-page .metric-card::after { position:absolute; inset-inline:18px; bottom:0; height:3px; content:""; background:linear-gradient(90deg,#39a6f2,var(--dashboard-blue)); border-radius:3px 3px 0 0; opacity:.8; }
.app-page .metric-icon { width:40px; height:40px; color:var(--dashboard-blue); background:#eaf4ff; border:1px solid #d5e8fb; border-radius:12px; }
.app-page .metric-card p { margin-top:15px; color:#738aa3; }
.app-page .metric-card strong { color:#173b62; }
.app-page .metric-card small { color:#8aa0b7; }
.app-page .dashboard-workspace { margin-top:19px; padding:clamp(20px,2.5vw,28px); background:#fff; border:1px solid #deebf6; border-radius:18px; box-shadow:0 9px 20px rgb(26 69 120 / 4%); }
.app-page .dashboard-section-heading h2 { margin:5px 0 7px; color:#1b3d62; font-size:18px; }
.app-page .dashboard-section-heading p:not(.eyebrow) { max-width:620px; margin:0; color:#73879e; font-size:12px; line-height:1.75; }
.app-page .dashboard-section-heading .eyebrow { color:#4d7fb7; font-size:10px; }
.app-page .workspace-link-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; margin-top:20px; }
.app-page .workspace-link { display:flex; min-width:0; min-height:58px; align-items:center; gap:10px; padding:10px 12px; color:#355875; background:#fbfdff; border:1px solid #e0ebf6; border-radius:13px; font-size:12px; font-weight:720; text-decoration:none; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease; }
.app-page .workspace-link:hover,.app-page .workspace-link:focus-visible { color:#0b56ae; background:#f2f8ff; border-color:#c7ddf4; box-shadow:0 8px 17px rgb(30 102 184 / 9%); outline:none; transform:translateY(-1px); }
.app-page .workspace-link-icon { display:inline-grid; width:29px; height:29px; flex:0 0 29px; place-items:center; color:#1268c8; background:#e7f3ff; border-radius:9px; font-size:15px; }
.app-page .workspace-link > span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-page .workspace-link b { margin-inline-start:auto; color:#91a7bd; font-size:18px; font-weight:500; }
html[dir="rtl"] .app-page .workspace-link b { transform:scaleX(-1); }

@media (max-width:1100px) {
    .app-page .workspace-link-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:820px) {
    .app-page .app-shell { display:block; }
    .app-page .sidebar { position:fixed; z-index:30; top:0; bottom:0; left:0; width:min(82vw,300px); height:100dvh; transform:translateX(-105%); transition:transform .22s ease; box-shadow:12px 0 32px rgb(24 43 59 / 15%); }
    html[dir="rtl"] .app-page .sidebar { right:0; left:auto; transform:translateX(105%); box-shadow:-12px 0 32px rgb(24 43 59 / 15%); }
    .app-page .sidebar.is-open,html[dir="rtl"] .app-page .sidebar.is-open { transform:translateX(0); }
    .app-page .menu-toggle { display:inline-grid; flex:0 0 39px; place-items:center; }
    .app-page .workspace-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
    .app-page .topbar { min-height:64px; gap:8px; padding-inline:12px; }
    .app-page .topbar-company-logo { width:34px; height:34px; flex-basis:34px; }
    .app-page .topbar-title strong { max-width:34vw; font-size:12px; }
    .app-page .topbar-actions { gap:5px; }
    .app-page .topbar-user { display:none; }
    .app-page .topbar-actions .language-switch { min-height:36px; padding-inline:9px; font-size:11px; }
    .app-page .topbar-icon-link { width:36px; height:36px; flex-basis:36px; }
    .app-page .logout-link { min-height:36px; padding-inline:9px; font-size:11px; }
    .app-page .page-content { padding:19px 13px 28px; }
    .app-page .page-heading { align-items:flex-start; gap:12px; margin-bottom:18px; }
    .app-page .page-heading .eyebrow { display:none; }
    .app-page .page-heading h1 { font-size:25px; }
    .app-page .date-chip { padding:8px 9px; font-size:10px; }
    .app-page .dashboard-welcome { min-height:0; gap:14px; margin-bottom:13px; padding:21px; border-radius:17px; }
    .app-page .dashboard-welcome-brand { width:75px; height:75px; flex-basis:75px; padding:7px; border-radius:20px; }
    .app-page .dashboard-welcome h2 { font-size:22px; }
    .app-page .dashboard-welcome p:not(.eyebrow) { font-size:12px; }
    .app-page .metric-grid { gap:10px; }
    .app-page .metric-card { min-height:145px; padding:14px; border-radius:14px; }
    .app-page .metric-card::after { inset-inline:14px; }
    .app-page .metric-card p { margin-top:12px; }
    .app-page .dashboard-workspace { margin-top:13px; padding:18px 14px; border-radius:16px; }
    .app-page .workspace-link-grid { gap:9px; margin-top:15px; }
    .app-page .workspace-link { min-height:52px; gap:7px; padding:8px 9px; font-size:11px; }
    .app-page .workspace-link-icon { width:26px; height:26px; flex-basis:26px; font-size:13px; }
}
@media (max-width:390px) {
    .app-page .topbar-company-logo { display:none; }
    .app-page .topbar-title strong { max-width:29vw; }
    .app-page .dashboard-welcome-brand { display:none; }
}
.login-page .password-toggle { position: absolute; z-index: 2; inset-inline-end: 13px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; color: #496caa; background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: 19px; line-height: 1; }
.login-page .password-toggle:hover, .login-page .password-toggle:focus-visible { color: #0b5fc2; background: #edf6ff; outline: none; }
.login-page .login-submit { width: 100%; min-height: clamp(56px, 5vw, 69px); justify-content: center; gap: 20px; margin-top: 7px; padding: 0 20px; color: #fff; background: linear-gradient(100deg, #11b5f3, #096cdd 48%, #092f99); border-radius: 19px; box-shadow: 0 12px 23px rgb(15 90 204 / 23%); font-size: clamp(16px, 1.55vw, 21px); }
.login-page .login-submit:hover { background: linear-gradient(100deg, #0aa9ec, #075fcb 48%, #082982); }
.login-page .login-submit > span { direction: inherit; unicode-bidi: isolate; }
.login-page .login-submit b { font-size: 27px; font-weight: 400; line-height: 1; }
html[dir="rtl"] .login-page .login-submit > span { transform: none; }
.login-page .alert { margin-bottom: 20px; text-align: start; }
.login-page .login-footer { position: absolute; bottom: 24px; color: #8391ae; font-size: 12px; }
.login-page .login-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[dir="rtl"] .login-page .login-submit b { transform: scaleX(-1); }

@media (max-width: 980px) {
    .login-page { padding: 18px; }
    .login-page .login-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, .96fr); }
    .login-page .login-brand-panel { padding: 34px; }
    .login-page .login-business-illustration { max-height: 330px; }
    .login-page .login-form-panel { padding-inline: 40px; }
}
@media (max-width: 760px) {
    .login-page { padding: 0; background: #edf7ff; }
    .login-page .login-shell { grid-template-areas: "brand" "form"; grid-template-columns: minmax(0, 1fr); width: 100%; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
    .login-page .login-brand-panel { min-height: 340px; padding: 25px 24px 17px; }
    .login-page .login-brand-lockup { gap: 10px; }
    .login-page .login-brand-lockup img { width: 52px; height: 52px; }
    .login-page .login-brand-lockup strong { font-size: 29px; }
    .login-page .login-business-illustration { width: min(100%, 480px); max-height: 225px; margin-top: 4px; }
    .login-page .login-module-list { width: min(100%, 390px); gap: 8px; }
    .login-page .login-module-list li { gap: 5px; font-size: 10px; }
    .login-page .login-module-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 21px; }
    .login-page .login-form-panel { justify-content: flex-start; min-height: 0; padding: 74px 24px 58px; border-top-left-radius: 36px; border-bottom-left-radius: 0; }
    .login-page .language-row { top: 17px; inset-inline-end: 20px; }
    .login-page .login-language-switch { min-height: 37px; padding: 6px 11px; font-size: 12px; }
    .login-page .login-avatar { width: 70px; height: 70px; }
    .login-page .login-card h2 { font-size: 29px; }
    .login-page .form-hint { margin-bottom: 23px; font-size: 13px; }
    .login-page .login-footer { position: static; margin-top: 34px; }
}
@media (max-width: 400px) {
    .login-page .login-brand-panel { min-height: 315px; padding-inline: 18px; }
    .login-page .login-brand-lockup small { font-size: 10px; }
    .login-page .login-business-illustration { max-height: 198px; }
    .login-page .login-module-list { gap: 5px; }
    .login-page .login-module-list li { font-size: 9px; }
    .login-page .login-form-panel { padding-inline: 17px; }
}

/* Company pricing settings: reusable, tenant-scoped configuration controls. */
.currency-pricing-panel { display:grid; gap:18px; }
.currency-pricing-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.currency-pricing-grid .unit-catalog-create { align-items:end; }
.pricing-currency-field { justify-content:center; min-height:72px; padding:12px 14px; background:#f8fbff; border:1px solid #d9e7f7; border-radius:12px; }
.pricing-currency-field strong { color:#0b5fc2; font-size:16px; }
.pricing-currency-field small { color:#70869e; font-size:11px; line-height:1.5; }
.legacy-pricing-panel { display:grid; gap:12px; padding:16px; background:#fffaf0; border:1px solid #f4dfaf; border-radius:13px; }
.legacy-pricing-panel h3 { margin:0; color:#74531c; font-size:15px; }
.legacy-pricing-panel .unit-help { margin:0; }
.legacy-pricing-form { display:grid; grid-template-columns:minmax(95px,auto) minmax(160px,1fr) minmax(230px,1.6fr) auto; align-items:center; gap:10px; padding:11px; background:#fff; border:1px solid #f5e5bd; border-radius:10px; }
.legacy-pricing-form > span { color:#725622; font-weight:750; white-space:nowrap; }
.legacy-pricing-form label { display:flex; align-items:flex-start; gap:7px; color:#6d6250; font-size:12px; line-height:1.45; }
.invoice-rate-refresh { display:flex; align-items:flex-start; gap:7px; margin:2px 0 13px; color:#63788e; font-size:12px; line-height:1.5; }
.invoice-rate-refresh input { margin-top:3px; }
.invoice-header .form-field small[id$="exchange-rate"] { display:block; margin-top:5px; color:#54718e; font-size:11px; font-weight:650; }
.pricing-pending-label { display:block; max-width:280px; margin-top:4px; color:#9a6511; font-size:10px; line-height:1.45; }

@media (max-width:820px) {
    .currency-pricing-grid { grid-template-columns:1fr; }
    .legacy-pricing-form { grid-template-columns:1fr; }
}

/* Company settings: grouped controls that remain usable in narrow WebViews. */
.company-settings-workspace { display:grid; gap:16px; }
.settings-tabs { display:flex; gap:9px; overflow-x:auto; padding:3px; scrollbar-width:thin; }
.settings-tab { display:grid; min-width:max-content; gap:2px; padding:11px 15px; color:#61778f; background:#fff; border:1px solid #dce8f5; border-radius:12px; font-size:13px; font-weight:750; line-height:1.25; text-decoration:none; transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease; }
.settings-tab:hover,.settings-tab:focus-visible { color:#0b5fc2; background:#f4f9ff; border-color:#bddaf7; outline:none; }
.settings-tab.is-active { color:#0a4d9d; background:#eaf4ff; border-color:#bcdaf8; box-shadow:inset 0 -2px 0 #1270d5; }
.settings-tab small { color:#8396aa; font-size:10px; font-weight:650; }
.settings-panel { display:grid; gap:18px; padding:clamp(18px,2.4vw,26px); }
.settings-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.settings-panel-heading h2,.settings-subheading h3 { margin:4px 0 7px; color:#1b3d62; font-size:18px; }
.settings-panel-heading p:not(.eyebrow),.settings-subheading p { max-width:790px; margin:0; color:#71869e; font-size:12px; line-height:1.7; }
.settings-panel-heading .eyebrow { margin:0; color:#4d7fb7; font-size:10px; }
.settings-inline-form,.settings-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:14px; }
.settings-inline-form { grid-template-columns:minmax(190px,360px) auto; justify-content:start; }
.settings-inline-form .primary-button,.settings-form-actions .primary-button { min-height:42px; }
.settings-form-actions { display:flex; grid-column:1 / -1; justify-content:flex-end; padding-top:2px; }
.settings-readonly-row { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:16px; background:#fffaf0; border:1px solid #f0dcae; border-radius:13px; }
.settings-readonly-row > div { display:grid; gap:3px; }
.settings-readonly-row span { color:#8b6b2b; font-size:11px; font-weight:750; }
.settings-readonly-row strong { color:#684a13; font-size:22px; }
.settings-readonly-row p { flex:1 1 260px; margin:0; color:#795c28; font-size:12px; line-height:1.65; }
.settings-permission-note { max-width:260px; padding:8px 10px; color:#7a6331; background:#fff8e9; border:1px solid #f2dfb5; border-radius:9px; font-size:11px; line-height:1.5; }
.currency-settings-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.settings-rate-preview { display:grid; align-content:center; gap:4px; min-height:74px; padding:12px 14px; background:#f7fbff; border:1px solid #d9e8f7; border-radius:12px; }
.settings-rate-preview span { color:#7990a7; font-size:11px; font-weight:700; }
.settings-rate-preview strong { color:#0b5fc2; font-size:14px; }
.settings-rate-preview small { color:#6f849b; font-size:10px; }
.settings-rate-history { display:grid; gap:12px; padding-top:4px; border-top:1px solid #e5eef7; }
.settings-subheading { padding-top:14px; }
.settings-deferred-panel { display:flex; min-height:180px; align-items:center; justify-content:center; gap:17px; padding:30px; text-align:start; }
.settings-deferred-panel > span { display:grid; width:54px; height:54px; flex:0 0 54px; place-items:center; color:#2974bf; background:#eaf4ff; border:1px solid #cfe4f8; border-radius:17px; font-size:25px; }
.settings-deferred-panel h2 { margin:0 0 6px; color:#1b3d62; font-size:18px; }
.settings-deferred-panel p { max-width:470px; margin:0; color:#70869e; font-size:13px; line-height:1.7; }

@media (max-width:700px) {
    .settings-tabs { margin-inline:-3px; }
    .settings-tab { padding:10px 12px; font-size:12px; }
    .settings-panel { gap:15px; padding:17px 14px; }
    .settings-panel-heading { display:grid; gap:11px; }
    .settings-inline-form,.settings-form-grid,.currency-settings-form { grid-template-columns:1fr; }
    .settings-inline-form .primary-button,.settings-form-actions { width:100%; }
    .settings-form-actions .primary-button { width:100%; justify-content:center; }
    .settings-readonly-row { align-items:stretch; }
    .settings-readonly-row form .secondary-button { width:100%; justify-content:center; }
    .settings-permission-note { max-width:none; }
    .settings-deferred-panel { min-height:150px; align-items:flex-start; justify-content:flex-start; padding:22px 17px; }
}

.mobile-list-filters,
.mobile-list-filter-panel,
.mobile-list-filter-inner {
    display: contents;
}

.mobile-list-filter-toggle {
    display: none;
}

@media screen and (max-width: 820px), screen and (max-height: 500px) and (pointer: coarse) and (orientation: landscape) {
    .mobile-list-filters.is-ready {
        display: block;
        min-width: 0;
    }

    .mobile-list-filters.is-ready .mobile-list-filter-toggle {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        min-height: 44px;
        width: 100%;
        text-align: start;
    }

    .mobile-list-filter-toggle svg {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
    }

    .mobile-list-filter-chevron {
        width: 8px;
        height: 8px;
        margin-inline-start: auto;
        border: solid currentColor;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        transition: transform 220ms ease;
    }

    .mobile-list-filter-active {
        padding: 2px 6px;
        border-radius: 12px;
        background: var(--surface-alt);
        font-size: 11px;
    }

    .mobile-list-filter-toggle[aria-expanded="true"] .mobile-list-filter-chevron {
        transform: rotate(225deg);
    }

    .mobile-list-filters.is-ready .mobile-list-filter-panel {
        display: grid;
        grid-template-rows: 0fr;
        visibility: hidden;
        transition: grid-template-rows 220ms ease, visibility 220ms;
    }

    .mobile-list-filters.is-ready .mobile-list-filter-toggle[aria-expanded="true"] + .mobile-list-filter-panel {
        grid-template-rows: 1fr;
        visibility: visible;
    }

    .mobile-list-filters.is-ready .mobile-list-filter-inner {
        display: block;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }

    .mobile-list-filter-inner > .data-panel {
        margin-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-list-filters.is-ready .mobile-list-filter-panel,
    .mobile-list-filter-chevron {
        transition: none;
    }
}

/* Shared invoice controls and purchase rows reuse the sales layout. */
.invoice-barcode-entry{display:flex;gap:8px;min-width:0}.invoice-barcode-entry input{min-width:0;flex:1}.invoice-barcode-entry button{flex-shrink:0}
.purchase-unified-lines td:first-child{min-width:0}.purchase-unified-lines td:nth-child(3){min-width:145px}.purchase-unified-lines .purchase-expenses{display:block;width:92px;min-width:78px}
.purchase-product-picker{inset:0;margin:auto;max-height:calc(100dvh - 32px);overflow:auto}.purchase-product-picker [data-picker-preview]{grid-column:1/-1}.purchase-product-picker::backdrop{background:rgb(19 35 45 / 48%)}
html.invoice-picker-open{overflow:hidden}.purchase-unified-lines tr{scroll-margin-block:100px}


.registration-service { display: flex; flex-wrap: wrap; gap: .5rem 1rem; border: 0; padding: 0; margin: 0; }
.registration-service label { display: flex; align-items: center; gap: .45rem; }
.registration-service input[type="radio"] { width: auto; }
