﻿@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --app-primary: var(--color-primary, #0057c8);
    --app-primary-dark: #003f9e;
    --app-accent: #2f4fb3;
    --app-success: #168a55;
    --app-warning: #b7791f;
    --app-danger: #c2413a;
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-surface-2: #f8fafc;
    --app-border: #dbe3ec;
    --app-text: #172033;
    --app-muted: #64748b;
    --app-sidebar: #ffffff;
    --app-sidebar-text: #334155;
    --app-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --app-radius: 8px;
    --sidebar-open: 248px;
    --sidebar-closed: 76px;
    --navbar-height: 64px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Nunito Sans', Arial, sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
    font-size: 15px;
    letter-spacing: 0;
}

a {
    color: var(--app-primary);
}

a:hover {
    color: var(--app-primary-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
}

.btn {
    border-radius: 7px;
    font-weight: 700;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--app-primary-dark) !important;
    border-color: var(--app-primary-dark) !important;
}

.btn-success {
    background: var(--app-success) !important;
    border-color: var(--app-success) !important;
}

.btn-light {
    background: #eef4f8;
    border-color: #dbe3ec;
    color: var(--app-text);
}

.btn-outline-primary {
    border-color: rgba(0, 87, 200, 0.35);
    color: var(--app-primary);
}

.btn-outline-primary:hover {
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary-dark);
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: #475569;
}

.btn-outline-warning {
    border-color: rgba(183, 121, 31, 0.45);
    color: var(--app-warning);
}

.btn-outline-danger {
    border-color: rgba(194, 65, 58, 0.45);
    color: var(--app-danger);
}

.btn-outline-success {
    border-color: rgba(22, 138, 85, 0.45);
    color: var(--app-success);
}

.form-control,
.custom-file-label {
    border-radius: 7px;
    border-color: var(--app-border);
    min-height: 42px;
    color: var(--app-text);
}

.form-control:focus {
    border-color: rgba(0, 87, 200, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 87, 200, 0.12);
}

.card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    background: var(--app-surface);
}

.card-header {
    background: var(--app-surface-2);
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    font-weight: 800;
}

.bg-white {
    background: var(--app-surface) !important;
}

label {
    color: var(--app-text);
    font-weight: 700;
}

.menufixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 1020;
    background: var(--app-surface) !important;
    border-bottom: 1px solid var(--app-border);
}

.menufixed img {
    max-height: 52px;
}


.loginShell {
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    background: var(--app-bg);
}

.loginHero {
    position: relative;
    min-height: 100vh;
    padding: 44px clamp(28px, 6vw, 88px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(150deg, #052a54 0%, #064887 48%, #0a6cc8 100%);
}

.loginHero::before,
.loginHero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    pointer-events: none;
}

.loginHero::before {
    width: 520px;
    height: 520px;
    right: -170px;
    bottom: -150px;
    background: rgba(255, 255, 255, 0.04);
}

.loginHero::after {
    width: 330px;
    height: 330px;
    right: 70px;
    bottom: 110px;
}

.loginBrandMini {
    position: absolute;
    top: 96px;
    left: clamp(28px, 6vw, 88px);
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.86);
}

.loginBrandIcon,
.loginCardIcon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.loginBrandMini strong,
.loginBrandMini small,
.loginCardHead strong,
.loginCardHead small {
    display: block;
}

.loginBrandMini strong {
    font-size: 1rem;
    font-weight: 800;
}

.loginBrandMini small {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.loginHeroContent {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.loginPill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #eaf4ff;
    font-weight: 800;
}

.loginHero h1 {
    margin: 28px 0 18px;
    max-width: 720px;
    font-size: clamp(2.65rem, 5vw, 4.9rem);
    line-height: 1.02;
    font-weight: 900;
    color: #ffffff;
}

.loginHero h1::first-line {
    color: #ffffff;
}

.loginHero p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    line-height: 1.65;
}

.loginStats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 52px;
    margin-top: 58px;
}

.loginStats div {
    min-width: 120px;
}

.loginStats strong {
    display: block;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.1;
}

.loginStats span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    font-size: 0.86rem;
}

.loginPanel {
    min-height: 100vh;
    padding: 104px 28px 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-surface-2);
}

#login {
    width: min(430px, 100%);
}

.loginCard {
    width: 100%;
    padding: 34px 38px 32px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.loginCardHead {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.loginCardIcon {
    flex: 0 0 auto;
    background: var(--app-primary);
    box-shadow: 0 12px 22px rgba(0, 87, 200, 0.24);
}

.loginCardHead strong {
    color: var(--app-text);
    font-size: 1.6rem;
    line-height: 1.1;
    font-weight: 900;
}

.loginCardHead small {
    margin-top: 6px;
    color: var(--app-muted);
    font-weight: 700;
}

.loginField {
    margin-bottom: 18px;
}

.loginField label {
    margin-bottom: 8px;
    font-size: 0.93rem;
}

.loginInputWrap {
    position: relative;
}

.loginInputWrap > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-muted);
    z-index: 2;
}

.loginInputWrap .form-control {
    height: 48px;
    padding-left: 42px;
    border-radius: 8px;
    background: var(--app-surface);
}

.loginMeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 18px;
    color: var(--app-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.loginSubmit {
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
}

.loginHint {
    margin: 18px 0 0;
    color: var(--app-muted);
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
}

.footer {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 0;
    z-index: 1010;
    min-height: 48px;
    padding: 10px 0 14px;
    background: transparent;
    color: var(--app-muted);
    font-weight: 800;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.footer p {
    margin: 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--app-surface) 86%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-border) 78%, transparent);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.dashboard-layout {
    min-height: 0;
    height: 0;
}

.dashboard-layout .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-open);
    background: var(--app-sidebar);
    border-right: 1px solid var(--app-border);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.05);
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
}

.dashboard-layout .sidebar.collapsed {
    width: var(--sidebar-closed);
}

.sidebar-brand {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--app-border);
    overflow: visible;
}

.sidebar-brand span {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--app-text);
    white-space: nowrap;
}

.collapse-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.dashboard-layout .sidebar.collapsed .sidebar-nav {
    overflow: visible;
}

.sidebar-nav a,
.sidebar-actions a,
.sidebar-actions button {
    position: relative;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--app-sidebar-text);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav a i,
.sidebar-actions a i,
.sidebar-actions button i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
}

.sidebar-nav a:hover,
.sidebar-actions a:hover,
.sidebar-actions button:hover {
    background: rgba(0, 87, 200, 0.08);
    color: var(--app-primary);
}

.sidebar-nav a.active {
    background: var(--app-primary);
    color: #ffffff;
}

.dashboard-layout .sidebar.collapsed span {
    display: none;
}

.dashboard-layout .sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.dashboard-layout .sidebar.collapsed .sidebar-nav a,
.dashboard-layout .sidebar.collapsed .sidebar-actions a,
.dashboard-layout .sidebar.collapsed .sidebar-actions button {
    justify-content: center;
    padding-inline: 8px;
}

.dashboard-layout .sidebar.collapsed [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translate(-4px, -50%);
    z-index: 2000;
    min-width: max-content;
    max-width: 220px;
    padding: 7px 10px;
    border-radius: 7px;
    background: #172033;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.1;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-layout .sidebar.collapsed [data-tooltip]:hover::after,
.dashboard-layout .sidebar.collapsed [data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.collapse-btn[data-tooltip] {
    position: relative;
}

.dashboard-layout .sidebar:not(.collapsed) .collapse-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translate(-4px, -50%);
    z-index: 2000;
    min-width: max-content;
    padding: 7px 10px;
    border-radius: 7px;
    background: #172033;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.1;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-layout .sidebar:not(.collapsed) .collapse-btn[data-tooltip]:hover::after,
.dashboard-layout .sidebar:not(.collapsed) .collapse-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.sidebar-actions {
    padding: 10px;
    border-top: 1px solid var(--app-border);
}

.dashboard-layout .navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-open);
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--app-border);
    z-index: 1020;
    transition: left 0.2s ease;
}

.dashboard-layout .navbar.collapsed {
    left: var(--sidebar-closed);
}

.dashboard-layout .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--app-text);
    font-weight: 800;
}

.user-dropdown {
    display: flex;
    align-items: center;
}

.profile-button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--app-text);
    cursor: pointer;
}

.profile-button:hover,
.profile-button:focus {
    color: var(--app-primary);
    outline: none;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
    max-width: 220px;
    line-height: 1.15;
}

.profile-meta strong {
    max-width: 220px;
    color: var(--app-text);
    font-size: 0.88rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-meta small {
    max-width: 220px;
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 0.76rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-avatar-box {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 87, 200, 0.12);
    border-radius: 8px;
    background: rgba(0, 87, 200, 0.08);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.profile-avatar-box img,
.profile-avatar-box .perfil-avatar-iniciales {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.profile-avatar-box img {
    object-fit: cover;
}

.profile-avatar-box .perfil-avatar-iniciales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 87, 200, 0.09);
    color: var(--app-primary);
    font-size: 0.86rem;
    font-weight: 900;
}

.profile-chevron {
    color: var(--app-muted);
    font-size: 0.72rem;
    transition: transform 0.16s ease, color 0.16s ease;
}

.profile-button[aria-expanded="true"] .profile-chevron {
    transform: rotate(180deg);
    color: var(--app-primary);
}

.profile-button::after {
    display: none;
}

.content {
    margin-left: var(--sidebar-open);
    padding: 88px 24px 32px;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
}

.content.collapsed {
    margin-left: var(--sidebar-closed);
}

.module-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

.module-shell.is-module-loading > :not(.module-loader) {
    opacity: 0.18;
    pointer-events: none;
}

.module-loader {
    position: fixed;
    inset: 0;
    z-index: 1200;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 248, 253, 0.78);
    backdrop-filter: blur(2px);
}

.module-loader-card {
    min-width: min(320px, 86vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px;
    color: var(--app-text);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    box-shadow: var(--app-shadow);
    text-align: center;
}

.module-loader-card .spin {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(0, 87, 200, 0.18);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 18px;
    box-shadow: var(--app-shadow);
}

.module-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.module-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.module-title h1 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--app-text);
}

.module-title p {
    margin: 4px 0 0;
    color: var(--app-muted);
    line-height: 1.35;
}

.module-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.metric-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--app-surface-2);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.metric-card strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
}

.metric-card span {
    color: var(--app-muted);
}

.module-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    overflow: hidden;
}

.module-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: var(--app-surface-2);
    border-bottom: 1px solid var(--app-border);
}

.module-panel-body {
    padding: 18px;
}

.module-subpanel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.turno-access-card,
.ventas-shortcuts-card {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.turno-access-info,
.ventas-shortcuts-info {
    min-width: 220px;
}

.turno-access-card .module-section-title,
.ventas-shortcuts-card .module-section-title {
    margin-bottom: 8px;
}

.turno-access-card .module-help,
.ventas-shortcuts-card .module-help {
    margin: 0;
}

.turno-access-actions,
.ventas-shortcuts-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.turno-action-group,
.turno-export-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.turno-export-group {
    border-left: 1px solid var(--app-border);
    padding-left: 12px;
}

.module-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--app-text);
    font-weight: 800;
}

.period-controls,
.product-filter-grid {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.period-controls label,
.product-filter-grid label {
    margin: 0;
}

.period-controls label {
    min-width: 180px;
}

.stats-toolbar {
    justify-content: space-between;
}

.stats-filter-actions,
.stats-export-actions {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-export-actions {
    margin-left: auto;
}

.stats-modal-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.stats-action-card {
    appearance: none;
    cursor: pointer;
    grid-column: span 2;
    justify-content: flex-start;
    min-height: 84px;
    position: relative;
    text-align: left;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    width: 100%;
}

.stats-action-card::after {
    background: rgba(17, 110, 231, 0.12);
    border-radius: 999px;
    bottom: 10px;
    content: "Ver";
    color: var(--app-primary);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    position: absolute;
    right: 10px;
    text-transform: uppercase;
}

.stats-action-card > div {
    min-width: 0;
    padding-right: 84px;
}

.stats-action-card > div span {
    display: block;
    line-height: 1.25;
}

.stats-action-card:hover {
    border-color: var(--app-primary);
    box-shadow: 0 12px 28px rgba(15, 32, 55, 0.12);
    transform: translateY(-1px);
}

.stats-action-card .metric-icon {
    background: rgba(17, 110, 231, 0.1);
    color: var(--app-primary);
}

.stats-action-cue {
    align-items: center;
    color: var(--app-primary);
    display: inline-flex;
    font-size: 0.9rem;
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 720px) {
    .stats-action-card {
        grid-column: span 1;
    }
}

.stats-result-shell {
    position: relative;
}

.stats-table-shell {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
}

.stats-inner-overlay {
    align-items: center;
    background: rgba(12, 20, 33, 0.32);
    border-radius: 8px;
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    min-height: 220px;
    padding: 12px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.stats-inner-window {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 32, 55, 0.18);
    display: flex;
    flex-direction: column;
    max-height: min(78vh, calc(100% - 24px));
    max-width: 920px;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: min(100%, 920px);
}

.stats-inner-overlay > .stats-inner-window:not(.modal-message-window) {
    max-width: none;
    min-height: min(340px, calc(100% - 24px));
    width: 100%;
}

.modal-message-window {
    max-width: 520px;
}

.modal-message-body {
    display: grid;
    gap: 10px;
    padding: 18px;
    text-align: center;
}

.modal-message-body p {
    color: var(--app-muted);
    margin: 0;
}

.modal-message-body strong {
    color: var(--app-text);
    overflow-wrap: anywhere;
}

.modal-message-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 0 18px 18px;
}

.modal-inline-status {
    color: var(--app-muted);
    font-size: 0.9rem;
    min-height: 20px;
}

.modal-inline-status.is-error {
    color: #dc2626;
    font-weight: 700;
}

.modal-inline-status.is-loading {
    color: var(--app-primary);
    font-weight: 700;
}

.stats-inner-header {
    align-items: center;
    background: var(--app-soft);
    border-bottom: 1px solid var(--app-border);
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
    padding: 10px 12px;
}

.stats-inner-header strong {
    color: var(--app-text);
    flex: 1 1 auto;
    font-size: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.stats-inner-body {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.stats-inner-body .table-responsive {
    max-width: 100%;
    overflow: auto;
}
.product-toolbar {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(150px, 180px) 1fr auto;
    gap: 12px;
    justify-content: stretch;
}

.product-toolbar .product-filter-grid {
    display: contents;
}

.product-toolbar .product-filter-grid label:first-child {
    min-width: 0;
}

.product-toolbar .product-filter-grid label:last-child {
    min-width: 0;
}

.product-toolbar #limpiarProductos {
    grid-column: 4;
    justify-self: end;
}

.product-toolbar .search-control {
    max-width: none;
    min-width: 0;
    width: 100%;
}

.inventory-tools-controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.inventory-tools-filters,
.inventory-tools-actions {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.inventory-tools-actions {
    margin-left: auto;
}

.inventory-tools-controls label {
    margin: 0;
    min-width: 180px;
}
@media (max-width: 768px) {
    .product-toolbar,
    .inventory-tools-controls,
    .inventory-tools-filters,
    .inventory-tools-actions {
        align-items: stretch;
        width: 100%;
    }

    .product-toolbar {
        grid-template-columns: 1fr;
    }

    .product-toolbar #limpiarProductos {
        grid-column: auto;
    }

    .product-toolbar .product-filter-grid,
    .product-toolbar .product-filter-grid label,
    .inventory-tools-controls label,
    .inventory-tools-controls .btn,
    .product-toolbar #limpiarProductos {
        flex: 1 1 100%;
        width: 100%;
    }

    .inventory-tools-actions,
    .product-toolbar #limpiarProductos {
        margin-left: 0;
    }
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.module-tile {
    min-height: 150px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.module-tile:hover,
.module-tile:focus {
    border-color: rgba(0, 87, 200, 0.35);
    box-shadow: 0 12px 26px rgba(0, 87, 200, 0.1);
    outline: none;
}

.module-tile i {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.module-tile strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.module-tile span {
    color: var(--app-muted);
}

.module-tile.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    color: var(--app-muted);
}

.inline-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--app-primary);
}

.cobro-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 12px;
    text-align: left;
}

.cobro-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.35fr);
    gap: 14px;
    text-align: left;
}

.cobro-card {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-card);
    padding: 12px;
}

.cobro-pago-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    padding: 9px 12px;
}

.cobro-pago-card > strong {
    flex: 0 0 auto;
    margin: 0;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.cobro-pago-card .cobro-payment-grid {
    flex: 0 1 420px;
    grid-template-columns: minmax(220px, 420px);
}

.cobro-pago-card .cobro-payment-grid label {
    gap: 3px;
}

.cobro-pago-card .form-control {
    min-height: 38px;
}

.cobro-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.cobro-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cobro-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cobro-client-summary {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 8px;
}

.cobro-chip {
    min-height: 38px;
    border-radius: 8px;
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-text);
    padding: 8px 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
}

.cobro-payment-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 10px;
}

.cobro-payment-grid label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--app-text);
    font-weight: 800;
}

.cobro-discount-field {
    grid-column: 1 / -1;
}

.cobro-lista-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cobro-lista-grid > div {
    display: grid;
    gap: 6px;
}

.cobro-lista-grid strong {
    color: var(--app-text);
    font-size: 0.95rem;
}

.cobro-products {
    max-height: 260px;
    overflow: auto;
    margin-top: 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.swal-search-control {
    max-width: none;
}

.swal2-title {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    padding: 1.2rem 2.5rem 0 !important;
}

.swal2-popup:not(.swal2-toast) {
    min-height: min(420px, calc(100dvh - 32px));
}

.swal2-popup:not(.swal2-toast):has(.stats-modal-shell) {
    display: flex !important;
    flex-direction: column;
}

.swal2-popup:not(.swal2-toast):has(.stats-modal-shell) .swal2-html-container {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .swal2-popup:not(.swal2-toast) {
        min-height: min(360px, calc(100dvh - 24px));
    }

    .stats-inner-overlay > .stats-inner-window:not(.modal-message-window) {
        min-height: min(300px, calc(100% - 20px));
    }
}

@media (max-width: 480px) {
    .swal2-popup:not(.swal2-toast) {
        min-height: min(300px, calc(100dvh - 16px));
    }

    .stats-inner-overlay > .stats-inner-window:not(.modal-message-window) {
        min-height: min(260px, calc(100% - 16px));
    }
}

.swal2-html-container {
    margin-top: 0.65rem !important;
}

.swal2-close {
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid var(--app-border) !important;
    border-radius: 8px !important;
    color: var(--app-muted) !important;
    display: inline-flex !important;
    font-size: 1.8rem !important;
    height: 42px !important;
    justify-content: center !important;
    left: auto !important;
    line-height: 1 !important;
    position: absolute !important;
    right: 14px !important;
    top: 14px !important;
    width: 42px !important;
}

.swal2-close:hover,
.swal2-close:focus {
    background: var(--app-soft) !important;
    border-color: rgba(0, 87, 200, 0.28) !important;
    color: var(--app-primary) !important;
}

.modal-close-btn {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-muted);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0;
    width: 34px;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    background: var(--app-soft);
    border-color: rgba(0, 87, 200, 0.28);
    color: var(--app-primary);
}

.cobro-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
    gap: 10px;
    justify-content: center;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    text-align: center;
}

.cobro-resumen span {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--app-muted);
}

.cobro-resumen strong {
    display: block;
    color: var(--app-text);
    font-size: 1.1rem;
}

.cobro-resumen small {
    display: block;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 2px;
}

.cobro-close-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.25fr);
    gap: 18px;
    align-items: stretch;
    max-width: 760px;
    margin: 8px auto 0;
    text-align: left;
}

.cobro-close-summary,
.cobro-close-payment {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-card);
    padding: 14px;
}

.cobro-close-summary {
    display: grid;
    gap: 10px;
}

.cobro-close-total,
.cobro-close-change {
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.cobro-close-total {
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
    font-weight: 900;
}

.cobro-close-change {
    background: var(--app-soft);
    color: var(--app-muted);
}

.cobro-close-total span,
.cobro-close-change span {
    display: block;
    font-weight: 800;
}

.cobro-close-total strong,
.cobro-close-change strong {
    display: block;
    color: var(--app-text);
    font-size: 1.25rem;
}

.cobro-close-total strong {
    color: var(--app-primary);
    font-size: 1.45rem;
}

.cobro-close-payment {
    display: grid;
    gap: 12px;
}

.cobro-close-payment label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--app-text);
    font-weight: 800;
}

.cobro-close-footer {
    max-width: 760px;
    margin: 12px auto 0;
}

.cobro-resumen .cobro-total-box {
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
    font-weight: 900;
}

.cobro-resumen .cobro-total-box strong {
    color: var(--app-primary);
    font-size: 1.35rem;
}

@media (max-width: 900px) {
    .cobro-layout,
    .cobro-payment-grid,
    .cobro-client-summary,
    .cobro-resumen {
        grid-template-columns: 1fr;
    }

    .cobro-pago-card {
        align-items: stretch;
        flex-direction: column;
    }

    .cobro-close-grid {
        grid-template-columns: 1fr;
    }

    .cobro-lista-grid {
        grid-template-columns: 1fr;
    }
}

.search-control {
    flex: 1;
    max-width: 420px;
    min-width: 220px;
    position: relative;
}

.search-control i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--app-muted);
}

.search-control input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 0 12px 0 40px;
    color: var(--app-text);
}

.module-table {
    margin: 0;
    color: var(--app-text);
}

.module-table thead th {
    background: var(--app-surface);
    border-top: 0;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 800;
}

.module-table td,
.module-table th {
    padding: 13px 16px;
    vertical-align: middle;
    border-color: var(--app-border);
}

.module-table .text-end {
    text-align: right;
}

.module-table .no-wrap {
    white-space: nowrap;
}

.module-table tfoot th {
    background: var(--app-soft);
    border-top: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 14px;
}

.module-table tbody tr[data-id] {
    cursor: pointer;
}

.module-table tbody tr.is-selected td {
    background: rgba(0, 87, 200, 0.08);
}

.module-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-weight: 700;
}

.swal-pager {
    margin-top: 10px;
    padding-left: 0;
    padding-right: 0;
}

.empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--app-muted);
    text-align: center;
}

.empty-state i {
    font-size: 2rem;
    color: var(--app-primary);
}

.empty-state strong {
    color: var(--app-text);
    font-size: 1.05rem;
}

.pos-workspace {
    display: grid;
    grid-template-columns: minmax(520px, 1.25fr) minmax(360px, 0.75fr);
    gap: 16px;
    align-items: start;
}

.is-hidden {
    display: none !important;
}

.pos-mode-tabs {
    align-self: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pos-onetouch-workspace {
    grid-template-columns: minmax(500px, 1fr) minmax(500px, 1fr);
}

.pos-onetouch-column,
.pos-onetouch-sale-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.onetouch-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    align-items: stretch;
    gap: 10px;
    margin: 12px 0;
}

.onetouch-categories.has-nav {
    grid-template-columns: 44px repeat(4, minmax(128px, 1fr)) 44px;
}

.onetouch-categories.no-nav {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.onetouch-category,
.onetouch-nav {
    min-height: 58px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-soft);
    color: var(--app-text);
    font-weight: 800;
}

.onetouch-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
    line-height: 1.15;
    cursor: pointer;
}

.onetouch-category span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.onetouch-nav {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    padding: 0;
    font-size: 1rem;
    cursor: pointer;
}

.onetouch-category.is-active {
    background: rgba(0, 87, 200, 0.1);
    color: var(--app-primary);
}

.onetouch-products-placeholder {
    min-height: 430px;
    display: grid;
    place-items: center;
    border-top: 1px solid var(--app-border);
}

.onetouch-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    min-height: 430px;
    max-height: 560px;
    overflow: auto;
    padding-top: 14px;
    border-top: 1px solid var(--app-border);
}

.onetouch-product-card {
    display: grid;
    grid-template-rows: 82px minmax(72px, auto) auto auto auto;
    gap: 8px;
    min-height: 245px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-card);
    box-shadow: var(--app-shadow-soft);
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.onetouch-product-card:hover {
    border-color: rgba(0, 87, 200, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.onetouch-product-card.has-quantity {
    border-color: rgba(0, 87, 200, 0.58);
    background: rgba(0, 87, 200, 0.04);
}

.onetouch-product-card.just-updated {
    transform: scale(0.985);
}

.onetouch-product-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--app-soft);
    color: var(--app-primary);
    font-size: 1.8rem;
}

.onetouch-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.onetouch-product-info {
    display: grid;
    gap: 4px;
}

.onetouch-product-info strong {
    color: var(--app-text);
    font-size: 0.9rem;
    line-height: 1.25;
}

.onetouch-product-info span,
.onetouch-product-meta span {
    color: var(--app-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.onetouch-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.onetouch-product-meta strong {
    color: var(--app-primary);
}

.onetouch-product-tap {
    color: var(--app-muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

.onetouch-product-actions {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 8px;
}

.onetouch-product-actions span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--app-soft);
    font-weight: 900;
    color: var(--app-text);
}

.onetouch-sale-list {
    display: grid;
    gap: 8px;
    max-height: 390px;
    overflow: auto;
    padding: 10px;
    border-top: 1px solid var(--app-border);
}

.onetouch-sale-empty {
    min-height: 190px;
}

.onetouch-sale-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-soft);
}

.onetouch-sale-image {
    grid-row: span 3;
    align-self: start;
}

.onetouch-sale-item strong {
    color: var(--app-text);
}

.onetouch-sale-item span {
    color: var(--app-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.onetouch-sale-controls {
    display: grid;
    grid-template-columns: 38px 1fr 38px 38px;
    align-items: center;
    gap: 6px;
}

.onetouch-sale-controls span {
    min-height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--app-card);
    color: var(--app-text);
    font-weight: 900;
}

.onetouch-sale-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.onetouch-sale-total strong {
    color: var(--app-primary);
}

.onetouch-product-actions .btn:disabled,
.onetouch-sale-controls .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pos-sale-column,
.pos-search-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pos-sale-panel .table-responsive {
    min-height: 360px;
}

.pos-products-panel .table-responsive {
    max-height: 420px;
    overflow: auto;
}

.module-hint {
    color: var(--app-muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.module-toolbar-actions,
.pos-search-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pos-search-main {
    flex: 1 1 240px;
}

.pos-search-price {
    flex: 0 0 112px;
}

.pos-search-tools .search-control {
    min-height: 40px;
}

.pos-search-tools .search-control input {
    min-width: 0;
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.row-actions .btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

.icon-action {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid rgba(0, 87, 200, 0.2);
    border-radius: 8px;
    background: #eef6ff;
    color: #0057c8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0, 87, 200, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-action:hover,
.icon-action:focus {
    border-color: rgba(0, 87, 200, 0.38);
    background: #dcebff;
    color: #00419a;
    box-shadow: 0 12px 24px rgba(0, 87, 200, 0.16);
    transform: translateY(-1px);
}

.icon-action.is-primary {
    border-color: rgba(0, 87, 200, 0.55);
    background: linear-gradient(135deg, #0057c8 0%, #1687d9 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(0, 87, 200, 0.24);
}

.icon-action.is-primary:hover,
.icon-action.is-primary:focus {
    border-color: rgba(0, 65, 154, 0.68);
    background: linear-gradient(135deg, #00419a 0%, #0878c7 100%);
    color: #ffffff;
}

.icon-action.is-danger {
    border-color: rgba(225, 29, 72, 0.2);
    background: #fff1f2;
    color: #be123c;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.08);
}

.icon-action.is-danger:hover,
.icon-action.is-danger:focus {
    border-color: rgba(225, 29, 72, 0.4);
    background: #ffe4e6;
    color: #9f1239;
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.14);
}

.stats-inner-header .icon-action,
.modal-export-panel .icon-action,
.herramientas-overlay-header .icon-action {
    background: #ffffff;
    border-color: var(--app-border);
    color: var(--app-muted);
    box-shadow: none;
}

.stats-inner-header .icon-action:hover,
.stats-inner-header .icon-action:focus,
.modal-export-panel .icon-action:hover,
.modal-export-panel .icon-action:focus,
.herramientas-overlay-header .icon-action:hover,
.herramientas-overlay-header .icon-action:focus {
    background: var(--app-soft);
    border-color: rgba(0, 87, 200, 0.28);
    color: var(--app-primary);
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(340px, 1.05fr) minmax(320px, .95fr);
    gap: 16px;
    align-items: stretch;
}

.profile-summary-panel {
    grid-row: span 2;
    padding: 18px;
}

.profile-summary-main {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-border);
}

.profile-summary-copy span,
.profile-info-item span,
.profile-upload-box span {
    display: block;
    color: var(--app-muted);
}

.profile-summary-copy h2 {
    margin: 2px 0 4px;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--app-text);
}

.profile-summary-copy p {
    margin: 0;
    color: var(--app-muted);
    overflow-wrap: anywhere;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 18px;
}

.profile-info-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-soft);
}

.profile-info-item-wide {
    grid-column: 1 / -1;
}

.profile-info-item i,
.profile-upload-box i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--app-primary);
    background: rgba(0, 87, 200, 0.08);
}

.profile-info-item strong {
    display: block;
    min-width: 0;
    color: var(--app-text);
    overflow-wrap: anywhere;
}

.profile-photo-panel,
.profile-password-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.profile-photo-panel .module-panel-body,
.profile-password-panel .module-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-password-panel form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.password-change-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.password-change-grid label {
    margin: 0;
}

.profile-form-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.profile-photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.profile-photo-preview img {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 87, 200, 0.16);
}

.profile-upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-soft);
}

.profile-upload-box strong {
    display: block;
    color: var(--app-text);
}

.profile-file-input .custom-file-label {
    border-color: var(--app-border);
    color: var(--app-text);
}

.readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.readonly-grid label {
    margin: 0;
}

.readonly-grid .form-control[readonly] {
    background: var(--app-surface-2);
    color: var(--app-muted);
}

.module-help {
    margin: 12px 0 0;
    color: var(--app-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.module-help span {
    color: var(--app-text);
}

.swal-form {
    display: grid;
    gap: 8px;
    text-align: left;
}

.swal-form label {
    margin: 0;
    color: var(--app-text);
    font-size: 0.88rem;
    font-weight: 800;
}

.swal-form .swal2-input {
    width: 100%;
    margin: 0 0 8px;
}

.swal-readonly-field {
    width: 100%;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #eaf3ff;
    color: #0057c8;
    font-size: 1.25rem;
    font-weight: 900;
    text-align: center;
}

.swal-help-text {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: center;
}

.product-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.product-form-grid label {
    display: grid;
    gap: 6px;
}

.product-form-grid .swal2-input {
    margin: 0;
}

.product-thumb-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #f6f9fc;
    place-items: center;
    overflow: hidden;
}

.product-thumb-button.is-static {
    pointer-events: none;
}

.product-thumb-img,
.product-thumb-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #64748b;
}

.product-thumb-img {
    object-fit: cover;
}

.product-thumb-img.is-preview,
.product-thumb-placeholder.is-preview {
    min-height: 190px;
    border-radius: 8px;
}

.product-thumb-img.is-large,
.product-thumb-placeholder.is-large {
    min-height: 280px;
    border-radius: 8px;
}

.product-form-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.product-image-editor {
    display: grid;
    gap: 10px;
}

.product-image-preview,
.product-image-view {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #f8fbff;
    text-align: center;
}

.product-image-preview .product-thumb-placeholder,
.product-image-view .product-thumb-placeholder {
    background: #eaf3ff;
    font-size: 3rem;
}

.product-image-picker {
    justify-content: center;
}

.product-image-view strong,
.product-image-view span {
    display: block;
}

.product-image-view span {
    color: var(--app-muted);
    font-weight: 700;
}

.product-inline-list {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.product-inline-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
}

.product-inline-row .form-control {
    min-height: 42px;
}

.product-inline-number {
    align-items: center;
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-primary);
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
}

.swal2-html-container {
    position: relative;
}

.compact-toolbar {
    justify-content: flex-end;
    min-height: auto;
    padding: 0;
}

.modal-export-toolbar {
    margin-bottom: 10px;
}

.modal-export-box {
    display: grid;
    gap: 8px;
    justify-items: stretch;
    margin-bottom: 10px;
}

.modal-export-overlay {
    align-items: center;
    background: rgba(12, 20, 33, 0.32);
    border-radius: 8px;
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 12px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 25;
}

.modal-export-actions {
    align-items: center;
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: inline-flex;
    gap: 5px;
    padding: 4px;
}

.modal-export-label {
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 800;
    padding: 0 7px;
    text-transform: uppercase;
}

.modal-export-btn {
    align-items: center;
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: 6px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    padding: 0 9px;
}

.modal-export-btn:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.modal-export-btn.pdf i {
    color: #dc3545;
}

.modal-export-btn.excel i {
    color: #198754;
}

.modal-export-panel {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 32, 55, 0.22);
    display: flex;
    flex-direction: column;
    max-width: 720px;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: left;
    width: min(92%, 720px);
    z-index: 1;
}

.modal-export-panel-head strong {
    color: var(--app-text);
    flex: 1 1 auto;
    font-size: 1rem;
    text-align: center;
}

.modal-export-panel-head {
    align-items: center;
    background: var(--app-soft);
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 54px;
    padding: 10px 54px 10px 16px;
}

.modal-export-footer {
    align-items: center;
    border-top: 1px solid var(--app-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 0;
    padding: 12px 14px;
    width: 100%;
}

.modal-export-footer .btn-primary {
    margin-left: auto;
}

.modal-export-close {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-muted);
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.modal-export-close:hover,
.modal-export-close:focus {
    background: var(--app-soft);
    border-color: rgba(0, 87, 200, 0.28);
    color: var(--app-primary);
}

.modal-export-panel > .modal-export-panel-head .modal-export-close {
    position: absolute;
    right: 12px;
    top: 10px;
}

.modal-export-options {
    align-items: flex-start;
    display: grid;
    flex: 1 1 auto;
    gap: 10px;
    margin: 0;
    padding: 14px;
}

.modal-export-options label {
    align-items: center;
    color: var(--app-text);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 6px;
    margin: 0;
}

.modal-export-range {
    display: inline-grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(74px, 96px));
    margin-left: 22px;
}

.modal-export-range label {
    align-items: stretch;
    display: grid;
    gap: 4px;
}

.modal-export-range .form-control {
    font-size: 0.9rem;
    min-height: 32px;
    padding: 4px 8px;
}

[data-modal-export-status] {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
}

.modal-export-footer .btn-primary,
.modal-export-footer .btn-primary span,
.modal-export-footer .btn-primary i {
    color: #ffffff !important;
}

.product-empty-compact {
    min-height: 180px;
}

.client-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.client-form-grid label {
    display: grid;
    gap: 6px;
}

.client-form-grid .swal2-input {
    margin: 0;
}

.provider-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.provider-form-grid label {
    display: grid;
    gap: 6px;
}

.provider-form-grid .swal2-input {
    margin: 0;
}

.config-modal-toolbar {
    align-items: center;
    gap: 10px;
}

.config-modal-toolbar .search-control {
    flex: 1 1 260px;
}

.config-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.config-form-grid label {
    display: grid;
    gap: 6px;
}

.config-form-grid .span-2 {
    grid-column: 1 / -1;
}

.config-form-grid .swal2-input {
    margin: 0;
}

.config-form-grid .form-section-title {
    padding-top: 4px;
    color: var(--app-primary);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.config-form-grid label small,
.config-form-grid .form-help {
    color: var(--app-muted);
    font-weight: 600;
    line-height: 1.3;
}

.config-check-field {
    align-items: center;
    align-self: end;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    min-height: 42px;
    padding: 9px 12px;
}

.config-check-field input {
    height: 18px;
    margin: 0;
    width: 18px;
}

.config-check-field span {
    color: var(--app-text);
    font-weight: 800;
}

.business-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.business-section {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    padding: 12px;
}

.business-form .form-section-title {
    color: var(--app-primary);
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.business-grid {
    display: grid;
    gap: 9px 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.business-print-grid {
    display: grid;
    gap: 9px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.business-grid label,
.business-print-grid label,
.business-logo-card label {
    display: grid;
    gap: 5px;
    font-weight: 800;
}


@media (max-width: 920px) {
    .business-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.business-grid .span-2,
.business-grid .span-3 {
    grid-column: 1 / -1;
}

.business-print-grid .span-2 {
    grid-column: 1 / -1;
}

.business-form .swal2-input,
.business-form .swal2-textarea,
.business-form .swal2-file {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
}

.business-form .swal2-input {
    height: 40px;
}

.business-form .swal2-textarea {
    min-height: 92px;
    resize: vertical;
}

.business-form small {
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.business-media-section {
    background: transparent;
    border: 0;
    padding: 0;
}

.business-media-form {
    position: relative;
}

.business-media-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.business-inner-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 11px;
    min-height: 100%;
    padding: 13px;
}

.business-inner-card .form-section-title {
    margin-bottom: 0;
}

.business-inner-card.business-print-grid {
    align-content: start;
    grid-template-columns: 1fr;
}


.business-media-rows {
    gap: 12px;
}

.business-row-card {
    gap: 12px;
}

.business-row-heading {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
}

.business-row-heading strong {
    color: var(--app-text);
    display: block;
    font-weight: 900;
    line-height: 1.2;
}

.business-row-heading small {
    color: var(--app-muted);
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 3px;
}

.business-row-icon {
    align-items: center;
    background: var(--app-soft);
    border-radius: 8px;
    color: var(--app-primary);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}


.business-row-icon img {
    background: #ffffff;
    border-radius: 8px;
    display: block;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    width: 100%;
}

.credit-table-wrap {
    min-height: 300px;
    max-height: min(58vh, 620px);
    overflow: auto;
}

.credit-table-wrap .module-table {
    margin-bottom: 0;
}

.credit-pay-panel {
    display: grid;
    gap: 14px;
}

.credit-pay-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.credit-pay-card {
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: 12px 14px;
}

.credit-pay-card span {
    color: var(--app-muted);
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.credit-pay-card strong {
    color: var(--app-text);
    display: block;
    font-size: 1.12rem;
    overflow-wrap: anywhere;
}

.credit-pay-card.is-total,
.credit-pay-change {
    background: var(--app-primary-soft);
}

.credit-pay-card.is-total strong,
.credit-pay-change strong {
    color: var(--app-primary);
    font-size: 1.35rem;
}

.credit-pay-form {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) minmax(150px, 190px);
    gap: 12px;
}

.credit-pay-form label {
    color: var(--app-text);
    display: grid;
    font-weight: 700;
    gap: 6px;
    margin: 0;
}

@media (max-width: 720px) {
    .credit-pay-summary,
    .credit-pay-form {
        grid-template-columns: 1fr;
    }

    .credit-table-wrap {
        max-height: min(62vh, 520px);
    }
}
button.business-row-icon {
    border: 0;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

button.business-row-icon:disabled {
    cursor: default;
    opacity: 0.72;
}
.business-file-field {
    display: grid !important;
    gap: 8px;
}

.business-file-field > span {
    font-weight: 800;
}

.business-file-field .swal2-file {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 7px;
    color: var(--app-text);
    min-height: 42px;
    padding: 7px;
}

.business-print-row {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 150px;
}

.business-print-row label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.business-print-row .swal2-textarea {
    min-height: 86px;
}

.business-media-section .business-print-grid {
    grid-template-columns: 1fr;
}


.business-logo-card .business-row-heading {
    grid-template-columns: 190px minmax(0, 1fr);
}

.business-logo-trigger {
    height: 86px;
    width: 190px;
}
.business-logo-card {
    display: grid;
    gap: 10px;
}

.business-logo-card .swal2-file {
    width: 100%;
}


.business-logo-card .business-file-field {
    margin-top: 2px;
}

.business-print-grid .business-row-heading {
    grid-template-columns: 38px minmax(0, 1fr);
}

.business-print-grid .business-print-row {
    grid-template-columns: minmax(0, 1fr) 150px;
}
.business-copies-field {
    margin-top: 10px;
}

.business-logo-preview {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    min-height: 78px;
    padding: 10px 12px;
}

.business-logo-preview img {
    display: block;
    max-height: 56px;
    max-width: 150px;
    object-fit: contain;
}

.business-logo-preview i {
    align-items: center;
    background: var(--app-soft);
    border-radius: 8px;
    color: var(--app-muted);
    display: inline-flex;
    font-size: 1.35rem;
    height: 44px;
    justify-content: center;
    width: 52px;
}

.business-logo-preview strong {
    color: var(--app-text);
    font-size: 0.95rem;
}


.business-image-viewer[hidden] {
    display: none !important;
}

.business-image-viewer {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 10px;
}

.business-image-viewer-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.business-image-viewer-head strong {
    color: var(--app-text);
    font-size: 0.9rem;
}

.business-image-viewer img {
    background: #ffffff;
    border-radius: 7px;
    display: block;
    max-height: 220px;
    max-width: 100%;
    object-fit: contain;
    padding: 8px;
    width: 100%;
}

.business-image-viewer-close {
    align-items: center;
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}
.field-compact {
    display: grid;
    gap: 5px;
    min-width: 150px;
    text-align: left;
}

.field-compact .form-control {
    min-height: 40px;
}

.field-grow {
    flex: 1 1 220px;
}

.turnos-anteriores-shell .module-toolbar {
    align-items: end;
}

.config-policy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.config-policy-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    text-align: left;
}

.config-policy-card input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--app-primary);
}

.config-policy-card strong,
.config-policy-card small {
    display: block;
}

.config-policy-card small {
    margin-top: 3px;
    color: var(--app-muted);
    font-weight: 600;
    line-height: 1.35;
}

.config-policy-field {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 150px;
    margin-top: 12px;
    padding: 14px;
    text-align: left;
}

.config-policy-field strong,
.config-policy-field small {
    display: block;
}

.config-policy-field small {
    color: var(--app-muted);
    font-weight: 600;
    line-height: 1.35;
    margin-top: 3px;
}

.input-suffix {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.input-suffix span {
    color: var(--app-muted);
    font-weight: 900;
}

.config-permissions-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    text-align: left;
}

.config-permission-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.config-permission-list .inline-check {
    margin: 0;
}

.perfil-avatar-iniciales {
    border-radius: 50%;
    background: var(--app-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0;
}

#divFotoPerfil .perfil-avatar-iniciales {
    width: 148px;
    height: 148px;
    font-size: 2.2rem;
}

.spinner-local {
    width: 100%;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-local .spin {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(0, 87, 200, 0.18);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.texto-pequeno {
    font-size: 0.9rem;
}

.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
}

.dropdown-item {
    color: var(--app-text);
    font-weight: 700;
}

.dropdown-item:hover {
    background: rgba(0, 87, 200, 0.08);
    color: var(--app-primary);
}

.mini-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
}

.mini-metrics.mini-metrics-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-metrics article {
    background: #eef6ff;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.mini-metrics span {
    color: #63748b;
    display: block;
}

.mini-metrics strong {
    color: #0057c8;
    display: block;
    font-size: 20px;
}

.venta-process-card {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0;
}

.venta-process-card > div {
    background: #f6f9fd;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
}

.venta-process-card span {
    color: var(--app-muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.venta-process-card strong {
    color: var(--app-text);
    display: block;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.venta-process-wide {
    grid-column: 1 / -1;
}

.caja-movimientos-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
}

.status-pill.is-success {
    background: #e8f8ef;
    color: #11844a;
}

.status-pill.is-danger {
    background: #fff0f0;
    color: #c12f2f;
}
.status-pill.is-warning {
    background: #fff7e0;
    color: #9a6200;
}


@media (max-width: 992px) {
    .pos-workspace {
        grid-template-columns: 1fr;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-summary-panel {
        grid-row: auto;
    }

    .module-header {
        flex-direction: column;
    }

    .module-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .readonly-grid {
        grid-template-columns: 1fr;
    }

    .password-change-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    :root {
        --sidebar-open: 220px;
        --sidebar-closed: 64px;
    }

    .content,
    .content.collapsed {
        margin-left: var(--sidebar-closed);
        padding: 80px 12px 24px;
    }

    .dashboard-layout .navbar,
    .dashboard-layout .navbar.collapsed {
        left: var(--sidebar-closed);
    }

    .sidebar-brand span,
    .dashboard-layout .sidebar:not(.collapsed) .sidebar-brand span {
        display: none;
    }

    .module-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-control {
        max-width: none;
        min-width: 0;
    }

    .module-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }

    .product-form-grid {
        grid-template-columns: 1fr;
    }

    .product-form-layout {
        grid-template-columns: 1fr;
    }

    .product-inline-row {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .client-form-grid {
        grid-template-columns: 1fr;
    }

    .provider-form-grid {
        grid-template-columns: 1fr;
    }

    .config-form-grid {
        grid-template-columns: 1fr;
    }

    .business-grid,
    .business-print-grid,
    .business-media-form {
    position: relative;
}

.business-media-grid {
        grid-template-columns: 1fr;
    }

    
.business-logo-card .business-file-field {
    margin-top: 2px;
}

.business-print-grid .business-row-heading {
    grid-template-columns: 38px minmax(0, 1fr);
}

.business-print-grid .business-print-row {
    grid-template-columns: minmax(0, 1fr) 150px;
}
.business-copies-field {
        margin-top: 0;
    }

    #login .card-body {
        padding: 28px 22px;
    }

    .footer {
        left: 14px;
        right: 14px;
    }
}

/* POS layout refinements */
.pos-sale-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
}

.pos-sale-name,
.pos-sale-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pos-sale-name .search-control {
    flex: 1 1 320px;
    max-width: none;
    min-width: 240px;
}

.pos-sale-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.pos-sale-actions .btn,
.pos-sale-name .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pos-summary-bar {
    display: grid;
    grid-template-columns: minmax(160px, 1.3fr) minmax(90px, 0.6fr) minmax(130px, 0.8fr) auto;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--app-border);
    padding: 12px 14px;
    background: rgba(66, 125, 235, 0.04);
}

.pos-summary-item {
    min-width: 0;
}

.pos-summary-item span {
    color: var(--app-muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.pos-summary-item strong {
    color: var(--app-text);
    display: block;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-summary-total strong {
    color: var(--app-primary);
    font-size: 1.35rem;
}

.pos-cobrar-btn {
    min-height: 44px;
    padding-inline: 22px;
    white-space: nowrap;
}

.pos-products-panel .module-table th:first-child,
.pos-products-panel .module-table td:first-child {
    left: 0;
    position: sticky;
    z-index: 2;
}

.pos-products-panel .module-table th:first-child {
    background: var(--app-surface-soft);
}

.pos-products-panel .module-table td:first-child {
    background: var(--app-surface);
}

.pos-products-panel .table-responsive {
    max-height: 420px;
}

.pos-workspace {
    align-items: stretch;
    grid-template-columns: minmax(500px, 1fr) minmax(500px, 1fr);
}

.pos-sale-column,
.pos-search-column {
    display: flex;
    flex-direction: column;
}

.pos-sale-panel,
.pos-products-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.pos-sale-panel .table-responsive,
.pos-products-panel .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
}

.pos-products-panel .module-table {
    min-width: 600px;
}

.pos-products-panel .table-responsive {
    max-height: none;
}

.pos-products-panel .module-pager {
    flex: 0 0 auto;
}

.pos-sale-panel .module-table {
    min-width: 620px;
}

.pos-workspace .module-table {
    font-size: 0.88rem;
}

.pos-workspace .module-table td,
.pos-workspace .module-table th {
    padding: 10px 8px;
}

.pos-workspace .btn {
    font-size: 0.88rem;
}

.pos-workspace .btn-sm {
    min-height: 34px;
    padding: 7px 10px;
}

.pos-products-panel .btn-sm span {
    font-size: 0.86rem;
}

.pos-products-panel .module-table th:nth-child(1),
.pos-products-panel .module-table td:nth-child(1) {
    width: 104px;
}

.pos-products-panel .module-table th:nth-child(2),
.pos-products-panel .module-table td:nth-child(2) {
    width: 58px;
}

.pos-products-panel .module-table th:nth-child(3),
.pos-products-panel .module-table td:nth-child(3) {
    width: 104px;
}

.pos-products-panel .module-table th:nth-child(5),
.pos-products-panel .module-table td:nth-child(5),
.pos-products-panel .module-table th:nth-child(6),
.pos-products-panel .module-table td:nth-child(6) {
    width: 82px;
    white-space: nowrap;
}

.pos-sale-panel .module-table th:nth-child(1),
.pos-sale-panel .module-table td:nth-child(1) {
    width: 118px;
}

.pos-sale-panel .module-table th:nth-child(3),
.pos-sale-panel .module-table td:nth-child(3) {
    width: 86px;
}

.pos-sale-panel .module-table th:nth-child(4),
.pos-sale-panel .module-table td:nth-child(4),
.pos-sale-panel .module-table th:nth-child(5),
.pos-sale-panel .module-table td:nth-child(5) {
    width: 92px;
    white-space: nowrap;
}

.pos-sale-panel .module-table th:nth-child(6),
.pos-sale-panel .module-table td:nth-child(6) {
    width: 128px;
}

.pos-sale-panel .row-actions {
    gap: 6px;
}

.pos-sale-panel .row-actions .btn {
    height: 34px;
    min-width: 34px;
    padding: 0;
}

.cobro-cliente-panel {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    margin-top: 12px;
    padding: 12px;
    text-align: left;
}

.cobro-cliente-panel .module-toolbar {
    margin-bottom: 10px;
    padding: 0;
}

.cobro-cliente-panel .swal-search-control {
    max-width: none;
}

.pos-products-head {
    gap: 12px;
}

.pos-products-head .inline-check {
    margin-left: auto;
}

.pos-search-tools {
    border-bottom: 1px solid var(--app-border);
    padding: 12px 14px;
}

.pos-search-tools .btn {
    min-height: 42px;
}

.pos-search-main {
    flex: 1 1 260px;
}

.pos-search-price {
    flex: 0 1 150px;
}

.pos-qty-field {
    flex: 0 0 140px;
}

.pos-qty-field .form-control {
    min-width: 100px;
}

.module-split {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    text-align: left;
}

.module-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
}

.module-panel > .module-toolbar,
.module-panel > .table-responsive,
.module-panel > .aux-list-header,
.module-panel > .form-grid {
    padding: 12px;
}

.panel-header {
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 12px;
}

.segmented-control {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: inline-flex;
    padding: 3px;
}

.segmented-control button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--app-muted);
    cursor: pointer;
    display: inline-flex;
    gap: 7px;
    justify-content: center;
    font-weight: 700;
    padding: 7px 10px;
}

.segmented-control button.is-active {
    background: var(--app-primary);
    color: #fff;
}

.apartado-flow-tabs {
    display: flex;
    gap: 4px;
    width: 100%;
}

.apartado-flow-tabs button {
    flex: 1 1 0;
    min-height: 42px;
}

.segmented-control label {
    margin: 0;
}

.segmented-control label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control label span {
    border-radius: 6px;
    color: var(--app-muted);
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    padding: 7px 10px;
}

.segmented-control label input:checked + span {
    background: var(--app-primary);
    color: #fff;
}

.compact-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: left;
}

.compact-form-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form .span-2 {
    grid-column: span 2;
}

.compact-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.selection-pill {
    align-items: center;
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.selection-pill i {
    color: var(--app-primary);
}

.selection-pill span {
    color: var(--app-muted);
    margin-left: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.herr-novedades-grid {
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
}

.herr-novedades-stack {
    display: grid;
    gap: 12px;
    text-align: left;
}

.herr-novedades-panel {
    overflow: auto;
}

.herr-novedades-stack .herr-novedades-panel:first-child {
    overflow: visible;
}

.herr-novedades-stack .herr-novedades-panel:nth-child(2) {
    max-height: 44vh;
}

.herr-novedades-panel .module-toolbar {
    gap: 10px;
}

.herr-novedades-panel .selection-pill {
    margin: 0 12px;
}

.herr-novedades-panel .module-table th,
.herr-novedades-panel .module-table td {
    font-size: 0.86rem;
    padding: 10px 12px;
    vertical-align: middle;
}

.herr-novedades-panel .module-table .btn {
    min-height: 36px;
    padding: 7px 10px;
}

.herr-novedades-panel .module-table th:first-child,
.herr-novedades-panel .module-table td:first-child {
    text-align: center;
    width: 42px;
}

.bulk-toolbar {
    align-items: center;
    color: var(--app-muted);
    display: flex;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px 0;
}

.bulk-toolbar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.herr-novedades-panel .compact-form {
    padding: 12px;
}

.herr-novedades-panel .compact-form textarea.form-control {
    min-height: 110px;
}

.novedad-anexo-row {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.novedad-anexo-row .btn {
    margin-bottom: 0;
    min-height: 38px;
}

.compact-form label {
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.compact-form .form-actions {
    align-items: end;
    display: flex;
    justify-content: flex-end;
}

.doc-qty-field {
    flex: 0 0 auto;
}

.doc-qty-field .form-control {
    max-width: 88px;
    min-width: 78px;
}

.doc-qty-field span {
    white-space: nowrap;
}

.doc-product-toolbar {
    align-items: center;
    flex-wrap: nowrap;
}

.doc-product-toolbar .search-control {
    flex: 0 1 360px;
    max-width: 360px;
    min-width: 220px;
}

.doc-products-table {
    font-size: 0.92rem;
}

.doc-products-table th,
.doc-products-table td {
    vertical-align: middle;
}

.doc-product-cell {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 44px minmax(0, 1fr);
    min-width: 0;
}

.doc-product-cell strong,
.doc-product-cell span {
    display: block;
    overflow-wrap: anywhere;
}

.doc-product-cell strong {
    color: var(--app-text);
    font-size: 0.95rem;
    line-height: 1.2;
}

.doc-product-cell span {
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 3px;
}

.inline-status {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
    text-align: left;
}

.inline-status-success {
    background: #eaf8f0;
    border-color: #9edbb9;
    color: #166534;
}

.inline-status-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.inline-status-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.inline-status-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.connector-link-notice {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.connector-link-notice[hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .connector-link-notice {
        align-items: flex-start;
        flex-direction: column;
    }
}
.aux-list-footer {
    align-items: center;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    display: flex;
    font-weight: 700;
    gap: 10px;
    justify-content: center;
    padding: 10px;
}

.inline-field {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.inline-field span {
    color: var(--app-muted);
    font-weight: 700;
}

.inline-field .form-control {
    max-width: 96px;
    min-height: 40px;
}
.thermal-label-options {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    padding: 8px 10px;
}

.thermal-label-options[hidden] {
    display: none !important;
}

.thermal-label-options-title {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.thermal-label-options .inline-field {
    gap: 6px;
}

.thermal-label-options .inline-field span {
    font-size: .82rem;
    line-height: 1.1;
    max-width: 72px;
    text-align: right;
}

.thermal-label-options .form-control {
    margin: 0;
    min-width: 82px;
}

@media (max-width: 768px) {
    .thermal-label-options {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .thermal-label-options-title {
        grid-column: 1 / -1;
    }

    .thermal-label-options .inline-field {
        align-items: stretch;
        flex-direction: column;
    }

    .thermal-label-options .inline-field span {
        max-width: none;
        text-align: left;
    }

    .thermal-label-options .form-control {
        max-width: none;
        width: 100%;
    }
}

.swal2-popup .btn-primary {
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
    color: #ffffff !important;
}

.swal2-popup .btn-primary i,
.swal2-popup .btn-primary span {
    color: #ffffff !important;
}

.swal2-popup .btn-primary:hover,
.swal2-popup .btn-primary:focus {
    background: var(--app-primary-dark) !important;
    border-color: var(--app-primary-dark) !important;
}

.swal2-popup .btn-outline-secondary {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

.swal2-popup .btn-outline-danger {
    background: #fffafa !important;
    border-color: rgba(194, 65, 58, 0.45) !important;
    color: var(--app-danger) !important;
}

.chart-bars {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.chart-bar {
    display: grid;
    gap: 5px;
}

.chart-bar span {
    color: var(--app-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.chart-bar strong {
    color: var(--app-text);
}

.chart-bar i {
    background: var(--app-primary);
    border-radius: 999px;
    display: block;
    height: 8px;
    min-width: 8px;
}

.turno-historico-window {
    width: min(100%, 980px);
}

.turno-historico-window .stats-inner-body {
    padding: 14px;
}

.turno-historico-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
}

.turno-historico-summary article {
    background: var(--app-soft);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: 10px 12px;
}

.turno-historico-summary span,
.turno-historico-secondary span {
    color: var(--app-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.turno-historico-summary strong {
    color: var(--app-text);
    display: block;
    font-size: 1.05rem;
    margin-top: 2px;
    white-space: nowrap;
}

.turno-historico-summary .is-total strong {
    color: var(--app-primary);
    font-size: 1.2rem;
}

.turno-historico-secondary {
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 10px;
    padding: 9px 12px;
}

.turno-historico-secondary strong {
    color: var(--app-text);
}

.turno-historico-metrics {
    display: none;
}

.turno-historico-card {
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    min-height: auto;
    padding: 12px 14px;
}

.turno-historico-card .module-section-title {
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.turno-historico-card .turno-access-actions {
    gap: 10px;
}

.turno-historico-table {
    font-size: 0.88rem;
    min-width: 820px;
}

.turno-historico-table th,
.turno-historico-table td {
    padding: 10px 9px;
    white-space: normal;
    word-break: normal;
}

.turno-historico-table th {
    white-space: nowrap;
}

.turno-historico-table th:nth-child(1),
.turno-historico-table td:nth-child(1) {
    width: 128px;
}

.turno-historico-table th:nth-child(4),
.turno-historico-table td:nth-child(4),
.turno-historico-table th:nth-child(5),
.turno-historico-table td:nth-child(5),
.turno-historico-table th:nth-child(6),
.turno-historico-table td:nth-child(6),
.turno-historico-table th:nth-child(7),
.turno-historico-table td:nth-child(7) {
    text-align: right;
    white-space: nowrap;
    width: 86px;
}

.turno-historico-table th:nth-child(9),
.turno-historico-table td:nth-child(9) {
    width: 118px;
    min-width: 118px;
    text-align: center;
    white-space: nowrap;
}

.turno-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.turno-row-actions .icon-action {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
}

.turno-historico-table .btn-sm {
    min-height: 34px;
    min-width: 34px;
    padding: 6px 8px;
}

@media (max-width: 900px) {
    .turno-historico-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .turno-historico-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .turno-access-card,
    .turno-access-actions,
    .ventas-shortcuts-card,
    .ventas-shortcuts-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .turno-action-group,
    .turno-export-group,
    .ventas-shortcuts-actions {
        justify-content: flex-start;
    }

    .turno-export-group {
        border-left: 0;
        border-top: 1px solid var(--app-border);
        padding-left: 0;
        padding-top: 12px;
    }

    .pos-sale-controls {
        grid-template-columns: 1fr;
    }

    .pos-sale-actions {
        justify-content: flex-start;
    }

    .pos-summary-bar {
        grid-template-columns: 1fr 1fr;
    }

    .pos-cobrar-btn {
        grid-column: 1 / -1;
    }

    .module-split,
    .compact-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pos-sale-name,
    .pos-sale-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-sale-name .btn,
    .pos-sale-actions .btn {
        width: 100%;
    }

    .pos-summary-bar {
        grid-template-columns: 1fr;
    }
}

/* Caja: cuenta activa */
.pos-account-card {
    align-items: stretch;
    gap: 1rem;
}

.pos-account-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .55rem;
    min-width: 0;
}

.pos-account-kicker {
    color: #0050bc;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pos-account-title {
    align-items: center;
    display: flex;
    gap: .65rem;
    min-width: 0;
}

.pos-account-title .search-control {
    flex: 1 1 auto;
    min-width: 0;
}

.pos-account-title .btn {
    flex: 0 0 auto;
}

.pos-account-meta {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .9rem;
    font-weight: 700;
}

.pos-account-meta span {
    align-items: center;
    background: #f4f8ff;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    display: inline-flex;
    gap: .4rem;
    min-height: 34px;
    padding: .35rem .65rem;
}

.account-row-id {
    color: #64748b;
    display: block;
    font-size: .78rem;
    font-weight: 700;
    margin-top: .2rem;
}

@media (max-width: 768px) {
    .pos-account-title {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Caja: selector de cliente de cuenta */
.account-client-current {
    background: #f4f8ff;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 12px;
    text-align: left;
}

.account-client-current span {
    color: #64748b;
    display: block;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.account-client-current strong {
    color: var(--app-text);
    display: block;
    font-size: 1rem;
}

.account-client-tools {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 190px minmax(0, 1fr);
    margin-bottom: 14px;
    text-align: left;
}

.account-client-public {
    min-height: 42px;
    width: 100%;
}

.account-client-temporal {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.account-client-temporal label {
    color: var(--app-text);
    font-size: .92rem;
    font-weight: 800;
    grid-column: 1 / -1;
    margin: 0;
}

.account-client-temporal .btn {
    min-height: 42px;
}

.account-client-search {
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .account-client-current,
    .account-client-tools,
    .account-client-temporal {
        grid-template-columns: 1fr;
    }
}

.pos-client-inline {
    min-height: 34px;
    padding: .35rem .75rem;
}

.pos-account-meta .pos-client-inline {
    margin-left: .15rem;
}

/* Caja: nueva cuenta */
.new-account-form {
    display: grid;
    gap: 14px;
    text-align: left;
}

.new-account-form label {
    color: var(--app-text);
    display: block;
    font-size: .92rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.new-account-client-mode {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.new-account-client-mode .btn {
    justify-content: center;
    min-height: 42px;
}

.new-account-panel {
    background: #f4f8ff;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    padding: 12px;
}

.new-account-client-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    max-height: 240px;
    overflow: auto;
}

.new-account-client-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
}

.new-account-client-row small {
    color: #64748b;
    display: block;
    font-size: .78rem;
    font-weight: 700;
    margin-top: 2px;
}

.new-account-client-row i {
    color: #0050bc;
    opacity: .2;
}

.new-account-client-row.is-selected {
    background: #e8f1ff;
    border-color: #7ab2ff;
}

.new-account-client-row.is-selected i {
    opacity: 1;
}

@media (max-width: 640px) {
    .new-account-client-mode {
        grid-template-columns: 1fr;
    }
}

.pos-account-actions-card {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.pos-account-actions-card .module-help {
    margin: 4px 0 0;
}

.pos-account-actions-card .pos-sale-actions {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .pos-account-actions-card {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-account-actions-card .pos-sale-actions {
        justify-content: flex-start;
    }
}

.pos-account-layout {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, .95fr);
}

.pos-account-field {
    background: #f7faff;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    display: grid;
    gap: 7px;
    padding: 10px;
}

.pos-account-field > span,
.pos-account-meta > span:first-child {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.pos-account-name-field .search-control {
    background: #fff;
}

.pos-account-client-line {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.pos-account-client-line > span {
    align-items: center;
    background: #eaf2ff;
    border: 1px solid #d7e4f5;
    border-radius: 8px;
    color: #1f2937;
    display: inline-flex;
    gap: .45rem;
    min-height: 40px;
    min-width: 0;
    padding: .45rem .65rem;
}

.pos-account-client-line strong {
    overflow-wrap: anywhere;
}

.pos-account-layout .pos-account-meta {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .pos-account-layout {
        grid-template-columns: 1fr;
    }

    .pos-account-client-line {
        grid-template-columns: 1fr;
    }
}

.pos-workspace.pos-account-readonly {
    grid-template-columns: minmax(0, 1fr);
}

.pos-workspace.pos-account-readonly .pos-sale-column,
.pos-workspace.pos-account-readonly .pos-onetouch-sale-column {
    width: 100%;
}

.pos-workspace.pos-account-readonly .pos-sale-panel .table-responsive {
    min-height: 420px;
}


/* Caja: control de entrega */
.delivery-actions {
    justify-content: center;
}

.delivery-action-btn {
    align-items: center;
    border: 1px solid #b9d4ff;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    width: 34px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.delivery-action-btn.is-deliver {
    background: #0050bc;
    border-color: #0050bc;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 80, 188, .22);
}

.delivery-action-btn.is-pending {
    background: #fff7e0;
    border-color: #ffd777;
    color: #8a5a00;
}

.delivery-action-btn:hover,
.delivery-action-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .14);
}

.barcode-filter-line {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.barcode-filter-line .search-control {
    flex: 1 1 auto;
    min-width: 180px;
}

.barcode-scan-btn {
    display: none;
    min-height: 42px;
    white-space: nowrap;
}

.barcode-scanner {
    display: grid;
    gap: 14px;
}

.barcode-scanner-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    background: #0b1220;
    aspect-ratio: 4 / 3;
}

.barcode-scanner-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.barcode-scanner-guide {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 42%;
    height: 16%;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.barcode-scanner-status {
    color: #60708a;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 768px) {
    .barcode-filter-line,
    .pos-search-tools {
        align-items: stretch;
    }

    .barcode-scan-btn {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }
}

/* Mobile usability pass: tables become readable cards and dense modules stack cleanly. */
@media (max-width: 700px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    .content,
    .content.collapsed {
        margin-left: var(--sidebar-closed);
        padding: 84px 10px 24px;
        width: calc(100% - var(--sidebar-closed));
    }

    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    .module-shell,
    .module-header,
    .module-subpanel,
    .module-panel {
        border-radius: 8px;
    }

    .module-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 14px;
    }

    .module-title {
        align-items: flex-start;
        gap: 12px;
    }

    .module-title h1 {
        font-size: 1.45rem;
        line-height: 1.15;
    }

    .module-title p,
    .module-help {
        font-size: .92rem;
        line-height: 1.35;
    }

    .module-actions,
    .module-toolbar,
    .product-toolbar,
    .inventory-tools-controls,
    .inventory-tools-filters,
    .inventory-tools-actions,
    .pos-mode-tabs,
    .ventas-shortcuts-actions,
    .pos-sale-actions,
    .pos-search-tools {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .module-actions .btn,
    .module-toolbar .btn,
    .product-toolbar .btn,
    .inventory-tools-controls .btn,
    .inventory-tools-filters .btn,
    .inventory-tools-actions .btn,
    .pos-mode-tabs .btn,
    .ventas-shortcuts-actions .btn,
    .pos-sale-actions .btn,
    .pos-search-tools .btn {
        width: 100%;
    }

    .barcode-filter-line {
        display: grid;
        grid-template-columns: 1fr;
    }

    .barcode-filter-line .search-control,
    .barcode-filter-line .btn,
    .barcode-scan-btn {
        display: inline-flex;
        min-width: 0;
        width: 100%;
    }

    .pos-workspace,
    .pos-workspace.pos-account-readonly,
    .pos-onetouch-workspace {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pos-sale-column,
    .pos-search-column,
    .pos-onetouch-sale-column,
    .pos-onetouch-column {
        min-width: 0;
        width: 100%;
    }

    .pos-products-panel .table-responsive,
    .pos-sale-panel .table-responsive {
        max-height: none;
        min-height: 0;
        overflow: visible;
    }

    .pos-products-panel .module-table,
    .pos-sale-panel .module-table,
    .pos-workspace .module-table {
        min-width: 0;
        width: 100%;
    }

    .table-responsive:has(td[data-label]) {
        overflow: visible;
    }

    .module-table:has(td[data-label]) {
        border-collapse: separate;
        border-spacing: 0 10px;
        display: block;
        width: 100%;
    }

    .module-table:has(td[data-label]) thead {
        display: none;
    }

    .module-table:has(td[data-label]) tbody,
    .module-table:has(td[data-label]) tr,
    .module-table:has(td[data-label]) td {
        display: block;
        width: 100%;
    }

    .module-table:has(td[data-label]) tr:has(td[data-label]) {
        background: var(--app-surface);
        border: 1px solid var(--app-border);
        border-radius: 8px;
        box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
        margin-bottom: 10px;
        overflow: hidden;
        padding: 8px 10px;
    }

    .module-table:has(td[data-label]) td[data-label] {
        align-items: start;
        border: 0;
        display: grid;
        gap: 10px;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        padding: 8px 2px;
        text-align: right;
        white-space: normal;
        word-break: normal;
    }

    .module-table:has(td[data-label]) td[data-label]::before {
        color: var(--app-muted);
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: .02em;
        text-align: left;
        text-transform: uppercase;
    }

    .module-table:has(td[data-label]) td[data-label]:empty {
        display: none;
    }

    .module-table:has(td[data-label]) .row-actions,
    .module-table:has(td[data-label]) .delivery-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .module-pager {
        justify-content: center;
        text-align: center;
    }

    .module-pager span {
        line-height: 1.25;
    }

    .stats-grid,
    .summary-grid,
    .readonly-grid,
    .form-grid,
    .module-split,
    .compact-form,
    .profile-layout,
    .profile-info-grid,
    .password-change-grid {
        grid-template-columns: 1fr !important;
    }

    .swal2-popup:not(.swal2-toast) {
        width: min(94vw, 680px) !important;
    }

    .swal2-html-container .module-table:has(td[data-label]) td[data-label] {
        grid-template-columns: minmax(82px, 32%) minmax(0, 1fr);
    }
}

/* Tablet/mobile POS flow: keep Caja usable before the phone-card breakpoint. */
@media (max-width: 1024px) {
    .pos-workspace,
    .pos-workspace.pos-account-readonly,
    .pos-onetouch-workspace {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .pos-sale-column,
    .pos-search-column,
    .pos-onetouch-sale-column,
    .pos-onetouch-column {
        min-width: 0;
        width: 100%;
    }

    .pos-products-panel .table-responsive,
    .pos-sale-panel .table-responsive {
        max-height: none;
    }
}

@media (max-width: 700px) {
    .table-responsive:not(:has(td[data-label])) {
        overflow-x: auto;
    }

    .table-responsive:not(:has(td[data-label])) .module-table {
        min-width: 620px;
    }
}
/* Tablet readable tables: cards before columns get cramped. */
@media (max-width: 1100px) and (min-width: 701px) {
    .table-responsive:has(td[data-label]) {
        overflow: visible;
    }

    .module-table:has(td[data-label]) {
        border-collapse: separate;
        border-spacing: 0 10px;
        display: block;
        width: 100%;
    }

    .module-table:has(td[data-label]) thead {
        display: none;
    }

    .module-table:has(td[data-label]) tbody,
    .module-table:has(td[data-label]) tr,
    .module-table:has(td[data-label]) td {
        display: block;
        width: 100%;
    }

    .module-table:has(td[data-label]) tr:has(td[data-label]) {
        background: var(--panel-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
        padding: 10px 12px;
    }

    .module-table:has(td[data-label]) td[data-label] {
        align-items: center;
        border: 0;
        display: grid;
        gap: 14px;
        grid-template-columns: minmax(112px, 24%) minmax(0, 1fr);
        justify-items: stretch;
        min-height: 36px;
        padding: 7px 0;
        text-align: right;
    }

    .module-table:has(td[data-label]) td[data-label]::before {
        color: var(--muted-text);
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 800;
        justify-self: start;
        text-align: left;
        text-transform: uppercase;
    }

    .module-table:has(td[data-label]) td[data-label]:empty {
        display: none;
    }

    .module-table:has(td[data-label]) .row-actions,
    .module-table:has(td[data-label]) .delivery-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .table-responsive:not(:has(td[data-label])) {
        overflow-x: auto;
    }

    .table-responsive:not(:has(td[data-label])) .module-table {
        min-width: 720px;
    }
}
/* Tablet card polish override. */
.modal-export-box {
    justify-items: end;
}

@media (max-width: 1100px) and (min-width: 701px) {
    .module-table:has(td[data-label]) td[data-label] {
        align-items: start;
        justify-items: stretch;
        text-align: left;
    }

    .module-table:has(td[data-label]) .row-actions,
    .module-table:has(td[data-label]) .delivery-actions {
        justify-content: flex-start;
    }
}
/* Tablet table restore override: keep tables readable, use cards only on phones. */
@media (max-width: 1100px) and (min-width: 701px) {
    .table-responsive:has(td[data-label]) {
        overflow-x: auto;
    }

    .module-table:has(td[data-label]) {
        border-collapse: collapse;
        border-spacing: 0;
        display: table;
        min-width: 720px;
        width: 100%;
    }

    .module-table:has(td[data-label]) thead {
        display: table-header-group;
    }

    .module-table:has(td[data-label]) tbody {
        display: table-row-group;
    }

    .module-table:has(td[data-label]) tr,
    .module-table:has(td[data-label]) tr:has(td[data-label]) {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        display: table-row;
        margin: 0;
        overflow: visible;
        padding: 0;
    }

    .module-table:has(td[data-label]) td,
    .module-table:has(td[data-label]) td[data-label] {
        border-bottom: 1px solid var(--app-border);
        display: table-cell;
        min-height: 0;
        padding: 13px 16px;
        text-align: inherit;
        vertical-align: middle;
        width: auto;
    }

    .module-table:has(td[data-label]) td[data-label]::before {
        content: none;
        display: none;
    }

    .module-table:has(td[data-label]) .row-actions,
    .module-table:has(td[data-label]) .delivery-actions {
        justify-content: center;
        white-space: nowrap;
    }
}
/* Mobile card action buttons: text buttons should not be cropped. */
@media (max-width: 700px) {
    .module-table:has(td[data-label]) .row-actions,
    .module-table:has(td[data-label]) .delivery-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .module-table:has(td[data-label]) .row-actions .btn,
    .module-table:has(td[data-label]) .delivery-actions .btn,
    .module-table:has(td[data-label]) td[data-label="Acciones"] .btn {
        height: auto;
        min-height: 36px;
        min-width: 36px;
        width: auto;
        max-width: 100%;
        padding: 8px 11px;
        white-space: nowrap;
    }

    .module-table:has(td[data-label]) .row-actions .btn span,
    .module-table:has(td[data-label]) .delivery-actions .btn span,
    .module-table:has(td[data-label]) td[data-label="Acciones"] .btn span {
        display: inline-block;
        margin-left: 6px;
        max-width: none;
        overflow: visible;
    }

    .module-table:has(td[data-label]) td[data-label="Acciones"] {
        align-items: center;
    }
}
/* Mobile card action cells: keep text buttons readable. */
@media (max-width: 700px) {
    .module-table:has(td[data-label]) td[data-label="Acciones"] {
        align-items: center;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        min-height: 44px;
        padding-top: 12px;
    }

    .module-table:has(td[data-label]) td[data-label="Acciones"]::before {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }

    .module-table:has(td[data-label]) td[data-label="Acciones"] .btn,
    .module-table:has(td[data-label]) td[data-label="Acciones"] .icon-action {
        flex: 0 0 auto;
        overflow: visible;
    }
}

.terminal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.terminal-action-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .business-print-grid .business-print-row {
        grid-template-columns: 1fr;
    }

    .business-logo-card .business-row-heading {
        grid-template-columns: 1fr;
    }

    .business-logo-trigger {
        height: 78px;
        width: 170px;
    }
}
.sidebar-help {
    padding: 10px;
    border-top: 1px solid var(--app-border);
}

.sidebar-help a {
    position: relative;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--app-sidebar-text);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 0;
    font-weight: 700;
    text-align: left;
}

.sidebar-help a i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
}

.sidebar-help a:hover {
    background: rgba(0, 87, 200, 0.08);
    color: var(--app-primary);
}

.dashboard-layout .sidebar.collapsed .sidebar-help a {
    justify-content: center;
    padding-inline: 8px;
}

.dashboard-layout .sidebar.collapsed .sidebar-help span {
    display: none;
}

.dashboard-layout .sidebar.collapsed .sidebar-help [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translate(-4px, -50%);
    z-index: 2000;
    min-width: max-content;
    max-width: 220px;
    padding: 7px 10px;
    border-radius: 7px;
    background: #172033;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.1;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dashboard-layout .sidebar.collapsed .sidebar-help [data-tooltip]:hover::after,
.dashboard-layout .sidebar.collapsed .sidebar-help [data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.sidebar-brand span {
    min-width: 0;
    max-width: calc(var(--sidebar-open) - 76px);
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1025px) {
    .pos-workspace {
        align-items: stretch;
    }

    .pos-sale-column,
    .pos-products-column {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .pos-sale-panel,
    .pos-products-panel {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .pos-sale-panel .table-responsive,
    .pos-products-panel .table-responsive {
        flex: 1 1 auto;
        min-height: 300px;
        max-height: min(56vh, 620px);
        overflow: auto;
    }

    .pos-sale-panel .empty-state {
        min-height: 260px;
    }
}

.swal2-container {
    z-index: 5000 !important;
}

.compact-action-window {
    max-width: 520px;
    width: min(100%, 520px);
}

.compact-action-window .stats-inner-body {
    padding: 18px 28px 24px;
}

.compact-action-summary {
    display: grid;
    gap: 14px;
}

.compact-action-main {
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    justify-self: center;
    min-width: 132px;
    padding: 12px 16px;
    text-align: center;
}

.compact-action-main span,
.compact-action-grid span {
    color: var(--app-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.compact-action-main strong {
    color: var(--app-text);
    font-size: 1.45rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.compact-action-main small {
    color: var(--app-text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.compact-action-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-action-grid > div {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: 12px;
}

.compact-action-grid strong {
    color: var(--app-text);
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.compact-action-status {
    color: var(--app-muted);
    font-size: 0.9rem;
    min-height: 20px;
    text-align: center;
}

.compact-action-status.is-loading {
    color: var(--app-primary);
    font-weight: 700;
}

.compact-action-status.is-success {
    color: #16a34a;
    font-weight: 700;
}

.compact-action-status.is-error {
    color: #dc2626;
    font-weight: 700;
}

.compact-action-footer {
    display: flex;
    justify-content: center;
}

@media (max-width: 520px) {
    .compact-action-grid {
        grid-template-columns: 1fr;
    }
}
.app-modal[hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.app-modal {
    align-items: center;
    display: grid;
    inset: 0;
    justify-items: center;
    padding: 24px;
    position: fixed;
    z-index: 1250;
}

.app-modal-backdrop {
    background: rgba(15, 23, 42, 0.48);
    inset: 0;
    position: absolute;
}

.app-modal-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    max-height: calc(100vh - 48px);
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: min(1120px, calc(100vw - 48px));
    z-index: 1;
}

.app-modal-header {
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 18px 20px;
}

.app-modal-header h2 {
    color: var(--app-text);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.app-modal-body {
    max-height: calc(100vh - 140px);
    overflow: auto;
    padding: 18px 20px 20px;
}






.proveedores-panel,
.proveedores-archived-panel {
    width: min(980px, calc(100vw - 48px));
}

.proveedores-panel .app-modal-body,
.proveedores-archived-panel .app-modal-body {
    padding: 18px 20px 20px;
}

.productos-panel,
.productos-archived-panel,
.productos-history-panel,
.productos-report-panel {
    width: min(1120px, calc(100vw - 48px));
}

.productos-report-panel {
    width: min(1180px, calc(100vw - 48px));
}

.productos-panel .app-modal-body,
.productos-archived-panel .app-modal-body,
.productos-history-panel .app-modal-body,
.productos-report-panel .app-modal-body {
    padding: 18px 20px 20px;
}

.herramientas-credit-panel,
.herramientas-doc-panel,
.herramientas-apartados-panel,
.herramientas-stats-panel,
.herramientas-labels-panel,
.herramientas-news-panel {
    width: min(1120px, calc(100vw - 48px));
}

.herramientas-credit-panel .app-modal-body {
    padding: 18px 20px 20px;
}

.config-terminals-panel {
    width: min(1120px, calc(100vw - 48px));
}

.config-terminal-form-swal {
    border-radius: 10px !important;
}

.config-terminal-form-swal .swal2-html-container {
    max-height: calc(100vh - 220px);
    overflow: auto !important;
    text-align: left;
}

.config-emails-panel {
    width: min(1120px, calc(100vw - 48px));
}

.ventas-accounts-panel {
    width: min(980px, calc(100vw - 48px));
}

.ventas-charge-panel {
    width: min(1040px, calc(100vw - 48px));
}

.clientes-archived-panel {
    width: min(980px, calc(100vw - 48px));
}

.clientes-history-panel {
    width: min(1120px, calc(100vw - 48px));
}

.corte-movements-panel {
    width: min(960px, calc(100vw - 48px));
}

.corte-payments-panel {
    width: min(1120px, calc(100vw - 48px));
}

.corte-turns-panel {
    width: min(1120px, calc(100vw - 48px));
}

.corte-turn-detail-panel {
    width: min(1140px, calc(100vw - 48px));
}

.corte-turn-detail-panel .stats-inner-window {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    border: 0;
}

.corte-turn-detail-panel .app-modal-body {
    padding: 18px 18px 22px;
}

.corte-turn-detail-panel .turno-historico-window .stats-inner-body {
    overflow: visible;
    padding: 0;
}

.turno-historico-title {
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 0 0 14px;
}

.corte-turn-detail-panel .turno-historico-summary {
    gap: 8px;
    margin-bottom: 8px;
}

.corte-turn-detail-panel .turno-historico-summary article {
    border-radius: 6px;
    padding: 9px 11px;
}

.corte-turn-detail-panel .turno-historico-secondary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
    padding: 9px 11px;
}

.corte-turn-detail-panel .turno-historico-secondary span {
    min-width: 0;
    white-space: nowrap;
}

.corte-turn-detail-panel .turno-historico-card {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 12px 14px;
}

.corte-turn-detail-panel .turno-access-actions {
    align-items: center;
    justify-content: flex-end;
}

.corte-turn-detail-panel .turno-action-group,
.corte-turn-detail-panel .turno-export-group {
    gap: 6px;
}

.corte-turn-detail-panel .table-responsive {
    margin-top: 2px;
}

.corte-turn-detail-panel .turno-historico-table {
    min-width: 980px;
    width: 100%;
}

.corte-turn-detail-panel .turno-historico-table th,
.corte-turn-detail-panel .turno-historico-table td {
    padding-left: 10px;
    padding-right: 10px;
}

.corte-turn-detail-panel .turno-historico-table th:nth-child(9),
.corte-turn-detail-panel .turno-historico-table td:nth-child(9) {
    min-width: 124px;
    text-align: left;
    width: 124px;
}

.corte-turn-detail-panel .turno-row-actions {
    justify-content: flex-start;
    width: 100%;
}

.corte-turn-detail-panel .empty-state {
    padding: 42px 16px;
}

@media (max-width: 980px) {
    .corte-turn-detail-panel .turno-historico-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .corte-turn-detail-panel .turno-historico-card {
        grid-template-columns: 1fr;
    }

    .corte-turn-detail-panel .turno-access-actions {
        justify-content: flex-start;
    }
}

.config-price-list-panel {
    width: min(980px, calc(100vw - 48px));
}

.config-taxes-panel {
    width: min(920px, calc(100vw - 48px));
}

.config-categories-panel {
    width: min(920px, calc(100vw - 48px));
}

.config-payments-panel {
    width: min(920px, calc(100vw - 48px));
}

.config-email-form-swal {
    border-radius: 10px !important;
}

.config-email-form-swal .swal2-html-container {
    max-height: calc(100vh - 220px);
    overflow: auto !important;
    text-align: left;
}

.config-users-panel {
    width: min(1120px, calc(100vw - 48px));
}

.config-users-panel .stats-inner-overlay {
    z-index: 2;
}

.config-price-list-form-swal {
    border-radius: 10px !important;
}

.config-price-list-form-swal .swal2-html-container {
    max-height: calc(100vh - 220px);
    overflow: auto !important;
    text-align: left;
}

.config-tax-form-swal {
    border-radius: 10px !important;
}

.config-tax-form-swal .swal2-html-container {
    overflow: visible !important;
    text-align: left;
}

.config-category-form-swal {
    border-radius: 10px !important;
}

.config-category-form-swal .swal2-html-container {
    overflow: visible !important;
    text-align: left;
}

.config-payment-form-swal {
    border-radius: 10px !important;
}

.config-payment-form-swal .swal2-html-container {
    overflow: visible !important;
    text-align: left;
}

.icon-only {
    min-width: 40px;
    padding-inline: 0;
}

.compact-action-swal {
    border-radius: 10px !important;
}

.compact-action-swal .swal2-html-container {
    overflow: visible !important;
}


.config-user-form-swal,
.config-permissions-swal {
    border-radius: 10px !important;
}

.config-user-form-swal .swal2-html-container,
.config-permissions-swal .swal2-html-container {
    max-height: calc(100vh - 220px);
    overflow: auto !important;
    text-align: left;
}

@media (max-width: 720px) {
    .app-modal {
        padding: 12px;
    }

    .app-modal-panel,
    .config-users-panel {
        max-height: calc(100vh - 24px);
        width: calc(100vw - 24px);
    }

    .app-modal-header {
        padding: 14px;
    }

    .app-modal-body {
        max-height: calc(100vh - 116px);
        padding: 14px;
    }
}


.herramientas-doc-panel {
    width: min(1280px, calc(100vw - 48px));
}

.herramientas-doc-panel .module-split {
    grid-template-columns: minmax(500px, 1fr) minmax(560px, 1fr);
    overflow-x: auto;
}

.herramientas-doc-panel .module-panel {
    min-width: 0;
}

.herramientas-doc-panel .table-responsive {
    overflow-x: auto;
}

.herramientas-doc-panel .doc-products-table {
    min-width: 640px;
    table-layout: auto;
}

.herramientas-doc-panel .doc-products-table th:first-child,
.herramientas-doc-panel .doc-products-table td:first-child {
    min-width: 230px;
}

.herramientas-doc-panel .doc-product-cell {
    grid-template-columns: 44px minmax(170px, 1fr);
}

.herramientas-doc-panel .doc-product-cell strong,
.herramientas-doc-panel .doc-product-cell span {
    overflow-wrap: normal;
    word-break: normal;
}


@media (max-width: 980px) {
    .loginShell {
        grid-template-columns: 1fr;
    }

    .loginHero {
        min-height: auto;
        padding: 118px 24px 42px;
    }

    .loginBrandMini {
        top: 96px;
        left: 24px;
    }

    .loginHero h1 {
        font-size: clamp(2.15rem, 10vw, 3.4rem);
    }

    .loginStats {
        margin-top: 32px;
        gap: 18px 26px;
    }

    .loginPanel {
        min-height: auto;
        padding: 34px 18px 82px;
    }
}

@media (max-width: 560px) {
    .loginHero {
        padding-left: 18px;
        padding-right: 18px;
    }

    .loginHero p {
        font-size: 1rem;
    }

    .loginStats div {
        min-width: 96px;
    }

    .loginCard {
        padding: 26px 22px 24px;
    }

    .loginCardHead strong {
        font-size: 1.35rem;
    }

    .loginMeta {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

/* Compacta el usuario del navbar en pantallas chicas. */
@media (max-width: 720px) {
    .profile-meta {
        display: none;
    }

    .profile-button {
        gap: 8px;
    }
}


/* Ajustes responsive del login publico: evita encimados con el menu fijo. */
.loginShell {
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.loginHero,
.loginPanel {
    min-height: calc(100vh - var(--navbar-height));
}

.loginBrandMini {
    top: 34px;
}

@media (max-width: 1280px) {
    .loginShell {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 0.88fr);
    }

    .loginHeroContent {
        max-width: 680px;
    }

    .loginHero {
        padding: 38px clamp(24px, 5vw, 64px);
    }

    .loginBrandMini {
        top: 32px;
    }

    .loginPill {
        max-width: 100%;
        white-space: normal;
        line-height: 1.2;
        font-size: 0.9rem;
    }

    .loginHero h1 {
        margin-top: 22px;
        font-size: clamp(2.1rem, 4.6vw, 3.45rem);
        line-height: 1.06;
    }

    .loginHero p {
        font-size: 1rem;
    }

    .loginStats {
        margin-top: 40px;
        gap: 22px 36px;
    }

    .loginPanel {
        padding: 48px 24px 76px;
    }
}

@media (max-width: 1100px) {
    .loginShell {
        grid-template-columns: 1fr;
    }

    .loginHero,
    .loginPanel {
        min-height: auto;
    }

    .loginHero {
        padding: 34px 24px 38px;
    }

    .loginBrandMini {
        position: static;
        margin-bottom: 18px;
    }

    .loginHero h1 {
        max-width: 760px;
        font-size: clamp(2rem, 7vw, 3.15rem);
    }

    .loginHero p {
        max-width: 720px;
    }

    .loginStats {
        margin-top: 30px;
    }

    .loginPanel {
        padding: 36px 20px 88px;
    }

    #login {
        width: min(460px, 100%);
    }
}

@media (max-width: 640px) {
    .menufixed img {
        max-height: 48px;
    }

    .loginHero {
        padding: 28px 18px 32px;
    }

    .loginBrandMini {
        margin-bottom: 18px;
    }

    .loginPill {
        font-size: 0.82rem;
        padding: 8px 12px;
    }

    .loginHero h1 {
        margin-top: 20px;
        font-size: clamp(1.85rem, 10vw, 2.55rem);
    }

    .loginStats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .loginStats div {
        min-width: 0;
    }

    .loginStats strong {
        font-size: 1.25rem;
    }

    .loginStats span {
        font-size: 0.76rem;
    }

    .loginPanel {
        padding: 28px 14px 84px;
    }

    .loginCard {
        padding: 24px 20px;
    }
}


/* Pulido extra del bloque superior del login en ventanas medianas. */
@media (max-width: 1280px) and (min-width: 1101px) {
    .loginBrandMini {
        top: 26px;
    }

    .loginBrandMini strong {
        font-size: 0.95rem;
        line-height: 1.05;
    }

    .loginBrandMini small {
        margin-top: 4px;
        font-size: 0.8rem;
        line-height: 1.05;
    }

    .loginPill {
        margin-top: 18px;
        font-size: 0.84rem;
    }

    .loginHero h1 {
        margin-top: 26px;
        font-size: clamp(1.95rem, 4.15vw, 3.15rem);
        line-height: 1.08;
    }
}


/* En ventanas medianas el logo superior ya identifica el sistema; ocultamos la marca interna para evitar encimado visual. */
@media (max-width: 1280px) and (min-width: 1101px) {
    .loginBrandMini {
        display: none;
    }

    .loginPill {
        margin-top: 0;
    }

    .loginHero h1 {
        margin-top: 28px;
        font-size: clamp(1.85rem, 3.95vw, 3rem);
        line-height: 1.1;
    }
}


/* Separacion definitiva del label superior del login. */
.loginPill {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 34px 0 0;
}

.loginHero h1 {
    margin-top: 30px;
}

@media (max-width: 1280px) and (min-width: 1101px) {
    .loginPill {
        margin-top: 46px;
        font-size: 0.84rem;
    }

    .loginHero h1 {
        margin-top: 30px;
        font-size: clamp(1.85rem, 3.95vw, 3rem);
        line-height: 1.1;
    }
}

@media (max-width: 1100px) {
    .loginPill {
        margin-top: 22px;
    }
}

@media (max-width: 640px) {
    .loginPill {
        width: auto;
        margin-top: 18px;
    }
}

