:root {
    --qs-primary: #7c68ad;
    --qs-primary-strong: #675493;
    --qs-primary-soft: #f0ecf8;
    --qs-bg: #f6f7f9;
    --qs-surface: #ffffff;
    --qs-text: #24252a;
    --qs-muted: #858895;
    --qs-border: #e9eaf0;
    --qs-danger: #d95d67;
    --qs-success: #4c9a73;
    --qs-shadow: 0 12px 36px rgba(31, 33, 40, 0.08);
    --qs-radius: 22px;
    --qs-header-height: 72px;
    --qs-nav-height: 76px;
}

html,
body.qs-mobile-body {
    min-height: 100%;
    background: var(--qs-bg);
}

body.qs-mobile-body {
    margin: 0;
    color: var(--qs-text);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body.qs-mobile-body * {
    -webkit-tap-highlight-color: transparent;
}

.qs-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: calc(var(--qs-header-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--qs-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.qs-app-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.qs-app-brand img {
    display: block;
    width: 154px;
    max-width: 46vw;
    height: auto;
}

.qs-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qs-icon-button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--qs-border);
    color: var(--qs-text);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 5px 16px rgba(31, 33, 40, 0.04);
    cursor: pointer;
}

.qs-icon-button i {
    font-size: 21px;
    line-height: 1;
}

.qs-icon-button:active {
    transform: scale(.97);
}

.qs-mobile-main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--qs-header-height) + env(safe-area-inset-top) + 26px) 18px calc(var(--qs-nav-height) + env(safe-area-inset-bottom) + 30px);
}

.qs-mobile-main.qs-budget-main {
    padding-bottom: calc(var(--qs-nav-height) + env(safe-area-inset-bottom) + 122px);
}

.qs-page-head {
    margin-bottom: 22px;
}

.qs-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 29px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--qs-primary-strong);
    background: var(--qs-primary-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.qs-page-head h1,
.qs-welcome h1 {
    margin: 10px 0 7px;
    color: var(--qs-text);
    font-size: clamp(27px, 7vw, 38px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.qs-page-head p,
.qs-welcome p {
    margin: 0;
    color: var(--qs-muted);
    font-size: 14px;
    line-height: 1.65;
}

.qs-welcome {
    position: relative;
    overflow: hidden;
    background: var(--qs-surface);
    border: 1px solid var(--qs-border);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: var(--qs-shadow);
}

.qs-welcome::after {
    content: '';
    position: absolute;
    right: -58px;
    bottom: -82px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--qs-primary-soft);
    opacity: .85;
}

.qs-welcome > * {
    position: relative;
    z-index: 1;
}

.qs-welcome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.qs-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 12px;
    background: #f7f7fa;
    color: #666a76;
    font-size: 11px;
    font-weight: 600;
}

.qs-section {
    margin-top: 26px;
}

.qs-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.qs-section-title h2 {
    margin: 0;
    color: var(--qs-text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.qs-section-title span {
    color: var(--qs-muted);
    font-size: 11px;
}

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

.qs-action-card {
    position: relative;
    min-height: 142px;
    padding: 18px;
    border: 1px solid var(--qs-border);
    border-radius: 22px;
    background: #fff;
    color: var(--qs-text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(31, 33, 40, 0.045);
}

.qs-action-card:active:not(.is-disabled) {
    transform: scale(.985);
}

.qs-action-card.is-wide {
    grid-column: 1 / -1;
    min-height: 118px;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.qs-action-card.is-disabled {
    color: #9ca0aa;
    background: #f1f2f5;
    box-shadow: none;
    cursor: default;
}

.qs-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    flex: 0 0 auto;
}

.qs-action-card.is-disabled .qs-action-icon {
    background: #e4e5e9;
    color: #9296a0;
}

.qs-action-icon i {
    font-size: 24px;
}

.qs-action-card strong {
    display: block;
    margin-top: 18px;
    color: inherit;
    font-size: 15px;
    font-weight: 700;
}

.qs-action-card small {
    display: block;
    margin-top: 3px;
    color: var(--qs-muted);
    font-size: 11px;
    line-height: 1.45;
}

.qs-action-card.is-disabled small {
    color: #a1a4ac;
}

.qs-action-arrow {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #f6f6f9;
    color: #6d707b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.qs-action-card.is-disabled .qs-action-arrow {
    background: #e4e5e9;
}

.qs-inline-note {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--qs-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .7);
    display: flex;
    gap: 11px;
    align-items: flex-start;
    color: var(--qs-muted);
    font-size: 12px;
    line-height: 1.55;
}

.qs-inline-note i {
    color: var(--qs-primary-strong);
    font-size: 20px;
    flex: 0 0 auto;
}

.qs-panel {
    background: #fff;
    border: 1px solid var(--qs-border);
    border-radius: var(--qs-radius);
    box-shadow: 0 8px 28px rgba(31, 33, 40, .05);
    overflow: hidden;
}

.qs-panel-head {
    padding: 18px 18px 0;
}

.qs-panel-head h2,
.qs-panel-head h3 {
    margin: 0;
    color: var(--qs-text);
    font-size: 16px;
    font-weight: 700;
}

.qs-panel-head p {
    margin: 5px 0 0;
    color: var(--qs-muted);
    font-size: 11px;
}

.qs-panel-body {
    padding: 18px;
}

.qs-search-trigger {
    width: 100%;
    min-height: 58px;
    padding: 0 15px;
    border: 1px solid var(--qs-border);
    border-radius: 17px;
    background: #fff;
    color: #767a86;
    display: flex;
    align-items: center;
    gap: 11px;
    font: inherit;
    font-size: 13px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(31, 33, 40, .04);
}

.qs-search-trigger i {
    color: var(--qs-primary-strong);
    font-size: 22px;
}

.qs-search-trigger span {
    flex: 1;
}

.qs-search-trigger .mdi-chevron-right {
    color: #b4b6bd;
    font-size: 20px;
}

.qs-camera-action {
    margin-top: 10px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qs-camera-action i {
    font-size: 20px;
}

.qs-result-area {
    margin-top: 16px;
}

#scansection {
    width: 100%;
    padding: 0;
}

#video {
    width: 100% !important;
    max-height: 54vh;
    margin: 0 0 14px !important;
    border-radius: 20px !important;
    background: #111;
    object-fit: cover;
}

.red-line {
    z-index: 5;
}

.qs-empty-state,
#scanProd,
#errorProd {
    padding: 34px 18px !important;
    margin: 0 !important;
    border: 1px dashed #dfe1e6;
    border-radius: 20px;
    background: #fff !important;
    text-align: center;
}

.qs-empty-state i,
#scanProd > i,
#errorProd > i {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    font-size: 31px !important;
}

#scanProd h2,
#errorProd h2 {
    max-width: 420px;
    margin: 15px auto 0;
    color: var(--qs-text);
    font-size: 15px !important;
    line-height: 1.55;
    font-weight: 600;
}

#errorProd > i {
    background: #faeeee;
    color: var(--qs-danger);
}

#proddata {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

#proddata > [class*="col-"] {
    margin: 0 !important;
    padding: 0 !important;
}

#proddata .divprod {
    width: 100% !important;
    display: block !important;
    padding: 16px !important;
    border: 1px solid var(--qs-border);
    border-radius: 22px !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: 0 8px 28px rgba(31, 33, 40, .05);
}

#proddata .divprod > div:first-child {
    border-radius: 17px !important;
}

#proddata .divprod p {
    margin: 7px 0;
    color: #656975;
    font-size: 12px !important;
    line-height: 1.45;
}

#proddata .divprod p b {
    color: var(--qs-text);
}

#proddata .btnmobile,
#proddata label.btnmobile {
    width: 100%;
    margin: 8px 0 0 !important;
    padding: 11px 13px !important;
    border: 0;
    border-radius: 13px;
    text-align: center;
    font-size: 11px !important;
    font-weight: 700;
}

#proddata input.form-control,
#proddata select.form-control {
    min-height: 44px;
}

.qs-search-overlay,
.contenedor-inp {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1065 !important;
    width: 100% !important;
    height: 100% !important;
    padding: calc(20px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)) !important;
    display: flex;
    align-items: flex-end !important;
    justify-content: center !important;
    background: rgba(19, 20, 24, .52) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.qs-search-sheet,
.contenido-inp {
    width: min(100%, 680px) !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 20px 70px rgba(14, 15, 18, .24);
    color: var(--qs-text);
}

.qs-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

.qs-sheet-head h2 {
    margin: 0;
    color: var(--qs-text);
    font-size: 18px;
    font-weight: 700;
}

.qs-sheet-head p {
    margin: 4px 0 0;
    color: var(--qs-muted);
    font-size: 11px;
}

.qs-sheet-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #f3f3f6;
    color: #646874;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qs-sheet-close i {
    font-size: 20px;
}

.qs-input-row {
    position: relative;
    display: flex;
    gap: 9px;
    align-items: stretch;
}

.qs-input-row .form-control,
.qs-input-row input.form-control,
.qs-input-row #codbarra {
    min-width: 0;
    min-height: 52px;
    padding: 0 14px !important;
    border: 1px solid #dfe1e6 !important;
    border-radius: 15px !important;
    background: #fff !important;
    color: var(--qs-text) !important;
    font-family: inherit;
    font-size: 14px !important;
    outline: none;
    box-shadow: none !important;
}

.qs-input-row input::placeholder {
    color: #aaadb5 !important;
}

.qs-input-submit {
    min-width: 52px;
    min-height: 52px;
    border: 0 !important;
    border-radius: 15px !important;
    background: var(--qs-primary) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qs-input-submit i {
    font-size: 22px;
}

.qs-sheet-secondary {
    width: 100%;
    margin-top: 10px;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contenedor-logo {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1100 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff !important;
}

.contenido-logo {
    padding: 22px !important;
    border-radius: 24px !important;
    background: #fff !important;
}

#cerrarcamara {
    width: 100%;
    margin: 0 0 14px !important;
    padding: 11px 14px !important;
    border-radius: 14px !important;
    background: #fff !important;
    border: 1px solid var(--qs-border);
    color: #626671;
    font-size: 12px;
    font-weight: 600;
}

.qs-products-panel {
    margin-top: 14px;
}

#scrollable-table {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

#tablaProd {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}

#prods {
    padding: 12px;
}

#prods > div {
    margin: 0 0 10px !important;
    padding: 12px !important;
    border: 1px solid var(--qs-border) !important;
    border-radius: 17px !important;
    background: #fff !important;
}

#prods > label {
    display: block;
    margin: 0 !important;
    padding: 26px 14px !important;
    color: var(--qs-muted) !important;
    font-size: 12px !important;
    text-align: center;
}

#prods input.form-control,
#prods select.form-control {
    min-height: 38px;
    border-radius: 11px;
    font-size: 12px;
}

.qs-budget-summary {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--qs-nav-height) + env(safe-area-inset-bottom) + 10px);
    z-index: 1034;
    max-width: 736px;
    margin: 0 auto;
    padding: 11px 12px 11px 16px;
    border: 1px solid rgba(229, 230, 236, .95);
    border-radius: 20px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 14px 45px rgba(24, 25, 30, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qs-budget-total small {
    display: block;
    margin-bottom: 1px;
    color: var(--qs-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.qs-budget-total strong,
#totalfact {
    color: var(--qs-text) !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    letter-spacing: -.025em;
}

.qs-primary-button {
    min-height: 48px;
    padding: 0 17px;
    border: 0;
    border-radius: 15px;
    background: var(--qs-primary);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
}

.qs-primary-button i {
    font-size: 19px;
}

.qs-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    height: calc(var(--qs-nav-height) + env(safe-area-inset-bottom));
    padding: 8px 10px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--qs-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.qs-bottom-nav-inner {
    width: 100%;
    max-width: 760px;
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
}

.qs-nav-item {
    position: relative;
    min-width: 0;
    border-radius: 16px;
    color: #92959f;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 600;
}

.qs-nav-item i {
    font-size: 22px;
    line-height: 1;
}

.qs-nav-item.is-active {
    color: var(--qs-primary-strong);
    background: var(--qs-primary-soft);
}

.qs-nav-item.is-disabled {
    color: #b7b9c0;
    cursor: default;
}

.qs-nav-lock {
    position: absolute;
    top: 3px;
    right: calc(50% - 23px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #eceef1;
    color: #8f939d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qs-nav-lock i {
    font-size: 9px;
}

.qs-data-carrier {
    display: none !important;
}

/* Bootstrap/modal cleanup for mobile */
.qs-mobile-body .modal {
    padding: 12px !important;
}

.qs-mobile-body .modal-dialog {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.qs-mobile-body .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(20, 21, 25, .22);
}

.qs-mobile-body .modal-header,
.qs-mobile-body .mhqube_primary {
    min-height: 58px;
    padding: 17px 18px !important;
    border: 0;
    border-bottom: 1px solid var(--qs-border);
    background: #fff !important;
    color: var(--qs-text) !important;
    font-size: 15px !important;
    font-weight: 700;
}

.qs-mobile-body .modal-body {
    padding: 18px !important;
    background: #fff;
    color: var(--qs-text);
}

.qs-mobile-body .modal-body .row {
    margin-left: -5px;
    margin-right: -5px;
}

.qs-mobile-body .modal-body [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 10px;
}

.qs-mobile-body .form-control,
.qs-mobile-body select.form-control,
.qs-mobile-body textarea.form-control {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #dfe1e6;
    border-radius: 13px;
    background: #fff;
    color: var(--qs-text);
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
}

.qs-mobile-body textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.qs-mobile-body .form-control:focus {
    border-color: #b7aad4;
    box-shadow: 0 0 0 3px rgba(124, 104, 173, .11);
}

.qs-mobile-body .modal-body label {
    color: #707480;
    font-size: 11px;
    font-weight: 600;
}

.qs-mobile-body .qube_btn,
.qs-mobile-body .aceptar_btn,
.qs-mobile-body .buscar_btn {
    display: inline-flex;
    min-height: 46px;
    padding: 0 15px !important;
    border: 0 !important;
    border-radius: 14px !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--qs-primary) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700;
    text-decoration: none;
}

/* Login */
.qs-login-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #f4f5f7;
    color: var(--qs-text);
}

.qs-login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qs-login-card {
    width: 100%;
    max-width: 430px;
    padding: 28px 22px 22px;
    border: 1px solid var(--qs-border);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(28, 29, 34, .09);
}

.qs-login-logo {
    width: 190px;
    max-width: 64vw;
    height: auto;
    display: block;
}

.qs-login-tag {
    display: inline-flex;
    margin-top: 20px;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
}

.qs-login-card h1 {
    margin: 12px 0 6px;
    color: var(--qs-text);
    font-size: 27px;
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -.035em;
}

.qs-login-card > p {
    margin: 0 0 24px;
    color: var(--qs-muted);
    font-size: 12px;
    line-height: 1.6;
}

.qs-login-field {
    margin-bottom: 14px;
}

.qs-login-field label {
    display: block;
    margin: 0 0 7px;
    color: #666a75;
    font-size: 11px;
    font-weight: 600;
}

.qs-login-input-wrap {
    position: relative;
}

.qs-login-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a3a6af;
    font-size: 19px;
    pointer-events: none;
}

.qs-login-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 14px 0 44px;
    border: 1px solid #dfe1e6;
    border-radius: 15px;
    background: #fff;
    color: var(--qs-text);
    font-family: inherit;
    font-size: 14px;
    outline: 0;
}

.qs-login-input-wrap input:focus {
    border-color: #b7aad4;
    box-shadow: 0 0 0 3px rgba(124, 104, 173, .11);
}

.qs-login-error {
    margin: 2px 0 15px;
    padding: 11px 12px;
    border-radius: 13px;
    background: #fff1f1;
    color: #b45159;
    font-size: 11px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.qs-login-error i {
    font-size: 17px;
}

.qs-login-submit,
.qs-login-secondary {
    width: 100%;
    min-height: 52px;
    border-radius: 15px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.qs-login-submit {
    border: 0;
    background: var(--qs-primary);
    color: #fff;
}

.qs-login-secondary {
    margin-top: 10px;
    border: 1px solid var(--qs-border);
    background: #fff;
    color: #656975;
}

.qs-login-foot {
    margin-top: 18px;
    color: #a1a4ac;
    font-size: 10px;
    text-align: center;
}

@media (min-width: 700px) {
    .qs-mobile-main {
        padding-left: 24px;
        padding-right: 24px;
    }

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

    .qs-action-card.is-wide {
        grid-column: auto;
        min-height: 142px;
        flex-direction: column;
        align-items: stretch;
    }

    .qs-login-card {
        padding: 34px 32px 28px;
    }
}

.qs-loader-mark {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: qsLoaderPulse 1.2s ease-in-out infinite;
}

.qs-loader-mark i {
    font-size: 34px;
}

@keyframes qsLoaderPulse {
    0%, 100% { transform: scale(1); opacity: .82; }
    50% { transform: scale(1.06); opacity: 1; }
}

.contenedor-inp.oculto {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.contenedor-inp.visible {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#modalFormaPago #selectVendedores {
    width: 100% !important;
    text-align: left !important;
}

#modalFormaPago .modal-body > label[onclick="saveData()"] {
    width: 100%;
    min-height: 48px;
    margin-top: 16px !important;
    padding: 0 16px !important;
    border-radius: 14px !important;
    background: var(--qs-primary) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    cursor: pointer;
}

#modalDatosFactDos .ms-md-auto {
    position: static !important;
    width: 100%;
    margin: 0 0 16px !important;
    padding: 0 !important;
}

#modalDatosFactDos .input-group {
    width: 100%;
    margin: 0 !important;
}

#modalDatosFact #clientes {
    max-height: 46vh;
    border-radius: 14px;
}

#modalSelProd #selProdsDiv > div,
#proddata .filaMultProds {
    margin-bottom: 7px !important;
    padding: 11px !important;
    border: 1px solid var(--qs-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: #60646f;
    font-size: 11px !important;
}

#modalAllGood .modal-body > i {
    color: var(--qs-success);
}

@media (max-width: 520px) {
    .qs-mobile-body .modal {
        padding: 8px !important;
    }

    .qs-mobile-body .modal-dialog-centered {
        min-height: calc(100% - 16px);
    }

    .qs-budget-summary {
        left: 8px;
        right: 8px;
    }

    .qs-primary-button {
        padding: 0 14px;
    }
}


/* Fix: results list in consulta de productos must stack vertically */
#proddata {
    display: block;
}

#proddata .filaMultProds {
    width: 100% !important;
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

#proddata .filaMultProds > [class*="col-"] {
    min-width: 0;
}

#proddata .filaMultProds > .col-2 {
    flex: 0 0 22%;
    max-width: 22%;
}

#proddata .filaMultProds > .col-7 {
    flex: 0 0 53%;
    max-width: 53%;
}

#proddata .filaMultProds > .col-3 {
    flex: 0 0 25%;
    max-width: 25%;
    text-align: right;
}


.qs-result-actions {
    margin-top: 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qs-inline-back {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--qs-border);
    border-radius: 15px;
    background: #fff;
    color: var(--qs-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(31, 33, 40, .05);
}

.qs-inline-back i {
    font-size: 18px;
    color: var(--qs-primary-strong);
}

#prods {
    padding: 10px;
}

.qs-budget-line {
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid var(--qs-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(31, 33, 40, .045);
}

.qs-budget-line-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.qs-budget-line-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.qs-budget-line-thumb {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    flex: 0 0 auto;
}

.qs-budget-line-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qs-budget-line-meta small {
    color: var(--qs-muted);
    font-size: 10px;
    font-weight: 600;
}

.qs-budget-line-meta strong {
    color: var(--qs-text);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    word-break: break-word;
}

.qs-budget-line-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.qs-budget-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--qs-border);
    border-radius: 12px;
    background: #fff;
    color: #6d727d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qs-budget-icon-btn.is-danger {
    color: var(--qs-danger);
}

.qs-budget-icon-btn i {
    font-size: 18px;
}

.qs-budget-line-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.qs-budget-field {
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: #f7f8fb;
}

.qs-budget-field > span,
.qs-budget-line-total > span {
    display: block;
    margin-bottom: 6px;
    color: var(--qs-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.qs-budget-input-wrap label {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--qs-text);
    font-size: 14px !important;
}

.qs-budget-input-wrap .qube_table_input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #dfe1e6;
    border-radius: 12px;
    background: #fff;
    color: var(--qs-text);
    font-size: 13px !important;
    font-weight: 600;
    box-shadow: none;
}

.qs-budget-line-total {
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 14px;
    background: var(--qs-primary-soft);
}

.qs-budget-line-total strong {
    display: block;
    color: var(--qs-text);
    font-size: 20px;
    line-height: 1.1;
}

.qs-budget-discount,
.qs-budget-line-total em {
    display: inline-block;
    margin-top: 4px;
    color: var(--qs-success);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

@media (min-width: 700px) {
    .qs-budget-line-body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }

    .qs-budget-line-total {
        grid-column: auto;
    }
}


/* Lector de códigos */
.qs-reader-main {
    position: fixed;
    top: calc(var(--qs-header-height) + env(safe-area-inset-top));
    right: 0;
    bottom: calc(var(--qs-nav-height) + env(safe-area-inset-bottom));
    left: 0;
    overflow: hidden;
    background: #111217;
}

.qs-reader-camera,
.qs-reader-result,
.qs-reader-message {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.qs-reader-camera {
    overflow: hidden;
    background: #111217;
}

#readerVideo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111217;
}

.qs-reader-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(12, 13, 17, .38) 0%,
        rgba(12, 13, 17, .10) 36%,
        rgba(12, 13, 17, .10) 64%,
        rgba(12, 13, 17, .46) 100%
    );
}

.qs-reader-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(82vw, 520px);
    height: min(34vw, 180px);
    min-height: 118px;
    transform: translate(-50%, -50%);
}

.qs-reader-corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: #fff;
    border-style: solid;
    opacity: .96;
}

.qs-reader-corner.is-tl {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
    border-radius: 12px 0 0 0;
}

.qs-reader-corner.is-tr {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
    border-radius: 0 12px 0 0;
}

.qs-reader-corner.is-bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
    border-radius: 0 0 0 12px;
}

.qs-reader-corner.is-br {
    right: 0;
    bottom: 0;
    border-width: 0 3px 3px 0;
    border-radius: 0 0 12px 0;
}

.qs-reader-scanline {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 0 14px rgba(255, 255, 255, .65);
    animation: qsReaderScan 1.9s ease-in-out infinite;
}

.qs-reader-copy {
    position: absolute;
    right: 20px;
    bottom: 24px;
    left: 20px;
    z-index: 2;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    background: rgba(17, 18, 23, .62);
    color: #fff;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.qs-reader-copy strong,
.qs-reader-copy span {
    display: block;
}

.qs-reader-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.qs-reader-copy span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
}

.qs-reader-result,
.qs-reader-message {
    z-index: 4;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
    background: #fff;
    text-align: center;
}

.qs-reader-result-content,
.qs-reader-message-content {
    width: 100%;
    max-width: 680px;
    margin: auto;
}

.qs-reader-result h1 {
    margin: 0 auto;
    max-width: 680px;
    color: var(--qs-text);
    font-size: clamp(30px, 8.5vw, 56px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.qs-reader-price {
    display: block;
    margin-top: 24px;
    color: var(--qs-primary-strong);
    font-size: clamp(48px, 15vw, 88px);
    line-height: .98;
    font-weight: 700;
    letter-spacing: -.055em;
}

.qs-reader-barcode {
    display: block;
    margin-top: 22px;
    color: var(--qs-muted);
    font-size: clamp(12px, 3.4vw, 16px);
    font-weight: 500;
    letter-spacing: .08em;
}

.qs-reader-result-progress {
    position: absolute;
    right: 20px;
    bottom: 18px;
    left: 20px;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #ececf1;
}

.qs-reader-result-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--qs-primary);
    transform-origin: left center;
    animation: qsReaderResultTime 3s linear forwards;
}

.qs-reader-message-content > i {
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: var(--qs-primary-soft);
    color: var(--qs-primary-strong);
    font-size: 34px;
}

.qs-reader-message h2 {
    margin: 18px 0 5px;
    color: var(--qs-text);
    font-size: clamp(25px, 7vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.035em;
}

.qs-reader-message p {
    margin: 0;
    color: var(--qs-muted);
    font-size: 13px;
}

.qs-reader-retry {
    min-height: 48px;
    margin-top: 22px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    background: var(--qs-primary);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qs-reader-retry i {
    font-size: 19px;
}

@keyframes qsReaderScan {
    0%, 100% { transform: translateY(-42px); opacity: .65; }
    50% { transform: translateY(42px); opacity: 1; }
}

@keyframes qsReaderResultTime {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-height: 600px) {
    .qs-reader-copy {
        bottom: 12px;
        padding: 10px 12px;
    }

    .qs-reader-guide {
        min-height: 100px;
    }

    .qs-reader-result {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .qs-reader-price {
        margin-top: 16px;
    }

    .qs-reader-barcode {
        margin-top: 14px;
    }
}


/* v20260819.7 · cámara estable en Productos y Presupuestos */
#scansection #video {
    width: 100% !important;
    height: clamp(230px, 46vh, 420px) !important;
    max-height: 420px !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 20px !important;
    background: #111;
}
