: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;
}

.menu-item-disabled {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.58;
    user-select: none;
}

.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;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}

.header-copy {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.offline-status-banner {
    margin: 0 14px 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d9dfeb;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 10px 24px rgba(17, 23, 35, 0.08);
}

.offline-status-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.offline-status-banner[data-tone="ok"] {
    border-color: #cde6d5;
    background: linear-gradient(135deg, rgba(240, 251, 244, 0.96), rgba(250, 255, 252, 0.92));
}

.offline-status-banner[data-tone="warn"] {
    border-color: #ead8a6;
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.98), rgba(255, 253, 245, 0.94));
}

.offline-status-banner[data-tone="info"] {
    border-color: #c8d9f3;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(250, 252, 255, 0.94));
}

.offline-status-banner[data-tone="danger"] {
    border-color: #efc5c5;
    background: linear-gradient(135deg, rgba(255, 241, 241, 0.98), rgba(255, 250, 250, 0.94));
}

.offline-status-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.offline-status-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #101113;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.offline-status-banner[data-tone="warn"] .offline-status-pill {
    background: #9b6a00;
}

.offline-status-banner[data-tone="info"] .offline-status-pill {
    background: #225ea8;
}

.offline-status-banner[data-tone="danger"] .offline-status-pill {
    background: #b53b3b;
}

.offline-status-copy {
    min-width: 0;
}

.offline-status-copy strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.offline-status-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.offline-status-meta {
    color: #5e6676;
    font-size: 0.78rem;
    white-space: nowrap;
}

.offline-online-only-banner {
    margin: 0 14px 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #ecd39f;
    background: linear-gradient(135deg, rgba(255, 247, 228, 0.98), rgba(255, 252, 244, 0.94));
    color: #714f13;
    box-shadow: 0 10px 24px rgba(17, 23, 35, 0.05);
}

.offline-online-only-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.offline-online-only-banner p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
}

.sync-center-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

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

.sync-center-panel {
    margin: 0;
    padding: 12px;
}

.sync-center-list {
    display: grid;
    gap: 8px;
    max-height: 58vh;
    overflow: auto;
}

.sync-center-item {
    border: 1px solid #d8e2f0;
    border-radius: 12px;
    padding: 10px;
    background: #fbfcff;
}

.sync-center-item[data-status="conflict"] {
    border-color: #efc5c5;
    background: #fff5f5;
}

.sync-center-item[data-status="error"] {
    border-color: #ead8a6;
    background: #fffaf0;
}

.sync-center-item[data-status="syncing"] {
    border-color: #c8d9f3;
    background: #f3f8ff;
}

.sync-center-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.sync-center-item-meta {
    color: #66748e;
    font-size: 0.78rem;
}

.sync-center-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.sync-center-empty {
    color: #73829f;
    font-size: 0.84rem;
    padding: 8px 2px;
}

.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;
}

.sales-page-subtitle {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.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;
}

.sales-promotions-ticker {
    display: block;
    min-height: 72px;
    margin: 0;
    overflow: hidden;
    background: transparent;
}

.header .sales-promotions-ticker {
    position: static;
    flex: 1 1 520px;
    max-width: none;
    min-width: 0;
    align-self: stretch;
    margin: 0;
}

.sales-promotions-ticker__viewport {
    display: flex;
    align-items: center;
    min-height: 72px;
    min-width: 0;
    overflow: hidden;
    outline: none;
    justify-content: center;
    perspective: 700px;
    position: relative;
    isolation: isolate;
    border: 1px solid #ecd8d3;
    border-radius: 14px;
    background:
        radial-gradient(circle at 94% -45%, rgba(214, 15, 23, 0.15) 0 84px, transparent 85px),
        linear-gradient(112deg, #fff9f7, #fff 58%, #fff5f2);
    box-shadow: 0 8px 20px rgba(111, 48, 35, 0.07);
    cursor: pointer;
}

.sales-promotions-ticker__viewport:hover {
    border-color: #dca89d;
    box-shadow: 0 9px 22px rgba(111, 48, 35, 0.13);
}

.sales-promotions-ticker__viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(214, 15, 23, 0.035) 19px 20px);
}

.sales-promotions-ticker__viewport:focus-visible {
    box-shadow: inset 0 0 0 2px #d60f17;
}

.sales-promotions-ticker__track,
.sales-promotions-ticker__set {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 100%;
}

.sales-promotions-ticker__track {
    transform-origin: center;
    transform-style: preserve-3d;
    will-change: opacity, transform;
}

.sales-promotions-ticker__track.is-revealing {
    animation: sales-promotions-shutter-in 900ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.sales-promotions-ticker__track.is-hiding {
    animation: sales-promotions-shutter-out 900ms cubic-bezier(0.55, 0.05, 0.67, 0.2) both;
}

.sales-promotions-ticker__set {
    padding: 0;
}

.sales-promotions-ticker__item {
    display: grid;
    grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 9px 16px 9px 10px;
}

.sales-promotions-ticker__benefit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 6px 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d60f17, #f15a4b);
    color: #fff;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    letter-spacing: 0.025em;
    box-shadow: 0 6px 14px rgba(194, 31, 29, 0.2);
}

.sales-promotions-ticker__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sales-promotions-ticker__eyebrow {
    color: #a54338;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sales-promotions-ticker__item strong {
    color: #251b1a;
    overflow: hidden;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.18rem;
    line-height: 0.95;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-promotions-ticker__meta {
    color: #786b68;
    font-size: 0.72rem;
    white-space: nowrap;
}

.sales-promotions-ticker__detail {
    display: grid;
    justify-items: end;
    gap: 5px;
    color: #6f5e5a;
    font-size: 0.7rem;
    text-align: right;
    white-space: nowrap;
}

.sales-promotions-ticker__counter {
    padding: 2px 7px;
    border-radius: 999px;
    background: #f2e5e1;
    color: #8d3128;
    font-size: 0.64rem;
    font-weight: 700;
}

@keyframes sales-promotions-shutter-in {
    from {
        opacity: 0;
        transform: rotateX(-88deg) scaleY(0.78);
    }

    to {
        opacity: 1;
        transform: rotateX(0) scaleY(1);
    }
}

@keyframes sales-promotions-shutter-out {
    from {
        opacity: 1;
        transform: rotateX(0) scaleY(1);
    }

    to {
        opacity: 0;
        transform: rotateX(88deg) scaleY(0.78);
    }
}

@media (max-width: 720px) {
    .header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .header .sales-promotions-ticker {
        flex-basis: 100%;
        width: 100%;
    }

    .sales-promotions-ticker {
        min-height: 68px;
    }

    .sales-promotions-ticker__viewport {
        min-height: 68px;
    }

    .sales-promotions-ticker__item {
        grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1fr) auto;
        gap: 9px;
        padding-right: 10px;
    }

    .sales-promotions-ticker__detail {
        font-size: 0.62rem;
    }

    .sales-promotions-ticker__item strong {
        font-size: 1rem;
    }

    .sales-promotions-ticker__benefit {
        font-size: 0.92rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sales-promotions-ticker__track,
    .sales-promotions-ticker__track.is-revealing,
    .sales-promotions-ticker__track.is-hiding {
        animation: none;
    }

    .sales-promotions-ticker__track {
        width: auto;
        flex-wrap: wrap;
        padding: 5px 0;
    }

}

.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)) minmax(230px, 0.9fr);
    align-items: end;
}

.report-filters-grid--with-branch {
    grid-template-columns: repeat(2, minmax(170px, 220px)) minmax(160px, 1fr) minmax(230px, 0.9fr);
}

.report-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    width: 100%;
}

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

.report-kpi-cards {
    grid-template-columns: repeat(var(--report-kpi-count, 1), minmax(0, 1fr));
    gap: clamp(4px, 0.7vw, 8px);
}

.report-kpi-cards .card {
    min-width: 0;
    padding: clamp(6px, 0.9vw, 11px);
}

.report-kpi-cards .card h4 {
    font-size: clamp(0.58rem, 1.1vw, 0.72rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.report-kpi-cards .card p {
    font-size: clamp(0.62rem, 1.35vw, 1.04rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

@media (min-width: 981px) and (max-width: 1200px) {
    .report-filters-grid {
        grid-template-columns: repeat(2, minmax(130px, 150px)) minmax(210px, 0.9fr);
    }

    .report-filters-grid--with-branch {
        grid-template-columns: repeat(2, minmax(130px, 150px)) minmax(130px, 1fr) minmax(210px, 0.9fr);
    }

    .report-filter-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.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: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

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

@media (min-width: 981px) {
    #sales-pos-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }

    .pos-grid:not(.ticket-collapsed) #sales-catalog-panel,
    .pos-grid:not(.ticket-collapsed) #sales-ticket-panel {
        height: 560px;
        min-height: 0;
    }

    .pos-grid:not(.ticket-collapsed) #sales-ticket-panel {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .pos-grid:not(.ticket-collapsed) #sales-form {
        display: flex;
        flex: 1;
        flex-direction: column;
        min-height: 0;
    }

    .pos-grid:not(.ticket-collapsed) .ticket-items-scroll {
        /* Eight compact ticket lines remain visible below the fixed header. */
        flex: 0 0 274px;
        min-height: 274px;
        max-height: 274px;
        overflow: auto;
        overscroll-behavior: contain;
        border: 1px solid #e6edf8;
        border-radius: 10px;
    }

    #new-sale-modal .catalog-table-shell {
        min-height: 355px;
        max-height: 355px;
    }

    .pos-grid:not(.ticket-collapsed) .ticket-items-scroll table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .pos-grid:not(.ticket-collapsed) .ticket-items-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        padding-top: 9px;
        padding-bottom: 9px;
        vertical-align: middle;
        background: #f7f9fe;
        box-shadow: 0 1px 0 #dbe5f4;
    }

    .pos-grid:not(.ticket-collapsed) .ticket-items-scroll tbody td {
        padding-top: 3px;
        padding-bottom: 3px;
    }
}

.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;
}

.stock-regularizations-pending-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 4px;
    color: #506079;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.stock-regularizations-title-row {
    justify-content: flex-start;
    gap: 7px;
}

.stock-regularizations-pending-filter input {
    width: 15px;
    height: 15px;
    margin: 0;
}

.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-commercial-row {
    display: grid;
    grid-template-columns: minmax(105px, 0.78fr) minmax(145px, 1fr) minmax(105px, 0.78fr) minmax(145px, auto);
    align-items: end;
    gap: 7px;
}

.customer-commercial-row .customer-actions-anchor {
    grid-column: auto;
    width: auto;
}

.customer-commercial-row .customer-form-actions {
    flex-wrap: wrap;
    gap: 5px;
}

.customer-commercial-row .customer-form-actions button {
    width: 100%;
    min-width: 145px;
}

@media (max-width: 650px) {
    .customer-commercial-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .customer-commercial-row {
        grid-template-columns: 1fr;
    }
}

.customer-currency-field {
    position: relative;
}

.customer-currency-field > span {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: #44536d;
    font-size: 0.86rem;
    font-weight: 700;
    pointer-events: none;
    transform: translateY(-50%);
}

.customer-currency-field > input {
    width: 100%;
    padding-left: 24px;
    font-variant-numeric: tabular-nums;
}

.cash-currency-field {
    position: relative;
}

.cash-currency-field > span {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: #44536d;
    font-size: 0.86rem;
    font-weight: 700;
    pointer-events: none;
    transform: translateY(-50%);
}

.cash-currency-field > input {
    width: 100%;
    padding-left: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.add-payment-currency-field {
    position: relative;
}

.add-payment-currency-field > span {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: #44536d;
    font-size: 0.86rem;
    font-weight: 700;
    pointer-events: none;
    transform: translateY(-50%);
}

.add-payment-currency-field > input {
    width: 100%;
    padding-left: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.form-grid.add-payment-form {
    grid-template-columns: repeat(3, minmax(0, 130px));
    justify-content: start;
}

#add-payment-modal .modal-card {
    width: min(426px, calc(100vw - 20px));
    transition: width 160ms ease;
}

#add-payment-modal.has-payment-change .modal-card {
    width: min(563px, calc(100vw - 20px));
}

#add-payment-modal.has-payment-change .form-grid.add-payment-form {
    grid-template-columns: repeat(4, minmax(0, 130px));
}

.add-payment-form > * {
    min-width: 0;
}

.add-payment-form > button[type="submit"] {
    grid-column: 1 / -1;
    width: 130px;
    justify-self: center;
}

.add-payment-change-field .field-static {
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #43516a;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    justify-content: flex-end;
}

.add-payment-change-field.has-change .field-static {
    border-color: #f0a031;
    background: #fff4df;
    color: #a75400;
    box-shadow: inset 0 3px 0 #ee941c;
}

@media (max-width: 680px) {
    .form-grid.add-payment-form,
    #add-payment-modal.has-payment-change .form-grid.add-payment-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .form-grid.add-payment-form,
    #add-payment-modal.has-payment-change .form-grid.add-payment-form {
        grid-template-columns: 1fr;
    }

    .add-payment-form > button[type="submit"] {
        width: 100%;
    }
}

.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;
}

.form-grid.customer-fiscal-grid {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
    .form-grid.customer-fiscal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .form-grid.customer-fiscal-grid {
        grid-template-columns: 1fr;
    }
}

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

.product-modal-card-wide {
    width: min(1120px, calc(100vw - 28px));
    max-width: 100%;
    overflow-x: hidden;
}

.product-modal-card-wide .product-form-grid {
    grid-template-columns: minmax(110px, 0.72fr) minmax(140px, 1fr) minmax(210px, 1.45fr) minmax(150px, 1.05fr);
}

.product-modal-card-wide .product-form-grid > *,
.product-modal-card-wide .field-label,
.product-modal-card-wide input,
.product-modal-card-wide select {
    min-width: 0;
    max-width: 100%;
}

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

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

.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;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.product-primary-supplier-field {
    width: 100%;
}

.product-currency-field {
    position: relative;
    display: block;
}

.product-currency-field > b {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    transform: translateY(-50%);
    color: #526480;
    font-size: 0.88rem;
    pointer-events: none;
}

.product-currency-field > input {
    width: 100%;
    padding-left: 24px;
    font-variant-numeric: tabular-nums;
}

.field-label.is-calculated input,
.product-branch-pricing input.is-calculated {
    background: #f3f6f4;
    color: #61706a;
}

.product-branch-pricing {
    min-width: 0;
    max-width: 100%;
    padding: 11px;
    border: 1px solid #d8e3dc;
    border-radius: 12px;
    background: linear-gradient(145deg, #fbfdfc, #f2f7f4);
}

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

.product-branch-pricing-head strong,
.product-branch-pricing-head small {
    display: block;
}

.product-branch-pricing-head small {
    margin-top: 2px;
    color: var(--muted);
}

.product-branch-pricing-head button {
    width: auto;
    min-width: 205px;
    padding: 7px 12px;
    border-radius: 9px;
    white-space: nowrap;
}

.product-branch-pricing-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 230px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e0e7e3;
    border-radius: 9px;
    background: #fff;
}

.product-branch-pricing table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.product-branch-pricing thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf4f0;
    color: #38564c;
}

.product-branch-pricing th:first-child,
.product-branch-pricing td:first-child {
    width: 42%;
}

.product-branch-pricing td {
    vertical-align: middle;
}

.product-branch-pricing td strong,
.product-branch-pricing td small {
    display: block;
}

.product-branch-pricing td small {
    margin-top: 2px;
    color: var(--muted);
}

.product-branch-pricing select,
.product-branch-pricing input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 36px;
    padding: 7px 9px;
}

.product-branch-percent-input,
.product-branch-money-input {
    position: relative;
}

.product-branch-percent-input span,
.product-branch-money-input span {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: #64716c;
    font-size: 0.78rem;
    font-weight: 700;
    pointer-events: none;
}

.product-branch-percent-input span { right: 9px; }
.product-branch-money-input span { left: 9px; }
.product-branch-percent-input input { padding-right: 24px; }
.product-branch-money-input input { padding-left: 22px; }

@media (max-width: 980px) {
    .product-modal-card-wide .product-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-branch-pricing-head { align-items: stretch; flex-direction: column; }
    .product-branch-pricing-head button { width: 100%; min-width: 0; white-space: normal; }
}

/* Administración global SAAP: aislada del panel operativo de cada tenant. */
.platform-body { margin: 0; min-height: 100vh; background: #f5f1ed; color: #273345; }
.platform-shell { max-width: 1440px; margin: 0 auto; padding: 26px; }
.platform-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.platform-header h2 { margin: 0; }
.platform-header p, .muted-copy { color: #66758c; margin: 5px 0 0; }
.platform-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.platform-kpis .card { display: grid; gap: 4px; }
.platform-kpis strong { font-size: 1.45rem; color: #0e5760; }
.platform-search { display: flex; gap: 10px; align-items: end; }
.platform-search input { flex: 1; }
.platform-create-panel { margin-bottom: 18px; }
.platform-create-panel h3 { margin: 0; }
.platform-create-panel p { margin: 5px 0 14px; color: #66758c; }
.platform-create-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.platform-tenants { display: grid; gap: 14px; margin-top: 18px; }
.platform-tenant-card { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 1.7fr); gap: 20px; align-items: start; }
.platform-tenant-summary h4 { margin: 0 0 4px; }
.platform-tenant-summary small { color: #66758c; }
.platform-tenant-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.platform-tenant-metrics span { border-radius: 999px; padding: 4px 9px; background: #edf4f1; color: #135a53; font-size: .76rem; font-weight: 600; }
.platform-tenant-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.35fr auto; gap: 10px; align-items: end; }
.platform-audit { grid-column: 1 / -1; border-top: 1px solid #e6ded8; padding-top: 10px; font-size: .8rem; color: #56647a; }
.platform-audit summary { cursor: pointer; color: #155b65; font-weight: 700; }
.platform-audit p { margin: 7px 0 0; }
.platform-users { grid-column: 1 / -1; border-top: 1px solid #e6ded8; padding-top: 10px; }
.platform-users summary { cursor: pointer; color: #155b65; font-size: .84rem; font-weight: 700; }
.platform-users-list { display: grid; gap: 6px; margin-top: 9px; }
.platform-users-list article { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 78px; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #e8e2dd; border-radius: 7px; background: #fcfbfa; font-size: .8rem; }
.platform-users-list strong, .platform-users-list small { display: block; }
.platform-users-list small { color: #6b788b; margin-top: 2px; }
.platform-role { color: #344760; font-weight: 600; }
.platform-user-status { border-radius: 999px; padding: 3px 7px; text-align: center; font-size: .72rem; font-weight: 700; }
.platform-user-status.is-active { background: #e6f4eb; color: #167043; }
.platform-user-status.is-inactive { background: #f6e6e3; color: #a13b32; }
.platform-message-card { max-width: 480px; }
.configuration-branch-scope-note { margin: 0 0 14px; color: #5f6f8b; font-size: .84rem; }
@media (max-width: 1080px) {
    .platform-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .platform-tenant-card, .platform-tenant-form, .platform-create-form { grid-template-columns: 1fr 1fr; }
    .platform-tenant-form button { grid-column: span 2; }
    .platform-users-list article { grid-template-columns: 1fr 120px 72px; }
}
@media (max-width: 620px) {
    .platform-shell { padding: 15px; }
    .platform-header { align-items: flex-start; flex-direction: column; }
    .platform-kpis, .platform-tenant-card, .platform-tenant-form { grid-template-columns: 1fr; }
    .platform-tenant-form button { grid-column: auto; }
    .platform-users-list article { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 680px) {
    .product-modal-card-wide .product-form-grid { grid-template-columns: 1fr; }

    .product-modal-card-wide {
        width: calc(100vw - 20px);
    }

    .product-branch-pricing {
        padding: 8px;
    }

    .product-branch-pricing table,
    .product-branch-pricing tbody {
        display: block;
    }

    .product-branch-pricing thead {
        display: none;
    }

    .product-branch-pricing tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border-bottom: 1px solid #e0e7e3;
    }

    .product-branch-pricing tbody tr:last-child {
        border-bottom: 0;
    }

    .product-branch-pricing tbody td {
        display: block;
        width: auto;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .product-branch-pricing tbody td:first-child {
        grid-column: 1 / -1;
        width: auto;
    }

    .product-branch-pricing tbody td:nth-child(2)::before,
    .product-branch-pricing tbody td:nth-child(3)::before {
        display: block;
        margin-bottom: 4px;
        color: #536b62;
        font-size: 0.7rem;
        font-weight: 700;
    }

    .product-branch-pricing tbody td:nth-child(2)::before { content: "Ganancia %"; }
    .product-branch-pricing tbody td:nth-child(3)::before { content: "Precio de venta"; }
}

@media (max-width: 380px) {
    .product-branch-pricing tbody tr {
        grid-template-columns: 1fr;
    }

    .product-branch-pricing tbody td {
        grid-column: 1 / -1;
    }
}

.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(180px, 1.45fr) minmax(105px, 0.58fr) minmax(100px, 0.54fr) minmax(105px, 0.58fr) minmax(130px, auto);
    gap: 10px;
    align-items: end;
}

.products-toolbar > * {
    min-width: 0;
}

.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: 130px;
    min-height: 38px;
    justify-self: end;
    white-space: nowrap;
}

.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-open-btn-disabled {
    color: #8490a2;
    cursor: not-allowed;
    opacity: 0.62;
    user-select: none;
}

.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;
}

body.purchase-modal-open {
    overflow: hidden;
}

#purchase-modal {
    overscroll-behavior: contain;
}

.purchase-remove-all-card {
    width: min(430px, 100%);
}

.purchase-remove-all-card p {
    margin: 4px 0 0;
    color: #40516f;
}

.pos-numeric-keypad {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 12px;
    background: rgba(10, 24, 51, 0.42);
}

.pos-numeric-keypad__card {
    width: min(520px, 100%);
    padding: 12px;
    border: 1px solid #d6e0ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 -12px 32px rgba(9, 26, 56, 0.22);
}

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

.pos-numeric-keypad__head > div { display: grid; gap: 2px; min-width: 0; }
.pos-numeric-keypad__head small { color: #5f708e; font-weight: 800; }
.pos-numeric-keypad__head output { color: #1b3159; font-size: clamp(1.55rem, 5vw, 2.15rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-numeric-keypad__head button { width: 38px; min-width: 38px; height: 38px; padding: 0; }

.pos-numeric-keypad__keys {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pos-numeric-keypad__keys button {
    min-height: 52px;
    padding: 8px;
    border: 1px solid #d6e0ed;
    border-radius: 11px;
    background: #f7faff;
    color: #1d345b;
    box-shadow: none;
    font-size: 1.08rem;
    font-weight: 800;
}

.pos-numeric-keypad__keys button:hover { background: #e9f1fc; }
.pos-numeric-keypad__keys [data-keypad-action="clear"] { color: #9b442f; font-size: 0.82rem; }
.pos-numeric-keypad__keys .pos-numeric-keypad__confirm { border-color: #1a816a; background: linear-gradient(120deg, #17775f, #26a183); color: #fff; font-size: 0.82rem; }
.pos-numeric-keypad.is-integer [data-keypad-key="."] { visibility: hidden; pointer-events: none; }

.pos-alpha-keyboard {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 12px;
    background: rgba(10, 24, 51, 0.42);
}

.pos-alpha-keyboard__card {
    width: min(760px, 100%);
    padding: 12px;
    border: 1px solid #d6e0ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 -12px 32px rgba(9, 26, 56, 0.22);
}

.pos-alpha-keyboard__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pos-alpha-keyboard__head > div { display: grid; flex: 1; gap: 3px; min-width: 0; }
.pos-alpha-keyboard__head small { color: #5f708e; font-weight: 800; }
.pos-alpha-keyboard__head output { min-height: 42px; max-height: 68px; overflow: auto; padding: 8px 10px; border: 1px solid #d6e0ed; border-radius: 9px; background: #f7faff; color: #1b3159; font-size: 1.1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-wrap; }
.pos-alpha-keyboard__head button { width: 38px; min-width: 38px; height: 38px; padding: 0; }
.pos-alpha-keyboard__keys { display: grid; gap: 7px; }
.pos-alpha-keyboard__row { display: grid; grid-template-columns: repeat(var(--alpha-key-count), minmax(0, 1fr)); gap: 7px; }
.pos-alpha-keyboard__row button { min-height: 46px; padding: 6px; border: 1px solid #d6e0ed; border-radius: 10px; background: #f7faff; color: #1d345b; box-shadow: none; font-size: 1rem; font-weight: 800; }
.pos-alpha-keyboard__row button:hover { background: #e9f1fc; }
.pos-alpha-keyboard__row .is-action { background: #e8f0fb; font-size: 0.85rem; }
.pos-alpha-keyboard__row .is-space { grid-column: span 2; font-size: 0.82rem; }
.pos-alpha-keyboard__row .is-clear { color: #9b442f; font-size: 0.8rem; }
.pos-alpha-keyboard__row .is-confirm { background: linear-gradient(120deg, #17775f, #26a183); color: #fff; font-size: 0.8rem; }

.touch-keyboard {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 12px;
    background: rgba(10, 24, 51, 0.42);
}

.touch-keyboard__card {
    width: min(760px, 100%);
    padding: 12px;
    border: 1px solid #d6e0ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 -12px 32px rgba(9, 26, 56, 0.22);
}

.touch-keyboard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.touch-keyboard__head > div { display: grid; flex: 1; gap: 3px; min-width: 0; }
.touch-keyboard__head small { color: #5f708e; font-weight: 800; }
.touch-keyboard__head output { min-height: 42px; max-height: 68px; overflow: auto; padding: 8px 10px; border: 1px solid #d6e0ed; border-radius: 9px; background: #f7faff; color: #1b3159; font-size: 1.1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-wrap; }
.touch-keyboard__head button { width: 38px; min-width: 38px; height: 38px; padding: 0; }
.touch-keyboard__keys { display: grid; gap: 7px; }
.touch-keyboard__row { display: grid; grid-template-columns: repeat(var(--key-count), minmax(0, 1fr)); gap: 7px; }
.touch-keyboard__row--numeric { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.touch-keyboard__row--actions { grid-template-columns: repeat(var(--key-count), minmax(0, 1fr)); }
.touch-keyboard__row button { min-height: 46px; padding: 6px; border: 1px solid #d6e0ed; border-radius: 10px; background: #f7faff; color: #1d345b; box-shadow: none; font-size: 1rem; font-weight: 800; }
.touch-keyboard__row button:hover { background: #e9f1fc; }
.touch-keyboard__row .is-action { background: #e8f0fb; font-size: .85rem; }
.touch-keyboard__row .is-space { grid-column: span 2; font-size: .82rem; }
.touch-keyboard__row .is-clear { color: #9b442f; font-size: .8rem; }
.touch-keyboard__row .is-confirm { border-color: #1a816a; background: linear-gradient(120deg, #17775f, #26a183); color: #fff; font-size: .8rem; }
.touch-keyboard__blank { min-height: 46px; }

@media (max-width: 980px), (pointer: coarse) {
    .touch-keyboard-target {
        -webkit-user-select: none;
        user-select: none;
        caret-color: transparent;
        touch-action: manipulation;
    }
}

@media (min-width: 981px) {
    #sales-catalog-panel { position: relative; }

    #sales-catalog-panel > .pos-numeric-keypad.is-ticket-panel {
        position: absolute;
        inset: 0;
        z-index: 6;
        padding: 0;
        align-items: stretch;
        background: rgba(238, 244, 252, 0.96);
        border-radius: inherit;
    }

    #sales-catalog-panel > .pos-numeric-keypad.is-ticket-panel .pos-numeric-keypad__card {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 20px;
        border: 0;
        border-radius: inherit;
        background: transparent;
        box-shadow: none;
    }

    #sales-catalog-panel > .pos-numeric-keypad.is-ticket-panel .pos-numeric-keypad__keys button {
        min-height: clamp(54px, 9vh, 72px);
    }

}

@media (max-width: 980px), (pointer: coarse) {
    input[data-pos-keypad][readonly] {
        -webkit-user-select: none;
        user-select: none;
        caret-color: transparent;
        touch-action: manipulation;
    }

    input[data-pos-alpha-keyboard][readonly],
    textarea[data-pos-alpha-keyboard][readonly] {
        -webkit-user-select: none;
        user-select: none;
        caret-color: transparent;
        touch-action: manipulation;
    }
}

.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;
}

#checkout-modal .modal-card {
    width: min(612px, 85%);
}

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

#new-sale-modal {
    padding: 8px;
}

#new-sale-modal .modal-card.modal-xl {
    width: min(1152px, 80vw);
}

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

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

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

@media (max-width: 980px) {
    #new-sale-modal .modal-card.modal-xl {
        width: 100%;
    }

    .offline-status-banner {
        flex-wrap: wrap;
    }

    .offline-status-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .sync-center-grid {
        grid-template-columns: 1fr;
    }
}

.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));
}

.supplier-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.supplier-form-grid > .field-label {
    min-width: 0;
}

.supplier-form-grid input,
.supplier-form-grid select {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1000px) {
    .supplier-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .supplier-form-grid {
        grid-template-columns: 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;
}

/* Resumen y filtros de cobranza: información compacta y operable de un vistazo. */
.customer-balances-overview {
    display: grid;
    grid-template-columns: minmax(560px, 1fr) minmax(420px, 0.72fr);
    gap: 8px;
    align-items: stretch;
    margin-bottom: 12px;
}

.customer-balances-summary-cards {
    order: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.customer-balances-summary-cards .card {
    min-width: 0;
    min-height: 64px;
    padding: 8px 10px;
    border-top-width: 3px;
}

.customer-balances-summary-cards .card h3 {
    margin: 0;
    color: #223047;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.82rem;
    line-height: 1.05;
}

.customer-balances-summary-cards .card p {
    margin: 5px 0 0;
    font-size: 0.94rem;
    line-height: 1;
}

.customer-balances-summary-cards .card:nth-child(2) p {
    color: #c83838;
}

.customer-balances-overview .customers-balances-toolbar {
    order: 1;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(25, 31, 38, 0.08);
}

.customer-balances-overview .customers-balances-toolbar > .field-label {
    flex: 1 1 205px;
    min-width: 0 !important;
}

.customer-balances-overview .customers-balances-actions {
    flex: 1 1 280px;
    min-width: 0;
    flex-wrap: nowrap;
}

.customer-balances-overview .customers-balances-actions .field-label {
    flex: 1 1 150px;
    min-width: 0 !important;
}

@media (max-width: 1180px) {
    .customer-balances-overview {
        grid-template-columns: 1fr;
    }

    .customer-balances-overview .customers-balances-toolbar {
        display: flex;
        align-items: flex-end;
    }
}

@media (max-width: 680px) {
    .customer-balances-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-balances-overview .customers-balances-toolbar,
    .customer-balances-overview .customers-balances-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-balances-overview .customers-balances-actions {
        width: 100%;
    }
}

.cash-current-layout {
    display: block;
}

#cash-close-modal .modal-card {
    width: min(880px, 100%);
}

.cash-open-form {
    grid-template-columns: minmax(170px, 0.7fr) minmax(320px, 1.7fr);
    align-items: end;
}

.cash-open-form > * {
    min-width: 0;
}

.cash-open-form textarea {
    min-height: 42px;
    height: 42px;
    resize: vertical;
}

.cash-movement-form {
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(260px, 1.4fr);
    align-items: end;
}

.cash-movement-form > * {
    min-width: 0;
}

.cash-movement-form textarea {
    min-height: 42px;
    height: 42px;
    resize: vertical;
}

#cash-movement-modal .modal-card {
    width: min(760px, 100%);
}

.cash-close-form {
    grid-template-columns: minmax(190px, 1fr) minmax(155px, 0.75fr) minmax(250px, 1.55fr);
    align-items: end;
}

.cash-close-form > * {
    min-width: 0;
}

.cash-close-form #cash-close-summary .panel {
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
}

.cash-close-form textarea {
    grid-column: auto;
    min-height: 42px;
    height: 42px;
    resize: vertical;
}

.cash-close-form .modal-actions {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .cash-open-form,
    .cash-movement-form {
        grid-template-columns: 1fr;
    }

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

    .cash-close-form textarea {
        grid-column: 1 / -1;
    }
}

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

.cash-current-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    gap: 7px;
    align-items: center;
    min-width: 0;
}

.cash-current-actions button {
    min-height: 42px;
    min-width: 0;
    padding: 8px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.cash-current-actions button.is-unavailable {
    opacity: 0.58;
    cursor: help;
}

.cash-current-actions .cash-movement-action {
    border-color: #b9dfcb;
    background: #f4fbf7;
    color: #23734b;
}

.cash-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.cash-summary-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr));
    gap: 7px;
    margin: 0;
}

.cash-summary-cards .card {
    padding: 9px;
}

.cash-summary-cards .card p {
    margin-top: 4px;
}

.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: 8px;
}

.cash-session-hero {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    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(3, minmax(0, 1fr));
    gap: 8px;
}

.cash-metric-tile {
    border: 1px solid #dce6f6;
    border-radius: 14px;
    min-height: 68px;
    padding: 10px;
    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-metric-tile.is-income {
    border-color: #b9dfcb;
    background: #f4fbf7;
}

.cash-metric-tile.is-income strong {
    color: #23734b;
}

.cash-metric-tile.is-expense {
    border-color: #efc9c9;
    background: #fff8f8;
}

.cash-metric-tile.is-expense strong {
    color: #bd3131;
}

.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;
}

.cash-movements-table-head {
    margin-bottom: 8px;
}

.cash-movements-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cash-movements-table-head h4 {
    margin: 0 0 2px;
}

.cash-movements-table-head small {
    color: #667792;
    font-size: 0.78rem;
}

.cash-movements-filter {
    flex: 0 0 145px;
}

.cash-movements-filter-check {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-height: 34px;
    color: #43536e;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.cash-movements-title-row .cash-movements-filter {
    flex-basis: auto;
}

.cash-movements-filter-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2068b0;
}

.cash-movements-pagination {
    justify-content: flex-end;
    min-height: 40px;
    padding-top: 8px;
}

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

.checkout-payment-field { position: relative; display: block; }
.checkout-payment-field input { padding-left: 25px; }
.checkout-currency-prefix { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 1; color: #526480; font-weight: 800; pointer-events: none; }
.checkout-change-card.has-change { border-color: #f0a031; background: #fff4df; box-shadow: inset 0 3px 0 #ee941c; }
.checkout-change-card.has-change h4, .checkout-change-card.has-change p { color: #a75400; }

#checkout-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.checkout-submit {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(205px, 100%);
}

#checkout-summary .card {
    display: flex;
    flex: 0 0 124px;
    min-width: 0;
    min-height: 54px;
    height: 54px;
    padding: 6px 8px;
    border-top-width: 3px;
    border-radius: 10px;
    flex-direction: column;
    justify-content: center;
}

#checkout-apartado:disabled + .checkout-subtoggle-text {
    color: #8a94a3;
}

#checkout-summary .card h4 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 1.1em;
    font-size: 0.66rem;
    line-height: 1.05;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#checkout-summary .card p {
    margin-top: 3px;
    font-size: 0.92rem;
    line-height: 1;
}

@media (max-width: 680px) {
    #checkout-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    #checkout-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.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;
    }
}

@media (max-width: 620px) {
    .cash-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 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;
}

.customer-payment-currency-field {
    position: relative;
}

.customer-payment-currency-field > span {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: #44536d;
    font-size: 0.86rem;
    font-weight: 700;
    pointer-events: none;
    transform: translateY(-50%);
}

.customer-payment-currency-field > input {
    width: 100%;
    padding-left: 24px;
    font-variant-numeric: tabular-nums;
}

.customer-payment-change-field .field-static {
    color: #43516a;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.customer-payment-change-field.has-change .field-static {
    border-color: #f0a031;
    background: #fff4df;
    color: #a75400;
    box-shadow: inset 0 3px 0 #ee941c;
}

@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;
}

.pos-stock-warning {
    display: block;
    margin-top: 5px;
    padding: 5px 7px;
    border: 1px solid #edbe7b;
    border-left: 3px solid #ca790e;
    border-radius: 5px;
    background: #fff5e4;
    color: #814600;
    font-size: 0.73rem;
    line-height: 1.4;
}

.report-ranking-panel { margin-top: 14px; }
.report-ranking-note { color: var(--muted); font-size: 0.78rem; line-height: 1.5; margin: 12px 0; }
.report-ranking-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.report-ranking-chart { height: 370px; min-width: 0; padding: 10px; background: linear-gradient(135deg, #f2f8f5, #fff); border-radius: 12px; }
.report-ranking-table { overflow: auto; max-height: 390px; }
.report-ranking-table table { min-width: 510px; }
.report-ranking-table th { position: sticky; top: 0; background: #f1f6f4; z-index: 1; }
.report-ranking-table td:nth-child(n + 3), .report-ranking-table th:nth-child(n + 3) { text-align: right; white-space: nowrap; }
.report-ranking-table td small { display: block; color: var(--muted); margin-top: 3px; }
.report-ranking-table tbody tr:nth-child(even) { background: #f8faf9; }
.report-operating-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.report-operating-head h4 { margin: 0; }
.report-operating-head p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.report-operating-head .field-label { width: min(260px, 100%); }
.report-operating-kpis { margin-bottom: 0; }
.report-chart-wrap-lg { height: 320px; }
.report-operating-panel { margin-top: 14px; }
.report-operating-table { overflow: auto; margin-top: 8px; }
.report-operating-table table { min-width: 720px; }
.report-operating-table th { position: sticky; top: 0; z-index: 1; background: #f1f6f4; }
.report-operating-table tbody tr:nth-child(even) { background: #faf8f5; }
.report-operating-table td:nth-child(n + 2) { white-space: nowrap; }
.report-operating-table td:last-child, .report-operating-table th:last-child { text-align: right; }
.report-positive-value { color: #176b4b; }
.report-negative-value { color: #b3362d; }
@media (max-width: 1000px) { .report-ranking-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .report-operating-head { align-items: stretch; flex-direction: column; } .report-operating-head .field-label { width: 100%; } }

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

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

.modal-actions:has(> button:not(.hidden) + button:not(.hidden)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-actions:has(> button:not(.hidden) + button:not(.hidden)) > :not(button) {
    grid-column: 1 / -1;
}

#expense-detail-actions.expense-detail-actions {
    grid-template-columns: repeat(3, minmax(0, 220px)) !important;
    justify-content: center;
}

@media (max-width: 720px) {
    #expense-detail-actions.expense-detail-actions { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

.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-type-field {
    grid-column: span 4;
}

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

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

#purchase-modal .modal-card.modal-xl {
    width: min(1044px, 90vw);
}

#purchase-modal .modal-split {
    grid-template-columns: minmax(460px, 1.08fr) minmax(360px, 0.92fr);
    align-items: stretch;
}

.purchase-search-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.purchase-items-table {
    table-layout: fixed;
}

.purchase-items-table-shell {
    height: 354px;
    overflow-y: auto;
}

.purchase-items-table-shell .purchase-items-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.purchase-items-table th,
.purchase-items-table td {
    padding: 4px 3px;
}

.purchase-items-table th:nth-child(3),
.purchase-items-table td:nth-child(3) {
    width: 72px;
    text-align: center;
    vertical-align: middle;
}

.purchase-items-table th:nth-child(4),
.purchase-items-table td:nth-child(4) {
    width: 72px;
    text-align: center;
    vertical-align: middle;
}

.purchase-items-table td:nth-child(3) input[data-item-field="qty"] {
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    box-sizing: border-box;
    padding: 4px;
    text-align: center;
}

.purchase-items-table td:nth-child(4) button {
    width: 64px;
    min-width: 64px;
    height: 32px;
    min-height: 32px;
    padding: 4px 5px;
    line-height: 1.1;
}

.purchase-register-action {
    margin-top: 8px;
}

.purchase-register-action button {
    width: 100%;
}

.purchase-selection-toolbar {
    display: grid;
    grid-template-columns: minmax(118px, 1fr) 150px auto;
    gap: 8px;
    align-items: end;
    margin-top: 8px;
}

.purchase-selection-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.purchase-selection-actions button {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 40px;
    padding: 6px 9px;
    line-height: 1.2;
    font-size: 0.76rem;
    white-space: nowrap;
}

.purchase-selection-toolbar .field-label input,
.purchase-selection-toolbar .field-label select {
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

.purchase-results-summary {
    min-height: 18px;
    margin: 6px 0 0;
    color: #5f6f8b;
    font-size: 0.76rem;
    font-weight: 600;
}

.purchase-entry-details {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 8px;
    margin-top: auto;
}

.purchase-entry-date {
    display: flex;
    align-items: center;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d5dce8;
    border-radius: 8px;
    background: #f5f7fb;
    color: #52627d;
    font-size: 0.82rem;
    font-weight: 600;
}

.purchase-entry-details .field-label input {
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

#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-operations-actions-panel {
    margin-bottom: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #fbfcfa 0%, #f3f7f4 100%);
}

.inventory-operations-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.inventory-operations-actions > * {
    width: 100%;
    min-height: 42px;
    margin: 0;
    white-space: nowrap;
}

.inventory-operations-actions:has(> :only-child) {
    grid-template-columns: minmax(220px, 360px);
}

.inventory-operations-actions:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-transfer-action {
    color: #1f5c52;
    border: 1px solid #b9d7cf;
    background: #e9f4f0;
    box-shadow: none;
}

.inventory-transfer-action:hover {
    color: #15453d;
    border-color: #88bcae;
    background: #d9eee7;
}

.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;
}

.inventory-stock-toolbar {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(120px, 150px) minmax(105px, 130px) minmax(108px, max-content);
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

.inventory-stock-toolbar .section-search {
    min-width: 0;
}

.inventory-stock-toolbar .btn-inline-action {
    min-height: 38px;
    white-space: nowrap;
}

/* Cabecera compacta de Stock actual: filtros primero e indicadores al final. */
.inventory-stock-overview {
    display: grid;
    grid-template-columns: minmax(600px, 1.25fr) minmax(390px, 0.75fr);
    gap: 8px;
    align-items: stretch;
    margin-bottom: 10px;
}

.inventory-stock-overview .inventory-stock-toolbar {
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(25, 31, 38, 0.08);
}

.inventory-overview-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.inventory-overview-cards .card {
    min-width: 0;
    min-height: 56px;
    padding: 7px 8px;
    border-top-width: 3px;
}

.inventory-overview-cards .card h4 {
    font-size: 0.66rem;
    line-height: 1.08;
}

.inventory-overview-cards .card p {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1;
}

@media (max-width: 1220px) {
    .inventory-stock-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .inventory-overview-cards {
        grid-template-columns: 1fr;
    }
}

.inventory-counts-panel .panel-head-inline {
    align-items: center;
}

.inventory-counts-panel .panel-head-inline h4,
.inventory-counts-panel .panel-head-inline small {
    display: block;
}

.inventory-counts-panel .panel-head-inline small {
    margin-top: 2px;
    color: var(--muted);
}

.inventory-counts-panel .panel-head-inline button {
    width: auto;
    min-width: 150px;
}

.inventory-count-status-note {
    margin: 9px 0;
    padding: 8px 10px;
    border-left: 3px solid #2c8a72;
    background: #f0f8f5;
    color: #365c52;
    font-size: 0.78rem;
}

.inventory-count-table-shell,
.inventory-count-items-shell {
    max-width: 100%;
    overflow: auto;
}

.inventory-count-sessions-table td small,
.inventory-count-items-table td small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.inventory-count-progress {
    width: 110px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e9e5;
}

.inventory-count-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #23826b, #52aa78);
}

.inventory-count-empty {
    padding: 22px !important;
    color: var(--muted);
    text-align: center;
}

.inventory-count-status-draft { background: #eef2f6; color: #506078; }
.inventory-count-status-counting { background: #fff1d9; color: #985a08; }
.inventory-count-status-review { background: #e7f1ff; color: #225f9b; }
.inventory-count-status-published { background: #e4f6ea; color: #1f7645; }
.inventory-count-status-cancelled { background: #f5e7e7; color: #9a3737; }

.inventory-count-create-card {
    width: min(760px, calc(100vw - 24px));
}

.inventory-count-create-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


.inventory-count-blind-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    align-self: end;
    padding: 8px 10px;
    border: 1px solid #d6dfda;
    border-radius: 8px;
    background: #f8faf9;
}

.inventory-count-blind-check input {
    width: auto;
    min-width: 0;
}

.inventory-count-detail-card {
    width: min(1180px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: hidden;
}

.inventory-count-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
}

.inventory-count-summary article {
    padding: 9px 11px;
    border: 1px solid #dbe5df;
    border-radius: 10px;
    background: linear-gradient(145deg, #fff, #f3f8f5);
}

.inventory-count-summary span,
.inventory-count-summary strong,
.inventory-count-summary small {
    display: block;
}

.inventory-count-summary span,
.inventory-count-summary small {
    color: var(--muted);
    font-size: 0.72rem;
}

.inventory-count-summary strong {
    margin: 2px 0;
    font-size: 1rem;
}

.inventory-count-capture-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr) minmax(150px, 0.45fr);
    gap: 8px;
    margin-bottom: 8px;
}

.inventory-count-items-shell {
    max-height: calc(100vh - 345px);
    border: 1px solid #dce4df;
    border-radius: 9px;
}

.inventory-count-items-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf4f0;
}

.inventory-count-items-table th:first-child { width: 31%; }
.inventory-count-items-table th:nth-child(2),
.inventory-count-items-table th:nth-child(3),
.inventory-count-items-table th:nth-child(4) { width: 11%; text-align: center; }
.inventory-count-items-table .inventory-count-expected-cell,
.inventory-count-items-table .inventory-count-difference-cell { text-align: center; }
.inventory-count-items-table .inventory-count-qty { min-width: 80px; text-align: center; }
.inventory-count-items-table .inventory-count-reason { min-width: 210px; }
.inventory-count-items-table .inventory-count-difference-cell.is-different {
    background: #fff0f0;
    box-shadow: inset 3px 0 #d92d20;
    color: #b42318;
    font-weight: 800;
}

.inventory-count-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 9px;
}

.inventory-count-detail-actions button {
    width: auto;
    min-width: 140px;
}

.inventory-count-feedback-modal { z-index: 70; }
.inventory-count-feedback-card { width: min(440px, 100%); }
.inventory-count-feedback-card > p {
    color: #46546a;
    line-height: 1.5;
    margin: 8px 0 14px;
}

@media (max-width: 760px) {
    .inventory-count-create-grid,
    .inventory-count-summary,
    .inventory-count-capture-toolbar {
        grid-template-columns: 1fr;
    }

    .inventory-count-detail-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .inventory-count-detail-actions button {
        width: 100%;
        min-width: 0;
    }
}

.icon-action-btn.return-action {
    color: #a65212;
    border-color: #f1c79f;
    background: #fff6e9;
}

.sales-return-modal-card {
    width: min(848px, calc(100vw - 28px));
    max-height: 92vh;
}

.sales-return-lines-wrap {
    overflow-x: auto;
    border: 1px solid #dce4ef;
    border-radius: 12px;
}

.sales-return-lines-table {
    width: 100%;
    min-width: 680px;
    table-layout: fixed;
}

.sales-return-lines-table td small {
    display: block;
    color: #6a7890;
    margin-top: 3px;
}

.sales-return-lines-table tr.is-disabled {
    opacity: 0.55;
}

.sales-return-lines-table input[type="number"] {
    width: 70px;
}

.sales-return-lines-table th:nth-child(4),
.sales-return-lines-table td:nth-child(4) {
    width: 76px;
    min-width: 76px;
    text-align: center;
}

.sales-return-lines-table th:nth-child(5),
.sales-return-lines-table td:nth-child(5) {
    width: 116px;
    min-width: 116px;
}

.sales-return-lines-table .sales-return-disposition {
    min-width: 0;
}

.sales-return-options {
    margin-top: 12px;
}

.sales-return-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 8px;
}

.sales-return-summary article {
    display: flex;
    flex: 0 1 200px;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #efd4b6;
    border-radius: 10px;
    background: #fff9f1;
}

.sales-return-summary span,
.sales-return-history-row span {
    color: #66758d;
    font-size: 0.78rem;
}

.sales-return-summary strong {
    color: #8c4310;
    font-size: 1rem;
}

.sales-return-history-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #ccd7e6;
}

.sales-return-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f6;
}

.sales-return-history-row > div:first-child {
    display: flex;
    flex-direction: column;
}

.sales-return-history-actions {
    display: flex;
    gap: 6px;
}

.warning-text {
    color: #b46012;
}

@media (max-width: 720px) {
    .sales-return-history-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.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;
}

.pos-promotion-label {
    display: inline-flex;
    margin-top: 4px;
    padding: 3px 7px;
    border: 1px solid #efbd79;
    border-radius: 999px;
    background: #fff3df;
    color: #9a4a00;
    font-size: 0.7rem;
    font-weight: 800;
}
.pos-promotion-label details { width: 100%; margin-top: 3px; font-weight: 600; }
.pos-promotion-label summary { cursor: pointer; color: #7e3b00; }
.pos-promotion-groups { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pos-promotion-group-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border: 1px solid #e8b968; border-radius: 7px; background: #fff6df; color: #844600; font-size: .67rem; font-weight: 700; }
.pos-promotion-group-badge strong { color: #a2251d; }

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

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

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

.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: 2px;
    padding-top: 4px;
    border-top: 1px dashed #cad8ee;
}

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

.ticket-summary-row.promotion span,
.ticket-summary-row.promotion strong {
    color: #a75100;
}

.pos-promotion-progress {
    color: #8b4c1d !important;
    font-weight: 700;
}

.ticket-promotion-breakdown {
    margin: 3px 0 7px;
    padding-left: 18px;
    color: #8b4c1d;
    font-size: 0.76rem;
}

.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-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 980px), (pointer: coarse) {
    /* El encabezado conserva siempre disponible el cierre mientras se revisa un ticket largo. */
    #ticket-modal .modal-head {
        position: sticky;
        top: -11px;
        z-index: 4;
        margin: 0 -11px 8px;
        padding: 11px 11px 8px;
        background: #fff;
        isolation: isolate;
        border-bottom: 1px solid #e3eaf5;
        box-shadow: 0 5px 10px rgba(25, 42, 70, 0.08);
    }
}

.sales-promotions-modal-card {
    width: min(720px, 92vw);
}

.sales-promotions-branch {
    margin: 3px 0 0;
    color: #5f6f8b;
    font-size: 0.8rem;
}

.sales-promotions-table-shell {
    max-height: 330px;
    overflow-y: auto;
    border: 1px solid #d9e4f4;
    border-radius: 8px;
}

.sales-promotions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.sales-promotions-table th {
    position: sticky;
    top: 0;
    background: #edf7f4;
    color: #185e56;
    text-align: left;
    z-index: 1;
}

.sales-promotions-table th,
.sales-promotions-table td {
    padding: 8px 9px;
    border-bottom: 1px solid #e1e9f5;
    vertical-align: middle;
}

.sales-promotion-participants-row td {
    background: #fafcff;
    padding: 7px 9px;
}

.sales-promotion-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    color: #245d54;
    font-size: 0.78rem;
}

.sales-promotion-product-row + .sales-promotion-product-row {
    border-top: 1px solid #e1e9f5;
}

.sales-promotion-order-wide,
.sales-promotions-empty {
    color: #607092;
    font-size: 0.84rem;
}

.sales-promotions-empty {
    margin: 4px 0;
}

.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-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.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;
    /* Header plus nine catalog rows. */
    min-height: 355px;
    max-height: 355px;
    overflow: auto;
    border: 1px solid #e6edf8;
    border-radius: 10px;
    background: #fff;
}

.catalog-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.catalog-table thead th,
.ticket-items-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fe;
    box-shadow: 0 1px 0 #dbe5f4;
}

.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(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 0.6fr) 88px;
    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: 126px;
}

.sales-catalog-toolbar-actions #open-products-catalog-btn {
    width: 88px;
    min-width: 88px;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.8rem;
}

.sales-catalog-toolbar input,
.sales-catalog-toolbar select {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.82rem;
}

.sales-ticket-actions button {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.82rem;
    line-height: 1.1;
}

.sales-ticket-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.sales-ticket-heading h4 {
    white-space: nowrap;
}

.sales-ticket-heading #ticket-total-due {
    padding: 3px 8px;
    border: 1px solid #e4c66b;
    border-radius: 7px;
    background: #fff3bf;
    color: #111;
}

.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 {
    width: 48px;
    min-width: 0;
    max-width: 48px;
    min-height: 24px;
    padding: 1px 6px;
    text-align: center;
}

.sales-ticket-items-table {
    table-layout: fixed;
}

.sales-ticket-items-table th:nth-child(2),
.sales-ticket-items-table td:nth-child(2) {
    width: 58px;
    text-align: center;
}

.sales-ticket-items-table th:nth-child(3),
.sales-ticket-items-table td:nth-child(3) {
    width: 82px;
    text-align: right;
}

.sales-ticket-items-table th:nth-child(4),
.sales-ticket-items-table td:nth-child(4) {
    width: 82px;
    text-align: center;
}

.sales-ticket-items-table th:nth-child(5),
.sales-ticket-items-table td:nth-child(5) {
    width: 66px;
    text-align: right;
}

.sales-ticket-items-table td:nth-child(n + 2) {
    vertical-align: middle;
}

.ticket-concept-inline {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ticket-concept-inline strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-concept-inline small {
    flex: 0 0 auto;
    color: #607092;
}

.pos-unit-price {
    color: #1d2a42;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.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,
.ticket-items-scroll,
.dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: #9db5e6 #edf3ff;
}

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

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

.modal-card::-webkit-scrollbar-thumb,
.catalog-table-shell::-webkit-scrollbar-thumb,
.ticket-items-scroll::-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,
.ticket-items-scroll::-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) {
    .offline-status-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .offline-status-main {
        align-items: flex-start;
    }

    .offline-status-meta {
        white-space: normal;
    }

    .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 {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

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

    .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: 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-catalog-toolbar-actions #open-products-catalog-btn {
        width: 100%;
        min-width: 0;
    }

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

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

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

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

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

    .inventory-operations-actions {
        grid-template-columns: 1fr;
    }

    .inventory-operations-actions:has(> :only-child) {
        grid-template-columns: 1fr;
    }

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

    .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 {
        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 .purchases-orders-pending-col {
        width: 40px;
        min-width: 40px;
        white-space: nowrap;
        text-align: center;
    }

    .purchases-orders-table .purchases-orders-status-col {
        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(6) {
        width: 34px;
        min-width: 34px;
        white-space: nowrap;
        font-size: 0;
        padding-right: 1px;
        text-align: center;
    }

    .restock-items-table td:nth-child(6) {
        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(7) {
        width: 24px;
        min-width: 24px;
        font-size: 0;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .restock-items-table td:nth-child(7) {
        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;
}

.purchase-suggestion-shell {
    height: 233px;
}

#purchase-item-suggestions .suggestion-item-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 33px;
    box-sizing: border-box;
    padding: 7px 10px;
}

#purchase-item-suggestions .suggestion-item-main {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#purchase-item-suggestions .purchase-suggestion-meta {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
    text-align: right;
}

.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-btn.is-selected,
.suggestion-item-btn.is-selected:hover {
    background: #e8f6ed;
    box-shadow: inset 4px 0 #2f9660;
    color: #155b38;
}

.sales-message-body--multiline {
    white-space: pre-line;
}

.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;
}

.expense-overview {
    display: grid;
    grid-template-columns: minmax(172px, auto) 1px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(25, 31, 38, .06);
}
.expense-overview.without-expense-action { grid-template-columns: minmax(0, 1fr); }
.expense-overview-action { display: grid; align-content: center; gap: 7px; }
.expense-overview-label { color: #6c7482; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.expense-overview-action #new-expense-btn { width: 100%; min-width: 160px; min-height: 38px; }
.expense-overview-divider { align-self: stretch; width: 1px; background: #e8e1d8; }
.expense-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.expense-summary-card { position: relative; min-width: 0; overflow: hidden; padding: 11px 12px; border: 1px solid #e8e1d8; border-radius: 10px; background: #fbfaf8; }
.expense-summary-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #a17042; }
.expense-summary-card.is-paid { background: #f5fbf7; border-color: #d6e8dc; }
.expense-summary-card.is-paid::before { background: #318052; }
.expense-summary-card.is-pending { background: #fff9f0; border-color: #f0dfbf; }
.expense-summary-card.is-pending::before { background: #c6811b; }
.expense-summary-card.is-scope { background: #f5f8fd; border-color: #dbe4f2; }
.expense-summary-card.is-scope::before { background: #4272a9; }
.expense-summary-metric { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.expense-summary-metric span { color: #5b6472; font-size: .78rem; font-weight: 700; }
.expense-summary-metric strong { overflow: hidden; color: #202933; font-size: 1.04rem; text-overflow: ellipsis; white-space: nowrap; }
.expense-summary-card small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; }
.expense-filter-panel { margin-top: 12px; container-type: inline-size; overflow-x: auto; }
.expense-filters { display: grid; grid-template-columns: minmax(165px, 1.6fr) repeat(3, minmax(110px, 1fr)) repeat(2, minmax(115px, .95fr)) minmax(105px, .8fr); gap: 8px; align-items: end; min-width: 824px; }
.expense-filters:has(#expense-branch-filter-wrap.hidden) { grid-template-columns: minmax(175px, 1.5fr) repeat(2, minmax(115px, 1fr)) repeat(2, minmax(130px, 1.1fr)) minmax(105px, .8fr); min-width: 800px; }
.expense-filters > * { min-width: 0; }
.expense-filters button { min-height: 38px; }

/* En tablet se preserva una sola fila; el panel desplaza lateralmente si falta espacio. */
@container (max-width: 1180px) {
    .expense-filters #expense-clear-filters { width: 100%; }
    .expense-filters { grid-template-columns: minmax(115px, 1.05fr) repeat(3, minmax(85px, .85fr)) repeat(2, minmax(126px, 1.2fr)) minmax(98px, .85fr); min-width: 772px; }
    .expense-filters:has(#expense-branch-filter-wrap.hidden) { grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(100px, .9fr)) repeat(2, minmax(138px, 1.25fr)) minmax(105px, .9fr); min-width: 752px; }
}
@media (max-width: 760px) {
    .expense-overview { grid-template-columns: 1fr; gap: 10px; padding: 11px; }
    .expense-overview-action { grid-template-columns: 1fr auto; align-items: center; }
    .expense-overview-action #new-expense-btn { width: auto; }
    .expense-overview-divider { width: auto; height: 1px; }
    .expense-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .expense-summary-card { padding: 10px; }
    .expense-summary-metric { display: block; }
    .expense-summary-metric strong { display: block; margin-top: 3px; }
}
@media (max-width: 520px) {
    .expense-overview-action { grid-template-columns: 1fr; }
    .expense-overview-action #new-expense-btn { width: 100%; }
    .expense-summary { grid-template-columns: 1fr; }
}
.expense-table-shell { overflow: auto; max-height: 480px; margin-top: 10px; }
.expense-table-shell th { position: sticky; top: 0; z-index: 1; background: #f8f5f1; }
.expense-table-shell td small { display: block; color: var(--muted); }
.expense-total-cell { font-weight: 700; color: #7b3b0b; }
.expense-empty { text-align: center; color: var(--muted); padding: 28px !important; }
.expense-status-pending_approval { background: #fff2cc; color: #805b00; }
.expense-status-pending_payment { background: #fff2cc; color: #805b00; }
.expense-status-approved { background: #e7f2ff; color: #165d9c; }
.expense-status-paid { background: #e7f7ee; color: #216b42; }
.expense-status-cancelled { background: #fde9e9; color: #9b2929; }
.expense-flow-note { margin: 0; padding: 10px 12px; border-left: 3px solid #c16a27; background: #fff8f0; color: #6e4a2e; font-size: .84rem; }
.modal-card.expense-form-card { width: min(920px, 100%); }
.modal-card.expense-payment-card { width: min(560px, 100%); }
.modal-card.modal-xl.expense-detail-card { width: min(1040px, 100%); }
.expense-form-title { display: inline-flex; align-items: baseline; gap: 9px; min-width: 0; }
.expense-form-title-separator { align-self: stretch; width: 1px; min-height: 18px; background: #d9d0c6; }
#expense-form-branch { overflow: hidden; color: #667792; font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.expense-form-grid { grid-template-columns: minmax(105px, .72fr) minmax(120px, .9fr) minmax(165px, 1.22fr) minmax(100px, .66fr) minmax(175px, 1.3fr); gap: 7px; }
.expense-payment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.expense-currency-field { position: relative; }
.expense-currency-field > span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #44536d; font-size: .86rem; font-weight: 700; pointer-events: none; }
.expense-currency-field > input { width: 100%; padding-left: 24px; font-variant-numeric: tabular-nums; }
.expense-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.expense-detail-grid > div { padding: 8px; border: 1px solid #e5ddd5; border-radius: 9px; background: #fbfaf8; }
.expense-detail-grid span { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 3px; }
.expense-detail-grid p { margin: 5px 0 0; color: var(--muted); }
.expense-detail-concept strong { display: block; overflow-wrap: anywhere; }
.expense-detail-wide { grid-column: span 4; }
.expense-detail-section h5 { margin: 0 0 9px; }
.expense-detail-section .panel-head-inline { margin-bottom: 9px; }
.expense-file-list { display: grid; gap: 6px; }
.expense-file-list a { color: #7a3c0d; text-decoration: none; border: 1px solid #eadacb; border-radius: 8px; padding: 8px; }
.expense-upload-btn { cursor: pointer; color: #8e430d; font-weight: 700; font-size: .8rem; }
.expense-upload-btn input { display: none; }
.expense-timeline { display: grid; gap: 9px; }
.expense-timeline > div { display: flex; gap: 9px; align-items: flex-start; }
.expense-timeline i { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: #bd6422; box-shadow: 0 0 0 4px #fff0e4; }
.expense-timeline span, .expense-timeline small { display: block; }
.expense-timeline small { color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .expense-form-grid { grid-template-columns: minmax(110px, .72fr) minmax(0, 1.28fr); } }
@media (max-width: 520px) { .expense-payment-fields { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .expense-filters, .expense-detail-grid { grid-template-columns: 1fr; } .expense-filters { min-width: 0; } .expense-detail-wide { grid-column: auto; } }
@media (max-width: 520px) { .expense-form-grid { grid-template-columns: 1fr; } }

.topbar-branch-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.topbar-branch-selector select {
    min-width: 170px;
    height: 36px;
    padding: 5px 30px 5px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
}

.branch-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.branch-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rawbt-ticket-preview {
    width: 48mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 3mm 2mm 4mm;
    box-sizing: border-box;
    color: #111;
    background: #fff;
    border: 1px dashed #777;
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1.3;
}

.rawbt-ticket-preview--roll_80 {
    width: 72mm;
    font-size: 11px;
}

.rawbt-ticket-preview header {
    padding-bottom: 6px;
    text-align: center;
    border-bottom: 1px dashed #444;
}

.rawbt-ticket-preview header img {
    display: block;
    max-width: 85%;
    max-height: 42mm;
    margin: 0 auto 5px;
    filter: grayscale(1) contrast(1.5);
}

.rawbt-ticket-preview header h3,
.rawbt-ticket-preview header p,
.rawbt-ticket-preview header strong,
.rawbt-ticket-preview header b {
    display: block;
    margin: 0;
}

.rawbt-ticket-preview header h3 {
    font-size: 2em;
    line-height: 1.1;
}

.rawbt-ticket-preview header strong {
    margin-top: 4px;
}

.rawbt-ticket-meta {
    padding: 5px 0;
    border-bottom: 1px dashed #444;
}

.rawbt-ticket-meta p,
.rawbt-ticket-preview footer p {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 1px 0;
}

.rawbt-ticket-meta p b {
    text-align: right;
}

.rawbt-ticket-preview table {
    width: 100%;
    margin: 5px 0;
    border-collapse: collapse;
}

.rawbt-ticket-preview th,
.rawbt-ticket-preview td {
    padding: 2px 0;
    vertical-align: top;
}

.rawbt-ticket-preview th {
    border-bottom: 1px dashed #444;
    font-size: 0.9em;
    text-transform: uppercase;
}

.rawbt-ticket-preview th:first-child,
.rawbt-ticket-preview td:first-child {
    width: 13%;
    text-align: right;
}

.rawbt-ticket-preview th:last-child,
.rawbt-ticket-preview td:last-child {
    width: 27%;
    text-align: right;
    white-space: nowrap;
}

.rawbt-ticket-preview td:nth-child(2) {
    padding: 2px 4px;
    overflow-wrap: anywhere;
}

.rawbt-ticket-preview td small {
    display: block;
    margin-top: 1px;
    font-size: 0.9em;
}

.rawbt-ticket-preview footer {
    padding-top: 5px;
    border-top: 1px dashed #444;
}

.rawbt-ticket-preview .rawbt-ticket-total {
    margin-top: 5px;
    padding: 4px 0;
    border-top: 1px dashed #444;
    border-bottom: 1px dashed #444;
    font-size: 1.25em;
    line-height: 1.3;
}

.rawbt-ticket-footer {
    margin-top: 7px;
    text-align: center;
}

.rawbt-image-source .ticket-meta-col p strong,
.rawbt-image-source .ticket-info p strong {
    font-weight: 400;
}

.rawbt-image-source .ticket-payments h4,
.rawbt-image-source .ticket-totals p,
.rawbt-image-source .ticket-totals p strong {
    font-weight: 500;
}

.inventory-stock-table-shell {
    max-width: 100%;
    overflow: auto;
}

.inventory-stock-table {
    min-width: 920px;
}

.inventory-stock-table .inventory-branch-stock-cell,
.inventory-stock-table .inventory-stock-total-cell {
    text-align: center;
    white-space: nowrap;
}

.inventory-stock-table .inventory-stock-total-cell {
    font-weight: 800;
    background: #f2f7f3;
}

.inventory-stock-table .inventory-stock-negative {
    color: #b42318;
    font-weight: 800;
    background: #fff0ee;
}

.branch-assignment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-assignment-actions button {
    width: auto;
    white-space: nowrap;
}

.branch-hero-actions > * {
    width: auto;
    min-width: 128px;
}

.button-link,
.transfer-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.button-link {
    color: #fff;
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    box-shadow: 0 8px 16px rgba(214, 15, 23, 0.24);
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.branches-grid.has-user-assignments {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
}

.branch-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.branch-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfb;
}

.branch-user-card span,
.branch-user-card small {
    display: block;
}

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

.branch-card {
    display: grid;
    gap: 3px;
    min-height: 118px;
    padding: 14px;
    border: 1px solid #d9e1dc;
    border-radius: 13px;
    background: linear-gradient(145deg, #ffffff, #f2f7f3);
    color: var(--text);
    text-align: left;
    cursor: default;
    box-shadow: none;
}

.has-user-assignments .branch-card {
    grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1.55fr);
    gap: 8px;
}

.branch-card-summary {
    display: grid;
    align-content: start;
    gap: 3px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    box-shadow: none;
}

.branch-card-summary:hover {
    border: 0;
    background: transparent;
    color: var(--text);
    box-shadow: none;
}

.branch-card-users {
    min-width: 0;
    padding-left: 9px;
    border-left: 1px solid #dbe6de;
}

.branch-card-pending { border-color: #ebc978; background: #fffaf0; }
.branch-card-pending .branch-card-type { background: #fff0c9; color: #865400; }
.branch-card-inactive { opacity: .72; }
.branch-card-pending .branch-card-users { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.branch-card-pending .branch-card-users button { width: auto; min-width: 132px; }

.branch-card-users-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.branch-card-users-head span,
.branch-card-users-head small {
    display: block;
}

.branch-card-users-head small,
.branch-card-users-status {
    color: var(--muted);
}

.branch-card-users-head button {
    width: auto;
    min-width: 74px;
    padding: 6px 10px;
}

.branch-card-user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 6px;
    max-height: 128px;
    overflow-y: auto;
    padding-right: 3px;
}

.branch-card-user-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #dce5df;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.branch-card-user-option input {
    width: auto;
    min-width: 0;
    margin: 0;
}

.branch-card-user-option-fixed {
    cursor: default;
    background: #edf8f1;
    border-color: #b9ddc7;
}

.branch-card-user-fixed-indicator {
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border-radius: 50%;
    background: #168254;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
}

.branch-card-user-option span,
.branch-card-user-option strong,
.branch-card-user-option small {
    display: block;
    min-width: 0;
}

.branch-card-user-option strong,
.branch-card-user-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-card-user-option strong {
    font-size: 0.72rem;
    line-height: 1.15;
}

.branch-card-user-option small {
    color: var(--muted);
    font-size: 0.62rem;
    line-height: 1.15;
}

.branch-card:hover,
.branch-card.is-active {
    border-color: #2c6b3d;
    box-shadow: 0 8px 18px rgba(33, 91, 51, 0.12);
}

.branch-card.is-active {
    background: linear-gradient(145deg, #f7fff8, #e8f4eb);
}

.branch-card-type {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dfeee3;
    color: #215b33;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.branch-card-summary > small,
.branch-card-summary > span:last-child {
    color: var(--muted);
}

@media (max-width: 640px) {
    .has-user-assignments .branch-card {
        grid-template-columns: 1fr;
    }

    .branch-card-users {
        padding-top: 11px;
        padding-left: 0;
        border-top: 1px solid #dbe6de;
        border-left: 0;
    }
}

.branch-table-shell {
    width: 100%;
    overflow: auto;
}

.branch-table-shell table {
    min-width: 900px;
}

.branch-number-input {
    width: 105px;
}

.branch-search {
    width: min(340px, 45vw);
}

.branch-price-toolbar { display: flex; align-items: center; gap: 8px; }
.branch-price-toolbar button { white-space: nowrap; width: auto; }
.branch-price-field { position: relative; display: block; width: 96px; }
.branch-price-field > b { position: absolute; top: 50%; left: 9px; z-index: 1; transform: translateY(-50%); color: #526480; font-size: 0.84rem; pointer-events: none; }
.branch-price-input { width: 100%; padding-left: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.branch-price-input.is-dirty { border-color: #dc8a18; background: #fff7e8; box-shadow: 0 0 0 2px rgba(220, 138, 24, 0.12); }
.branch-inventory-price-cell { vertical-align: middle; }
.branch-price-readonly { display: block; width: 96px; color: #1d2a42; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.branch-inventory-stock-col { text-align: center; }
.branch-price-matrix .branch-transit-col { text-align: center; white-space: nowrap; }
.branch-price-matrix .branch-stock-col { text-align: center; white-space: nowrap; }
.branch-inventory-table tbody td { padding: 3px 4px; line-height: 1.15; vertical-align: middle; }
.branch-inventory-table .branch-price-input { height: 30px; min-height: 30px; padding-top: 4px; padding-bottom: 4px; }
.branch-inventory-table tbody td > strong,
.branch-inventory-table tbody td > small { line-height: 1.1; }
.branch-price-matrix th:nth-child(-n+2), .branch-price-matrix td:nth-child(-n+2) { position: sticky; z-index: 2; background: #fff; }
.branch-price-matrix th:first-child, .branch-price-matrix td:first-child { left: 0; }
.branch-price-matrix th:nth-child(2), .branch-price-matrix td:nth-child(2) { left: 90px; min-width: 210px; }
.catalog-pagination#branch-price-pagination { justify-content: space-between; min-height: 42px; padding-top: 8px; border-top: 1px solid #e1e7e4; }
.branch-price-page-summary { flex: 0 0 auto; }
.branch-price-page-actions { display: grid; grid-template-columns: minmax(92px, auto) minmax(105px, auto) minmax(92px, auto); align-items: center; gap: 7px; }
.branch-price-page-actions button { width: auto; min-height: 34px; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.branch-price-page-actions strong { color: #253b35; font-size: 0.8rem; text-align: center; white-space: nowrap; }
@media (max-width: 620px) { .catalog-pagination#branch-price-pagination { align-items: stretch; flex-direction: column; } .branch-price-page-actions { grid-template-columns: 1fr auto 1fr; width: 100%; } }
.branch-price-unsaved-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; width: min(560px, 100%); padding: 18px; border-color: #efd3aa; }
.branch-price-unsaved-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff2dc; color: #a95b08; font-family: "Rajdhani", sans-serif; font-size: 1.45rem; font-weight: 800; }
.branch-price-unsaved-card h4 { margin: 1px 0 3px; color: #26352f; }
.branch-price-unsaved-card p { margin: 0; color: #66736d; }
.branch-price-unsaved-card #branch-price-unsaved-count { display: inline-block; margin-top: 8px; color: #a95b08; font-size: 0.78rem; }
.branch-price-unsaved-actions { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto minmax(160px, 1fr); gap: 8px; margin-top: 14px; }
.branch-price-unsaved-actions button { width: auto; min-height: 38px; padding: 8px 14px; border-radius: 9px; white-space: nowrap; }
@media (max-width: 540px) { .branch-price-unsaved-actions { grid-template-columns: 1fr; } .branch-price-unsaved-actions button { width: 100%; } }

.branch-transfer-actions,
.transfer-route {
    display: flex;
    align-items: center;
    gap: 10px;
}

.transfer-route {
    justify-content: center;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #f3f7f4;
}

.branch-loss-value {
    color: #a12b2b;
    font-weight: 700;
}

.branch-loss-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 4px solid #b5483f;
    background: #fff4f2;
    color: #7d2e29;
    font-size: 13px;
}

.branch-status-in_transit,
.branch-status-partially_received {
    background: #fff1c7;
    color: #745400;
}

.branch-status-completed {
    background: #dff1e4;
    color: #215b33;
}

#receive-items-tbody td:first-child small {
    display: block;
    color: var(--muted);
}

#receive-items-tbody input,
#receive-items-tbody select {
    min-width: 95px;
}

.transfer-create-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
    padding: 18px 20px;
    overflow: hidden;
    border: 1px solid #d6dfd8;
    border-radius: 14px;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 241, 0.9)),
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(34, 95, 52, 0.04) 18px 20px);
}

.transfer-create-hero::after {
    content: "";
    position: absolute;
    right: 12%;
    bottom: -42px;
    width: 170px;
    height: 95px;
    border-radius: 50%;
    background: rgba(41, 110, 61, 0.08);
}

.transfer-create-hero h3,
.transfer-create-hero p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.transfer-create-hero h3 {
    margin-top: 3px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.35rem;
}

.transfer-create-hero p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.transfer-kicker {
    color: #296b3e;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.transfer-back-link {
    position: relative;
    z-index: 1;
    width: auto;
    border: 1px solid #cdd9d0;
    color: #285f3a;
    background: rgba(255, 255, 255, 0.8);
}

.transfer-create-layout {
    display: grid;
    gap: 10px;
    padding-bottom: 76px;
}

.transfer-route-panel,
.transfer-catalog-panel {
    padding: 12px;
}

.transfer-route-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) 32px minmax(220px, 1fr) minmax(280px, 1.4fr);
    gap: 10px;
    align-items: end;
}

.transfer-route-arrow {
    align-self: end;
    display: grid;
    place-items: center;
    height: 38px;
    color: #347448;
    font-size: 1.3rem;
    font-weight: 800;
}

.transfer-readonly-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cdd9d0;
    border-radius: 8px;
    background: #f1f7f3;
    color: #224f31;
}

.transfer-readonly-field small {
    color: #63806c;
}

.transfer-form-message {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid #efb8b8;
    border-radius: 8px;
    background: #fff2f2;
    color: #8a2626;
    font-size: 0.82rem;
    font-weight: 700;
}

.transfer-form-message[data-tone="success"] {
    border-color: #b9ddc3;
    background: #eef8f1;
    color: #255f36;
}

.transfer-form-message[data-tone="info"] {
    border-color: #efd59b;
    background: #fff8e8;
    color: #765718;
}

.transfer-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(135px, 0.8fr)) 105px max-content max-content;
    gap: 8px;
    align-items: end;
    padding-bottom: 10px;
    border-bottom: 1px solid #e4dfd9;
}

.transfer-toolbar-button {
    height: 38px;
}

.transfer-toolbar-suggest {
    width: auto;
    height: 38px;
    white-space: nowrap;
}

.transfer-catalog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px 8px;
}

.transfer-catalog-heading h4,
.transfer-catalog-heading small {
    display: block;
    margin: 0;
}

.transfer-catalog-heading small {
    margin-top: 2px;
    color: var(--muted);
}

.transfer-catalog-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.transfer-catalog-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.transfer-catalog-actions button {
    width: auto;
}

.transfer-selected-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #465049;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.transfer-selected-toggle input {
    width: auto;
}

.bulk-transfer-table-shell {
    max-height: min(52vh, 530px);
    overflow: auto;
    border: 1px solid #e0ddd7;
    border-radius: 10px;
}

.bulk-transfer-table {
    width: 100%;
    min-width: 850px;
    border-collapse: separate;
    border-spacing: 0;
}

.bulk-transfer-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 10px;
    background: #f3f6f3;
    box-shadow: 0 1px 0 #d9ded9;
}

.bulk-transfer-table td {
    padding: 7px 10px;
    transition: background 140ms ease;
}

.bulk-transfer-table tr.is-selected td {
    background: #eef8f0;
}

.bulk-transfer-table tr.is-selected td:first-child {
    box-shadow: inset 4px 0 #2e8b4b;
}

.bulk-transfer-table td strong,
.bulk-transfer-table td small,
.bulk-transfer-table td span {
    display: block;
}

.bulk-transfer-table td small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
}

.bulk-transfer-qty-input {
    width: 130px;
    text-align: right;
    font-weight: 800;
}

.bulk-transfer-table tr.is-selected .bulk-transfer-qty-input {
    border-color: #4b9c61;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(75, 156, 97, 0.12);
}

.transfer-empty-state {
    padding: 30px !important;
    color: var(--muted);
    text-align: center;
}

.transfer-summary-bar {
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 8px;
    left: 258px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px 10px 16px;
    border: 1px solid #cdd9d0;
    border-radius: 12px;
    background: rgba(252, 254, 252, 0.96);
    box-shadow: 0 14px 34px rgba(25, 55, 35, 0.18);
    backdrop-filter: blur(10px);
}

.layout.sidebar-collapsed .transfer-summary-bar {
    left: 92px;
}

.transfer-summary-copy span,
.transfer-summary-copy strong {
    display: block;
}

.transfer-summary-copy span {
    color: var(--muted);
    font-size: 0.76rem;
}

.transfer-summary-copy strong {
    color: #245d36;
    font-size: 1rem;
}

.transfer-summary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transfer-summary-actions button {
    width: auto;
    min-width: 150px;
}

.transfer-cancel-link {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.transfer-module-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #d9dfda;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.72);
}

.transfer-module-tab {
    width: auto;
    min-width: 190px;
    padding: 8px 14px;
    border: 1px solid transparent;
    color: #506158;
    background: transparent;
    box-shadow: none;
}

.transfer-module-tab.is-active {
    border-color: #bcd2c2;
    color: #245f36;
    background: #eef7f0;
}

.transfer-tracking-layout {
    display: grid;
    gap: 10px;
}

.transfer-dispatch-grid {
    grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(230px, 1.4fr);
    align-items: end;
}

.transfer-commercial-modal-card {
    width: min(1080px, 96vw);
}

.transfer-commercial-intro {
    margin: 0 0 10px;
    color: var(--muted);
}

.transfer-commercial-toolbar {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-bottom: 10px;
}

.transfer-commercial-toolbar .field-label {
    width: 220px;
}

.transfer-commercial-toolbar button {
    width: auto;
}

.transfer-commercial-table-shell {
    max-height: 32vh;
}

.transfer-commercial-table-shell table {
    min-width: 760px;
}

.transfer-commercial-table-shell input {
    min-width: 100px;
}

.transfer-promotion-builder,
.transfer-commercial-review,
.transfer-commercial-note {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid #d8e2da;
    border-radius: 10px;
    background: #f7faf8;
}

.transfer-promotion-heading strong,
.transfer-promotion-heading small,
.transfer-promotion-review strong,
.transfer-promotion-review small {
    display: block;
}

.transfer-promotion-heading small,
.transfer-promotion-review small {
    color: var(--muted);
}

.transfer-promotion-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 9px;
}

.promotion-admin-builder { padding: 14px; }
.promotion-builder-head { align-items: center; gap: 12px; }
.promotion-builder-head > div { min-width: 0; }
.promotion-builder-head #promotion-builder-back { width: auto; min-width: 160px; white-space: nowrap; }
.promotion-list-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.promotion-list-actions select { min-width: 170px; }
.promotion-list-actions #promotion-new-btn { width: auto; min-width: 145px; white-space: nowrap; }
.promotion-empty-state { display: grid; justify-items: center; gap: 4px; padding: 26px 12px; color: #6b7c75; text-align: center; }
.promotion-empty-state strong { color: #294b42; font-size: .9rem; }
.promotion-empty-state span { font-size: .78rem; }
.promotion-discard-notice { padding: 12px; border: 1px solid #efc98f; border-left: 4px solid #df8618; border-radius: 9px; background: #fff8ec; }
.promotion-discard-notice > strong { display: block; margin-bottom: 4px; color: #704008; }
.promotion-discard-notice > p { margin: 0; color: #5f5548; line-height: 1.35; }
.promotion-destination-block { display: grid; grid-template-columns: 180px minmax(280px, 820px); align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.promotion-destination-block > div:first-child small { display: block; margin-top: 3px; color: #718078; font-size: .75rem; }
.promotion-branch-picker { position: relative; min-width: 0; }
.promotion-branch-picker summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border: 1px solid #cbded5; border-radius: 9px; background: #f8fbf9; color: #214f45; font-weight: 700; cursor: pointer; list-style: none; }
.promotion-branch-picker summary::-webkit-details-marker { display: none; }
.promotion-branch-picker[open] summary { border-color: #78ad9e; border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #edf7f2; }
.promotion-branch-picker-icon { font-size: 1.25rem; line-height: 1; transition: transform 140ms ease; }
.promotion-branch-picker[open] .promotion-branch-picker-icon { transform: rotate(180deg); }
.promotion-branch-options { position: absolute; z-index: 8; right: 0; left: 0; max-height: 230px; overflow: auto; padding: 7px; border: 1px solid #78ad9e; border-top: 0; border-radius: 0 0 9px 9px; background: #fff; box-shadow: 0 12px 22px rgba(35, 70, 58, .14); }
.promotion-branch-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px; }
.promotion-branch-option { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 9px; border: 1px solid #d8e5df; border-radius: 8px; background: #fff; cursor: pointer; }
.promotion-branch-option:hover { background: #f0f7f3; }
.promotion-branch-option:has(input:checked) { border-color: #71aa99; background: #edf7f2; }
.promotion-branch-option input { width: 16px; min-width: 16px; height: 16px; margin: 0; accent-color: #21836f; }
.promotion-branch-option span { display: flex; overflow: hidden; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; }
.promotion-branch-option strong { overflow: hidden; text-overflow: ellipsis; }
.promotion-branch-option small { color: #6d7d76; font-size: .72rem; }
.promotion-branch-option small::before { content: "|"; margin-right: 5px; color: #9aaba4; }
.promotion-branch-actions { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 7px; padding-bottom: 7px; border-bottom: 1px solid #e0e9e5; }
.promotion-branch-actions button { width: auto; min-height: 28px; padding: 4px 9px; white-space: nowrap; }
.promotion-check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.promotion-check-card, .promotion-product-card { display: flex; align-items: center; gap: 9px; border: 1px solid #d7e2dc; border-radius: 11px; background: #f8fbf9; padding: 9px 11px; cursor: pointer; }
.promotion-check-card span, .promotion-product-card span { display: grid; min-width: 0; }
.promotion-check-card small, .promotion-product-card small { color: #68758a; }
.promotion-product-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.promotion-product-toolbar .field-label { flex: 1; }
.promotion-product-toolbar > small { flex: 0 0 auto; min-width: 170px; padding: 8px 10px; border-radius: 999px; background: #edf5f1; color: #345e55; font-weight: 700; text-align: center; }
.promotion-product-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-height: 330px; overflow: auto; margin-top: 8px; padding: 2px 5px 4px 2px; scrollbar-gutter: stable; }
.promotion-product-card { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); grid-template-rows: minmax(45px, auto) auto; align-items: start; gap: 6px 7px; min-height: 94px; padding: 10px; border-color: #d5e1dc; border-radius: 12px; background: linear-gradient(145deg, #fff 0%, #f6faf8 100%); box-shadow: 0 2px 7px rgba(39, 78, 67, 0.05); transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease; }
.promotion-product-card:hover { border-color: #91b9aa; box-shadow: 0 6px 14px rgba(39, 78, 67, 0.11); transform: translateY(-1px); }
.promotion-product-card.is-selected { border-color: #21836f; background: linear-gradient(145deg, #f2fcf7 0%, #e6f5ed 100%); box-shadow: 0 0 0 2px rgba(33, 131, 111, 0.12), 0 6px 14px rgba(39, 78, 67, 0.1); }
.promotion-product-card input[type="checkbox"] { width: 17px; min-width: 17px; height: 17px; margin: 1px 0 0; accent-color: #21836f; cursor: pointer; }
.promotion-product-card .promotion-product-copy { display: flex; flex-direction: column; align-self: stretch; min-width: 0; line-height: 1.15; }
.promotion-product-card .promotion-product-copy strong { display: -webkit-box; overflow: hidden; min-height: 2.3em; color: #17231f; font-size: 0.79rem; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.promotion-product-card .promotion-product-copy small { overflow: hidden; margin-top: 3px; font-size: 0.68rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.promotion-product-card b { grid-column: 2; align-self: end; width: max-content; padding: 3px 7px; border-radius: 999px; background: #e5f2ed; color: #176653; font-size: 0.76rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.promotion-product-card.is-selected b { background: #21836f; color: #fff; }
.promotion-product-toolbar { display: grid; grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(150px, .7fr)) auto; align-items: end; gap: 10px; margin-top: 12px; }
.promotion-product-toolbar > small { min-width: 175px; padding: 9px 11px; border-radius: 10px; background: #edf5f1; color: #345e55; font-weight: 700; text-align: center; }
.promotion-product-selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: #62756e; font-size: .78rem; }
.promotion-product-selection-tools > div { display: flex; flex-wrap: wrap; gap: 7px; }
.promotion-product-selection-tools button { width: auto; min-height: 34px; white-space: nowrap; }
.promotion-admin-builder .transfer-promotion-grid.is-bundle { grid-template-columns: minmax(145px, 1fr) minmax(180px, 1.2fr) minmax(145px, .7fr) repeat(2, minmax(135px, .8fr)); }
.promotion-admin-builder .transfer-promotion-grid.is-threshold { grid-template-columns: minmax(190px, 1.25fr) minmax(160px, 1fr) minmax(165px, .9fr) minmax(135px, .75fr) repeat(2, minmax(140px, .78fr)); }
.promotion-readonly-money { background: #f3f7f5; color: #244f45; font-weight: 800; font-variant-numeric: tabular-nums; }
.promotion-bundle-summary { margin-top: 9px; padding: 10px 12px; border: 1px solid #c9ddd3; border-radius: 11px; background: linear-gradient(135deg, #f7fbf9 0%, #eef7f2 100%); }
.promotion-bundle-summary.is-invalid { border-color: #df8f88; background: #fff4f2; }
.promotion-bundle-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.promotion-bundle-summary-head > div { min-width: 0; }
.promotion-bundle-summary-head strong, .promotion-bundle-summary-head small { display: block; }
.promotion-bundle-summary-head small { margin-top: 2px; color: #6a7a74; font-size: .71rem; }
.promotion-bundle-savings { flex: 0 0 auto; color: #176653; font-size: .82rem; text-align: right; }
.promotion-bundle-summary.is-invalid .promotion-bundle-savings { color: #a52920; }
.promotion-selected-products { display: flex; flex-wrap: wrap; gap: 6px; min-height: 31px; margin-top: 8px; }
.promotion-selected-products > small { align-self: center; color: #718078; }
.promotion-selected-product { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 5px 6px 5px 9px; border: 1px solid #bad4c8; border-radius: 9px; background: #fff; }
.promotion-selected-product > span { display: grid; min-width: 0; }
.promotion-selected-product strong, .promotion-selected-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promotion-selected-product strong { color: #203e36; font-size: .74rem; }
.promotion-selected-product small { color: #718078; font-size: .66rem; font-variant-numeric: tabular-nums; }
.promotion-selected-product button { width: 22px; min-width: 22px; height: 22px; min-height: 22px; padding: 0; border-radius: 7px; box-shadow: none; font-size: .72rem; }
.promotion-bundle-branch-note { display: grid; gap: 4px; margin-top: 8px; color: #304940; font-size: .72rem; }
.promotion-bundle-branch-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(3, minmax(125px, auto)); align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #d4e4dc; border-radius: 7px; background: #fff; font-variant-numeric: tabular-nums; }
.promotion-bundle-branch-row span,
.promotion-bundle-branch-row b { text-align: right; white-space: nowrap; }
.promotion-bundle-branch-row b { color: #176653; }
.promotion-bundle-branch-row.is-unavailable { grid-template-columns: minmax(130px, 1fr) auto; border-color: #efc3bd; color: #9e332b; }
@media (max-width: 680px) { .promotion-bundle-branch-row { grid-template-columns: 1fr 1fr; } .promotion-bundle-branch-row span, .promotion-bundle-branch-row b { text-align: left; } }
.promotion-products-table-shell { max-height: 360px; overflow: auto; margin-top: 8px; border: 1px solid #d8e4dd; border-radius: 11px; }
.promotion-products-table { min-width: 1180px; margin: 0; }
.promotion-products-table th { position: sticky; top: 0; z-index: 1; background: #f2f7f4; }
.promotion-products-table td { vertical-align: middle; }
.promotion-products-table td:nth-child(2) { white-space: nowrap; }
.promotion-products-table td:nth-child(3) small { display: block; margin-top: 2px; color: #75847f; font-size: .72rem; }
.promotion-products-table th:last-child { min-width: 270px; }
.promotion-products-table th:nth-child(5) { min-width: 600px; text-align: center; }
.promotion-branch-context-cell { width: 600px; min-width: 600px; text-align: center; }
.promotion-branch-context-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 145px)); justify-content: center; gap: 5px; }
.promotion-branch-context-card { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 6px 7px; border: 1px solid #cfe1d9; border-radius: 8px; background: #f5faf7; font-size: .68rem; line-height: 1.15; text-align: center; font-variant-numeric: tabular-nums; }
.promotion-branch-context-card > strong { overflow: hidden; color: #174f43; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.promotion-branch-context-card > span { display: flex; justify-content: center; gap: 5px; color: #5d6d67; }
.promotion-branch-context-card > span b { color: #24332e; white-space: nowrap; }
.promotion-branch-context-card .promotion-branch-preview { margin-top: 2px; padding-top: 3px; border-top: 1px dashed #acd0c1; color: #17705b; }
.promotion-branch-context-card .promotion-branch-preview b { color: #12634f; }
.promotion-branch-context-card > small { color: #708079; }
.promotion-branch-context-card > small.is-low { color: #a16112; font-weight: 700; }
.promotion-branch-context-card > small.is-empty { color: #a63535; font-weight: 700; }
.promotion-branch-context-card > small.is-conflict { color: #a34a17; font-weight: 700; }
.promotion-branch-context-card.is-empty { border-color: #e7c7c4; background: #fff8f7; }
.promotion-branch-context-card.has-conflict { border-color: #e3b476; background: #fff8ed; }
.promotion-branch-context-status { display: block; padding: 8px; color: #6d7e77; text-align: center; font-size: .72rem; font-style: italic; }
.promotion-branch-context-status.is-error { color: #a63535; }
.promotion-deactivate-modal-card { width: min(430px, 100%); overflow: hidden; }
.promotion-deactivate-notice { padding: 12px; border: 1px solid #efc98f; border-left: 4px solid #df8618; border-radius: 9px; background: #fff8ec; }
.promotion-deactivate-notice > strong { display: block; margin-bottom: 4px; color: #704008; }
.promotion-deactivate-notice > p { margin: 0; color: #5f5548; line-height: 1.35; }
.promotion-deactivate-error { margin: 8px 0 0; padding: 7px 9px; border-radius: 7px; background: #fff0ef; color: #a42e2e; font-size: .78rem; }
.promotion-deactivate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.promotion-deactivate-actions button { width: 100%; }
.promotion-product-check-col { width: 42px; min-width: 42px; text-align: center; }
.promotion-product-check-col input { width: 17px; min-width: 17px; height: 17px; margin: 0; accent-color: #21836f; cursor: pointer; }
.promotion-product-check-col input:disabled { cursor: not-allowed; opacity: .45; }
.promotion-product-row { transition: background 140ms ease; }
.promotion-product-row:hover { background: #f7fbf8; }
.promotion-product-row.is-selected { background: #eaf6ef; }
.promotion-product-row.has-conflict { background: #fff9f2; }
.promotion-product-row.has-conflict.is-selected { background: #fff2df; }
.promotion-availability { display: grid; justify-items: start; gap: 2px; color: #65736e; font-size: .71rem; line-height: 1.15; }
.promotion-availability > strong { font-size: .75rem; }
.promotion-availability.is-available { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #e5f5ed; color: #176653; font-weight: 700; }
.promotion-availability.is-conflict > strong { color: #a34a17; }
.promotion-availability.is-conflict small { color: #76563f; }
.promotion-availability.is-loading,
.promotion-availability.is-pending { color: #72817b; font-style: italic; }
.promotion-availability-suggestion { width: auto; min-height: 25px; margin-top: 3px; padding: 3px 7px; border: 1px solid #dc9c51; border-radius: 6px; background: #fff4e5; color: #8a430f; box-shadow: none; font-size: .68rem; white-space: nowrap; }
.promotion-availability-suggestion:hover { background: #ffe7c4; }
.promotion-product-empty { padding: 28px !important; color: #73829f; text-align: center; }
.promotion-products-pagination { justify-content: flex-end; min-height: 42px; padding-top: 8px; }
.promotion-builder-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e0e7e3; }
.promotion-builder-actions button { width: auto; min-width: 138px; min-height: 38px; padding: 8px 16px; border-radius: 9px; }
.promotion-builder-actions #promotion-clear { min-width: 90px; }
.promotion-list-panel .compact-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
.promotion-list-panel .compact-actions button { width: auto; min-width: 82px; min-height: 32px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.promotion-branch-view-table table { min-width: 720px; }
.promotion-branch-view-row td { vertical-align: middle; }
.promotion-branch-view-row > td:first-child strong { color: #174f48; }
.promotion-branch-order-wide { color: #65736e; font-size: .78rem; font-style: italic; }
.promotion-branch-participants { min-width: 180px; }
.promotion-branch-participants summary { width: fit-content; cursor: pointer; color: #176553; font-weight: 700; font-size: .78rem; }
.promotion-branch-participants > div { display: grid; gap: 3px; margin-top: 6px; padding: 6px 8px; border: 1px solid #d8e7df; border-radius: 7px; background: #f6fbf8; color: #40534d; font-size: .75rem; line-height: 1.2; }
.promotion-branch-participants b { color: #1a6357; }
@media (max-width: 980px) { .promotion-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px) { .promotion-product-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .7fr)); } .promotion-product-toolbar > small { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 980px) {
    .promotion-products-table { min-width: 940px; }
    .promotion-products-table th:nth-child(5),
    .promotion-branch-context-cell { width: 380px; min-width: 380px; }
    .promotion-branch-context-grid { grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 4px; }
    .promotion-branch-context-card {
        grid-template-columns: minmax(92px, 1fr) auto auto auto;
        align-items: center;
        justify-items: stretch;
        gap: 3px 8px;
        padding: 4px 7px;
        font-size: .64rem;
        line-height: 1.1;
        text-align: left;
    }
    .promotion-branch-context-card > strong { align-self: center; font-size: .68rem; }
    .promotion-branch-context-card > span { justify-content: flex-start; gap: 3px; white-space: nowrap; }
    .promotion-branch-context-card .promotion-branch-preview {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }
    .promotion-branch-context-card > small {
        grid-column: 1 / -1;
        justify-self: start;
        font-size: .62rem;
    }
}
@media (max-width: 1180px) { .promotion-admin-builder .transfer-promotion-grid.is-bundle { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 980px) { .promotion-admin-builder .transfer-promotion-grid.is-threshold { grid-template-columns: repeat(3, minmax(150px, 1fr)); } .promotion-branch-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .promotion-builder-head { align-items: stretch; flex-direction: column; } .promotion-builder-head #promotion-builder-back { width: 100%; min-width: 0; } .promotion-list-panel .panel-head-inline { align-items: stretch; flex-direction: column; } .promotion-list-actions { justify-content: stretch; } .promotion-list-actions select, .promotion-list-actions #promotion-new-btn { flex: 1 1 0; min-width: 0; } .promotion-product-toolbar { align-items: stretch; flex-direction: column; } .promotion-product-toolbar > small { align-self: flex-start; min-width: 0; } .promotion-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .promotion-builder-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .promotion-builder-actions button { width: 100%; min-width: 0; } .promotion-builder-actions #promotion-publish { grid-column: 1 / -1; } }
@media (max-width: 760px) { .promotion-destination-block { grid-template-columns: 1fr; gap: 7px; } .promotion-branch-option-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .promotion-product-toolbar { grid-template-columns: 1fr; } .promotion-product-toolbar > small { justify-self: stretch; } .promotion-product-selection-tools { align-items: stretch; flex-direction: column; } .promotion-product-selection-tools > div { display: grid; grid-template-columns: 1fr 1fr; } .promotion-product-selection-tools button { width: 100%; } }
@media (max-width: 760px) { .promotion-admin-builder .transfer-promotion-grid.is-bundle, .promotion-admin-builder .transfer-promotion-grid.is-threshold { grid-template-columns: 1fr 1fr; } .promotion-bundle-summary-head { align-items: flex-start; flex-direction: column; } .promotion-bundle-savings { text-align: left; } }
@media (max-width: 480px) { .promotion-product-grid, .promotion-admin-builder .transfer-promotion-grid.is-threshold { grid-template-columns: 1fr; } }

.transfer-promotion-grid.is-bundle {
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(170px, 1fr)
        minmax(240px, 1.45fr)
        minmax(85px, 0.55fr)
        minmax(85px, 0.55fr)
        minmax(130px, 0.85fr)
        minmax(130px, 0.85fr);
}

.transfer-promotion-grid.is-threshold {
    grid-template-columns: minmax(170px, 1.25fr) minmax(180px, 1.15fr) repeat(2, minmax(145px, 0.85fr)) repeat(2, minmax(130px, 0.8fr));
}

.transfer-currency-field {
    position: relative;
}

.transfer-currency-field > span {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #44536d;
    font-size: 0.86rem;
    font-weight: 700;
    pointer-events: none;
}

.transfer-currency-field > input {
    width: 100%;
    padding-left: 24px;
    font-variant-numeric: tabular-nums;
}

.field-caption {
    display: block;
    margin: 9px 0 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.transfer-promotion-products {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    align-items: center;
}

.transfer-promotion-products label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid #cbd9ce;
    border-radius: 999px;
    background: #fff;
    font-size: 0.75rem;
}

.transfer-promotion-product-picker {
    display: grid;
    grid-template-columns: minmax(180px, 0.65fr) minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: end;
    margin-top: 10px;
}

.transfer-promotion-product-picker button,
.transfer-promotion-editor-actions button,
.transfer-promotion-row-actions button {
    width: auto;
}

.transfer-promotion-product-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px 5px 10px;
    border: 1px solid #b9d3c0;
    border-radius: 999px;
    background: #fff;
    color: #244b30;
    font-size: 0.76rem;
    font-weight: 700;
}

.transfer-promotion-product-chip button {
    width: 22px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
}

.transfer-promotion-editor-actions,
.transfer-promotion-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.transfer-promotion-editor-actions {
    margin-top: 10px;
}

.transfer-promotions-saved {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed #cbd9ce;
}

.transfer-promotions-saved .branch-table-shell {
    max-height: 210px;
    margin-top: 7px;
}

.transfer-promotions-saved table {
    min-width: 900px;
}

.transfer-promotion-review + .transfer-promotion-review {
    margin-top: 6px;
}

.transfer-commercial-note pre {
    margin: 6px 0 0;
    white-space: pre-wrap;
    font: inherit;
    color: #385443;
}

.ticket-promotion-label {
    display: block;
    margin-top: 2px;
    color: #b35a00;
    font-weight: 700;
}
.ticket-promotion-markers { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.ticket-promotion-markers > span { padding: 2px 4px; border: 1px solid #b35a00; border-radius: 4px; color: #8e4800; font-size: .68rem; font-weight: 700; }
.ticket-product-section-title { margin: 7px 0 3px; padding: 4px 6px; border-left: 3px solid #607092; background: #f1f4f8; color: #34445f; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.ticket-product-section-title--direct { border-color: #d18a20; background: #fff7e8; color: #8b4c1d; }
.ticket-product-section-title--group { border-color: #26816d; background: #edf8f3; color: #1e6656; }
.ticket-promotion-free { display: block; margin-top: 2px; color: #b52c24; font-size: .7rem; font-weight: 900; }
.ticket-promotion-group-total { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0 7px; padding: 4px 6px; border-top: 1px dashed #83aa9e; color: #1e6656; font-size: .72rem; }
.ticket-promotion-group-total strong { font-variant-numeric: tabular-nums; }
.ticket-promotion-groups-summary { display: grid; gap: 4px; margin: 7px 0; padding: 7px; border: 1px dashed #b35a00; border-radius: 6px; }
.ticket-promotion-groups-summary > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.ticket-promotion-groups-summary span { display: grid; min-width: 0; }
.ticket-promotion-groups-summary span small { font-size: .68rem; }
.ticket-promotion-groups-summary em { color: #9a3500; font-size: .72rem; font-style: normal; font-weight: 700; }

.transfer-tracking-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.transfer-tracking-toolbar h4,
.transfer-tracking-toolbar small {
    display: block;
    margin: 0;
}

.transfer-tracking-toolbar small {
    color: var(--muted);
}

.transfer-tracking-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.65fr);
    gap: 8px;
    width: min(560px, 100%);
}

.transfer-tracking-table-shell {
    max-height: 62vh;
}

.transfer-tracking-table-shell table {
    min-width: 980px;
}

.transfer-tracking-table-shell th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f7f4;
}

.transfer-route-cell strong,
.transfer-route-cell small,
.transfer-shipping-cell strong,
.transfer-shipping-cell small {
    display: block;
}

.transfer-route-cell small,
.transfer-shipping-cell small {
    margin-top: 2px;
    color: var(--muted);
}

.transfer-tracking-actions {
    display: flex;
    gap: 5px;
}

.transfer-tracking-actions button {
    width: auto;
    min-width: 70px;
    padding: 6px 8px;
    font-size: 0.74rem;
}

.transfer-detail-route,
.transfer-shipping-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

#transfer-detail-modal .modal-card.modal-xl.transfer-detail-modal-card {
    width: min(1088px, 80vw);
}

.transfer-detail-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) repeat(4, minmax(0, 0.8fr));
    gap: 7px;
    margin-bottom: 10px;
}

.transfer-detail-summary-row .transfer-detail-card {
    overflow: hidden;
    min-width: 0;
}

.transfer-detail-summary-row .transfer-detail-card strong,
.transfer-detail-summary-row .transfer-detail-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    #transfer-detail-modal .modal-card.modal-xl.transfer-detail-modal-card {
        width: 100%;
    }
}

.transfer-detail-card {
    padding: 9px 10px;
    border: 1px solid #dce3dd;
    border-radius: 9px;
    background: #f6f9f6;
}

.transfer-detail-card span,
.transfer-detail-card strong,
.transfer-detail-card small {
    display: block;
}

.transfer-detail-card span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

.transfer-detail-items-table th:nth-child(n + 3),
.transfer-detail-items-table td:nth-child(n + 3) {
    text-align: center;
}

.transfer-detail-items-table th:nth-child(4),
.transfer-detail-items-table th:nth-child(5),
.transfer-detail-items-table th:nth-child(6),
.transfer-detail-items-table th:nth-child(7),
.transfer-detail-items-table td:nth-child(4),
.transfer-detail-items-table td:nth-child(5),
.transfer-detail-items-table td:nth-child(6),
.transfer-detail-items-table td:nth-child(7) {
    text-align: center;
    vertical-align: middle;
}

#transfer-receive-form th:nth-child(2),
#transfer-receive-form th:nth-child(3),
#transfer-receive-form th:nth-child(4),
#transfer-receive-form th:nth-child(5),
#transfer-receive-form td:nth-child(2),
#transfer-receive-form td:nth-child(3),
#transfer-receive-form td:nth-child(4),
#transfer-receive-form td:nth-child(5) {
    text-align: center;
    vertical-align: middle;
}

#transfer-receive-modal .modal-card.modal-xl.transfer-receive-modal-card {
    width: min(1088px, 80vw);
}

#transfer-receive-form .branch-table-shell {
    overflow: auto;
}

#transfer-receive-form .transfer-receive-items-shell {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

#transfer-receive-form table {
    min-width: 860px;
    table-layout: fixed;
}

#transfer-receive-form th,
#transfer-receive-form td {
    padding: 3px 4px;
    line-height: 1.1;
}

#transfer-receive-form th:first-child { width: 18%; }
#transfer-receive-form th:nth-child(2) { width: 8%; }
#transfer-receive-form th:nth-child(3),
#transfer-receive-form th:nth-child(4),
#transfer-receive-form th:nth-child(5) { width: 10%; }
#transfer-receive-form th:nth-child(6) { width: 24%; }
#transfer-receive-form th:nth-child(7) { width: 20%; }

#transfer-receive-form td input,
#transfer-receive-form td select {
    width: 100%;
    height: 30px;
    min-height: 30px;
    padding: 4px 7px;
}

#transfer-receive-form td:nth-child(3) input,
#transfer-receive-form td:nth-child(4) input,
#transfer-receive-form td:nth-child(5) input {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#transfer-receive-form thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 20px;
    border-bottom: 2px solid #2c806b;
    background: #dcefe8;
    color: #174f43;
    vertical-align: middle;
}

#transfer-receive-form tbody tr {
    height: 36px;
}

@media (max-width: 760px) {
    #transfer-receive-modal .modal-card.modal-xl.transfer-receive-modal-card {
        width: 100%;
    }
}

.transfer-detail-items-shell {
    max-height: 310px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.transfer-detail-items-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 30px;
    padding: 7px 5px;
    border-bottom: 2px solid #2c806b;
    background: #dcefe8;
    color: #174f43;
    vertical-align: middle;
}

.transfer-detail-items-table tbody tr {
    height: 28px;
}

.transfer-detail-items-table tbody td {
    padding: 6px 5px;
    vertical-align: middle;
}

.transfer-event-list {
    margin-top: 10px;
}

.transfer-event-list h5 {
    margin: 0 0 5px;
}

.transfer-event-track {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    border: 1px solid #d9e4df;
    border-radius: 8px;
    background: #f7faf8;
}

.transfer-event-row {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
}

.transfer-event-row + .transfer-event-row {
    border-left: 2px solid #dc7a24;
}

.transfer-event-row strong,
.transfer-event-row small {
    flex: 0 0 auto;
}

.transfer-event-row span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
}

.transfer-event-row small {
    color: var(--muted);
}

.transfer-event-action {
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: #eef8f4;
}

.transfer-event-action button {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    min-width: 150px;
    min-height: 100%;
    padding: 7px 14px;
    border-radius: 0;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .transfer-event-row {
        flex: 0 0 auto;
        min-width: 290px;
    }
}

.branch-status-draft,
.branch-status-ready {
    background: #eef1f4;
    color: #475466;
}

.branch-status-cancelled {
    background: #f6e5e5;
    color: #8a3030;
}

@media (max-width: 760px) {
    .topbar-branch-selector span {
        display: none;
    }

    .topbar-branch-selector select {
        min-width: 120px;
        max-width: 38vw;
    }

    .branch-hero,
    .branch-transfer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .branch-hero-actions,
    .transfer-create-hero,
    .transfer-catalog-heading,
    .transfer-summary-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .branch-hero-actions > *,
    .transfer-back-link {
        width: 100%;
    }

    .transfer-route-grid,
    .transfer-toolbar {
        grid-template-columns: 1fr;
    }

    .transfer-module-tabs,
    .transfer-tracking-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .transfer-module-tab,
    .transfer-tracking-filters {
        width: 100%;
    }

    .transfer-tracking-filters,
    .transfer-detail-route,
    .transfer-shipping-summary,
    .transfer-dispatch-grid {
        grid-template-columns: 1fr;
    }

    .transfer-promotion-grid {
        grid-template-columns: 1fr 1fr;
    }

    .transfer-promotion-grid.is-bundle {
        grid-template-columns: 1fr 1fr;
    }

    .transfer-promotion-grid.is-threshold {
        grid-template-columns: 1fr 1fr;
    }

    .transfer-promotion-product-picker {
        grid-template-columns: 1fr;
    }

    .transfer-promotion-product-picker button {
        width: 100%;
    }

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

    .transfer-commercial-toolbar .field-label,
    .transfer-commercial-toolbar button {
        width: 100%;
    }

    .transfer-route-arrow {
        display: none;
    }

    .transfer-catalog-actions,
    .transfer-summary-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .transfer-selected-toggle,
    .transfer-cancel-link {
        grid-column: 1 / -1;
    }

    .transfer-summary-bar {
        right: 8px;
        bottom: 8px;
        left: 8px;
    }

    .transfer-summary-actions button {
        min-width: 0;
    }

    .branch-search {
        width: 100%;
    }
}

.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: 640px) {
    .cash-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-current-actions {
        grid-template-columns: 1fr;
    }
}

.inventory-load-notice {
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #efb4ae;
    border-radius: 7px;
    background: #fff4f2;
    color: #9f2d24;
    font-size: 0.82rem;
    font-weight: 600;
}

@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;
    }

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

    .purchase-entry-details {
        grid-template-columns: 1fr;
    }

    .purchase-selection-actions {
        justify-content: stretch;
    }

    .purchase-selection-actions button {
        flex: 1 1 180px;
    }
}
