:root {
    --bg-1: #f3f1ee;
    --bg-2: #e9e5e0;
    --nav: #161616;
    --nav-2: #0f0f10;
    --panel: #ffffff;
    --line: #ddd6d2;
    --text: #191919;
    --muted: #6e7075;
    --brand: #d60f17;
    --brand-2: #ff2b32;
    --brand-soft: #fff0f1;
    --danger: #c43b3b;
    --shadow: 0 18px 36px rgba(16, 16, 18, 0.14);
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    margin: 0;
    font-family: "Barlow", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, #f5e7e7 0%, transparent 34%),
        radial-gradient(circle at 100% 20%, #e7ebea 0%, transparent 36%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(214, 15, 23, 0.24), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(255, 43, 50, 0.14), transparent 24%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 26%),
        linear-gradient(145deg, #111113 0%, #161619 38%, #221215 72%, #0f1012 100%);
}

.login-shell {
    min-height: 100vh;
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 18px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 14px;
    align-items: stretch;
}

.login-showcase {
    background:
        radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.1), transparent 32%),
        linear-gradient(150deg, #181818 0%, #212124 54%, #381215 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 54px rgba(16, 33, 67, 0.25);
}

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.login-brand-row h1 {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.03em;
}

.login-brand-wordmark {
    display: block;
    height: 42px;
    width: auto;
    max-width: min(280px, 100%);
    object-fit: contain;
}

.login-brand-row p {
    margin: 2px 0 0;
    opacity: 0.9;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.login-brand-row-tight {
    margin-bottom: 10px;
    justify-content: center;
    text-align: center;
}

.login-brand-row-tight .login-brand-wordmark {
    height: 74px;
    max-width: min(460px, 100%);
}

.login-showcase h2 {
    margin: 0 0 10px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.45rem;
    line-height: 1.22;
}

.login-showcase p {
    margin: 0 0 14px;
    line-height: 1.55;
    opacity: 0.95;
    font-size: 0.92rem;
}

.login-showcase ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
    display: grid;
    align-content: center;
}

.login-card h3 {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.2rem;
}

.login-card p {
    margin: 6px 0 14px;
    color: #5f6f8b;
    font-size: 0.86rem;
}

.login-alert {
    margin-bottom: 10px;
    border: 1px solid #f0cccc;
    background: #fff5f5;
    color: #8f2f2f;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.83rem;
}

.login-success {
    margin-bottom: 10px;
    border: 1px solid #bde4ce;
    background: #effcf4;
    color: #236847;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.83rem;
}

.login-demo {
    margin-top: 12px;
    border-top: 1px solid #e7eef9;
    padding-top: 10px;
    color: #637392;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.login-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 9px;
}

.onboarding-card {
    align-content: flex-start;
}

.auth-shell {
    width: min(1220px, 100%);
    grid-template-columns: minmax(380px, 1fr) minmax(380px, 1fr);
    gap: 18px;
    padding: 24px;
    align-items: stretch;
}

.auth-card {
    border-radius: 20px;
    border: 1px solid #dfd8cc;
    box-shadow: 0 24px 56px rgba(25, 29, 35, 0.12);
    padding: 24px;
    align-content: start;
    gap: 0;
}

.auth-kicker {
    display: inline-flex;
    width: auto;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #a10f18;
    background: #fff0f2;
    border: 1px solid #f3ccd0;
}

.auth-card h3 {
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
    line-height: 1.06;
    margin-bottom: 10px;
}

.auth-step {
    margin: 4px 0 10px;
    color: #5f6f8b;
    font-size: 0.86rem;
}

.auth-social {
    display: grid;
    gap: 8px;
}

.auth-social-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid #d4deed;
    background: #ffffff;
    color: #1b2a44;
    font-weight: 700;
    padding: 9px 12px;
}

.auth-social-btn[disabled] {
    opacity: 0.66;
    cursor: not-allowed;
}

.auth-social-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf2ff;
    color: #2e5fcc;
    font-size: 0.84rem;
    font-weight: 700;
}

.auth-divider {
    position: relative;
    margin: 12px 0 10px;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 1px solid #e0e8f5;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    background: #ffffff;
    color: #73829f;
    font-size: 0.78rem;
    padding: 0 8px;
}

.auth-form .field-label input,
.auth-form .field-label select {
    min-height: 44px;
    border-radius: 10px;
}

.auth-actions {
    margin-top: 6px;
    gap: 7px;
}

.auth-actions .btn-secondary {
    background: #f7faff;
}

.auth-showcase {
    border-radius: 20px;
    padding: 0;
    display: grid;
    align-content: stretch;
    gap: 0;
    min-height: min(720px, calc(100vh - 48px));
    background:
        radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.22), transparent 35%),
        radial-gradient(circle at 84% 22%, rgba(131, 249, 222, 0.17), transparent 28%),
        linear-gradient(145deg, #163979, #2f61d8 52%, #4e7ff2);
    overflow: hidden;
}

.auth-showcase-art {
    margin-top: 0;
    border-radius: 0;
    border: 0;
    background: rgba(17, 38, 79, 0.2);
    min-height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.auth-showcase-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    z-index: 0;
    filter: saturate(1.03) contrast(1.04);
    transform: scale(1.02);
}

.auth-window {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 0;
    border: 0;
    background:
        linear-gradient(180deg, rgba(14, 33, 70, 0.32), rgba(14, 33, 70, 0.08)),
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 35%);
    z-index: 1;
}

.login-card.auth-card {
    width: min(560px, 100%);
    min-height: min(720px, calc(100vh - 48px));
    justify-self: center;
    justify-items: stretch;
    align-content: center;
}

.login-card.auth-card > * {
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.login-card.auth-card .auth-kicker,
.login-card.auth-card .login-brand-row-tight {
    max-width: none;
}

.login-card.auth-card .auth-kicker,
.login-card.auth-card h3,
.login-card.auth-card > p {
    text-align: center;
}

.login-card.auth-card .auth-kicker {
    justify-self: center;
}

.login-card.auth-card .field-label {
    text-align: left;
}

.login-card.auth-card .auth-actions {
    align-items: stretch;
}

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
    transition: grid-template-columns 0.25s ease;
}

.layout.sidebar-collapsed {
    grid-template-columns: 74px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, var(--nav), var(--nav-2));
    color: #dce7f2;
    border-right: 1px solid #26384c;
    padding: 16px 10px;
    overflow: hidden;
    transition: padding 0.25s ease;
}

.layout.sidebar-collapsed .sidebar {
    padding: 16px 8px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(125deg, var(--brand), var(--brand-2));
    border: 1px solid rgba(214, 15, 23, 0.38);
    color: #ffffff;
}

.brand-mark-logo {
    background: #ffffff;
    border: 1px solid rgba(214, 15, 23, 0.18);
    color: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
}

.brand-logo-icon {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    display: block;
    flex: 0 0 24px;
}

.brand-toggle {
    cursor: pointer;
}

.brand-toggle:hover {
    filter: brightness(1.05);
}

.menu {
    display: grid;
    gap: 8px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c4d2e2;
    font-weight: 600;
    border-radius: 11px;
    padding: 10px;
    border: 1px solid transparent;
    background: transparent;
}

.menu-icon {
    width: 20px;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 16px;
    height: 16px;
}

.menu-label {
    white-space: nowrap;
    font-size: 0.95rem;
}

.menu a.active,
.menu a:hover {
    background: rgba(214, 15, 23, 0.16);
    border-color: rgba(255, 43, 50, 0.35);
    color: #fff4f4;
}

.layout.sidebar-collapsed .brand-mark {
    margin: 0 auto;
}

.layout.sidebar-collapsed .menu a {
    justify-content: center;
    padding: 12px 8px;
}

.layout.sidebar-collapsed .menu-label {
    display: none;
}

.main {
    padding: 0;
    min-width: 0;
}

.topbar {
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 8px 20px rgba(26, 32, 40, 0.06);
    padding: 11px 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-left {
    min-height: 1px;
    gap: 12px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.topbar-brand-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.mobile-menu-btn {
    display: none;
}

.crumb {
    color: #6b7992;
    font-size: 0.86rem;
}

.topbar-menu {
    position: relative;
}

.icon-btn {
    position: relative;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid #d8d5cc;
    background: #fffdf8;
    color: #4e5d67;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

.dot-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    font-size: 0.62rem;
    background: #e94f4f;
    color: #fff;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #d8d5cc;
    border-radius: 10px;
    padding: 2px 6px 2px 8px;
    cursor: pointer;
}

.user-box:hover {
    background: #f7f9ff;
}

.user-name {
    display: block;
    font-size: 0.8rem;
    color: #314a75;
}

.user-email {
    display: block;
    color: #7b88a2;
    font-size: 0.66rem;
    margin-top: 1px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #171a1f, #d60f17);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.user-avatar-icon {
    width: 17px;
    height: 17px;
    display: block;
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border: 1px solid #dce5f3;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(18, 37, 70, 0.16);
    z-index: 40;
}

.dropdown.hidden {
    display: none;
}

.dropdown-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #ebf1fa;
}

.dropdown-list {
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 240px;
    overflow: auto;
}

.dropdown-list li {
    margin: 0;
}

.dropdown-item {
    display: grid;
    gap: 2px;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: #172c54;
    padding: 7px 9px;
    border-radius: 8px;
}

.dropdown-item:hover {
    background: #f5f8ff;
    border-color: #e4ecf9;
}

.dropdown-item small {
    color: #6a7fa6;
    font-size: 0.7rem;
}

.dropdown-item.unread strong::before {
    content: "• ";
    color: #e94f4f;
}

.link-btn {
    border: 0;
    background: transparent;
    color: #2f5faa;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
}

.menu-action {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: #162949;
    border-radius: 8px;
    padding: 8px 9px;
}

.menu-action:hover {
    background: #f5f8ff;
    border-color: #e4ecf9;
}

.menu-action.danger {
    color: #b53737;
}

.dropdown-list.compact {
    max-height: none;
}

.header {
    margin: 0;
    padding: 10px 14px 6px;
}

.tag {
    margin: 0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.header h2 {
    margin: 4px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.015em;
}

.content {
    background: transparent;
    border: 0;
    border-radius: 20px;
    box-shadow: none;
    padding: 0 14px 14px;
}

.hero {
    margin-bottom: 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 2px 4px;
}

.hero h3 {
    margin: 0 0 4px;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.98rem;
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.card {
    background: #fff;
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    padding: 11px;
    box-shadow: 0 10px 24px rgba(25, 31, 38, 0.08);
    border-top: 4px solid #2f7f76;
}

.card h4 {
    margin: 0;
    font-size: 0.72rem;
    color: var(--muted);
}

.card p {
    margin: 6px 0 0;
    font-size: 1.04rem;
    font-weight: 700;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.settings-ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 12px;
    align-items: start;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.report-filters-grid {
    grid-template-columns: repeat(2, minmax(170px, 220px)) 1fr;
    align-items: end;
}

.report-filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.report-filter-actions button {
    width: auto;
    min-width: 150px;
}

.report-list {
    display: grid;
    gap: 7px;
}

.report-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5ecf8;
    border-radius: 9px;
    padding: 8px 9px;
    background: #f9fbff;
    font-size: 0.82rem;
}

.report-list-row strong {
    color: #20375f;
    font-size: 0.8rem;
}

.report-list-row span {
    color: #4f6081;
    text-align: right;
    font-size: 0.78rem;
}

.report-bars {
    display: grid;
    gap: 6px;
}

.report-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.report-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #eaf0fb;
    overflow: hidden;
}

.report-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
}

.report-empty {
    margin: 0;
    color: #697895;
    font-size: 0.8rem;
}

.report-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.report-tab {
    width: auto;
    border: 1px solid #cfddf5;
    background: #f4f8ff;
    color: #2a4f95;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 0.82rem;
}

.report-tab.active {
    background: linear-gradient(120deg, #2f61d8, #4b7af1);
    color: #fff;
    border-color: transparent;
}

.report-tab-pane {
    display: none;
}

.report-tab-pane.active {
    display: block;
}

.report-chart-wrap {
    position: relative;
    height: 280px;
    width: 100%;
}

.pos-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 10px;
}

.pos-grid.ticket-collapsed {
    grid-template-columns: 1fr;
}

.pos-grid.ticket-collapsed #sales-ticket-panel {
    display: none;
}

.panel {
    background: var(--panel);
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    padding: 11px;
    box-shadow: 0 10px 22px rgba(18, 24, 31, 0.07);
}

.panel h4 {
    margin: 0 0 8px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-pill.ok {
    background: #e7f7ef;
    color: #136746;
}

.status-pill.warn {
    background: #fff1e7;
    color: #8b4c1d;
}

.btn-compact {
    width: auto;
    min-width: 118px;
    padding: 6px 9px;
    font-size: 0.76rem;
}

.customer-form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.customer-form-actions button {
    width: auto;
    min-width: 160px;
    padding: 8px 12px;
}

.customer-actions-anchor {
    grid-column: 1 / -1;
    align-self: end;
    width: 100%;
}

.customer-actions-anchor .customer-form-actions {
    margin-top: 0;
}

.customer-fiscal-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e5ddd1;
    border-radius: 12px;
    background: #fbfaf8;
}

.customer-fiscal-toggle-label {
    font-weight: 700;
    color: #314055;
}

.customer-fiscal-toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f6f8b;
    font-size: 0.9rem;
}

.customer-fiscal-toggle-control input[type="checkbox"] {
    width: auto;
    min-width: auto;
}

.customer-fiscal-fields {
    padding: 12px;
    border: 1px dashed #d8d5cc;
    border-radius: 12px;
    background: #fffdfa;
}

.product-form-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.product-sku-field {
    grid-column: span 1;
}

.product-name-field {
    grid-column: span 2;
}

.product-margin-combo {
    position: relative;
}

.product-margin-combo input {
    width: 100%;
    padding-right: 38px;
}

.product-margin-combo-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 34px;
    min-width: 34px;
    height: calc(100% - 2px);
    border-radius: 0 9px 9px 0;
    border: 0;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #425774;
    background: linear-gradient(180deg, #f8fafc, #edf2f8);
    border-left: 1px solid #d7dee8;
    padding: 0;
}

.product-margin-combo-toggle:hover {
    background: linear-gradient(180deg, #eef4fb, #e3ebf5);
    color: #223b63;
}

.product-margin-combo-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid #d6dee9;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f9fbfe);
    box-shadow: 0 16px 28px rgba(18, 24, 31, 0.14);
    max-height: 240px;
    overflow-y: auto;
}

.product-margin-option {
    width: 100%;
    border: 1px solid #e1e8f2;
    background: #ffffff;
    color: #304966;
    box-shadow: none;
    text-align: left;
    padding: 8px 10px;
    min-height: 36px;
}

.product-margin-option:hover {
    background: #f3f7fc;
    border-color: #cfdae8;
    color: #1e3557;
}

.product-suppliers-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(360px, 2fr);
    gap: 10px;
}

.product-inline-check-field {
    justify-content: center;
    align-items: center;
}

.product-inline-check-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    color: #314055;
}

.product-inline-check-control input[type="checkbox"] {
    width: auto;
    min-width: auto;
}

.products-toolbar {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.products-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

.products-search-field {
    margin: 0;
}

.products-filters-toggle-btn {
    display: none;
}

.products-add-btn {
    width: auto;
    min-width: 190px;
    justify-self: end;
}

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

.products-table-shell {
    width: 100%;
}

.products-col-part {
    word-break: break-word;
}

.products-col-money,
.products-col-int,
.products-col-margin {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.products-col-money {
    text-align: right;
}

.products-col-margin {
    text-align: right;
}

.products-col-int {
    text-align: center;
}

.products-col-actions {
    white-space: nowrap;
    width: 120px;
    min-width: 120px;
}

.products-actions-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.customers-credit-days-label-tc {
    display: none;
}

.customers-discount-label-tc {
    display: none;
}

.multi-combo {
    position: relative;
}

.multi-combo-trigger {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #d8c7af;
    background: #fff;
    color: #1f2a44;
    padding: 9px 12px;
    text-align: left;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: none;
}

.multi-combo-trigger::after {
    content: "▾";
    float: right;
    color: #66789c;
}

.multi-combo-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 320px;
    z-index: 35;
    background: #fff;
    border: 1px solid #d8e2f1;
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(18, 24, 31, 0.12);
    padding: 6px;
}

.multi-combo-options {
    max-height: 220px;
    overflow: auto;
    display: grid;
    gap: 4px;
}

.multi-combo-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.multi-combo-option:hover {
    background: #f4f8ff;
}

.multi-combo-option input[type="checkbox"] {
    margin: 0;
    justify-self: center;
}

.multi-combo-option span {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-size: 0.84rem;
    font-weight: 600;
    color: #30415f;
}

.multi-combo-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.products-filters-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 8px 10px;
}

.products-filters-stack {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.products-filters-stack .products-filters-grid {
    margin-top: 0;
}

.draft-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.tabs-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tab-chip {
    border: 1px solid #cfdff3;
    background: #eef4ff;
    color: #0f1e3b;
    border-radius: 999px;
    padding: 3px 5px 3px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-chip small {
    color: #49628f;
    font-weight: 600;
    font-size: 0.74rem;
}

.tab-chip.active {
    background: linear-gradient(120deg, #0e8474, #14a68d);
    border-color: transparent;
    color: white;
}

.tab-chip.active small {
    color: rgba(255, 255, 255, 0.92);
}

.tab-open-btn {
    background: transparent;
    color: inherit;
    border: 0;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.tab-close-btn {
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    border: 0;
    width: 21px;
    height: 21px;
    min-width: 21px;
    border-radius: 999px;
    line-height: 1;
    padding: 0;
}

.tab-chip.active .tab-close-btn {
    background: rgba(255, 255, 255, 0.22);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 24, 51, 0.5);
    display: grid;
    place-items: center;
    z-index: 50;
    padding: 14px;
    overflow: auto;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    width: min(720px, 100%);
    background: #fff;
    border: 1px solid #dce6f6;
    border-radius: 13px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
    padding: 11px;
    max-height: calc(100vh - 28px);
    overflow: auto;
}

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

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

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

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-head h4 {
    margin: 0;
}

.modal-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-toggle-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid #cfdff3;
    background: #eef4ff;
    color: #274682;
    padding: 0;
    font-weight: 700;
}

.icon-toggle-btn.is-active {
    background: linear-gradient(120deg, #0e8474, #14a68d);
    border-color: transparent;
    color: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 7px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.field-label {
    display: grid;
    gap: 4px;
    align-content: start;
}

.field-label span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5b6b87;
}

.field-label.is-required span::after {
    content: " *";
    color: #d94b3d;
}

.field-label.is-required input,
.field-label.is-required select,
.field-label.is-required textarea {
    border-color: #efb2a8;
    background: #fff8f6;
}

.field-static {
    min-height: 42px;
    border: 1px solid #d9e0ec;
    border-radius: 12px;
    background: #f8fbff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    color: #223047;
}

.customers-balances-toolbar {
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.customers-balances-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.cash-current-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.7fr);
    gap: 18px;
    align-items: start;
}

.cash-current-main {
    min-width: 0;
}

.cash-current-actions {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dce6f6;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.cash-current-actions h5 {
    margin: 0 0 4px 0;
    color: #4a5b78;
    font-size: 0.9rem;
}

.cash-sessions-table-shell {
    width: 100%;
}

.cash-current-board {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
    gap: 14px;
    margin-bottom: 12px;
}

.cash-current-meta {
    display: grid;
    gap: 12px;
}

.cash-session-hero {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid #dce6f6;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.cash-session-hero small {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a89a5;
    font-weight: 700;
}

.cash-session-hero strong {
    font-size: 1.15rem;
    color: #223047;
}

.cash-session-hero span {
    color: #5d6e8b;
}

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

.cash-metric-tile {
    border: 1px solid #dce6f6;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 4px;
}

.cash-metric-tile span {
    color: #6b7b97;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cash-metric-tile strong {
    color: #20324f;
    font-size: 1.05rem;
}

.cash-movements-preview {
    border: 1px solid #dce6f6;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 12px;
}

.cash-movements-list {
    display: grid;
    gap: 10px;
}

.cash-movement-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e6edf8;
    border-radius: 14px;
    background: #f9fbff;
}

.cash-movement-row > div {
    display: grid;
    gap: 3px;
}

.cash-movement-row strong {
    color: #223047;
}

.cash-movement-row span {
    color: #61728e;
    font-size: 0.88rem;
}

.cash-empty-state {
    min-height: 180px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border: 1px dashed #cddaf0;
    border-radius: 16px;
    background: linear-gradient(180deg, #fcfdff 0%, #f5f8ff 100%);
}

.cash-empty-state strong {
    font-size: 1.1rem;
    color: #223047;
}

.cash-empty-state p,
.cash-empty-inline {
    margin: 0;
    color: #607092;
}

.cash-movements-table-wrap {
    margin-top: 0;
}

.status-note {
    color: #607092;
    font-size: 0.78rem;
}

.checkout-payment-field {
    display: block;
}

.checkout-payment-block {
    display: grid;
    gap: 4px;
    align-content: start;
}

.checkout-payment-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5b6b87;
}

.checkout-subtoggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5b6b87;
    font-size: 0.69rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.checkout-subtoggle input {
    margin: 0;
}

.checkout-subtoggle-text {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    color: inherit;
}

.checkout-subtoggle-row {
    justify-self: start;
    padding: 2px 0;
}

@media (max-width: 1100px) {
    .cash-current-layout,
    .cash-current-board {
        grid-template-columns: 1fr;
    }
}

.customer-payment-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(320px, 1.8fr);
    gap: 14px;
    align-items: start;
}

.customer-payment-summary-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-payment-summary-main strong {
    font-size: 1.05rem;
    color: #20324f;
}

.customer-payment-summary-main span {
    color: #556681;
    font-size: 0.9rem;
}

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

.customer-payment-summary-meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-payment-summary-meta span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7383a0;
}

.customer-payment-summary-meta strong {
    color: #223047;
    font-size: 0.96rem;
}

@media (max-width: 900px) {
    .customer-payment-summary {
        grid-template-columns: 1fr;
    }
}

.field-span-all {
    grid-column: 1 / -1;
}

.input-name-lg input {
    min-height: 42px;
    font-size: 0.98rem;
}

.modal-actions {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    align-content: end;
}

.modal-actions button {
    width: 100%;
}

.modal-split {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
    gap: 10px;
    align-items: start;
}

.modal-split-col {
    display: grid;
    gap: 8px;
}

.movement-head-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 7px;
}

.movement-head-grid .movement-head-field {
    grid-column: span 2;
}

.movement-head-grid .movement-notes-field {
    grid-column: span 6;
}

#purchase-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

#restock-order-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

#purchase-form .purchase-head-field,
#restock-order-form .purchase-head-field {
    grid-column: span 2;
}

#purchase-form .purchase-notes-field,
#restock-order-form .purchase-notes-field {
    grid-column: span 6;
}

.section-toolbar {
    justify-content: space-between;
    align-items: flex-end;
}

.inventory-actions-toolbar {
    align-items: flex-end;
}

.inventory-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.inventory-actions-group button {
    width: auto;
    min-width: 150px;
}

.inventory-actions-group .export-icon-btn,
.modal-actions .export-icon-btn {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #d7dfec;
    background: #fbfcff;
    color: #50627c;
    box-shadow: none;
}

.inventory-actions-group .export-icon-btn:hover,
.modal-actions .export-icon-btn:hover {
    background: #eef4ff;
    color: #284a84;
}

.configuration-facturacion-stack {
    display: grid;
    gap: 10px;
}

.facturacion-status-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.facturacion-status-cards .card {
    gap: 6px;
}

.facturacion-status-cards .card span {
    font-size: 1.02rem;
    font-weight: 800;
    color: #173057;
}

.facturacion-emisor-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.facturacion-emisor-grid .field-label {
    min-width: 0;
}

.facturacion-emisor-status {
    margin: 0;
    color: #5f6f8b;
    font-size: 0.82rem;
}

.facturacion-csd-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.facturacion-csd-banner p {
    margin: 0;
    color: #5f6f8b;
}

.facturacion-csd-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #bfe7d3;
    background: #eefcf3;
    color: #176947;
    font-weight: 800;
}

.facturacion-csd-delete-form,
.facturacion-csd-upload-grid {
    margin-top: 4px;
}

@media (max-width: 900px) {
    .facturacion-status-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facturacion-emisor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .facturacion-status-cards,
    .facturacion-emisor-grid {
        grid-template-columns: 1fr;
    }

    .facturacion-csd-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

.inventory-stock-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.inventory-filters-toggle-btn {
    display: none;
}

.purchases-order-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.purchases-order-actions .icon-action-btn {
    margin-right: 0;
}

.restock-notes-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.section-search {
    margin: 0;
    min-width: min(380px, 100%);
}

input,
select,
textarea,
button {
    width: 100%;
    font: inherit;
    border-radius: 8px;
    border: 1px solid #d9d4ca;
    padding: 9px 10px;
    font-size: 0.92rem;
}

textarea {
    grid-column: 1 / -1;
    min-height: 72px;
}

button {
    border: 0;
    color: #fff;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(214, 15, 23, 0.24);
}

.btn-secondary {
    border: 1px solid #d5ddd6;
    color: #285f59;
    background: #eef5f2;
    box-shadow: none;
}

.icon-btn,
.user-box,
.tab-open-btn,
.tab-close-btn,
.link-btn {
    width: auto;
}

.btn-danger {
    background: var(--danger);
    padding: 5px 8px;
    font-size: 0.75rem;
}

.btn-success {
    background: #229062;
    padding: 5px 8px;
    font-size: 0.75rem;
}

.icon-action-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #d6dfed;
    background: #fff;
    color: #415273;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-right: 4px;
}

.icon-action-btn svg {
    width: 16px;
    height: 16px;
}

.icon-action-btn.success {
    color: #1f7f58;
    border-color: #b5e2ce;
    background: #ecfbf3;
}

.icon-action-btn.danger {
    color: #b53f3f;
    border-color: #f1c7c7;
    background: #fff1f1;
}

.sales-history-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sales-history-actions .icon-action-btn {
    margin-right: 0;
}

.pos-num-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 78px;
    padding: 8px 9px;
}

.pos-discount-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 112px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f2f6fe;
    color: #2b3f63;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.ticket-summary {
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.ticket-summary-rows {
    width: 100%;
    border: 1px solid #dbe5f4;
    border-radius: 10px;
    background: #fbfcff;
    padding: 8px 10px;
    display: grid;
    gap: 4px;
}

.ticket-summary-row {
    display: grid;
    grid-template-columns: 1fr minmax(170px, auto);
    gap: 8px;
    align-items: center;
    font-size: 0.83rem;
}

.ticket-summary-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 170px;
}

.ticket-summary-row span {
    color: #5f6f8b;
}

.ticket-summary-row strong {
    font-size: 0.92rem;
    color: #1d2a42;
    font-variant-numeric: tabular-nums;
}

.ticket-summary-row.total {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #cad8ee;
}

.ticket-summary-row.total span,
.ticket-summary-row.total strong {
    font-weight: 700;
    color: #12253f;
}

.ticket-summary-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ticket-summary-edit small {
    color: #5f6f8b;
    font-size: 0.8rem;
}

.customer-walk-in-card {
    margin-bottom: 12px;
    border: 1px solid #dce6f6;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff 0%, #f5f8ff 100%);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.customer-walk-in-card-head {
    display: grid;
    grid-template-columns: 56px minmax(160px, 1.6fr) minmax(90px, 0.9fr) minmax(120px, 1fr) minmax(140px, 1.1fr) minmax(72px, 0.8fr) minmax(84px, 0.9fr) minmax(96px, 1fr) minmax(96px, 1fr) minmax(110px, 1fr) 34px;
    align-items: center;
    gap: 10px;
}

.customer-walk-in-card-head > div {
    grid-column: 2 / 11;
}

.customer-walk-in-card-head .icon-action-btn {
    grid-column: 11;
    justify-self: start;
    margin-right: 0;
}

.customer-walk-in-card-kicker {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #cfe0fb;
    background: #eef4ff;
    color: #244a92;
    font-size: 0.72rem;
    font-weight: 700;
}

.customer-walk-in-card-title {
    margin: 4px 0 0;
    font-size: 1rem;
    color: #20324f;
}

.customer-walk-in-card-meta {
    display: grid;
    grid-template-columns: 56px minmax(160px, 1.6fr) minmax(90px, 0.9fr) minmax(120px, 1fr) minmax(140px, 1.1fr) minmax(72px, 0.8fr) minmax(84px, 0.9fr) minmax(96px, 1fr) minmax(96px, 1fr) minmax(110px, 1fr) 34px;
    gap: 10px;
}

.customer-walk-in-card-meta div {
    display: grid;
    gap: 3px;
}

.customer-walk-in-card-meta div:nth-child(1) {
    grid-column: 1;
}

.customer-walk-in-card-meta div:nth-child(2) {
    grid-column: 3;
}

.customer-walk-in-card-meta div:nth-child(3) {
    grid-column: 4;
}

.customer-walk-in-card-meta div:nth-child(4) {
    grid-column: 5;
}

.customer-walk-in-card-meta span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7383a0;
}

.customer-walk-in-card-meta strong {
    color: #223047;
    font-size: 0.9rem;
}

.ticket-summary-edit .pos-num-input {
    min-width: 62px;
    width: 62px;
    padding: 3px 6px;
    font-size: 0.83rem;
}

.ticket-customer-discount-edit {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-customer-discount-edit label {
    color: #5f6f8b;
    font-size: 0.78rem;
}

.ticket-customer-discount-edit .pos-num-input {
    min-width: 76px;
    width: 76px;
    padding: 4px 6px;
}

.ticket-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ticket-preview {
    border: 1px dashed #c7d6ec;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    color: #1b2437;
    box-sizing: border-box;
}

.ticket-preview--standard,
.ticket-paper-standard {
    width: 100%;
    max-width: 100%;
}

.ticket-preview--roll_58,
.ticket-paper-58 {
    width: 48mm;
    max-width: 48mm;
    margin: 0 auto;
    padding: 7px 6px;
    border-radius: 6px;
}

.ticket-preview--roll_80,
.ticket-paper-80 {
    width: 72mm;
    max-width: 72mm;
    margin: 0 auto;
    padding: 8px 7px;
    border-radius: 6px;
}

.ticket-head {
    text-align: center;
    margin-bottom: 8px;
}

.ticket-head h3 {
    margin: 0;
    font-size: 1rem;
}

.ticket-head p {
    margin: 2px 0 4px;
    color: #5f7191;
    font-size: 0.78rem;
}

.ticket-logo-wrap {
    margin: 0 0 6px;
}

.ticket-logo-wrap img {
    max-height: 56px;
    max-width: 220px;
    object-fit: contain;
}

.ticket-head.ticket-logo-left {
    text-align: left;
}

.ticket-head.ticket-logo-left .ticket-logo-wrap {
    text-align: left;
}

.ticket-head.ticket-logo-center {
    text-align: center;
}

.ticket-head.ticket-logo-center .ticket-logo-wrap {
    text-align: center;
}

.ticket-head.ticket-logo-right {
    text-align: right;
}

.ticket-head.ticket-logo-right .ticket-logo-wrap {
    text-align: right;
}

.ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 6px;
}

.ticket-meta-col p {
    margin: 2px 0;
    font-size: 0.8rem;
}

.ticket-meta-col-right {
    text-align: right;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    table-layout: fixed;
}

.ticket-table th,
.ticket-table td {
    border-bottom: 1px solid #e9eff8;
    padding: 5px 4px;
    font-size: 0.78rem;
    vertical-align: top;
}

.ticket-table small {
    display: block;
    color: #607092;
}

.ticket-footer-grid {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #d3deef;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
    gap: 18px;
    align-items: start;
}

.ticket-info {
    font-size: 0.8rem;
}

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

.ticket-totals {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    text-align: right;
    justify-self: end;
    min-width: 230px;
}

.ticket-totals p {
    margin: 2px 0;
    font-size: 0.82rem;
}

.ticket-total-line {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #d3deef;
}

.ticket-payments {
    margin-top: 8px;
}

.ticket-payments h4 {
    margin: 8px 0 4px;
    font-size: 0.84rem;
}

.ticket-payments ul {
    margin: 0;
    padding-left: 16px;
}

.ticket-payments li {
    margin: 2px 0;
    font-size: 0.78rem;
}

.ticket-preview--roll_58 .ticket-head,
.ticket-paper-58 .ticket-head {
    margin-bottom: 6px;
}

.ticket-preview--roll_80 .ticket-head,
.ticket-paper-80 .ticket-head {
    margin-bottom: 7px;
}

.ticket-preview--roll_58 .ticket-head h3,
.ticket-paper-58 .ticket-head h3 {
    font-size: 0.92rem;
}

.ticket-preview--roll_80 .ticket-head h3,
.ticket-paper-80 .ticket-head h3 {
    font-size: 0.96rem;
}

.ticket-preview--roll_58 .ticket-head p,
.ticket-preview--roll_58 .ticket-meta-col p,
.ticket-preview--roll_58 .ticket-info,
.ticket-preview--roll_58 .ticket-totals p,
.ticket-preview--roll_58 .ticket-payments li,
.ticket-paper-58 .ticket-head p,
.ticket-paper-58 .ticket-meta-col p,
.ticket-paper-58 .ticket-info,
.ticket-paper-58 .ticket-totals p,
.ticket-paper-58 .ticket-payments li {
    font-size: 0.71rem;
    line-height: 1.3;
}

.ticket-preview--roll_80 .ticket-head p,
.ticket-preview--roll_80 .ticket-meta-col p,
.ticket-preview--roll_80 .ticket-info,
.ticket-preview--roll_80 .ticket-totals p,
.ticket-preview--roll_80 .ticket-payments li,
.ticket-paper-80 .ticket-head p,
.ticket-paper-80 .ticket-meta-col p,
.ticket-paper-80 .ticket-info,
.ticket-paper-80 .ticket-totals p,
.ticket-paper-80 .ticket-payments li {
    font-size: 0.73rem;
    line-height: 1.32;
}

.ticket-preview--roll_58 .ticket-logo-wrap img,
.ticket-paper-58 .ticket-logo-wrap img {
    max-height: 36px !important;
    max-width: 120px !important;
}

.ticket-preview--roll_80 .ticket-logo-wrap img,
.ticket-paper-80 .ticket-logo-wrap img {
    max-height: 40px !important;
    max-width: 140px !important;
}

.ticket-preview--roll_58 .ticket-meta-grid,
.ticket-preview--roll_58 .ticket-footer-grid,
.ticket-preview--roll_80 .ticket-meta-grid,
.ticket-preview--roll_80 .ticket-footer-grid,
.ticket-paper-58 .ticket-meta-grid,
.ticket-paper-58 .ticket-footer-grid,
.ticket-paper-80 .ticket-meta-grid,
.ticket-paper-80 .ticket-footer-grid {
    grid-template-columns: 1fr;
    gap: 6px;
}

.ticket-preview--roll_58 .ticket-meta-col-right,
.ticket-preview--roll_58 .ticket-totals,
.ticket-preview--roll_80 .ticket-meta-col-right,
.ticket-preview--roll_80 .ticket-totals,
.ticket-paper-58 .ticket-meta-col-right,
.ticket-paper-58 .ticket-totals,
.ticket-paper-80 .ticket-meta-col-right,
.ticket-paper-80 .ticket-totals {
    text-align: left;
    justify-self: stretch;
    min-width: 0;
}

.ticket-preview--roll_58 .ticket-table,
.ticket-preview--roll_80 .ticket-table,
.ticket-paper-58 .ticket-table,
.ticket-paper-80 .ticket-table {
    table-layout: fixed;
}

.ticket-lines {
    margin-top: 8px;
}

.ticket-line-compact-head {
    padding-bottom: 4px;
    border-bottom: 1px solid #e9eff8;
}

.ticket-line-compact-head .ticket-col-qty,
.ticket-line-compact-head .ticket-col-concept,
.ticket-line-compact-head .ticket-col-money {
    font-size: 9.2px;
    line-height: 1.05;
    font-weight: 600;
}

.ticket-line-compact-top {
    display: grid;
    grid-template-columns: 14% minmax(0, 1fr) 26%;
    column-gap: 5px;
    align-items: start;
}

.ticket-line-compact-meta-head,
.ticket-line-compact-meta {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 3px;
    padding-left: 14%;
    font-variant-numeric: tabular-nums;
}

.ticket-line-compact-meta-head {
    color: #5f7191;
    font-weight: 600;
}

.ticket-line-compact-item {
    padding: 5px 0;
    border-bottom: 1px solid #e9eff8;
}

.ticket-line-compact-item .ticket-cell-total {
    text-align: right;
    white-space: nowrap;
}

.ticket-line {
    display: grid;
    grid-template-columns: 14% 34% 16% 16% 16%;
    column-gap: 1px;
    align-items: start;
}

.ticket-line-head {
    padding-bottom: 4px;
    border-bottom: 1px solid #e9eff8;
    font-weight: 600;
}

.ticket-line-item {
    padding: 4px 0;
    border-bottom: 1px solid #e9eff8;
}

.ticket-line-head > div,
.ticket-line-item > div {
    padding: 0 1px;
    box-sizing: border-box;
    min-width: 0;
}

.ticket-col-qty,
.ticket-cell-qty,
.ticket-col-money,
.ticket-cell-money {
    font-variant-numeric: tabular-nums;
}

.ticket-col-qty,
.ticket-cell-qty {
    text-align: center;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 0;
}

.ticket-cell-qty {
    padding-top: 0;
    padding-bottom: 0;
}

.ticket-qty-box {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 100%;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}

.ticket-col-concept,
.ticket-cell-concept {
    text-align: left;
    vertical-align: top;
}

.ticket-col-money,
.ticket-cell-money {
    text-align: right;
    white-space: nowrap;
}

.ticket-preview--roll_58 .ticket-line,
.ticket-paper-58 .ticket-line {
    grid-template-columns: 16% 30% 14% 14% 14%;
}

.ticket-preview--roll_58 .ticket-line-compact-top,
.ticket-paper-58 .ticket-line-compact-top {
    grid-template-columns: 14% minmax(0, 1fr) 26%;
    column-gap: 4px;
}

.ticket-preview--roll_58 .ticket-line-compact-item .ticket-cell-qty,
.ticket-preview--roll_58 .ticket-line-compact-item .ticket-cell-concept,
.ticket-preview--roll_58 .ticket-line-compact-item .ticket-cell-total,
.ticket-paper-58 .ticket-line-compact-item .ticket-cell-qty,
.ticket-paper-58 .ticket-line-compact-item .ticket-cell-concept,
.ticket-paper-58 .ticket-line-compact-item .ticket-cell-total {
    font-size: 9.2px;
    line-height: 1.08;
}

.ticket-preview--roll_58 .ticket-line-compact-meta-head,
.ticket-preview--roll_58 .ticket-line-compact-meta,
.ticket-paper-58 .ticket-line-compact-meta-head,
.ticket-paper-58 .ticket-line-compact-meta {
    gap: 8px;
    margin-top: 2px;
    padding-left: 14%;
    font-size: 9.2px;
    line-height: 1.15;
}

.ticket-preview--roll_80 .ticket-line-compact-top,
.ticket-paper-80 .ticket-line-compact-top {
    grid-template-columns: 10% minmax(0, 1fr) 22%;
    column-gap: 6px;
}

.ticket-preview--roll_80 .ticket-line-compact-item .ticket-cell-qty,
.ticket-preview--roll_80 .ticket-line-compact-item .ticket-cell-concept,
.ticket-preview--roll_80 .ticket-line-compact-item .ticket-cell-total,
.ticket-paper-80 .ticket-line-compact-item .ticket-cell-qty,
.ticket-paper-80 .ticket-line-compact-item .ticket-cell-concept,
.ticket-paper-80 .ticket-line-compact-item .ticket-cell-total {
    font-size: 11.6px;
    line-height: 1.18;
}

.ticket-preview--roll_80 .ticket-line-compact-meta-head,
.ticket-preview--roll_80 .ticket-line-compact-meta,
.ticket-paper-80 .ticket-line-compact-meta-head,
.ticket-paper-80 .ticket-line-compact-meta {
    gap: 12px;
    margin-top: 3px;
    padding-left: 12%;
    font-size: 10.2px;
    line-height: 1.18;
}

.ticket-preview--roll_58 .ticket-line-compact-head .ticket-col-qty,
.ticket-preview--roll_58 .ticket-line-compact-head .ticket-col-concept,
.ticket-preview--roll_58 .ticket-line-compact-head .ticket-col-money,
.ticket-paper-58 .ticket-line-compact-head .ticket-col-qty,
.ticket-paper-58 .ticket-line-compact-head .ticket-col-concept,
.ticket-paper-58 .ticket-line-compact-head .ticket-col-money {
    font-size: 8.6px;
    line-height: 1.02;
}

.ticket-preview--roll_80 .ticket-line,
.ticket-paper-80 .ticket-line {
    grid-template-columns: 14% 32% 15% 15% 16%;
}

.ticket-preview--roll_58 .ticket-line-head > div,
.ticket-preview--roll_58 .ticket-line-item > div,
.ticket-paper-58 .ticket-line-head > div,
.ticket-paper-58 .ticket-line-item > div {
    padding: 0 1px;
    font-size: 7.8px;
    line-height: 1.08;
    word-break: break-word;
}

.ticket-preview--roll_58 .ticket-line-head > div,
.ticket-paper-58 .ticket-line-head > div {
    font-size: 10px;
    line-height: 1.08;
}

.ticket-preview--roll_80 .ticket-line-head > div,
.ticket-preview--roll_80 .ticket-line-item > div,
.ticket-paper-80 .ticket-line-head > div,
.ticket-paper-80 .ticket-line-item > div {
    padding: 0 1px;
    font-size: 11.6px;
    line-height: 1.18;
    word-break: break-word;
}

.ticket-preview--roll_80 .ticket-line-head > div,
.ticket-paper-80 .ticket-line-head > div {
    font-size: 10.4px;
    line-height: 1.08;
}

.ticket-preview--roll_58 .ticket-col-money,
.ticket-preview--roll_58 .ticket-cell-money,
.ticket-paper-58 .ticket-col-money,
.ticket-paper-58 .ticket-cell-money {
    font-size: 7.8px;
    font-weight: 500;
}

.ticket-preview--roll_80 .ticket-col-money,
.ticket-preview--roll_80 .ticket-cell-money,
.ticket-paper-80 .ticket-col-money,
.ticket-paper-80 .ticket-cell-money {
    font-size: 11.6px;
    font-weight: 500;
}

.ticket-preview--roll_58 .ticket-line-head,
.ticket-paper-58 .ticket-line-head {
    font-weight: 500;
}

.ticket-preview--roll_80 .ticket-line-head,
.ticket-paper-80 .ticket-line-head {
    font-weight: 500;
}

.ticket-print-window {
    background: #ffffff;
    color: #1b2437;
    display: flex;
    justify-content: center;
}

.ticket-print-window .ticket-print-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: block;
}

.ticket-print-window .ticket-preview {
    border-style: solid;
}

.ticket-print-window--roll_58 .ticket-print-shell {
    width: 58mm;
    max-width: 58mm;
    padding: 2mm 1.4mm 0.8mm;
}

.ticket-print-window--roll_80 .ticket-print-shell {
    width: 80mm;
    max-width: 80mm;
    padding: 2mm 1.5mm 0.8mm;
}

.ticket-print-window--roll_58 .ticket-preview,
.ticket-print-window--roll_80 .ticket-preview {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding-bottom: 0;
}

.ticket-cut-spacer {
    display: none;
}

.ticket-print-window--roll_58 .ticket-cut-spacer,
.ticket-print-window--roll_80 .ticket-cut-spacer {
    display: block;
    height: 2mm;
}

@media print {
    @page {
        size: auto;
        margin: 10mm;
    }

    @page ticket-roll-58 {
        size: 58mm auto;
        margin: 0;
    }

    @page ticket-roll-80 {
        size: 80mm auto;
        margin: 0;
    }

    body.ticket-print-window {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff;
    }

    body.ticket-print-window .ticket-print-shell {
        margin: 0 auto !important;
        padding: 0 !important;
    }

    body.ticket-print-window .ticket-preview {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 0;
    }

    body.ticket-print-window--roll_58 {
        page: ticket-roll-58;
        width: 58mm;
        min-width: 58mm;
        max-width: 58mm;
        margin: 0 auto !important;
    }

    body.ticket-print-window--roll_80 {
        page: ticket-roll-80;
        width: 80mm;
        min-width: 80mm;
        max-width: 80mm;
        margin: 0 auto !important;
    }

    body.ticket-print-window--roll_58 .ticket-print-shell {
        width: 58mm !important;
        max-width: 58mm !important;
        min-width: 58mm !important;
        padding: 2mm 1.2mm 0.8mm 1.6mm !important;
    }

    body.ticket-print-window--roll_80 .ticket-print-shell {
        width: 80mm !important;
        max-width: 80mm !important;
        min-width: 80mm !important;
        padding: 2mm 1.3mm 0.8mm 1.7mm !important;
    }
}

@media (max-width: 640px) {
    .ticket-meta-grid,
    .ticket-footer-grid {
        grid-template-columns: 1fr;
    }

    .ticket-meta-col-right,
    .ticket-totals {
        text-align: left;
        justify-self: stretch;
    }
}

.catalog-pagination {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.catalog-pagination span {
    font-size: 0.78rem;
    color: #5f6f8b;
}

.btn-inline-action {
    width: auto;
    border: 1px solid #cfe0fb;
    color: #244a92;
    background: #f4f8ff;
    padding: 4px 9px;
    font-size: 0.76rem;
    border-radius: 8px;
}

.catalog-row-placeholder td {
    color: transparent;
    user-select: none;
}

.catalog-table-shell {
    position: relative;
    margin-top: 10px;
    min-height: 334px;
    max-height: 334px;
    overflow: auto;
    border: 1px solid #e6edf8;
    border-radius: 10px;
    background: #fff;
}

.catalog-table {
    margin: 0;
}

.catalog-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.74);
    color: #5f6f8b;
    font-size: 0.82rem;
    font-weight: 600;
}

.inventory-processing-card {
    min-width: 220px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dbe3f1;
    box-shadow: 0 18px 40px rgba(18, 24, 31, 0.16);
    display: grid;
    justify-items: center;
    gap: 10px;
}

.inventory-processing-card p {
    margin: 0;
    color: #42516d;
    font-weight: 700;
}

.inventory-processing-spinner {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 3px solid #dce6f6;
    border-top-color: #d06821;
    animation: inventory-spin 0.8s linear infinite;
}

@keyframes inventory-spin {
    to {
        transform: rotate(360deg);
    }
}

.sales-catalog-toolbar {
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.sales-catalog-toolbar-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.sales-catalog-toolbar-actions .btn-inline-action,
.sales-catalog-toolbar-actions .btn-secondary {
    width: auto;
    min-width: 142px;
}

.sales-filters-toggle-btn {
    display: none;
}

.sales-catalog-filters {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 8px;
}

.sales-catalog-filters-stack {
    margin-top: 10px;
    display: grid;
    gap: 7px;
}

.sales-catalog-filters-stack .sales-catalog-filters {
    margin-top: 0;
}

.sales-catalog-filters .field-label {
    gap: 3px;
}

.sales-catalog-filters .field-label span {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.sales-catalog-filters select {
    padding: 6px 8px;
    min-height: 34px;
    font-size: 0.82rem;
}

.sales-active-filters {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sales-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #cfdff3;
    background: #f3f7ff;
    color: #18345f;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.74rem;
}

.sales-filter-chip button {
    width: 16px;
    min-width: 16px;
    height: 16px;
    border: 0;
    border-radius: 999px;
    background: #d7e5ff;
    color: #1f3f73;
    line-height: 1;
    padding: 0;
    font-size: 0.7rem;
}

.sales-stock-tag {
    display: inline-block;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    margin-bottom: 4px;
}

.sales-stock-tag.ok {
    color: #0d6e3f;
    background: #dff8ea;
    border: 1px solid #bbe9ce;
}

.sales-stock-tag.off {
    color: #8f1d3f;
    background: #fde4ea;
    border: 1px solid #f7c9d5;
}

.pos-qty-input {
    max-width: 92px;
}

.pos-price-input,
.pos-discount-input {
    max-width: 108px;
}

.pos-discount-input {
    max-width: 78px;
}

.catalog-add-btn {
    transition: transform 0.14s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.catalog-add-btn.is-added-soft {
    background: #fff4e7;
    border-color: #f2c58f;
    color: #8b4c1d;
    transform: translateY(-1px);
}

.ticket-row-added {
    animation: ticketRowFlash 0.7s ease;
}

@keyframes ticketRowFlash {
    0% {
        background: #fff7ec;
    }
    100% {
        background: transparent;
    }
}

/* Scrollbar theme */
.modal-card,
.catalog-table-shell,
.dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: #9db5e6 #edf3ff;
}

.modal-card::-webkit-scrollbar,
.catalog-table-shell::-webkit-scrollbar,
.dropdown-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.modal-card::-webkit-scrollbar-track,
.catalog-table-shell::-webkit-scrollbar-track,
.dropdown-list::-webkit-scrollbar-track {
    background: #edf3ff;
    border-radius: 999px;
}

.modal-card::-webkit-scrollbar-thumb,
.catalog-table-shell::-webkit-scrollbar-thumb,
.dropdown-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8ea8dd, #6f8fcb);
    border: 2px solid #edf3ff;
    border-radius: 999px;
}

.modal-card::-webkit-scrollbar-thumb:hover,
.catalog-table-shell::-webkit-scrollbar-thumb:hover,
.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7f9ad4, #5f81c2);
}

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

th,
td {
    border-bottom: 1px solid #e6edf8;
    padding: 7px 4px;
    text-align: left;
    font-size: 0.8rem;
    vertical-align: top;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 240px;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .layout.sidebar-open-mobile .sidebar {
        transform: translateX(0);
    }

    .btn-compact {
        width: 100%;
    }

    .customer-actions-anchor {
        grid-column: 1 / -1;
    }

    .product-form-grid {
        grid-template-columns: 1fr;
    }

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

    .product-sku-field,
    .product-name-field {
        grid-column: 1 / -1;
    }

    .products-toolbar {
        grid-template-columns: 1fr;
    }

    .products-toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .products-toolbar-actions > .btn-secondary,
    .products-toolbar-actions > .products-filters-toggle-btn,
    .products-toolbar-actions > .products-add-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        width: 100%;
        white-space: nowrap;
    }

    .products-toolbar-actions > .products-filters-toggle-btn {
        order: 1;
    }

    .products-toolbar-actions > .btn-secondary {
        order: 2;
    }

    .products-toolbar-actions > .products-add-btn {
        order: 3;
    }

    .products-toolbar-actions > .btn-secondary {
        text-align: center;
    }

    .products-add-btn {
        width: auto;
        min-width: 0;
        justify-self: auto;
    }

    .products-filters-toggle-btn {
        display: inline-flex;
        width: auto;
    }

    .products-filters-panel {
        display: none;
    }

    .products-filters-panel.is-open {
        display: grid;
    }

    .products-filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .products-filters-stack .products-filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .products-table .products-col-supplier,
    .products-table .products-col-margin {
        display: none;
    }

    .products-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .products-table .products-col-part {
        width: 110px;
        min-width: 110px;
    }

    .products-table .products-col-part-head .products-col-part-label {
        display: none;
    }

    .products-table .products-col-part-head::after {
        content: "No. Parte";
        display: inline;
        font: inherit;
        color: inherit;
    }

    .products-table .products-col-actions {
        width: 72px;
        min-width: 72px;
    }

    .products-table .products-actions-row {
        display: grid;
        grid-template-columns: repeat(2, 30px);
        gap: 4px;
        justify-content: start;
        white-space: normal;
    }

    .layout.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .layout.sidebar-collapsed .menu a {
        justify-content: flex-start;
        padding: 12px;
    }

    .layout.sidebar-collapsed .menu-label {
        display: inline;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .settings-ticket-layout {
        grid-template-columns: 1fr;
    }

    .report-filters-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-actions {
        justify-content: stretch;
    }

    .report-filter-actions button {
        width: 100%;
    }

    .report-bar-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .report-chart-wrap {
        height: 240px;
    }

    .pos-grid {
        grid-template-columns: 1fr;
    }

    .sales-catalog-filters {
        grid-template-columns: 1fr 1fr;
    }

    .sales-catalog-filters-stack .sales-catalog-filters {
        grid-template-columns: 1fr 1fr;
    }

    .sales-catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .sales-catalog-toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
        align-items: stretch;
        gap: 8px;
    }

    .sales-catalog-toolbar-actions .btn-secondary,
    .sales-catalog-toolbar-actions .btn-inline-action {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    .sales-filters-toggle-btn {
        display: inline-flex;
    }

    .sales-catalog-filters-panel {
        display: none;
    }

    .sales-catalog-filters-panel.is-open {
        display: grid;
    }

    .inventory-stock-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .inventory-restock-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .inventory-filters-toggle-btn {
        display: inline-flex;
    }

    .inventory-filters-panel {
        display: none;
    }

    .inventory-filters-panel.is-open {
        display: grid;
    }

    .cash-current-actions {
        order: 2;
    }

    .cash-current-main {
        order: 1;
    }

    #cash-current-actions-anchor {
        display: block;
        margin: 10px 0;
    }

    .cash-sessions-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .purchases-orders-table td:last-child {
        white-space: normal;
    }

    .purchases-orders-table .purchases-orders-items-col,
    .purchases-orders-table th:nth-child(7),
    .purchases-orders-table td:nth-child(7) {
        width: 34px;
        min-width: 34px;
        white-space: nowrap;
        text-align: center;
    }

    .purchases-orders-table .purchases-orders-items-col .purchases-orders-items-label {
        display: none;
    }

    .purchases-orders-table .purchases-orders-items-col::after {
        content: "Itms";
        font: inherit;
        color: inherit;
    }

    .purchases-orders-table th:nth-child(8),
    .purchases-orders-table td:nth-child(8) {
        width: 40px;
        min-width: 40px;
        white-space: nowrap;
        text-align: center;
    }

    .purchases-orders-table th:nth-child(6),
    .purchases-orders-table td:nth-child(6) {
        width: 58px;
        min-width: 58px;
        white-space: nowrap;
    }

    .purchases-orders-table .purchases-orders-actions-col,
    .purchases-orders-table th:last-child,
    .purchases-orders-table td:last-child {
        width: 92px;
        min-width: 92px;
    }

    .purchases-orders-table td:last-child .purchases-order-actions {
        display: grid;
        grid-template-columns: repeat(2, 30px);
        gap: 4px;
        justify-content: start;
    }

    .purchases-orders-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .restock-items-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .restock-items-table .restock-min-col,
    .restock-items-table th:nth-child(7) {
        width: 34px;
        min-width: 34px;
        white-space: nowrap;
        font-size: 0;
        padding-right: 1px;
        text-align: center;
    }

    .restock-items-table td:nth-child(7) {
        width: 34px;
        min-width: 34px;
        white-space: nowrap;
        text-align: center;
    }

    .restock-items-table .restock-min-col::after {
        content: "Min";
        font-size: 0.8rem;
    }

    .restock-items-table .restock-gap-col,
    .restock-items-table th:nth-child(8) {
        width: 24px;
        min-width: 24px;
        font-size: 0;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .restock-items-table td:nth-child(8) {
        width: 24px;
        min-width: 24px;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .restock-items-table .restock-gap-col::after {
        content: "Falta";
        font-size: 0.8rem;
    }

    .restock-items-table .restock-cost-col {
        min-width: 60px;
        padding-left: 0;
    }

    .restock-items-table .restock-cost-col,
    .restock-items-table .restock-cost-cell {
        white-space: nowrap;
    }

    .restock-items-table .restock-cost-col {
        text-align: center;
    }

    .restock-items-table .restock-cost-cell {
        text-align: right;
    }

    .restock-items-table .restock-cost-cell {
        padding-left: 0;
        padding-right: 1px;
    }

    .sales-history-table td:last-child {
        white-space: normal;
    }

    .sales-history-table td:last-child .sales-history-actions {
        display: grid;
        grid-template-columns: repeat(2, 30px);
        gap: 4px;
        justify-content: start;
    }

    .customers-directory-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .customers-directory-table-shell table {
        width: 100%;
        table-layout: fixed;
    }

    .customers-directory-table-shell table th,
    .customers-directory-table-shell table td {
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .customers-directory-table-shell table th:nth-child(5),
    .customers-directory-table-shell table td:nth-child(5) {
        display: none;
    }

    .customers-directory-table-shell table th:nth-child(1),
    .customers-directory-table-shell table td:nth-child(1) {
        width: 20px;
        min-width: 20px;
        white-space: nowrap;
        text-align: center;
    }

    .customers-directory-table-shell table th:nth-child(2),
    .customers-directory-table-shell table td:nth-child(2) {
        width: 80px;
        min-width: 80px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .customers-directory-table-shell table th:nth-child(3),
    .customers-directory-table-shell table td:nth-child(3) {
        width: 38px;
        min-width: 38px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.05;
        text-align: center;
    }

    .customers-directory-table-shell table th:nth-child(4),
    .customers-directory-table-shell table td:nth-child(4) {
        width: 54px;
        min-width: 54px;
        white-space: normal;
        text-align: center;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .customers-directory-table-shell table th:nth-child(6),
    .customers-directory-table-shell table td:nth-child(6) {
        width: 48px;
        min-width: 48px;
        white-space: normal;
        text-align: center;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .customers-directory-table-shell table th:nth-child(7),
    .customers-directory-table-shell table td:nth-child(7) {
        width: 36px;
        min-width: 36px;
        white-space: normal;
    }

    .customers-directory-table-shell .customers-credit-days-label-tc {
        display: inline;
        line-height: 1.05;
    }

    .customers-directory-table-shell .customers-credit-days-label-default {
        display: none;
    }

    .customers-directory-table-shell .customers-discount-label-default {
        display: none;
    }

    .customers-directory-table-shell .customers-discount-label-tc {
        display: inline;
    }

    .customers-directory-table-shell table th:nth-child(7),
    .customers-directory-table-shell table td:nth-child(7) {
        text-align: center;
    }

    .customers-directory-table-shell table th:last-child,
    .customers-directory-table-shell table td:last-child {
        width: 40px;
        min-width: 40px;
        white-space: normal;
        text-align: center;
    }

    .customers-directory-table-shell table th:nth-child(1),
    .customers-directory-table-shell table th:nth-child(3),
    .customers-directory-table-shell table th:nth-child(4),
    .customers-directory-table-shell table th:nth-child(6),
    .customers-directory-table-shell table th:nth-child(7) {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .customers-directory-table-shell table td:last-child .icon-action-btn {
        display: block;
        margin: 0 auto 4px;
    }

    .customers-directory-table-shell table td:last-child .icon-action-btn:last-child {
        margin-bottom: 0;
    }

    .suppliers-table-shell {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .suppliers-table-shell table {
        width: 100%;
        table-layout: fixed;
    }

    .suppliers-table-shell table th,
    .suppliers-table-shell table td {
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .suppliers-table-shell table th:nth-child(4),
    .suppliers-table-shell table td:nth-child(4),
    .suppliers-table-shell table th:nth-child(7),
    .suppliers-table-shell table td:nth-child(7) {
        display: none;
    }

    .suppliers-table-shell table th:nth-child(1),
    .suppliers-table-shell table td:nth-child(1) {
        width: 60px;
        min-width: 60px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .suppliers-table-shell table th:nth-child(2),
    .suppliers-table-shell table td:nth-child(2) {
        width: 104px;
        min-width: 104px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .suppliers-table-shell table th:nth-child(3),
    .suppliers-table-shell table td:nth-child(3) {
        width: 54px;
        min-width: 54px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .suppliers-table-shell table th:nth-child(5),
    .suppliers-table-shell table td:nth-child(5) {
        width: 62px;
        min-width: 62px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .suppliers-table-shell table th:nth-child(6),
    .suppliers-table-shell table td:nth-child(6) {
        width: 32px;
        min-width: 32px;
        white-space: normal;
        text-align: center;
    }

    .suppliers-table-shell table th:last-child,
    .suppliers-table-shell table td:last-child {
        width: 40px;
        min-width: 40px;
        text-align: center;
    }

    .suppliers-table-shell table td:last-child .icon-action-btn {
        margin-right: 0;
    }

    .customers-balances-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .customers-balances-toolbar > .field-label {
        grid-column: 1 / -1;
    }

    .customers-balances-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .customer-balances-table .customer-balances-docs-col,
    .customer-balances-table .customer-balances-docs-cell {
        width: 56px;
        min-width: 56px;
        text-align: center;
        white-space: nowrap;
    }

    .customer-balances-table .customer-balances-docs-cell {
        padding-left: 0;
        padding-right: 0;
        text-align: center !important;
    }

    .customer-balances-table .customer-balances-docs-col {
        font-size: 0;
    }

    .customer-balances-table .customer-balances-docs-col::after {
        content: "Doctos.";
        font-size: 0.8rem;
    }

    .customer-balances-table .customer-balances-docs-value {
        display: block;
        width: 100%;
        font-variant-numeric: tabular-nums;
        text-align: center !important;
    }

    .facturas-table-shell table th:last-child,
    .facturas-table-shell table td:last-child {
        width: 136px;
        min-width: 136px;
        text-align: center;
        vertical-align: top;
    }

    .facturas-table-shell .factura-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        align-items: start;
        justify-items: stretch;
    }

    .facturas-table-shell .factura-actions .btn-inline-action,
    .facturas-table-shell .factura-actions .btn-danger-soft {
        width: 100%;
        min-width: 0;
        margin: 0;
        text-align: center;
        padding: 7px 6px;
        font-size: 0.68rem;
        line-height: 1.1;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .vm-panel-brands .vm-models-col,
    .vm-panel-brands .vm-models-cell {
        text-align: center !important;
        white-space: nowrap;
    }

    .vm-panel-brands .vm-models-cell {
        padding-left: 0;
        padding-right: 0;
    }

    .vm-panel-brands .vm-models-value {
        display: block;
        width: 100%;
        text-align: center !important;
        font-variant-numeric: tabular-nums;
    }

    .vm-panel-brands .vm-action-col {
        text-align: left !important;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 9px 10px;
    }

    .topbar-left {
        display: flex;
        justify-content: flex-start;
        min-width: auto;
    }

    .topbar-brand-logo {
        height: 34px;
        max-width: 180px;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-right {
        justify-content: flex-end;
        margin-left: auto;
    }

    .header {
        padding: 8px 10px 6px;
    }

    .content {
        padding: 0 10px 10px;
    }

    .dropdown {
        width: min(320px, calc(100vw - 30px));
        right: 0;
    }

    .modal-backdrop {
        place-items: start center;
        padding: 10px;
    }

    .modal-card,
    .modal-card.modal-xl {
        width: 100%;
        max-height: calc(100vh - 20px);
    }

    .login-shell {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }

    .auth-card {
        padding: 16px;
        border-radius: 14px;
    }

    .login-card.auth-card {
        width: 100%;
        min-height: auto;
    }

    .login-card.auth-card > * {
        max-width: none;
    }

    .auth-showcase {
        min-height: 280px;
    }

    .auth-card h3 {
        font-size: 1.56rem;
    }

    .login-showcase {
        padding: 18px;
    }

    .login-showcase h2 {
        font-size: 1.2rem;
    }

    .auth-showcase {
        order: -1;
        padding: 0;
        gap: 0;
    }

    .auth-showcase-art {
        min-height: 280px;
    }

    .auth-showcase-photo {
        object-position: center 18%;
        transform: scale(1);
    }

    .auth-window {
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .section-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .section-search {
        min-width: 100%;
    }
}

@media (max-width: 680px) {
    .products-filters-grid {
        grid-template-columns: 1fr;
    }

    .products-filters-stack .products-filters-grid {
        grid-template-columns: 1fr;
    }

    .sales-catalog-filters {
        grid-template-columns: 1fr;
    }

    .sales-catalog-filters-stack .sales-catalog-filters {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        margin: 4mm;
    }

    body:not(.ticket-print-window) * {
        visibility: hidden;
    }

    body:not(.ticket-print-window) #ticket-modal-content,
    body:not(.ticket-print-window) #ticket-modal-content * {
        visibility: visible;
    }

    body:not(.ticket-print-window) #ticket-modal-content {
        position: absolute;
        inset: 0;
        padding: 0;
        margin: 0;
    }

    body:not(.ticket-print-window) #ticket-modal-content .ticket-preview.ticket-preview--roll_58,
    body:not(.ticket-print-window) #ticket-modal-content .ticket-preview.ticket-paper-58 {
        width: 48mm;
        max-width: 48mm;
        border: 0;
        border-radius: 0;
        padding: 0;
        margin: 0;
    }

    body:not(.ticket-print-window) #ticket-modal-content .ticket-preview.ticket-preview--roll_80,
    body:not(.ticket-print-window) #ticket-modal-content .ticket-preview.ticket-paper-80 {
        width: 72mm;
        max-width: 72mm;
        border: 0;
        border-radius: 0;
        padding: 0;
        margin: 0;
    }
}

.suggestion-shell {
    height: 220px;
    overflow: hidden;
}

.suggestion-list {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.suggestion-list:empty {
    display: none;
}

.suggestion-item-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.suggestion-item-btn:last-child {
    border-bottom: 0;
}

.suggestion-item-btn:hover {
    background: rgba(58, 103, 221, 0.08);
}

.suggestion-item-main {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.suggestion-item-meta {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.vm-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.35fr;
    gap: 12px;
    align-items: start;
}

.vm-panel {
    min-height: 520px;
}

.vm-panel-brands table tbody {
    max-height: 560px;
}

.vm-detail-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.vm-detail-head h4 {
    margin: 0;
}

.vm-detail-head p {
    margin: 0;
    color: #5f6f8b;
    font-size: 0.84rem;
}

.vm-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    border-bottom: 1px solid #d9e2f1;
    padding-bottom: 8px;
}

.vm-tab-btn {
    border: 1px solid #d2dced;
    background: #f8fbff;
    color: #36506f;
    border-radius: 8px;
    font-weight: 700;
    padding: 7px 11px;
    font-size: 0.78rem;
    cursor: pointer;
}

.vm-tab-btn.is-active {
    background: #eaf2ff;
    border-color: #9fb8e5;
    color: #223b5d;
}

.vm-tab-panel {
    min-height: 420px;
}

.vm-row-selected {
    background: #eef5ff;
}

@media (max-width: 980px) {
    .vm-layout {
        grid-template-columns: 1fr;
    }

    .vm-panel {
        min-height: auto;
    }

    .modal-split {
        grid-template-columns: 1fr;
    }

    .movement-head-grid .movement-head-field,
    .movement-head-grid .movement-notes-field {
        grid-column: 1 / -1;
    }

    #purchase-form .purchase-head-field,
    #purchase-form .purchase-notes-field,
    #restock-order-form .purchase-head-field,
    #restock-order-form .purchase-notes-field {
        grid-column: 1 / -1;
    }
}
