:root {
    color-scheme: light;
    --bg: #eef2f5;
    --ink: #172026;
    --muted: #5d6872;
    --line: #d8e0e6;
    --brand: #0b6f6a;
    --brand-dark: #084d4a;
    --factusol: #cf0a3d;
    --blue: #1261a6;
    --amber: #c57a00;
    --warn: #b45f06;
    --bad: #b42318;
    --ok: #117a42;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.login-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 22px;
}

.login-box {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(23, 32, 38, 0.16);
    margin: 0 auto;
    max-width: 420px;
    padding: 24px;
    width: 100%;
}

.login-box h1 {
    font-size: 34px;
    margin: 4px 0 22px;
}

.login-box label {
    color: var(--muted);
    display: grid;
    font-size: 15px;
    font-weight: 800;
    gap: 7px;
    margin-bottom: 14px;
}

.login-box input {
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 20px;
    min-height: 48px;
    padding: 10px 12px;
}

.login-error {
    background: #fff0ec;
    border: 1px solid #f3b29f;
    border-radius: 7px;
    color: var(--bad);
    font-weight: 800;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.login-help,
.login-version {
    color: var(--muted);
    font-size: 13px;
    margin: 14px 0 0;
}

.user-pill {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin: 4px 0 0;
}

.observations-box {
    border: 1px solid var(--line);
    border-radius: 7px;
    font: inherit;
    min-height: 76px;
    padding: 10px 12px;
    resize: vertical;
    width: 100%;
}

.topbar {
    align-items: center;
    background: linear-gradient(90deg, var(--factusol), #a30735);
    border-bottom: 4px solid #f3c24f;
    display: flex;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #ffffff;
    border-radius: 6px;
    color: var(--factusol);
    display: inline-flex;
    font-size: 18px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.topnav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.topnav a {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    color: #ffffff;
    font-weight: 800;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 18px;
}

.toolbar,
.order-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
}

h1,
h2,
p {
    margin: 0;
}

.muted {
    color: var(--muted);
    margin-top: 6px;
}

h1 {
    font-size: 30px;
}

.button {
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 17px;
    font-weight: 700;
    min-height: 46px;
    padding: 12px 18px;
    text-decoration: none;
}

.button.primary-action {
    background: var(--factusol);
}

.button.secondary {
    background: #61707b;
}

.button.receive-action {
    background: var(--blue);
}

.button.receive-warehouse-button {
    min-height: 52px;
    padding-inline: 22px;
}

.button.send-store-action {
    background: var(--ok);
}

.button.send-action {
    background: var(--factusol);
}

.button.send-warehouse-action {
    background: var(--factusol);
    color: #ffffff;
}

.document-list,
.lines {
    display: grid;
    gap: 10px;
}

.document-row {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 12px;
    grid-template-columns: 110px 110px 130px minmax(220px, 1fr) 140px;
    min-height: 62px;
    padding: 10px 14px;
    text-decoration: none;
}

.doc-type,
.status {
    font-weight: 800;
}

.status.done {
    color: var(--ok);
}

.status.pending {
    color: var(--bad);
}

.client {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.back {
    color: var(--brand-dark);
    display: inline-block;
    font-weight: 700;
    margin-bottom: 8px;
    text-decoration: none;
}

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

.scan-panel {
    background: #ffffff;
    border: 2px solid var(--brand);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 14px;
}

.scan-panel label {
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

#scanInput {
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 24px;
    min-height: 58px;
    padding: 8px 12px;
    width: 100%;
}

.message {
    font-size: 18px;
    font-weight: 700;
    min-height: 24px;
    padding-top: 8px;
}

.message.ok {
    color: var(--ok);
}

.message.warn {
    color: var(--warn);
}

.message.error {
    color: var(--bad);
}

.line-card {
    background: #ffffff;
    border: 2px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1fr) 160px;
    padding: 14px;
}

.order-form {
    display: grid;
    gap: 14px;
}

.line-editor {
    display: grid;
    gap: 10px;
}

.line-inputs {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 160px 180px;
    padding: 10px;
}

.line-inputs input {
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 18px;
    min-height: 46px;
    padding: 8px 10px;
}

.line-card.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 111, 106, 0.15);
}

.line-main h2 {
    font-size: 22px;
    margin: 4px 0;
}

.pos {
    color: var(--muted);
    font-weight: 800;
}

.amounts {
    align-content: center;
    display: grid;
    gap: 4px;
    justify-items: end;
}

.amounts span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.amounts strong {
    font-size: 23px;
}

details,
.scans {
    grid-column: 1 / -1;
}

summary {
    color: var(--brand-dark);
    font-weight: 800;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chips span,
.scan-item {
    background: #eef4f4;
    border-radius: 6px;
    padding: 8px 10px;
}

.scan-item {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 8px;
}

.scan-item.warn {
    background: #fff4e5;
    color: var(--warn);
}

.scan-item em {
    font-style: normal;
    font-weight: 700;
}

.empty {
    color: var(--muted);
    font-size: 18px;
}

.upload-panel,
.search-panel {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
}

.upload-panel label {
    font-size: 18px;
    font-weight: 800;
}

.upload-panel input,
.search-panel input {
    border: 1px solid var(--line);
    border-radius: 6px;
    flex: 1;
    font-size: 18px;
    min-height: 46px;
    padding: 8px 10px;
}

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

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.summary-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 8px;
    padding: 14px;
    text-decoration: none;
}

.summary-card strong {
    color: var(--brand-dark);
    font-size: 22px;
}

.summary-card span {
    font-size: 18px;
    font-weight: 800;
}

.summary-card small {
    color: var(--muted);
}

.home-hero {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin: -18px -18px 18px;
    min-height: 132px;
    padding: 22px 28px;
}

.iges-home-head {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: 50px 1fr 50px;
    margin: -18px -18px 0;
    min-height: 118px;
    padding: 22px 28px;
}

.iges-home-head h1 {
    color: #000000;
    font-size: 42px;
    font-weight: 900;
}

.icon-menu,
.save-icon {
    background: transparent;
    border: 0;
    color: #2177d4;
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.save-icon {
    border: 1px solid #2177d4;
    border-radius: 6px;
    min-height: 34px;
    padding: 4px 8px;
}

.iges-menu {
    background: rgba(255, 255, 255, 0.76);
    margin: 0 -18px 18px;
    position: relative;
}

.iges-menu::after {
    bottom: 18px;
    color: rgba(207, 10, 61, 0.13);
    content: "iGes";
    font-size: 220px;
    font-weight: 900;
    left: 64px;
    line-height: 1;
    position: absolute;
    z-index: 0;
}

.iges-menu-row {
    align-items: center;
    border-bottom: 1px solid #d7d7d7;
    color: #111111;
    display: grid;
    gap: 18px;
    grid-template-columns: 70px 1fr;
    min-height: 92px;
    padding: 10px 24px;
    position: relative;
    text-decoration: none;
    z-index: 1;
}

.iges-menu-row strong {
    display: block;
    font-size: 28px;
    font-weight: 900;
}

.iges-menu-row small {
    color: #5f5f5f;
    display: block;
    font-size: 18px;
    margin-top: 6px;
}

.menu-icon {
    align-items: center;
    border: 3px solid #606060;
    border-radius: 4px;
    color: #606060;
    display: inline-flex;
    font-size: 36px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.document-red {
    color: #c64040;
}

.sync-blue {
    color: #227fc6;
}

.sync-red {
    color: #c64040;
}

.gift {
    color: #3d6f43;
}

.sale-icon {
    color: #22a447;
}

.truck-icon {
    color: #b24d4d;
}

.eyebrow {
    color: var(--factusol);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.module-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.iges-sale {
    background: #ffffff;
    margin: -18px -18px 0;
    min-height: calc(100vh - 70px);
    padding-bottom: 92px;
    position: relative;
}

.iges-sale-head {
    background: #ffffff;
    border-bottom: 1px solid #bdbdbd;
    padding: 8px 12px 10px;
    position: sticky;
    top: 70px;
    z-index: 20;
}

.iges-sale-head .back {
    color: #2177d4;
    font-size: 19px;
    font-weight: 500;
}

.iges-sale-head h1 {
    color: #000000;
    font-size: 24px;
    font-weight: 900;
    margin: 4px 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sale-icons {
    display: flex;
    gap: 8px;
    position: absolute;
    right: 14px;
    top: 14px;
}

.iges-search {
    background: #dedee0;
    border: 0;
    border-radius: 10px;
    font-size: 18px;
    min-height: 40px;
    padding: 6px 12px;
    width: 100%;
}

.consumed-list {
    display: grid;
}

.consumed-row {
    border-bottom: 1px solid #cfcfcf;
    padding: 4px 0 5px;
    position: relative;
}

.consumed-row.has-qty {
    background: #e8f6ed;
    border-left: 6px solid #22a447;
}

.product-title {
    padding: 0 38px 0 8px;
}

.product-title strong {
    color: #000000;
    display: block;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
}

.product-title span {
    color: #4f4f4f;
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.product-info-button {
    background: #eef4f4;
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: var(--brand-dark);
    float: right;
    font-size: 12px;
    font-weight: 900;
    min-height: 30px;
    min-width: 48px;
}

.product-browser-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.product-browser-row {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand);
    border-radius: 7px;
    color: var(--ink);
    display: grid;
    gap: 5px;
    min-height: 58px;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.product-browser-row strong {
    font-size: 16px;
}

.product-browser-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.product-list-caption {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    margin: 6px 0 0;
    text-align: center;
}

.row-menu {
    background: transparent;
    border: 0;
    color: #666666;
    font-size: 20px;
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 20px;
}

.sale-fields {
    align-items: end;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr 1fr 1fr 1.25fr;
    padding: 3px 4px 0;
}

.sale-fields label,
.line-total {
    display: grid;
    gap: 4px;
}

.sale-fields span,
.line-total span {
    color: #555555;
    font-size: 13px;
    text-align: center;
}

.sale-fields input {
    background: #dedede;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    min-height: 32px;
    padding: 3px 6px;
    text-align: center;
    text-decoration: underline;
    width: 100%;
}

.sale-fields input.qty-touch,
.extra-line input.qty-touch {
    background: #dceeff;
    border: 2px solid #8fc3f0;
    cursor: pointer;
    font-weight: 800;
}

.line-total strong {
    color: #000000;
    font-size: 17px;
    min-height: 32px;
    padding-top: 6px;
    text-align: center;
}

.tariff {
    color: #555555;
    font-size: 13px;
    font-weight: 900;
    margin: 3px 0 0 8px;
}

.floating-add {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    bottom: 66px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
    color: #42b63d;
    cursor: pointer;
    display: flex;
    font-size: 58px;
    font-weight: 700;
    height: 74px;
    justify-content: center;
    line-height: 1;
    position: fixed;
    right: 20px;
    width: 74px;
    z-index: 25;
}

.floating-save {
    background: var(--factusol);
    border: 0;
    border-radius: 24px;
    bottom: 72px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    min-height: 52px;
    padding: 12px 18px;
    position: fixed;
    right: 102px;
    z-index: 25;
}

.sale-footer {
    align-items: center;
    background: rgba(248, 248, 250, 0.98);
    border-top: 1px solid #d0d0d0;
    bottom: 0;
    color: #2177d4;
    display: grid;
    gap: 6px;
    grid-template-columns: 42px 86px 1fr;
    min-height: 58px;
    padding: 6px 10px;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 22;
}

.cart-icon {
    color: #4d4d4d;
    font-size: 28px;
}

.sale-footer span {
    color: #555555;
    font-size: 15px;
    text-align: center;
}

.sale-footer strong {
    color: #2177d4;
    font-size: 18px;
    text-decoration: underline;
}

.extra-products {
    background: #f7f7f7;
    border-top: 4px solid #42b63d;
    display: none;
    padding: 12px;
}

.extra-line.added-line {
    background: #fff5d9;
    border-left: 6px solid #c57a00;
}

.qty-modal {
    align-items: end;
    background: rgba(0, 0, 0, 0.42);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 12px;
    position: fixed;
    z-index: 1000;
}

.qty-modal.open {
    display: flex;
}

.qty-dialog {
    background: #19293b;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    max-width: 460px;
    overflow: hidden;
    width: 100%;
}

.qty-head {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 10px;
}

.qty-head button {
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    padding: 8px;
    text-decoration: underline;
}

.qty-head button:last-child {
    justify-self: end;
}

.qty-head strong {
    color: #ffffff;
    font-size: 22px;
}

.qty-product {
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    padding: 10px 12px 4px;
    text-transform: uppercase;
}

.qty-iges-display {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    padding: 10px 12px;
}

.qty-display-box {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 6px;
    color: #ffffff;
    display: grid;
    gap: 4px;
    font-weight: 900;
    min-height: 86px;
    padding: 8px;
    text-align: right;
}

.qty-display-box.active {
    background: #f39a28;
    border-color: #ffc16a;
}

.qty-display-box span {
    font-size: 16px;
}

.qty-display-box strong {
    font-size: 36px;
    line-height: 1;
}

.qty-display {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 110px 1fr;
    padding: 12px;
}

.qty-display span {
    color: #555555;
    font-size: 18px;
    font-weight: 800;
}

.qty-display strong {
    background: #f4f4f4;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #000000;
    font-size: 42px;
    min-height: 62px;
    overflow: hidden;
    padding: 6px 12px;
    text-align: right;
}

.qty-box-hint {
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    padding: 9px 12px;
    text-align: center;
}

.qty-pad {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 12px 14px;
}

.qty-pad button {
    background: #1294ea;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    min-height: 72px;
    text-decoration: underline;
}

.qty-pad button[data-action],
.qty-pad button[data-boxes] {
    background: #626262;
    font-size: 24px;
}

.extra-products.open {
    display: grid;
    gap: 10px;
}

.extra-products h2 {
    font-size: 24px;
}

.empty-start {
    padding: 22px;
}

.padded {
    padding: 18px;
}

.module-tile {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 7px solid var(--brand);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 7px;
    min-height: 136px;
    padding: 16px;
    text-decoration: none;
}

.module-tile span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.module-tile strong {
    color: var(--brand-dark);
    font-size: 25px;
}

.module-tile small {
    color: var(--muted);
}

.module-tile.sales {
    border-left-color: var(--factusol);
}

.module-tile.clients {
    border-left-color: var(--blue);
}

.module-tile.stock {
    border-left-color: var(--amber);
}

.module-tile.lots {
    border-left-color: var(--ok);
}

.module-tile.warehouse {
    border-left-color: var(--factusol);
}

.module-tile.history {
    border-left-color: #7b3fb4;
}

.module-tile.sync {
    border-left-color: #5c6570;
}

.work-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.iphone-app {
    background: #ffffff;
    margin: -18px -18px 0;
    min-height: 100vh;
    padding: 12px 12px 96px;
}

.iphone-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.iphone-head-actions {
    display: grid;
    gap: 8px;
}

.iphone-head-actions .button {
    font-size: 15px;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
}

.iphone-head h1 {
    color: #000000;
    font-size: 34px;
    font-weight: 900;
}

.offline-strip {
    align-items: center;
    background: #eef4f4;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 9px 10px;
}

.offline-strip strong,
.offline-strip span {
    color: var(--brand-dark);
    font-size: 15px;
    font-weight: 900;
}

.save-notice {
    background: #eef4f4;
    border: 1px solid var(--line);
    border-left: 6px solid var(--brand);
    border-radius: 8px;
    color: var(--brand-dark);
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 10px;
    padding: 9px 10px;
}

.save-notice.warn {
    background: #fff7e6;
    border-left-color: var(--amber);
    color: var(--warn);
}

.save-notice.error {
    background: #fff0f0;
    border-left-color: var(--bad);
    color: var(--bad);
}

.iphone-home {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.home-tile {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 7px solid var(--factusol);
    border-radius: 8px;
    color: #111111;
    cursor: pointer;
    display: grid;
    gap: 5px;
    min-height: 86px;
    padding: 12px 14px;
    text-align: left;
    width: 100%;
}

.home-tile:nth-child(2) {
    border-left-color: var(--brand);
}

.home-tile:nth-child(3) {
    border-left-color: var(--blue);
}

.home-tile:nth-child(4) {
    border-left-color: var(--amber);
}

.home-tile.sync-tile.sales-sync {
    border-left-color: var(--ok);
    background: #f1fbf5;
}

.home-tile.sync-tile.warehouse-sync {
    border-left-color: var(--factusol);
    background: #fff5f7;
}

.home-tile.sync-tile.all-sync {
    border-left-color: var(--bad);
    background: #fff7f5;
}

.home-tile strong {
    font-size: 25px;
    font-weight: 900;
}

.home-tile span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
}

.home-tile em {
    color: var(--brand-dark);
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
}

.doc-type.active {
    background: var(--factusol);
}

.app-mode.active {
    background: var(--brand);
}

.current-doc-pill {
    align-items: center;
    background: #eef4f4;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand-dark);
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    min-height: 46px;
    padding: 10px 14px;
}

.hidden {
    display: none !important;
}

.field-label {
    color: var(--muted);
    display: block;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 6px;
}

.iphone-add-panel {
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    bottom: 58px;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.18);
    left: 0;
    max-height: 55vh;
    overflow: auto;
    position: fixed;
    right: 0;
    z-index: 40;
}

.iphone-add-panel:not(.open) {
    display: none;
}

.iphone-add-panel.open {
    display: grid;
    gap: 10px;
}

.iphone-app .floating-add {
    bottom: 68px;
    right: 14px;
}

.iphone-app .floating-save {
    bottom: 74px;
    right: 98px;
}

.panel-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.document-list.compact .document-row {
    border-radius: 6px;
    min-height: 54px;
}

.warehouse-offline {
    display: grid;
    gap: 12px;
}

.warehouse-offline.warehouse-detail-open > .panel-head,
.warehouse-offline.warehouse-detail-open > .offline-strip {
    display: none;
}

.warehouse-doc {
    border: 1px solid var(--line);
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.pending-doc {
    text-align: left;
    width: 100%;
}

.pending-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.warehouse-offline-detail {
    display: grid;
    gap: 12px;
}

.warehouse-offline.warehouse-detail-open .warehouse-offline-detail {
    min-height: calc(100vh - 120px);
}

.offline-order-head {
    margin: 0;
}

.offline-order-head h1 {
    font-size: 22px;
}

.offline-warehouse-lines {
    gap: 10px;
}

.warehouse-add-product {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 6px solid var(--ok);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.compact-head {
    margin: 0;
}

.draft-panel,
.pending-panel {
    margin-top: 12px;
}

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

.draft-row {
    align-items: center;
    background: #e8f6ed;
    border: 1px solid #b9dfc5;
    border-left: 6px solid #22a447;
    border-radius: 7px;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 72px 78px 92px 86px 78px;
    min-height: 54px;
    padding: 8px 10px;
}

.draft-row strong {
    color: #000000;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draft-row span,
.draft-row em {
    color: #555555;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.draft-row b {
    color: #000000;
    font-size: 14px;
    text-align: right;
}

.mini-action {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    min-height: 34px;
}

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

.sale-shell {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 16px;
}

.sale-status {
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-width: 170px;
    padding: 12px;
}

.sale-status span {
    color: var(--muted);
    font-weight: 800;
}

.sale-status strong {
    color: var(--factusol);
    font-size: 22px;
}

.sale-form {
    display: grid;
    gap: 14px;
}

.customer-strip {
    align-items: end;
    background: #ffffff;
    border: 2px solid var(--factusol);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1fr) auto;
    padding: 14px;
}

.customer-strip label {
    display: grid;
    gap: 7px;
}

.search-strip {
    align-items: start;
}

.customer-strip span,
.line-header {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.customer-strip input,
.sale-line input {
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 19px;
    min-height: 52px;
    padding: 10px 12px;
}

.search-box {
    display: grid;
    gap: 7px;
    position: relative;
}

.search-box label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.selected-pill {
    background: #eef4f4;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 800;
    min-height: 32px;
    padding: 7px 9px;
}

.search-results {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(23, 32, 38, 0.18);
    display: none;
    left: 0;
    max-height: 330px;
    overflow: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
}

.search-results.open {
    display: grid;
}

.result-row {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: 4px;
    min-height: 58px;
    padding: 10px 12px;
    text-align: left;
}

.result-row:hover,
.result-row:focus {
    background: #f0f6f8;
}

.result-row strong {
    color: var(--brand-dark);
    font-size: 16px;
}

.result-row span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.iges-lines {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    gap: 0;
    overflow: hidden;
}

.line-header {
    background: #e7edf2;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(260px, 1fr) 160px minmax(190px, 0.7fr);
    padding: 10px;
}

.sale-line {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    grid-template-columns: minmax(260px, 1fr) 160px minmax(190px, 0.7fr);
}

.sale-line:last-child {
    border-bottom: 0;
}

.warehouse-form {
    display: grid;
    gap: 14px;
}

.warehouse-line {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 7px solid var(--factusol);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 1fr) 190px;
    padding: 14px;
}

.warehouse-line.selected {
    border-color: var(--factusol);
    box-shadow: 0 0 0 3px rgba(207, 10, 61, 0.14);
}

.warehouse-line.prepared-line {
    background: #eef8f0;
    border-color: #64a976;
    border-left-color: var(--ok);
}

.line-ready-button {
    background: #61707b;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    justify-self: start;
    min-height: 36px;
    padding: 7px 11px;
}

.line-ready-button.is-ready {
    background: var(--ok);
}

.warehouse-scan {
    border-color: var(--factusol);
}

.warehouse-main h2 {
    font-size: 22px;
    margin: 4px 0;
}

.scan-hint {
    color: var(--factusol);
    font-size: 13px;
    font-weight: 900;
    margin: 6px 0 0;
}

.warehouse-line label {
    display: grid;
    gap: 7px;
}

.warehouse-line label span,
.lot-head span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.warehouse-line input {
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 18px;
    min-height: 48px;
    padding: 9px 10px;
}

.lot-editor {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
    padding-top: 12px;
}

.current-lot-box {
    align-items: center;
    background: #e8f6ed;
    border: 1px solid #b9dfc5;
    border-left: 7px solid var(--ok);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    grid-template-columns: 120px minmax(0, 1fr) 120px;
    padding: 10px 12px;
}

.current-lot-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.current-lot-box strong {
    color: #000000;
    font-size: 22px;
}

.current-lot-box em {
    color: var(--ok);
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.lot-change-grid {
    display: grid;
    gap: 10px;
}

.lot-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.available-lots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lot-chip {
    background: #eef4f4;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--brand-dark);
    cursor: pointer;
    display: grid;
    gap: 3px;
    min-height: 56px;
    min-width: 145px;
    padding: 8px 10px;
    text-align: left;
}

.lot-chip:first-child {
    border-color: var(--ok);
    box-shadow: 0 0 0 2px rgba(17, 122, 66, 0.12);
}

.lot-chip strong {
    font-size: 16px;
}

.lot-chip span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.lot-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) 150px 90px;
}

.lot-row.hidden-lot-fields {
    display: none;
}

.manual-lot-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.lot-select-wrap {
    display: grid;
    gap: 7px;
}

.lot-select-wrap span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.lot-select {
    background: #ffffff;
    border: 2px solid var(--brand);
    border-radius: 6px;
    color: var(--brand-dark);
    font-size: 18px;
    font-weight: 900;
    min-height: 50px;
    padding: 8px 10px;
    width: 100%;
}

.warehouse-observations {
    background: #fff4e5;
    border: 1px solid #e1a943;
    border-left: 6px solid var(--amber);
    border-radius: 7px;
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
}

.warehouse-observations strong {
    color: var(--warn);
    font-size: 13px;
}

.warehouse-observations span {
    color: #000000;
    font-size: 18px;
    font-weight: 900;
}

.info-modal {
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 80;
}

.info-modal.open {
    display: flex;
}

.info-dialog {
    background: #ffffff;
    border-radius: 8px;
    max-height: 88vh;
    max-width: 620px;
    overflow: auto;
    padding: 16px;
    width: 100%;
}

.sent-order-body {
    display: grid;
    gap: 14px;
}

.sent-observations {
    background: #fff5d8;
    border-left: 4px solid #e4a321;
    margin: 0;
    padding: 10px;
}

.sent-observations strong {
    display: block;
    margin-bottom: 5px;
}

.sent-lines {
    display: grid;
    gap: 8px;
}

.sent-lines article {
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.sent-lines span {
    color: var(--muted);
    font-size: 14px;
}

.user-form {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 9px;
    padding-top: 14px;
}

.user-form input,
.user-form select {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    min-height: 42px;
    padding: 8px 10px;
}

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

@media (max-width: 560px) {
    .user-form-grid { grid-template-columns: 1fr; }
}

.info-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.info-head strong {
    font-size: 20px;
}

.info-head button {
    background: var(--factusol);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 900;
    min-height: 38px;
    padding: 8px 12px;
}

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

.info-grid > div,
.info-grid section {
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 12px;
}

.info-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.info-grid strong {
    display: block;
    font-size: 20px;
    margin-top: 4px;
}

.info-grid section h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.info-grid section p {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 8px 0;
}

.file-list {
    margin-top: 20px;
}

.file-list h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.file-list span {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 6px 8px;
}

.data-table-wrap {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: auto;
}

.data-table {
    border-collapse: collapse;
    font-size: 14px;
    min-width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    white-space: nowrap;
}

.data-table th {
    background: #eef4f4;
    color: var(--brand-dark);
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

@media (max-width: 760px) {
    .page {
        padding: 10px;
    }

    .toolbar,
    .order-head,
    .home-hero,
    .sale-shell,
    .state-actions,
    .upload-panel,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .document-row {
        grid-template-columns: 1fr 1fr;
    }

    .client,
    .status {
        grid-column: 1 / -1;
    }

    .pending-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .pending-actions .mini-action {
        flex: 1;
    }

    .line-card {
        grid-template-columns: 1fr;
    }

    .line-inputs {
        grid-template-columns: 1fr;
    }

    .customer-strip,
    .line-header,
    .warehouse-line,
    .lot-row,
    .current-lot-box {
        grid-template-columns: 1fr;
    }

    .current-lot-box em {
        text-align: left;
    }

    .amounts {
        grid-template-columns: 1fr 1fr;
        justify-items: start;
    }

    .iges-home-head h1 {
        font-size: 34px;
    }

    .iges-sale-head h1 {
        font-size: 24px;
    }

    .iges-menu-row strong {
        font-size: 24px;
    }

    .product-title strong {
        font-size: 17px;
    }

    .sale-fields {
        grid-template-columns: 0.9fr 0.9fr 0.9fr 1.15fr;
    }

    .draft-row {
        grid-template-columns: 1fr 70px 70px;
    }

    .draft-row strong,
    .draft-row b {
        grid-column: 1 / -1;
        text-align: left;
    }

    .sale-footer {
        grid-template-columns: 36px 74px 1fr;
        padding: 6px 8px;
    }

    .sale-footer strong {
        font-size: 19px;
    }
}
