:root {
    --bg: #f4f1ea;
    --paper: #fffdf8;
    --paper-strong: #fff;
    --line: #ded3c2;
    --text: #2a241d;
    --muted: #6d6256;
    --accent: #165d52;
    --accent-soft: #daf0e7;
    --danger: #a33b2f;
    --danger-soft: #f7d7d2;
    --shadow: 0 16px 48px rgba(42, 36, 29, 0.08);
}

.ai-config-form {
    display: grid;
    gap: 22px;
}

.ai-config-layout,
.ai-config-mail-columns,
.ai-config-prompts {
    display: grid;
    gap: 18px;
}

.ai-config-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
}

.ai-config-mail-columns,
.ai-config-prompts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-config-panel {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.ai-config-panel-openai {
    background: #f8fbff;
}

.ai-config-panel-mail {
    background: #fbfaf7;
}

.ai-config-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.ai-config-panel-head span {
    color: #8a4f25;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ai-config-panel-head h3 {
    margin: 0;
    color: #173247;
    font-size: 1.08rem;
}

.ai-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ai-config-grid label,
.ai-config-prompts label {
    display: grid;
    gap: 8px;
}

.ai-config-grid input,
.ai-config-grid select,
.ai-config-prompts textarea {
    width: 100%;
}

.ai-config-mark-seen {
    margin: 0;
}

@media (max-width: 1100px) {
    .ai-config-layout,
    .ai-config-mail-columns,
    .ai-config-prompts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .ai-config-grid {
        grid-template-columns: 1fr;
    }

    .ai-config-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-size: 15px;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(22, 93, 82, 0.12), transparent 28%),
        linear-gradient(180deg, #f8f4ec 0%, #f2ede5 100%);
}

.auth-body {
    min-height: 100vh;
    background: #030715;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    align-items: stretch;
    padding: 0;
}

.auth-layout {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(430px, 1fr);
    gap: 0;
    align-items: center;
}

.auth-copy {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    padding: clamp(32px, 4.5vw, 64px);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(10, 16, 31, 0.75), rgba(12, 18, 33, 0.88)),
        linear-gradient(135deg, #071526 0%, #0e3443 52%, #12384d 100%);
}

.auth-copy::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
    opacity: 0.32;
    pointer-events: none;
}

.auth-brand-mark {
    position: absolute;
    top: clamp(28px, 4vw, 44px);
    left: clamp(28px, 4.5vw, 64px);
    display: block;
    width: min(285px, 42vw);
}

.auth-brand-mark img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.16));
}

.auth-copy .auth-kicker {
    position: relative;
    margin: 0 0 28px;
    color: #7ff3ff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-copy h1 {
    position: relative;
    max-width: 720px;
    margin: 0 0 26px;
    color: #ffffff;
    font-size: clamp(2.35rem, 3.9vw, 4.25rem);
    line-height: 1.16;
    font-weight: 620;
}

.auth-copy p {
    position: relative;
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 1.15vw, 1.18rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.auth-copy-badges {
    position: absolute;
    left: clamp(28px, 4.5vw, 64px);
    right: clamp(28px, 4.5vw, 64px);
    bottom: clamp(28px, 4vw, 42px);
    display: flex;
    gap: 16px;
}

.auth-copy-badges span {
    flex: 1 1 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(214, 232, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 650;
    backdrop-filter: blur(10px);
}

.auth-panel {
    width: min(448px, calc(100% - 48px));
    justify-self: center;
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    padding: clamp(30px, 3vw, 38px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.auth-panel-head span {
    color: #00749a;
    font-weight: 850;
    font-size: 0.88rem;
}

.auth-panel-head h2 {
    margin: 12px 0 30px;
    color: #020617;
    font-size: clamp(1.72rem, 2.2vw, 2rem);
    line-height: 1.12;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form label,
.checkbox-line {
    display: grid;
    gap: 9px;
    color: #173247;
    font-size: 0.86rem;
    font-weight: 650;
}

.auth-form input,
.auth-form select,
.auth-password-field {
    min-height: 52px;
    border: 1px solid #c8d3e2;
    border-radius: 14px;
    background: #e8f0fd;
    color: #020617;
}

.auth-form input,
.auth-form select {
    padding: 14px 16px;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-password-field:focus-within {
    border-color: #0ea5c4;
    outline: 3px solid rgba(14, 165, 196, 0.16);
    background: #f1f6ff;
}

.auth-panel .auth-submit {
    width: 100%;
    justify-content: center;
    min-height: 54px;
    margin-top: 2px;
    border-radius: 14px;
    background: #030715;
    border-color: #030715;
    color: #ffffff;
    box-shadow: none;
}

.auth-panel .auth-submit:hover,
.auth-panel .auth-submit:focus-visible {
    background: #0d172b;
    border-color: #0d172b;
    color: #ffffff;
}

.auth-password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    overflow: hidden;
}

.auth-password-field input {
    border: 0;
    border-radius: 0;
}

.auth-password-toggle {
    min-height: 100%;
    padding: 0 16px;
    border-radius: 0;
    background: transparent;
    color: #006f8f;
    box-shadow: none;
    font-size: 0.86rem;
    font-weight: 850;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    background: rgba(255, 255, 255, 0.45);
    color: #03485d;
}

.auth-panel .flash {
    border-radius: 14px;
    margin-bottom: 20px;
}

.auth-form-alt {
    margin: -2px 0 0;
    text-align: center;
    color: #48657a;
    font-size: 0.88rem;
}

.auth-form-alt a {
    color: #00749a;
    font-weight: 800;
    text-decoration: none;
}

.auth-form-alt a:hover,
.auth-form-alt a:focus {
    color: #03485d;
    text-decoration: underline;
}

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

    .auth-copy {
        min-height: auto;
        padding: 100px clamp(22px, 6vw, 44px) 34px;
    }

    .auth-brand-mark {
        left: clamp(22px, 6vw, 44px);
        width: min(260px, 58vw);
    }

    .auth-copy h1 {
        max-width: 100%;
        font-size: clamp(2rem, 7vw, 2.8rem);
    }

    .auth-copy p {
        max-width: 720px;
    }

    .auth-copy-badges {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 28px;
    }

    .auth-panel {
        width: min(520px, calc(100% - 36px));
        margin: 42px auto;
    }
}

@media (max-width: 560px) {
    .auth-copy {
        padding: 92px 18px 28px;
    }

    .auth-copy h1 {
        margin-bottom: 18px;
        font-size: 1.86rem;
    }

    .auth-copy p {
        font-size: 0.98rem;
    }

    .auth-copy-badges {
        flex-direction: column;
        gap: 10px;
    }

    .auth-copy-badges span {
        min-height: 46px;
    }

    .auth-panel {
        width: calc(100% - 24px);
        margin: 20px auto 28px;
        border-radius: 18px;
        padding: 24px 20px;
    }

    .auth-panel-head h2 {
        font-size: 1.55rem;
    }
}

.checkbox-line {
    grid-template-columns: auto 1fr;
    align-items: center;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(30, 44, 41, 0.96);
    color: #f3ece1;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(25, 32, 30, 0.18);
}

.topbar-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 auto;
}

.workspace-tabs {
    position: relative;
    z-index: 15;
    min-height: 42px;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 24px;
    color: #2f2b86;
    background: #b9b5d4;
    border-top: 1px solid rgba(18, 16, 66, 0.18);
    box-shadow: 0 5px 12px rgba(25, 23, 62, 0.16);
}

.workspace-tabs-home,
.workspace-tab-link,
.workspace-tab-close {
    color: inherit;
}

.workspace-tabs-home {
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(47, 43, 134, 0.18);
    color: #343092;
    transition: background 0.18s ease, color 0.18s ease;
}

.workspace-tabs-home:hover,
.workspace-tabs-home:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    color: #241f78;
    outline: none;
}

.workspace-tab-list {
    min-width: 0;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: thin;
}

.workspace-tab {
    flex: 0 0 auto;
    min-width: 142px;
    max-width: 240px;
    display: inline-flex;
    align-items: stretch;
    border-right: 1px solid rgba(47, 43, 134, 0.18);
    background: transparent;
    color: #343092;
    transition: background 0.18s ease, color 0.18s ease;
}

.workspace-tab.active {
    background: #d78a50;
    color: #fff;
}

.workspace-tab:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #241f78;
}

.workspace-tab.active:hover {
    background: #c9783f;
    color: #fff;
}

.workspace-tab-link {
    min-width: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 14px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
}

.workspace-tab-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-tab-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
}

.workspace-tab-icon svg,
.workspace-tabs-home svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workspace-tab-close {
    width: 34px;
    min-height: 42px;
    flex: 0 0 34px;
    border: 0;
    border-left: 1px solid rgba(47, 43, 134, 0.12);
    background: transparent;
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    opacity: 0.86;
}

.workspace-tab-close:hover,
.workspace-tab-close:focus-visible {
    background: rgba(47, 43, 134, 0.14);
    opacity: 1;
    outline: none;
}

.brand {
    margin-bottom: 0;
}

.brand-logo {
    display: block;
    width: 220px;
    max-width: 32vw;
    height: auto;
    background: #fff;
    border-radius: 4px;
    padding: 6px 10px;
}

.brand h1 {
    margin: 0;
    font-size: 1.6rem;
}

.brand p {
    margin: 6px 0 0;
    color: rgba(243, 236, 225, 0.74);
    line-height: 1.5;
}

.hero-inline-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inventory-edit-hero-actions {
    flex-basis: 100%;
    margin-top: 12px;
    justify-content: flex-start;
}

.category-search-card .actions {
    margin-top: 18px;
}

.category-list-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(340px, 1fr);
    gap: 14px 24px;
    align-items: end;
}

.category-list-filter-form .inventory-filter-grid {
    grid-template-columns: 1fr;
}

.category-list-filter-actions {
    justify-content: flex-end;
    align-items: end;
    margin-top: 0;
}

.category-list-card {
    margin-top: 18px;
}

.category-list-header .section-title {
    margin-bottom: 4px;
}

.category-list-header p {
    margin: 0;
}

.stock-reconciliation-filters {
    margin-top: 18px;
    margin-bottom: 22px;
    padding-top: 14px;
    border-top: 1px solid #efe3d5;
}

.stock-reconciliation-filters a {
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stock-reconciliation-filters a:hover,
.stock-reconciliation-filters a:focus-visible,
.stock-reconciliation-filters .is-active {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(72, 54, 38, 0.16);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.company-switch-form {
    display: flex;
    align-items: end;
    gap: 8px;
    margin: 0;
}

.company-switch-form label {
    display: grid;
    gap: 4px;
    color: rgba(243, 236, 225, 0.78);
    font-size: 0.74rem;
    font-weight: 750;
}

.company-switch-form select,
.company-switch-form button {
    min-height: 46px;
    border: 1px solid rgba(243, 236, 225, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f3ece1;
    font: inherit;
}

.company-switch-form select {
    width: min(260px, 24vw);
    padding: 0 38px 0 12px;
}

.company-switch-form option {
    color: #1e2c29;
}

.company-switch-form button {
    padding: 0 14px;
    cursor: pointer;
}

.company-switch-form select:focus,
.company-switch-form button:focus {
    border-color: rgba(243, 236, 225, 0.38);
    outline: none;
}

.logout-form {
    margin: 0;
}

.logout-button {
    border: 1px solid rgba(243, 236, 225, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(163, 59, 47, 0.18);
    color: #f3ece1;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    white-space: nowrap;
    cursor: pointer;
    font: inherit;
}

.logout-button:hover,
.logout-button:focus {
    background: rgba(163, 59, 47, 0.32);
    border-color: rgba(247, 215, 210, 0.32);
    outline: none;
}

.nav-group {
    position: relative;
}

.nav a,
.nav-link {
    border: 1px solid rgba(243, 236, 225, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    white-space: nowrap;
}

.nav-link {
    gap: 10px;
}

.menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav a.active,
.nav a:hover,
.nav-link.active,
.nav-group:hover > .nav-link {
    background: rgba(218, 240, 231, 0.15);
    border-color: rgba(218, 240, 231, 0.32);
}

.nav-link.is-disabled,
.nav-link.is-disabled:hover,
.nav-group:hover > .nav-link.is-disabled {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(243, 236, 225, 0.08);
    color: rgba(243, 236, 225, 0.42);
    cursor: default;
    pointer-events: none;
}

.nav-link.is-disabled .menu-icon {
    opacity: 0.55;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(24, 31, 29, 0.98);
    border: 1px solid rgba(243, 236, 225, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 32px rgba(11, 16, 15, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 30;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu-link {
    border-radius: 12px;
    padding: 11px 12px;
    color: #f3ece1;
    background: transparent;
    border: 1px solid transparent;
    min-height: auto;
}

.nav-submenu-link:hover,
.nav-submenu-link.active {
    background: rgba(218, 240, 231, 0.12);
    border-color: rgba(218, 240, 231, 0.18);
}

.main {
    padding: 32px;
}

.main-topbar {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.hero,
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 18px 22px;
    margin-bottom: 18px;
}

body:not(.page-dashboard) .main-topbar > .hero:not(.hero-header):not(.shipment-hero):not(:has(.hero-inline-actions)):not(:has(.inventory-reference-pill)) {
    display: none;
}

body:not(.page-dashboard) .main-topbar > .hero.hero-header,
body:not(.page-dashboard) .main-topbar > .hero:has(.hero-inline-actions),
body:not(.page-dashboard) .main-topbar > .hero:has(.inventory-reference-pill) {
    padding: 0;
    margin: 0 0 18px;
    border: 0;
    box-shadow: none;
    background: transparent;
    justify-content: flex-end;
}

body:not(.page-dashboard) .hero-header > div:first-child > h2,
body:not(.page-dashboard) .hero-header > div:first-child > p,
body:not(.page-dashboard) .main-topbar > .hero:has(.hero-inline-actions) > h2,
body:not(.page-dashboard) .main-topbar > .hero:has(.hero-inline-actions) > p,
body:not(.page-dashboard) .main-topbar > .hero.shipment-hero > h2,
body:not(.page-dashboard) .main-topbar > .hero.shipment-hero > p,
body:not(.page-dashboard) .main-topbar > .admin-management-page > .section-head,
body:not(.page-dashboard) .main-topbar > .card.module-hero-card > .entry-panel-title,
body:not(.page-dashboard) .main-topbar > .card.module-hero-card > .module-hero-body > h2,
body:not(.page-dashboard) .main-topbar > .card.module-hero-card > .module-hero-body > p:first-of-type {
    display: none;
}

.hero h2,
.section-title {
    margin: 0 0 10px;
    font-size: 1.28rem;
    line-height: 1.25;
    font-weight: 600;
}

.hero > h2:first-child {
    display: inline;
    margin: 0 12px 0 0;
    vertical-align: baseline;
}

.hero > h2:first-child + p {
    display: inline;
    margin: 0;
    vertical-align: baseline;
}

.hero-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.hero-header > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-header h2,
.hero-header p {
    margin-bottom: 0;
}

.hero p,
.muted {
    color: var(--muted);
    line-height: 1.6;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.stats {
    padding: 18px;
}

.stats strong {
    display: block;
    font-size: 1.8rem;
    margin-top: 10px;
}

.dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(216, 138, 82, 0.18), transparent 30%),
        linear-gradient(135deg, #fffdf8 0%, #fff7ed 100%);
}

.dashboard-hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.dashboard-stats-grid {
    margin-top: 22px;
}

.dashboard-stat-card {
    border-top: 4px solid #d88a52;
    background: linear-gradient(180deg, #fffdf9 0%, #fff8ef 100%);
}

.dashboard-mini-bar {
    margin-top: 14px;
    height: 10px;
    border-radius: 999px;
    background: #f2e6d7;
    overflow: hidden;
}

.dashboard-mini-bar-fill,
.dashboard-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.dashboard-mini-bar-fill.is-products,
.dashboard-bar-fill.is-products {
    background: linear-gradient(90deg, #1f7f55 0%, #65c395 100%);
}

.dashboard-mini-bar-fill.is-inventory,
.dashboard-bar-fill.is-inventory {
    background: linear-gradient(90deg, #356ca7 0%, #7eb0df 100%);
}

.dashboard-mini-bar-fill.is-shipments,
.dashboard-bar-fill.is-shipments {
    background: linear-gradient(90deg, #c96d1f 0%, #efb35a 100%);
}

.dashboard-mini-bar-fill.is-details,
.dashboard-bar-fill.is-details {
    background: linear-gradient(90deg, #9b5de5 0%, #d2aaf8 100%);
}

.dashboard-mini-bar-fill.is-units,
.dashboard-bar-fill.is-units {
    background: linear-gradient(90deg, #b8741a 0%, #e4bd72 100%);
}

.dashboard-bar-fill.is-warehouse {
    background: linear-gradient(90deg, #17684f 0%, #59bc96 100%);
}

.dashboard-bar-fill.is-finalizado {
    background: linear-gradient(90deg, #3aa36a 0%, #8fd2aa 100%);
}

.dashboard-bar-fill.is-pendiente {
    background: linear-gradient(90deg, #d39a35 0%, #efcc84 100%);
}

.dashboard-bar-fill.is-no-enviado {
    background: linear-gradient(90deg, #cf4aa8 0%, #efabd9 100%);
}

.dashboard-chart-grid {
    margin-top: 20px;
}

.dashboard-panel {
    background:
        radial-gradient(circle at top right, rgba(216, 138, 82, 0.11), transparent 32%),
        linear-gradient(180deg, #fffdf9 0%, #fff8f1 100%);
}

.dashboard-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-today-summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.dashboard-today-summary-line span {
    padding: 7px 10px;
    border: 1px solid #ead8c5;
    border-radius: 8px;
    background: #fffdf9;
    color: #596273;
    font-size: 0.82rem;
}

.dashboard-today-table-wrap {
    max-height: 430px;
}

.dashboard-today-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.dashboard-today-table th {
    background: #d78a50;
    color: #fff;
    padding: 10px;
    font-size: 0.76rem;
    text-align: left;
    text-transform: uppercase;
}

.dashboard-today-table td {
    padding: 10px;
    border-bottom: 1px solid #f0e0cf;
    color: #273449;
    font-size: 0.84rem;
    vertical-align: top;
}

.dashboard-today-table tbody tr:nth-child(even) td {
    background: #fffaf4;
}

.dashboard-bar-list {
    display: grid;
    gap: 16px;
}

.dashboard-bar-row {
    display: grid;
    gap: 8px;
}

.dashboard-bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.dashboard-bar-track {
    height: 14px;
    border-radius: 999px;
    background: #f1e5d8;
    overflow: hidden;
}

.dashboard-donut-wrap {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.dashboard-donut {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.dashboard-donut-center {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    background: #fffdf9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #eadfce;
}

.dashboard-donut-center strong {
    font-size: 2rem;
    color: #24313d;
}

.dashboard-donut-center span {
    color: var(--muted);
    font-size: 0.86rem;
}

.dashboard-donut-legend {
    display: grid;
    gap: 10px;
    color: #4d5a66;
}

.dashboard-legend-swatch {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 8px;
}

.dashboard-legend-swatch.is-ok { background: #3aa36a; }
.dashboard-legend-swatch.is-bad { background: #d85252; }
.dashboard-legend-swatch.is-lot { background: #b8741a; }

.dashboard-mismatch-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}

.dashboard-mismatch-list strong {
    font-size: 0.92rem;
    color: #334155;
}

.dashboard-mismatch-link {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff4f4;
    border: 1px solid #f0caca;
    color: #7d2b2b;
    text-decoration: none;
}

.dashboard-mismatch-link small {
    color: #9a4b4b;
}

.dashboard-inventory-control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.dashboard-inventory-control-block {
    min-width: 0;
    padding: 16px;
    border: 1px solid #eadfce;
    border-radius: 8px;
    background: #fffdf8;
}

.dashboard-inventory-control-block.is-ok {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.dashboard-inventory-control-block.is-review {
    background: #fff8f8;
    border-color: #f0caca;
}

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

.dashboard-inventory-control-head strong {
    color: #334155;
    font-size: 0.95rem;
}

.dashboard-inventory-control-head span {
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0caca;
    color: #7d2b2b;
    text-align: center;
    font-weight: 900;
}

.dashboard-month-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 240px;
}

.dashboard-month-col {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.dashboard-month-link {
    text-decoration: none;
}

.dashboard-month-button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.dashboard-month-link:hover .dashboard-month-bar-track {
    background: linear-gradient(180deg, #f2e0c7 0%, #e9d3b3 100%);
}

.dashboard-month-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4b5563;
}

.dashboard-month-bar-track {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: end;
    border-radius: 16px;
    padding: 6px;
    background: linear-gradient(180deg, #f7ead9 0%, #f0dfc8 100%);
}

.dashboard-month-bar-fill {
    width: 100%;
    border-radius: 12px;
    background: linear-gradient(180deg, #d88a52 0%, #b8682a 100%);
    box-shadow: 0 10px 18px rgba(184, 104, 42, 0.18);
}

.dashboard-month-bar-fill.is-warehouse {
    background: linear-gradient(180deg, #2f9f7a 0%, #17684f 100%);
    box-shadow: 0 10px 18px rgba(23, 104, 79, 0.18);
}

.dashboard-month-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
}

.dashboard-month-subvalue {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1f7a5f;
}

.dashboard-focus-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.dashboard-focus-metric {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 18px;
    border: 1px solid #eadfce;
    border-radius: 8px;
    background: #fffdf8;
    color: #334155;
    text-decoration: none;
}

.dashboard-focus-metric span {
    font-size: 0.78rem;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
}

.dashboard-focus-metric strong {
    font-size: 2.2rem;
    line-height: 1;
    color: #24313d;
}

.dashboard-focus-metric small {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-focus-metric.is-warehouse strong {
    color: #17684f;
}

.dashboard-focus-metric.is-shipments strong {
    color: #b8682a;
}

a.dashboard-focus-metric:hover {
    border-color: #d6b891;
    box-shadow: 0 14px 28px rgba(120, 83, 45, 0.12);
    transform: translateY(-1px);
}

.dashboard-action-chart {
    display: grid;
    gap: 14px;
}

.dashboard-action-block {
    display: grid;
    gap: 12px;
}

.dashboard-action-row {
    display: grid;
    gap: 9px;
    padding: 13px 14px;
    border: 1px solid #eadfce;
    border-radius: 8px;
    background: #fffdf8;
    color: #334155;
    text-decoration: none;
}

.dashboard-action-row:hover {
    border-color: #d6b891;
    box-shadow: 0 12px 24px rgba(120, 83, 45, 0.1);
    transform: translateY(-1px);
}

.dashboard-action-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-action-meta strong {
    font-size: 0.92rem;
}

.dashboard-action-meta span {
    min-width: 44px;
    text-align: right;
    font-size: 1.15rem;
    font-weight: 900;
    color: #24313d;
}

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

.dashboard-alert-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid #d7eadf;
    border-radius: 8px;
    background: #f7fff9;
    color: #334155;
    text-decoration: none;
}

.dashboard-alert-card:hover {
    box-shadow: 0 12px 24px rgba(120, 83, 45, 0.1);
    transform: translateY(-1px);
}

.dashboard-alert-card span {
    color: #526170;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-alert-card strong {
    font-size: 2rem;
    line-height: 1;
    color: #1f7f55;
}

.dashboard-alert-card small {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-alert-card.is-warning {
    border-color: #efd19d;
    background: #fff9ed;
}

.dashboard-alert-card.is-warning strong {
    color: #b8741a;
}

.dashboard-alert-card.is-danger {
    border-color: #f0caca;
    background: #fff8f8;
}

.dashboard-alert-card.is-danger strong {
    color: #b42323;
}

.dashboard-day-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22px, 1fr));
    gap: 6px;
    align-items: end;
    min-height: 150px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eadfce;
}

.dashboard-day-col {
    display: grid;
    gap: 5px;
    min-width: 0;
    justify-items: center;
    color: #6b7280;
    text-decoration: none;
}

.dashboard-day-value {
    min-height: 14px;
    font-size: 0.68rem;
    font-weight: 800;
}

.dashboard-day-track {
    width: 100%;
    height: 86px;
    display: flex;
    align-items: end;
    padding: 3px;
    border-radius: 8px;
    background: #f1e5d8;
}

.dashboard-day-fill {
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(180deg, #c96d1f 0%, #efb35a 100%);
}

.dashboard-day-fill.is-finalizado {
    background: linear-gradient(180deg, #3aa36a 0%, #8fd2aa 100%);
}

.dashboard-day-fill.is-inventory {
    background: linear-gradient(180deg, #356ca7 0%, #7eb0df 100%);
}

.dashboard-day-label {
    font-size: 0.68rem;
    font-weight: 800;
}

.dashboard-day-col:hover .dashboard-day-track {
    background: #e6d2b8;
}

.dashboard-occupancy-filter {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dashboard-occupancy-filter label {
    display: grid;
    gap: 5px;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-occupancy-filter select {
    min-width: 104px;
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: #fffdf8;
    font-weight: 800;
}

.dashboard-occupancy-filter select[name="warehouse_company"] {
    min-width: 220px;
}

.dashboard-company-occupancy {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eadfce;
}

.dashboard-company-occupancy > strong {
    color: #334155;
    font-size: 0.92rem;
}

.dashboard-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-product-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid #eadfce;
    border-radius: 8px;
    background: #fffdf8;
    color: #334155;
    text-decoration: none;
}

.dashboard-product-card:hover {
    border-color: #d6b891;
    box-shadow: 0 12px 24px rgba(120, 83, 45, 0.1);
    transform: translateY(-1px);
}

.dashboard-product-card strong {
    color: #24313d;
    line-height: 1.25;
}

.dashboard-product-card span:not(.dashboard-product-id),
.dashboard-product-card small {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-product-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff3e5;
    color: #9a5e18;
    font-size: 0.76rem;
    font-weight: 900;
}

.section {
    margin-top: 24px;
}

.card {
    padding: 22px;
}

.flash {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
}

.flash.success {
    background: var(--accent-soft);
    color: #113f38;
}

.flash.error {
    background: var(--danger-soft);
    color: #692119;
}

.flash.warning {
    background: #fff2d8;
    color: #8a5a12;
    border: 1px solid #f0d29b;
}

.security-context {
    margin-bottom: 18px;
    padding: 18px 22px;
    border-color: #d8ccb9;
    background: linear-gradient(180deg, #fffdf9 0%, #faf4eb 100%);
}

.security-context-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 18px auto;
    padding: 10px 16px;
    border: 1px solid #d7cab7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(44, 36, 28, 0.08);
}

.security-context-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.security-context-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.security-context-header strong {
    font-size: 1rem;
}

.security-context-hide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 9px 14px;
    border: 1px solid #d7cab7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.security-scope {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.security-scope.is-admin {
    background: #fff0d9;
    color: #8a5a14;
}

.security-scope.is-company {
    background: #daf0e7;
    color: #12483f;
}

.security-context-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.security-context-grid[hidden] {
    display: none !important;
}

.security-context-grid div {
    padding: 12px 14px;
    border: 1px solid #e7dccd;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.security-context-grid span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.security-context-grid strong {
    display: block;
    font-size: 0.96rem;
    word-break: break-word;
}

form {
    display: grid;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.dashboard-today-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 auto;
    display: block;
}

.inline-company-switch-form {
    display: block;
}

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

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

label {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--paper-strong);
    color: var(--text);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.code-block {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7f2eb;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    color: var(--ink);
}

.empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 18px 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.button,
button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.button:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(22, 93, 82, 0.22);
    outline-offset: 2px;
}

.action-button-back,
.action-button-save {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.action-button-back {
    background: #fffdf8;
    color: #111827;
    border: 1px solid #e1cdb4;
    box-shadow: 0 8px 18px rgba(44, 36, 28, 0.06);
}

.action-button-save {
    background: #165d52;
    color: #fff;
    border: 1px solid #165d52;
    box-shadow: 0 10px 22px rgba(22, 93, 82, 0.18);
}

.action-button-back svg,
.action-button-save svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-button-save svg {
    width: 16px;
    height: 16px;
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap table {
    font-size: 0.82rem;
}

.table-wrap.sticky-head {
    overflow: auto;
    max-height: 520px;
    scroll-padding-top: 64px;
}

.table-wrap.sticky-head.inventory-table-wrap {
    max-height: none;
    scroll-padding-top: 72px;
}

.table-wrap.sticky-head.list-page-table-wrap {
    max-height: none !important;
    overflow-x: auto;
    overflow-y: visible !important;
}

.table-wrap.sticky-head.tmp-shipment-review-table-wrap {
    max-height: none !important;
    overflow-x: auto;
    overflow-y: visible !important;
}

body[class*="page-listado"] .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado-envios .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado-productos .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado-categorias .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado-filas .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-listado-zonas .table-wrap.sticky-head:not(.variant-table-wrap):not(.cart-table-wrap):not(.shipment-lines-modal-wrap),
body.page-trazabilidad .table-wrap.sticky-head {
    max-height: none !important;
    overflow-x: auto;
    overflow-y: visible !important;
}

.variant-table-wrap {
    max-height: 360px;
}

.cart-table-wrap {
    max-height: 50vh;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: #d78a50;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.sticky-head th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.js-sortable th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.js-sortable th[data-sortable="false"] {
    cursor: default;
}

.js-sortable th .sort-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.js-sortable th .sort-label::after {
    content: "↕";
    font-size: 0.8rem;
    opacity: 0.55;
}

.js-sortable th.is-sort-asc .sort-label::after {
    content: "↑";
    opacity: 1;
}

.js-sortable th.is-sort-desc .sort-label::after {
    content: "↓";
    opacity: 1;
}

.pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #113f38;
    font-size: 0.84rem;
    margin: 2px 6px 2px 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #ece7df;
    color: #51463b;
}

.status-pendiente {
    background: #fff3cd;
    color: #7a5100;
}

.status-procesando {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-terminado {
    background: #dff3e8;
    color: #166534;
}

.status-error {
    background: #fde2e2;
    color: #b42318;
}

.block {
    display: block;
}

.empty {
    padding: 22px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    border: 1px dashed var(--line);
}

.attribute-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.helper {
    font-size: 0.88rem;
    color: var(--muted);
}

.button.danger,
button.danger {
    background: var(--danger);
}

.security-admin-grid,
.security-backup-grid {
    align-items: start;
}

.security-card {
    scroll-margin-top: 120px;
    background:
        radial-gradient(circle at top right, rgba(216, 138, 82, 0.08), transparent 30%),
        linear-gradient(180deg, #fffdf9 0%, #fff8f1 100%);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.section-head > div:first-child,
.traceability-header > div:first-child,
.trace-chart-header > div:first-child,
.module-hero-body {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.section-head .section-title,
.traceability-header .section-title,
.trace-chart-header .section-title,
.module-hero-body h2 {
    margin-bottom: 0;
}

.inline-jump-form {
    margin: 0;
}

.security-filter-form,
.security-inline-form,
.security-restore-form {
    display: grid;
    gap: 14px;
}

.security-filter-form .actions {
    margin-top: 8px;
    margin-bottom: 18px;
}

.security-table-wrap {
    max-height: 58vh;
}

.security-table {
    min-width: 1180px;
}

.security-log-detail {
    max-width: 460px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.86rem;
}

.security-log-view {
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #211d18;
    color: #fff8ee;
    border: 1px solid rgba(42, 36, 29, 0.22);
    border-radius: 8px;
    padding: 16px;
    font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
    font-size: 0.84rem;
    line-height: 1.55;
}

.security-context-list {
    display: grid;
    gap: 8px;
    line-height: 1.35;
}

.security-context-item,
.security-context-records {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid rgba(42, 36, 29, 0.12);
    border-radius: 8px;
    background: #fffdfa;
}

.security-context-item span,
.security-context-records span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #72675a;
}

.security-context-item strong,
.security-context-records strong {
    display: block;
    color: #27221c;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.security-context-records {
    background: #f8fbf8;
    border-color: rgba(47, 111, 77, 0.18);
}

.security-context-records strong {
    padding-top: 6px;
    border-top: 1px solid rgba(47, 111, 77, 0.14);
    font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.security-context-item-empty {
    background: #f5f2ee;
}

.security-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.security-posture-summary .security-level,
.security-posture-card .security-level {
    min-width: 82px;
}

.security-backup-list-table .security-level {
    min-width: 76px;
}

.security-level-info {
    background: #e2eefc;
    color: #24518b;
}

.security-level-ok {
    background: rgba(42, 122, 88, 0.14);
    color: #1f6f4d;
}

.security-level-warning {
    background: #fff1d8;
    color: #8a5b11;
}

.security-level-error {
    background: #f8dbd7;
    color: #91372b;
}

.security-backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}

.security-backup-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 30px rgba(42, 36, 29, 0.05);
}

a.security-backup-card {
    color: inherit;
    text-decoration: none;
}

a.security-backup-card:hover {
    border-color: rgba(28, 95, 80, 0.4);
}

.security-posture-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.security-posture-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.security-posture-card {
    min-height: 112px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.security-posture-card:hover {
    border-color: rgba(28, 95, 80, 0.35);
    box-shadow: 0 14px 34px rgba(42, 36, 29, 0.08);
    transform: translateY(-1px);
}

.security-posture-id {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.security-backup-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.security-backup-head strong {
    font-size: 1rem;
}

.security-backup-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.security-backup-metrics strong {
    color: var(--text);
}

.security-backup-list-wrap {
    max-height: 62vh;
}

.security-backup-list-table {
    min-width: 1180px;
}

.security-backup-list-table td {
    vertical-align: top;
}

.backup-row-subline {
    display: block;
    margin: 5px 0 8px;
    font-size: 0.78rem;
}

.backup-row-metrics {
    display: grid;
    gap: 5px;
    color: var(--muted);
}

.backup-row-metrics strong {
    color: var(--text);
}

.backup-row-path {
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.78rem;
}

.backup-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    min-width: 330px;
}

.backup-row-action-form {
    display: block;
}

.backup-row-restore-form {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto;
    gap: 8px;
    min-width: 230px;
}

.backup-row-actions .button,
.backup-row-actions button {
    min-height: 38px;
    padding: 8px 12px;
}

.backup-row-actions .button.is-disabled {
    color: var(--muted);
    border-color: rgba(42, 36, 29, 0.14);
    background: rgba(42, 36, 29, 0.04);
    cursor: not-allowed;
    box-shadow: none;
}

.backup-row-action-note {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 0.78rem;
}

.backup-summary-grid {
    margin-bottom: 20px;
}

.audit-security-summary-grid {
    margin-bottom: 34px;
}

.stacked-sections {
    display: grid;
    gap: 22px;
}

.audit-security-alerts-section {
    margin-top: 0;
    margin-bottom: 34px;
}

.audit-events-section {
    margin-top: 34px;
}

.audit-alert-table-wrap {
    margin-top: 24px;
}

.audit-events-section .security-filter-form {
    margin-bottom: 24px;
}

.audit-events-section .section-head {
    margin-bottom: 24px;
}

.backup-summary-card {
    min-height: 170px;
}

.backup-summary-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.backup-summary-value {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 12px;
    color: #20312c;
}

.backup-summary-value-small {
    font-size: 1.2rem;
    line-height: 1.35;
}

.inventory-shell {
    background: linear-gradient(180deg, #fcfbf8 0%, #f7f3ed 100%);
}

.inventory-filter-card,
.inventory-grid-card,
.inventory-editor-card {
    background: #fbfaf8;
}

.inventory-grid-card {
    scroll-margin-top: 110px;
}

.inventory-table tr[id],
.inventory-table .expanded-row {
    scroll-margin-top: 76px;
}

.inventory-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.inventory-filter-grid > * {
    min-width: 0;
}

.shipment-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.inventory-filter-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}


.inventory-zero-location-cleanup-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inventory-zero-location-cleanup-ids {
    color: #5d6678;
    font-size: 12px;
    line-height: 1.2;
    max-width: 260px;
}

.inventory-zero-location-cleanup-button {
    min-height: 36px;
    padding: 0 14px;
}

.inventory-zero-location-cleanup-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}
.area-list-filter-card {
    margin-bottom: 18px;
}

.area-list-filter-form {
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(340px, 1fr);
    gap: 14px 24px;
    align-items: end;
}

.area-list-filter-form .inventory-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.area-list-filter-actions {
    justify-content: flex-end;
    align-items: end;
    margin-top: 0;
}

.area-list-table-card {
    margin-top: 0;
}

.scriptcase-button {
    background: #e79654;
    box-shadow: 0 8px 18px rgba(231, 150, 84, 0.28);
}

.scriptcase-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #d9e3f0;
    background: #eef4fb;
    color: #243f63;
    font-weight: 600;
}

.action-button-back,
.action-button-save,
.action-button-danger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.action-button-back {
    border: 1px solid #ead8bf;
    background: #fffdf8;
    color: #1f2933;
}

.action-button-save {
    border: 1px solid #165d52;
    background: #165d52;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(22, 93, 82, 0.18);
}

.action-button-danger {
    border: 1px solid #b42318;
    background: #b42318;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(180, 35, 24, 0.18);
}

.action-button-back:hover,
.action-button-back:focus-visible {
    border-color: #d8b98e;
    background: #fff8ec;
    color: #1f2933;
}

.action-button-save:hover,
.action-button-save:focus-visible {
    border-color: #10483f;
    background: #10483f;
    color: #ffffff;
}

.action-button-danger:hover,
.action-button-danger:focus-visible {
    border-color: #912018;
    background: #912018;
    color: #ffffff;
}

.action-button-back svg,
.action-button-save svg,
.action-button-danger svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 18px;
}

.product-edit-actions-bottom {
    margin-top: 24px;
}

.inventory-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.inventory-toolbar-search {
    display: flex;
    gap: 0;
    align-items: center;
    flex: 0 1 460px;
    max-width: 460px;
}

.inventory-toolbar-search select {
    width: 150px;
    border-radius: 10px 0 0 10px;
    border-right: 0;
}

.inventory-toolbar-search input {
    border-radius: 0 10px 10px 0;
}

.inventory-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

.inventory-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #697687;
    font-weight: 700;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

.inventory-pagination .current {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #8a3f79;
    color: #fff;
}

.inventory-page-link {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef4fb;
    color: #243f63;
    text-decoration: none;
}

.inventory-page-link:hover {
    background: #dce9f8;
}

.inventory-pagination-summary {
    margin-left: 6px;
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 600;
}

.shipment-list-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.shipment-pagination {
    justify-content: flex-end;
}

.cart-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef4fb;
    color: #243f63;
    font-weight: 700;
}

.cart-button {
    border: 0;
    cursor: pointer;
}

.cart-button.cart-bump {
    animation: cartBump 0.48s ease;
}

.cart-fly-particle {
    position: fixed;
    z-index: 2500;
    width: 60px;
    height: 52px;
    border-radius: 9px;
    background: linear-gradient(135deg, #d99a48 0%, #f0bf72 58%, #c88437 100%);
    border: 3px solid #9b6227;
    box-shadow: 0 16px 34px rgba(112, 71, 28, 0.34);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: cartFly 0.75s cubic-bezier(0.2, 0.78, 0.28, 1) forwards;
}

.cart-fly-particle::before {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    top: 14px;
    height: 3px;
    background: rgba(91, 58, 26, 0.5);
}

.cart-fly-box-lid,
.cart-fly-box-seam {
    position: absolute;
    pointer-events: none;
}

.cart-fly-box-lid {
    left: 10px;
    top: -10px;
    width: 32px;
    height: 16px;
    border-radius: 6px 6px 2px 2px;
    background: #edb963;
    border: 3px solid #9b6227;
    transform: skewX(-12deg);
}

.cart-fly-box-seam {
    left: 27px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: rgba(255, 242, 197, 0.78);
}

@keyframes cartBump {
    0% {
        transform: scale(1);
    }
    38% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes cartFly {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.65) rotate(0deg);
    }
    18% {
        opacity: 1;
    }
    72% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--cart-target-x)), calc(-50% + var(--cart-target-y))) scale(0.32) rotate(18deg);
    }
}

.cart-summary {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.cart-table th,
.variant-table th {
    background: #d78a50;
    color: #fff;
}

.variant-table {
    border-collapse: collapse;
    min-width: 620px;
}

.variant-table thead th {
    padding: 16px 12px;
    border-bottom: 1px solid #ead9c8;
    vertical-align: middle;
}

.variant-table td,
.cart-table td {
    background: #fffdfa;
}

.variant-table td {
    padding: 22px 16px;
    border-bottom: 1px solid #ead9c8;
    vertical-align: middle;
    line-height: 1.45;
}

.lot-row-master td {
    background: rgba(217, 138, 76, 0.08);
}

.lot-row-child td {
    background: rgba(255, 253, 250, 0.92);
}

.inventory-table tr.is-out-of-stock td,
.variant-table tr.is-out-of-stock td {
    background: #fff4f3;
}

.stock-pill.is-zero {
    background: #fde2df;
    color: #a64238;
}

.variant-table tr.is-out-of-stock .qty-input {
    background: #f7ecea;
    color: #9b746f;
    border-color: #ecc5bf;
}

.variant-table tr.is-out-of-stock .icon-action-button {
    background: #d9b5af;
    color: #fff;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.72;
    pointer-events: none;
}

.lot-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.lot-role-badge.is-master {
    background: #fde4cf;
    color: #8f4d18;
    border: 1px solid #efc59e;
}

.lot-role-badge.is-child {
    background: #edf2f0;
    color: #45615a;
    border: 1px solid #d4dfdb;
}

.lot-role-badge.is-empty-location {
    background: #f6eeee;
    color: #8f3737;
    border: 1px solid #e0bcbc;
}

.qty-input {
    max-width: 90px;
}

.variant-cart-form {
    display: inline-flex;
}

.stock-pill {
    min-width: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.category-products-link {
    border: 1px solid #bfe7cc;
    cursor: pointer;
    font: inherit;
}

.category-products-link:hover,
.category-products-link:focus-visible {
    background: #dff4e6;
    color: #125d3d;
}

.category-reference-link {
    color: #0b6f8f;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.category-reference-link:hover,
.category-reference-link:focus-visible {
    color: #084e66;
}

.product-origin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-origin-badge.is-ai {
    background: #e2eefc;
    color: #24518b;
}

.product-origin-badge.is-manual {
    background: #e1f3ea;
    color: #1f7f55;
}

.product-name-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.84rem;
}

.filter-section-header,
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.product-list-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-list-card {
    margin-top: 22px;
}

.product-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-state-badge.is-active {
    background: #e1f3ea;
    color: #1f7f55;
}

.product-state-badge.is-inactive {
    background: #fde7e7;
    color: #b83232;
}

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

.shipment-line-stock-error td {
    background: #fff0f0 !important;
}

.shipment-line-stock-error .shipment-qty-input,
.shipment-qty-input.is-stock-error {
    background: #fff7f7;
    border-color: #d46a6a;
    color: #8a2f2f;
}

.shipment-line-stock-note {
    margin-top: 5px;
    color: #9f3434;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.shipment-stock-context {
    margin-top: 4px;
    color: #6f6256;
    font-size: 0.72rem;
    line-height: 1.2;
    max-width: 120px;
}

.tmp-shipment-review-row.is-stock-blocked td {
    background: #fff3f0;
}

.tmp-shipment-review-row.is-stock-blocked .tmp-line-stock-input {
    border-color: #d46a6a;
    background: #fff;
    color: #8a2f2f;
    font-weight: 800;
}

.tmp-shipment-observations {
    margin-top: 18px;
    margin-bottom: 24px;
}

.tmp-shipment-review-actions {
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    margin-top: 14px;
    padding-top: 12px;
}

.tmp-shipment-main-actions,
.tmp-shipment-line-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tmp-shipment-main-actions {
    flex: 0 1 auto;
}

.tmp-shipment-line-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-left: auto;
}

.tmp-shipment-top-line-action {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 91, 82, 0.16);
}

.stock-zero-warning {
    margin-top: 4px;
    color: #9f3434;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
}

.shipment-remove-button {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #efc0bc;
    background: #fff4f2;
    color: #b83232;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.18s ease;
}

.shipment-remove-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shipment-remove-button span:not(.shipment-remove-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.shipment-remove-icon,
.shipment-remove-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.shipment-remove-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shipment-remove-button:hover,
.shipment-remove-button:focus-within {
    background: #fde7e7;
    border-color: #df8d86;
}

.shipment-remove-button:has(input:checked) {
    background: #b83232;
    border-color: #b83232;
    color: #fff;
    box-shadow: 0 8px 16px rgba(184, 50, 50, 0.18);
}

.shipment-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 18px;
}

.shipment-fieldset[disabled] {
    opacity: 0.82;
}

.shipment-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.shipment-number-highlight {
    gap: 10px;
    margin-bottom: 6px;
    color: #7c4f2c;
    font-weight: 700;
}

.shipment-number-highlight input {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 16px 18px;
    border: 2px solid #e2c4a6;
    background: #fffaf4;
    color: #7c4f2c;
}

.shipment-status-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.shipment-status-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #e2d6c7;
    border-radius: 9px;
    background: #fffdfa;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.shipment-current-status-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 10px;
    padding: 8px 11px;
    border-radius: 8px;
    background: #251f19;
    color: #fff8ee;
    font-size: 0.82rem;
    font-weight: 700;
}

.shipment-current-status-note strong {
    color: #ffd18a;
}

.shipment-status-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.shipment-status-card-title {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.shipment-status-card-finalizado {
    border-color: #b9dcc6;
    background: #eef8f1;
    color: #1b7a47;
}

.shipment-status-card-pendiente {
    border-color: #eed7b0;
    background: #fff7e8;
    color: #8a5a14;
}

.shipment-status-card-no-enviado {
    border-color: #efc0df;
    background: #fff3fb;
    color: #d0129a;
}

.shipment-status-card-borrador {
    border-color: #d8d1c7;
    background: #f8f5f1;
    color: #685744;
}

.shipment-status-card:has(input:checked),
.shipment-status-card.is-selected {
    border-width: 2px;
    box-shadow: 0 12px 24px rgba(42, 36, 29, 0.16), 0 0 0 4px rgba(215, 138, 80, 0.22);
    transform: translateY(-1px);
}

.shipment-status-card.is-selected::before {
    content: "Actual";
    position: absolute;
    top: -10px;
    right: 8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #251f19;
    color: #fff8ee;
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 8px 16px rgba(42, 36, 29, 0.18);
}

.shipment-status-card-finalizado:has(input:checked),
.shipment-status-card-finalizado.is-selected {
    background: #1f8f55;
    border-color: #166b3f;
    color: #fff;
}

.shipment-status-card-pendiente:has(input:checked),
.shipment-status-card-pendiente.is-selected {
    background: #c5791f;
    border-color: #9a5b12;
    color: #fff;
}

.shipment-status-card-no-enviado:has(input:checked),
.shipment-status-card-no-enviado.is-selected {
    background: #b01882;
    border-color: #861363;
    color: #fff;
}

.shipment-status-card-borrador:has(input:checked),
.shipment-status-card-borrador.is-selected {
    background: #685744;
    border-color: #4d4032;
    color: #fff;
}

.shipment-status-card:has(input:focus-visible) {
    outline: 2px solid #d78a50;
    outline-offset: 2px;
}

.shipment-submit-button {
    background: #1b7a47;
    box-shadow: 0 10px 22px rgba(27, 122, 71, 0.2);
}

.shipment-submit-button:hover,
.shipment-submit-button:focus-visible {
    background: #146338;
}

.shipment-delete-draft-button {
    background: #a33b2f;
    box-shadow: 0 10px 22px rgba(163, 59, 47, 0.18);
}

.shipment-delete-draft-button:hover,
.shipment-delete-draft-button:focus-visible {
    background: #842d24;
}

.shipment-delete-draft-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.tmp-remove-line-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #f0c6bf;
    border-radius: 10px;
    background: #fff7f6;
    color: #b14535;
    cursor: pointer;
}

.tmp-remove-line-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tmp-remove-line-control svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tmp-remove-line-control:has(input:checked) {
    background: #b14535;
    border-color: #b14535;
    color: #fff;
}
.tmp-duplicate-line-button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    margin-right: 6px;
    border-radius: 10px;
}

.tmp-duplicate-line-button svg {
    width: 17px;
    height: 17px;
}
.mail-preview-box {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    line-height: 1.6;
    overflow: hidden;
}

.mail-preview-box * {
    box-sizing: border-box;
    max-width: 100%;
}

.mail-preview-box p {
    margin: 0 0 14px;
}

.mail-preview-box p:last-child {
    margin-bottom: 0;
}

.mail-preview-box table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 16px 0;
}

.mail-preview-box th,
.mail-preview-box td {
    padding: 10px 12px !important;
    border: 1px solid #d9d0c4 !important;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.mail-preview-box th:last-child,
.mail-preview-box td:last-child {
    width: 90px;
    text-align: center !important;
}

.mail-preview-box th {
    background: #d78a50 !important;
    color: #fff;
    font-weight: 700;
}

.icon-action-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #165d52;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(22, 93, 82, 0.2);
}

.icon-action-button:hover {
    background: #124c43;
    color: #ffffff;
}

.inventory-observations-cell {
    text-align: center;
}

.inventory-document-cell {
    text-align: center;
}

.inventory-document-button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.inventory-observations-button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.inventory-observations-modal-card {
    width: min(620px, 100%);
}

.inventory-observations-modal-body {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.55;
    color: var(--text);
}

.inline-action-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.danger-confirm-text-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 18px 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.danger-confirm-text-field input {
    width: 210px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
}

.table-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.danger-icon-button {
    border: 0;
    background: #a33b2f;
    box-shadow: 0 10px 22px rgba(163, 59, 47, 0.18);
    cursor: pointer;
}

.danger-icon-button:hover,
.danger-icon-button:focus-visible {
    background: #842d24;
}

.warning-icon-button {
    border: 0;
    background: #c5791f;
    box-shadow: 0 10px 22px rgba(197, 121, 31, 0.18);
    cursor: pointer;
}

.warning-icon-button:hover,
.warning-icon-button:focus-visible {
    background: #9a5b12;
}

.success-icon-button {
    border: 0;
    background: #1f8f55;
    box-shadow: 0 10px 22px rgba(31, 143, 85, 0.18);
    cursor: pointer;
}

.success-icon-button:hover,
.success-icon-button:focus-visible {
    background: #166b3f;
}

.eye-button {
    width: 38px;
    height: 38px;
    background: #f28c28;
    box-shadow: 0 10px 22px rgba(242, 140, 40, 0.2);
}

.eye-button:hover {
    background: #df7a17;
}

.icon-action-button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(24, 30, 32, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-card {
    width: min(980px, 100%);
    max-height: 85vh;
    overflow: auto;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(24, 30, 32, 0.24);
    padding: 22px;
}

.cart-modal-card {
    width: min(1180px, 96vw);
}

.inventory-history-modal {
    z-index: 70;
}

.inventory-regularize-modal-card {
    width: min(560px, calc(100vw - 28px));
}

.inventory-regularize-form {
    display: grid;
    gap: 16px;
}

.inventory-regularize-form label {
    display: grid;
    gap: 7px;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 800;
}

.inventory-regularize-form input,
.inventory-regularize-form textarea {
    width: 100%;
}

.regularize-summary {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 8px 14px;
    padding: 12px;
    border: 1px solid #d7c7b5;
    border-radius: 8px;
    background: #fffaf2;
}

.regularize-summary span {
    color: #6f7785;
    font-size: 0.78rem;
    font-weight: 800;
}

.regularize-summary strong {
    color: #273449;
    font-size: 0.9rem;
}

.inventory-history-modal-card {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    padding: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inventory-history-modal-card .modal-header {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.inventory-history-modal-card .modal-header .section-title {
    display: none;
}

.inventory-history-frame-wrap {
    position: relative;
    min-height: 0;
    flex: 1;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.inventory-history-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.embedded-page {
    background: #f8f4ec;
}

.embedded-page .embedded-main {
    padding: 0;
    max-width: none;
}

.embedded-page .hero {
    display: none;
}

.embedded-page .hero-inline-actions {
    display: none;
}

.inventory-notice-modal {
    z-index: 90;
    background:
        radial-gradient(circle at center, rgba(22, 93, 82, 0.18), transparent 42%),
        rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(8px);
}

.confirm-action-modal {
    z-index: 95;
    background: rgba(24, 30, 32, 0.58);
    backdrop-filter: blur(6px);
}

.confirm-action-card {
    width: min(460px, 100%);
    overflow: visible;
}

.confirm-action-message {
    margin: 8px 0 22px;
    color: var(--text);
    line-height: 1.55;
}

.confirm-action-detail {
    margin: -12px 0 22px;
    color: var(--muted);
    line-height: 1.5;
}

.confirm-action-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.danger-confirm-button {
    background: #a33b2f;
    box-shadow: 0 10px 22px rgba(163, 59, 47, 0.18);
}

.danger-confirm-button:hover,
.danger-confirm-button:focus-visible {
    background: #842d24;
}

.inventory-notice-card {
    width: min(440px, 100%);
    padding: 28px;
    border-radius: 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    overflow: visible;
}

.inventory-notice-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #fff2d8;
    color: #a15b08;
    border: 1px solid #f0d29b;
}

.inventory-notice-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.inventory-notice-content {
    min-width: 0;
}

.inventory-notice-kicker {
    margin: 0 0 6px;
    color: #165d52;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.inventory-notice-content h3 {
    margin: 0 0 8px;
    color: #1f2933;
    font-size: 1.45rem;
    line-height: 1.15;
}

.inventory-notice-content p {
    margin: 0;
    color: #5b6472;
    line-height: 1.5;
}

.inventory-notice-detail {
    margin-top: 12px !important;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7f2eb;
    border: 1px solid #ead8bf;
    color: #3f4652 !important;
    font-weight: 700;
}

.inventory-notice-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.app-feedback-modal {
    z-index: 92;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(8px);
}

.app-feedback-card {
    width: min(520px, 100%);
    padding: 26px;
    border-radius: 14px;
    overflow: visible;
}

.app-feedback-header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.app-feedback-kicker {
    margin: 0 0 6px;
    color: #526170;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.app-feedback-body {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #ead8bf;
    background: #fbf8f3;
}

.app-feedback-body strong {
    color: #1f2933;
    line-height: 1.35;
}

.app-feedback-body p {
    margin: 0;
    color: #5b6472;
    line-height: 1.5;
}

.app-feedback-success .app-feedback-body {
    border-color: #b7dfd2;
    background: #effaf6;
}

.app-feedback-error .app-feedback-body {
    border-color: #f0caca;
    background: #fff8f8;
}

.app-feedback-warning .app-feedback-body {
    border-color: #f0d29b;
    background: #fff9ed;
}

.app-feedback-actions {
    margin-top: 16px;
}

@media (max-width: 560px) {
    .inventory-notice-card {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .inventory-notice-actions {
        justify-content: stretch;
    }

    .inventory-notice-actions .action-button-save {
        width: 100%;
    }

    .app-feedback-actions .action-button-save {
        width: 100%;
    }
}

.cart-remove-button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fbe8e6;
    color: #a23a34;
    box-shadow: none;
}

.cart-remove-button:hover,
.cart-remove-button:focus {
    background: #e15f55;
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: #4b5563;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.modal-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.app-help-backdrop {
    align-items: stretch;
}

.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(22, 28, 33, 0.38);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    backdrop-filter: blur(3px);
}

.is-page-transitioning .page-transition-overlay {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.page-transition-card {
    display: grid;
    gap: 14px;
    justify-items: center;
    min-width: 220px;
    padding: 22px 24px;
    border: 1px solid rgba(234, 219, 199, 0.95);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 24px 60px rgba(18, 23, 27, 0.22);
    color: #2f2b27;
}

.page-transition-card strong {
    font-size: 14px;
    font-weight: 800;
}

.box-loader {
    position: relative;
    width: 96px;
    height: 76px;
}

.box-loader-box {
    position: absolute;
    width: 28px;
    height: 22px;
    border: 2px solid #7b5739;
    border-radius: 3px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%),
        #d99a59;
    box-shadow: inset 0 -5px 0 rgba(91, 62, 38, 0.16), 0 8px 14px rgba(63, 47, 34, 0.16);
    transform-origin: 50% 100%;
    animation: boxStack 1.35s cubic-bezier(.24, .78, .28, 1) infinite;
}

.box-loader-box::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: rgba(123, 87, 57, 0.45);
    transform: translateX(-50%);
}

.box-loader-box-1 {
    left: 12px;
    bottom: 0;
    animation-delay: 0s;
}

.box-loader-box-2 {
    left: 42px;
    bottom: 0;
    background-color: #cfc7ab;
    animation-delay: 0.12s;
}

.box-loader-box-3 {
    left: 27px;
    bottom: 24px;
    background-color: #8fb0a9;
    animation-delay: 0.24s;
}

.box-loader-box-4 {
    left: 57px;
    bottom: 24px;
    background-color: #d9b36f;
    animation-delay: 0.36s;
}

.box-loader-box-5 {
    left: 42px;
    bottom: 48px;
    background-color: #b8755d;
    animation-delay: 0.48s;
}

@keyframes boxStack {
    0% {
        transform: translateY(-34px) rotate(-8deg);
        opacity: 0;
    }
    22% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    72% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(8px) rotate(0deg);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition-overlay,
    .box-loader-box {
        transition: none;
        animation: none;
    }

    .box-loader-box {
        opacity: 1;
    }
}

.app-help-modal {
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.app-help-header {
    margin: 0;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    background: #fffaf0;
}

.app-help-header .helper {
    margin: 4px 0 0;
}

.app-help-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: 220px 1fr;
}

.app-help-index {
    padding: 18px;
    border-right: 1px solid var(--line);
    background: #f8f3ea;
    overflow: auto;
}

.app-help-index a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
}

.app-help-index a:hover,
.app-help-index a:focus {
    background: var(--accent-soft);
    outline: none;
}

.app-help-content {
    padding: 22px;
    overflow: auto;
}

.app-help-section + .app-help-section {
    margin-top: 26px;
}

.app-help-section-heading {
    margin-bottom: 12px;
}

.app-help-section-heading h4 {
    margin: 0 0 5px;
    color: #c86416;
    font-size: 1.1rem;
}

.app-help-section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.app-help-pages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.app-help-page {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fffdf8;
}

.app-help-page.is-current {
    border-color: #c86416;
    box-shadow: 0 0 0 2px rgba(200, 100, 22, 0.14);
}

.app-help-page h5 {
    margin: 0 0 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-help-page h5 span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff0de;
    color: #a24e10;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.app-help-page ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.55;
}

.app-help-page li + li {
    margin-top: 6px;
}

.ai-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(217, 138, 76, 0.18), transparent 30%),
        rgba(24, 30, 32, 0.58);
}

.ai-processing-overlay[hidden] {
    display: none;
}

.ai-processing-card {
    width: min(760px, 100%);
    max-height: none;
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(250, 247, 242, 0.98)),
        #fffdf8;
}

.pdf-ingest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.pdf-ingest-card {
    height: 100%;
}

.pdf-form-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr);
    gap: 16px;
    align-items: end;
}

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

.pdf-mode-field {
    display: grid;
    gap: 8px;
}

.field-label {
    color: #6f5b48;
    font-weight: 700;
    font-size: 0.9rem;
}

.pdf-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    border: 1px solid #ead8bf;
    border-radius: 14px;
    background: #fffaf3;
}

.pdf-mode-toggle label {
    margin: 0;
}

.pdf-mode-toggle input,
.pdf-ai-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdf-mode-toggle span {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 11px;
    color: #7c4b24;
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
}

.pdf-mode-toggle input:checked + span {
    background: #d78a50;
    color: #fff;
    box-shadow: 0 8px 16px rgba(215, 138, 80, 0.22);
}

.pdf-file-picker {
    display: grid;
    gap: 8px;
}

.pdf-file-picker input[type="file"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdf-file-picker-box {
    min-height: 82px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px dashed #d8b98e;
    border-radius: 12px;
    background: #fffaf3;
    color: #493624;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pdf-file-picker.is-dragging .pdf-file-picker-box {
    background: #f1fff9;
    border-color: #165d52;
    box-shadow: 0 16px 34px rgba(22, 93, 82, 0.16);
    transform: translateY(-1px);
}

.pdf-file-picker-icon {
    width: 42px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #165d52;
    color: #fff;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.pdf-file-picker-copy {
    display: grid;
    gap: 3px;
}

.pdf-file-picker-copy small {
    color: #7b6a59;
    font-size: 0.82rem;
    font-weight: 650;
}

.pdf-ai-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    padding: 10px 16px;
    border: 1px solid #cfe2f8;
    border-radius: 999px;
    background: #eaf3ff;
    color: #1f4770;
    font-weight: 850;
    cursor: pointer;
}

.pdf-ai-toggle span::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-radius: 5px;
    vertical-align: -4px;
    background: #fff;
}

.pdf-ai-toggle input:checked + span::before {
    background:
        linear-gradient(135deg, transparent 52%, #fff 52%) 5px 3px / 8px 12px no-repeat,
        #1f7a5f;
    border-color: #1f7a5f;
}

.pdf-actions {
    margin-top: 18px;
}

.pdf-actions .action-button-save {
    min-height: 42px;
    padding: 10px 18px;
}

.ai-processing-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 35%, rgba(217, 138, 76, 0.28), transparent 34%),
        linear-gradient(180deg, rgba(36, 52, 47, 0.95), rgba(49, 69, 63, 0.96));
    position: relative;
    overflow: hidden;
}

.ai-processing-visual::before,
.ai-processing-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.ai-processing-visual::before {
    width: 132px;
    height: 132px;
    animation: aiPulse 2.4s ease-in-out infinite;
}

.ai-processing-visual::after {
    width: 176px;
    height: 176px;
    animation: aiPulse 2.4s ease-in-out infinite 0.5s;
}

.ai-processing-spinner {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.16);
    position: relative;
    animation: aiRotate 1.8s linear infinite;
}

.ai-processing-spinner span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #f6d8bf;
    box-shadow: 0 0 18px rgba(246, 216, 191, 0.55);
}

.ai-processing-spinner span:nth-child(1) {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
}

.ai-processing-spinner span:nth-child(2) {
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
}

.ai-processing-spinner span:nth-child(3) {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
}

.ai-processing-content h3 {
    margin: 6px 0 10px;
    font-size: 1.65rem;
    line-height: 1.1;
}

.ai-processing-content p {
    margin: 0;
}

.ai-processing-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent);
}

.ai-processing-steps {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.ai-processing-step {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 138, 76, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.ai-processing-step strong {
    font-size: 0.96rem;
    color: #26352f;
}

.ai-processing-step span {
    color: #65706a;
    font-size: 0.87rem;
}

.ai-processing-step.is-active {
    border-color: rgba(31, 122, 95, 0.72);
    background: #e8f8ef;
    box-shadow: inset 0 0 0 1px rgba(31, 122, 95, 0.18);
}

.ai-processing-step.is-active strong {
    color: #1f7a5f;
}

.ai-processing-step.is-active span {
    color: #1f7a5f;
}

.ai-processing-step.is-done {
    border-color: rgba(31, 122, 95, 0.72);
    background: #dff4e8;
}

.ai-processing-step.is-done strong {
    color: #1f7a5f;
}

.ai-processing-step.is-done span {
    color: #1f7a5f;
}

@keyframes aiRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes aiPulse {
    0%, 100% {
        transform: scale(0.86);
        opacity: 0.38;
    }
    50% {
        transform: scale(1);
        opacity: 0.82;
    }
}

.inventory-entry-card {
    background: #faf7f2;
}

.inventory-entry-top {
    display: grid;
    grid-template-columns: minmax(420px, 1.65fr) minmax(320px, 1.05fr) minmax(240px, 0.7fr);
    gap: 28px;
    margin-bottom: 30px;
}

.inventory-product-entry-top {
    grid-template-columns: minmax(420px, 1.65fr) minmax(320px, 1.05fr);
    margin-bottom: 24px;
}

.entry-panel {
    border: 1px solid var(--line);
    background: #fff;
}

.entry-panel-stack {
    display: grid;
    gap: 22px;
    align-content: start;
}

.inventory-entry-media-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    margin-bottom: 30px;
}

.entry-panel-title {
    padding: 14px 18px;
    background: #d78a50;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
}

.entry-panel-body {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.albaran-meta-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.inventory-product-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: end;
}

.inventory-product-select-field,
.inventory-product-name-field,
.inventory-reference-stack,
.inventory-product-grid .inline-action-row,
.inventory-product-grid .form-grid {
    grid-column: 1 / -1;
}

.inventory-product-select-field select,
.inventory-product-select-field .searchable-select-trigger {
    min-height: 50px;
    font-size: 1rem;
}

.inventory-reference-stack {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #ead9c8;
    background: #fffaf4;
}

.inventory-ref-field input,
.inventory-barcode-field input {
    font-size: 1rem;
    min-height: 44px;
}

.entry-lines-table .entry-line-caja-col,
.entry-lines-table .entry-line-caja-cell {
    width: 84px;
    min-width: 84px;
    max-width: 100px;
}

.entry-lines-table .entry-line-caja-cell input {
    min-width: 0;
    width: 100%;
}

.linked-caja-field,
.new-linked-caja-field {
    max-width: 120px;
}

.admin-management-page {
    display: grid;
    gap: 22px;
}

.admin-management-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(42, 36, 29, 0.07);
    overflow: hidden;
}

.admin-block-head {
    padding: 18px 22px;
    border-bottom: 1px solid #ead9c8;
    background: #fffaf4;
}

.admin-block-summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 54px;
}

.admin-block-summary::-webkit-details-marker {
    display: none;
}

.admin-block-summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7bfa6;
    border-radius: 8px;
    background: #fff;
    color: #8f4a1b;
    font-weight: 900;
    transform: translateY(-50%);
}

.admin-create-user-panel[open] .admin-block-summary::after {
    content: "-";
}

.admin-create-company-panel[open] .admin-block-summary::after {
    content: "-";
}

.admin-block-head span {
    display: inline-flex;
    margin-bottom: 6px;
    color: #c86416;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-block-head h3 {
    margin: 0;
    font-size: 1.2rem;
}

.admin-form-grid {
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.admin-form-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

.admin-form-wide,
.admin-toggle-row,
.admin-form-actions,
.admin-role-picker,
.admin-attribute-picker {
    grid-column: 1 / -1;
}

.admin-role-picker,
.admin-attribute-picker {
    display: grid;
    gap: 10px;
}

.admin-role-title {
    color: var(--muted);
    font-weight: 800;
}

.admin-role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-role-card {
    position: relative;
    min-height: 92px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #ead9c8;
    border-radius: 8px;
    background: #fffdf8;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-role-card:hover {
    border-color: rgba(28, 95, 80, 0.35);
    box-shadow: 0 12px 28px rgba(42, 36, 29, 0.07);
}

.admin-role-card input {
    margin-top: 4px;
    accent-color: #165d52;
}

.admin-role-card span {
    display: grid;
    gap: 4px;
}

.admin-role-card strong {
    color: var(--ink);
    font-size: 0.96rem;
}

.admin-role-card small {
    color: var(--muted);
    font-weight: 650;
    line-height: 1.35;
}

.admin-role-card:has(input:checked) {
    border-color: #165d52;
    background: #f1fff9;
    box-shadow: 0 12px 30px rgba(22, 93, 82, 0.12);
}

.admin-role-card.is-superadmin:has(input:checked) {
    border-color: #8f4a1b;
    background: #fff6ee;
}

.admin-role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #d7e4df;
    background: #f1fff9;
    color: #165d52;
    font-size: 0.78rem;
    font-weight: 850;
    margin: 2px 4px 2px 0;
}

.admin-role-pill-0,
.admin-role-pill.is-admin {
    border-color: #d8b98e;
    background: #fff7eb;
    color: #8f4a1b;
}

.admin-role-pill-10 {
    border-color: #d7b7b1;
    background: #fff0ee;
    color: #91372b;
}

.admin-service-select {
    min-height: 44px;
}

.admin-segmented-buttons {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    width: min(260px, 100%);
    gap: 8px;
}

.admin-segmented-buttons label {
    display: block;
}

.admin-segmented-buttons input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-segmented-buttons span {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid #ead9c8;
    border-radius: 8px;
    background: #fffdf8;
    color: var(--muted);
    font-weight: 850;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.admin-segmented-buttons span:hover {
    border-color: rgba(28, 95, 80, 0.35);
    color: #165d52;
}

.admin-segmented-buttons input:checked + span {
    border-color: #165d52;
    background: #f1fff9;
    color: #165d52;
    box-shadow: 0 10px 24px rgba(22, 93, 82, 0.1);
}

.admin-service-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #d8b98e;
    background: #fff7eb;
    color: #8f4a1b;
    font-size: 0.78rem;
    font-weight: 850;
}

.admin-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-toggle-row .checkbox-line {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #ead9c8;
    border-radius: 8px;
    background: #fffaf4;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.admin-list-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.admin-list-table th {
    background: #d78a50;
    color: #fff;
    padding: 14px 12px;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.admin-list-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #ead9c8;
    background: #fffdfa;
    vertical-align: middle;
}

.admin-id-pill,
.admin-company-chip,
.admin-yesno {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-id-pill {
    background: #fde4cf;
    color: #8f4d18;
}

.admin-company-chip {
    margin: 2px 4px 2px 0;
    background: #edf3fb;
    color: #355d8c;
}

.admin-yesno.is-yes {
    background: #e1f3ea;
    color: #1f7f55;
}

.admin-yesno.is-no {
    background: #fde2df;
    color: #a64238;
}

.inventory-reference-pill,
.inventory-reference-banner {
    border: 1px solid #e2ba93;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff8f0 0%, #fff0de 100%);
}

.inventory-reference-pill {
    min-width: 220px;
    padding: 14px 18px;
    display: grid;
    gap: 6px;
    justify-items: end;
    flex: 0 0 auto;
}

.inventory-reference-pill span,
.inventory-reference-banner-label {
    color: #8b623f;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inventory-reference-pill strong,
.inventory-reference-banner-value {
    color: #1f312b;
    font-size: 2rem;
    line-height: 1;
}

.inventory-reference-delete-form {
    display: grid;
    gap: 5px;
    justify-items: end;
    width: 100%;
    margin-top: 4px;
}

.inventory-reference-delete-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #df8f86;
    border-radius: 10px;
    background: #fff7f5;
    color: #9e332a;
    font-weight: 800;
    cursor: pointer;
    padding: 7px 11px;
    box-shadow: 0 8px 18px rgba(158, 51, 42, 0.12);
}

.inventory-reference-delete-button:hover,
.inventory-reference-delete-button:focus-visible {
    background: #ffe7e2;
    border-color: #c95d52;
    color: #7f241d;
}

.inventory-reference-delete-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.inventory-reference-delete-form small {
    color: #9e332a;
    font-size: 0.74rem;
    font-weight: 700;
}

.inventory-reference-banner {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toggle-fieldset {
    display: grid;
    gap: 8px;
}

.toggle-fieldset-label {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

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

.segmented-choice-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-choice-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid #d9c5aa;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: 0.2s ease;
    font-weight: 700;
    color: #6d6256;
    font: inherit;
}

.segmented-choice-button.is-active {
    border-color: #cf8755;
    background: #fff1e2;
    color: #1f312b;
}

.product-fixed-choice {
    grid-template-columns: 1fr;
    width: 100%;
}

.product-fixed-choice .segmented-choice-button {
    pointer-events: none;
    background: #e1f3ea;
    border-color: #86c8a7;
    color: #1f7f55;
    font-weight: 800;
}

.searchable-select-box {
    position: relative;
    display: block;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.searchable-select-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.searchable-select-trigger {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.searchable-select-box.is-disabled,
.searchable-select-trigger:disabled {
    background: #f3f0ea;
    color: #7b7166;
    cursor: not-allowed;
}

.searchable-select-box.is-disabled .searchable-select-trigger-icon {
    opacity: 0.35;
}

.searchable-select-trigger-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-trigger-icon {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #8f7c69;
    flex: 0 0 auto;
    transition: transform 0.16s ease;
}

.searchable-select-box.is-open .searchable-select-trigger-icon {
    transform: rotate(180deg);
}

.searchable-select-panel {
    position: absolute;
    left: -1px;
    right: -1px;
    top: calc(100% + 6px);
    border: 1px solid #cf8755;
    border-radius: 14px;
    background: #fffdf9;
    box-shadow: 0 18px 32px rgba(42, 36, 29, 0.16);
    padding: 10px;
    display: none;
    z-index: 35;
}

.searchable-select-box.is-open .searchable-select-panel {
    display: grid;
    gap: 10px;
}

.searchable-select-input {
    width: 100%;
    border: 1px solid #e2d4c2;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.searchable-select-input:focus {
    outline: 2px solid rgba(215, 138, 80, 0.14);
    border-color: #cf8755;
    background: #fffefb;
}

.searchable-select-options {
    display: grid;
    gap: 6px;
    max-height: 240px;
    overflow: auto;
}

.searchable-select-option {
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: 0.18s ease;
}

.searchable-select-option:hover,
.searchable-select-option:focus,
.searchable-select-option.is-selected {
    background: #fff1e2;
    border-color: #e0b387;
    outline: none;
}

.searchable-select-empty {
    padding: 12px;
    border-radius: 12px;
    background: #fff8ef;
    color: var(--muted);
}

.searchable-select-box:focus-within {
    border-color: #cf8755;
    box-shadow: 0 0 0 3px rgba(215, 138, 80, 0.16);
}

.radio-line {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.radio-line input {
    width: auto;
}

.upload-dropzone {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    border: 2px dashed #b9b9b9;
    color: #6d7786;
    background: #fbfbfb;
}

.upload-dropzone-compact {
    min-height: 132px;
    flex-direction: column;
    gap: 12px;
}

.upload-dropzone-copy {
    display: grid;
    gap: 4px;
}

.upload-dropzone-copy strong {
    color: #4d4a44;
}

.upload-dropzone-copy small {
    color: #7b736a;
}

.entry-image-preview {
    width: 100%;
    max-height: 168px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #e1d5c7;
    background: #fff;
}

.inline-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inventory-lines-block {
    border: 1px solid var(--line);
    background: #fff;
}

.module-hero-card {
    padding: 0;
    overflow: hidden;
}

.module-hero-body {
    padding: 18px 22px;
    background:
        linear-gradient(180deg, rgba(215, 138, 80, 0.08) 0%, rgba(255, 255, 255, 0) 100%),
        #fffdf9;
}

.module-hero-body h2 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.25;
}

.module-hero-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.inventory-lines-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
}

.inventory-stock-pill {
    justify-items: end;
}

.inventory-lines-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.lot-total-summary {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.lot-total-summary small {
    color: var(--muted);
    font-size: 0.82rem;
}

.lot-total-summary.is-prominent {
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff8ef 0%, #fff2df 100%);
    border: 1px solid #ebcfab;
    min-width: 180px;
}

.lot-total-summary strong {
    font-size: 1.35rem;
    color: #1f312b;
}

.lot-total-banner {
    margin: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #ebcfab;
    background: linear-gradient(135deg, #fff8ef 0%, #fff3e5 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.lot-total-banner span {
    color: #6d6256;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.lot-total-banner strong {
    font-size: 2rem;
    color: #1f312b;
    line-height: 1;
}

.entry-lines-table th {
    background: #d78a50;
    color: #fff;
}

.entry-lines-table td {
    background: #fff;
}

.entry-lines-table input {
    min-width: 100%;
    border-radius: 8px;
    padding: 10px 12px;
}

.entry-lines-table select {
    min-width: 100%;
}

.icon-cell {
    width: 54px;
    text-align: center;
    color: #7c8490;
    font-weight: 700;
}

.variant-master {
    min-width: 110px;
    color: #7c8490;
    font-weight: 700;
}

.inventory-table th,
.shipment-table th,
.shipment-lines-table th {
    background: #d78a50;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    padding: 11px 9px;
}

.inventory-table {
    min-width: 1280px;
}

.inventory-table td {
    background: #fff;
    padding: 10px 9px;
}

.inventory-table .inventory-ref-cell {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
    white-space: nowrap;
}

.inventory-ref-cell .helper {
    max-width: 72px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-row td {
    background: #fff6ee;
}

.reference-entry-row {
    scroll-margin-top: 96px;
}

.linked-edit-row td {
    padding: 0;
    background: #fffaf3;
}

.linked-row-editor {
    padding: 18px;
    border-top: 1px solid #ecd9c3;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8f0 100%);
}

.related-reference-block {
    margin-top: 34px;
}

.linked-bulk-location-form {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
}

.linked-bulk-location-form button {
    min-height: 42px;
}

.compact-inline-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}

.compact-edit-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.compact-form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    align-self: end;
    padding-top: 8px;
    padding-bottom: 2px;
    flex-wrap: wrap;
}

.linked-row-editor .compact-form-actions,
.linked-entry-editor .compact-form-actions {
    border-top: 1px solid #ecd9c3;
    margin-top: 2px;
}

.compact-form-actions .action-button-back,
.compact-form-actions .action-button-save {
    min-height: 42px;
    padding: 10px 18px;
}

.linked-trace-button {
    min-height: 42px;
    border-radius: 10px;
    background: #eaf3ff;
    border-color: #cfe2f8;
    color: #1f4770;
}

.linked-trace-button:hover,
.linked-trace-button:focus-visible {
    background: #dbeafe;
    border-color: #b7d2ef;
    color: #173a5f;
}

.reference-filter-bar {
    display: flex;
    align-items: end;
    gap: 14px;
    padding: 0 18px 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.reference-filter-bar label {
    min-width: 220px;
}

.reference-filter-bar .inline-checkbox {
    min-width: auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    color: #6d635a;
    white-space: nowrap;
}

.reference-filter-bar .inline-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
}

.reference-filter-controls,
.reference-filter-actions {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
}

.reference-filter-actions {
    justify-content: flex-end;
    margin-left: auto;
}

.reference-clear-filters {
    min-height: 42px;
}

.compact-actions {
    justify-content: flex-end;
}

.icon-label-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.inventory-edit-hero-actions .inline-checkbox {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6d635a;
    white-space: nowrap;
}

.inventory-edit-hero-actions .inline-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.icon-label-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 18px;
}

.inventory-edit-button {
    width: 38px;
    height: 38px;
}

.inventory-image-cell {
    width: 58px;
}

.inventory-thumb {
    width: 48px;
    height: 38px;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd1c2;
    background: #fff;
}

.inventory-thumb-button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 8px;
    display: inline-flex;
}

.inventory-thumb-button:focus-visible {
    outline: 3px solid rgba(42, 104, 155, 0.34);
    outline-offset: 2px;
}

.inventory-thumb-button:hover .inventory-thumb {
    border-color: #c48757;
    box-shadow: 0 8px 18px rgba(24, 30, 32, 0.16);
}

.inventory-image-modal {
    z-index: 80;
}

.inventory-image-modal-card {
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 18px;
    overflow: hidden;
}

.inventory-image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: calc(100vh - 150px);
    overflow: auto;
    background: #f7f1e8;
    border: 1px solid #e4d5c3;
    border-radius: 10px;
}

.inventory-image-modal-photo {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 170px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.image-flag {
    width: 48px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e3eef9;
    color: #2b577e;
    font-size: 1rem;
    font-weight: 700;
}

.image-flag-empty {
    background: #f2f2f2;
    color: transparent;
    font-size: 0;
    position: relative;
}

.image-flag-empty::before {
    content: "";
    width: 20px;
    height: 20px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='6' width='16' height='12' rx='2'/><circle cx='9' cy='10' r='1.4'/><path d='M7 16l3.5-3.5 2.7 2.7 2.8-3.2L18 16'/><path d='M5 5l14 14'/></svg>");
}

.control-indicator {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
}

.control-indicator svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-indicator-ok {
    background: #daf0e7;
    color: #155b50;
}

.control-indicator-bad {
    background: #f9d7d3;
    color: #a12d24;
}

.control-indicator-link {
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.control-indicator-link:hover,
.control-indicator-link:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(161, 45, 36, 0.16);
    outline: none;
}

.control-expected-stock {
    margin-top: 5px;
    color: #6f7785;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.control-expected-stock strong {
    color: #273449;
}

.history-link-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #d7c7b5;
    background: #fff8ef;
    color: #8b6034;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.history-link-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-link-button:hover,
.history-link-button:focus {
    background: #fff1df;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(139, 96, 52, 0.14);
    outline: none;
}

.history-link-button.is-disabled {
    background: #f3f3f3;
    color: #a6a6a6;
    border-color: #dddddd;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.inventory-table .helper {
    font-size: 0.79rem;
    margin-top: 4px;
}

.row-actions {
    margin-bottom: 6px;
}

.mini-action {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f4ede5;
    color: #7c4f2c;
    font-size: 0.82rem;
    font-weight: 700;
}

.mini-action-button {
    border: 0;
    cursor: pointer;
}

.inventory-id-link {
    color: inherit;
    text-decoration: none;
}

.inventory-id-link:hover strong {
    color: #8a3f79;
    text-decoration: underline;
}

.trace-shipment-web-number {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: normal;
}

.inventory-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.inventory-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-editor-block {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.detail-editor-title {
    margin-bottom: 12px;
    font-weight: 700;
    color: #7c4f2c;
}

.checkbox-line {
    display: flex;
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.checkbox-line input {
    width: auto;
}

.expand-cell {
    width: 54px;
    text-align: center;
}

.expand-toggle {
    width: 34px;
    height: 34px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #8a3f79;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.expanded-row td {
    padding: 0;
    background: #fff8f1;
}

.inline-attributes-panel {
    padding: 34px 22px 26px;
    border-top: 1px solid #f1dbc7;
}

.lot-summary {
    margin-bottom: 14px;
    color: #7a5b42;
}

.lot-summary .muted {
    display: block;
    margin-top: 4px;
}

.inline-attributes-panel .section-title {
    margin-bottom: 12px;
}

.traceability-search-form {
    display: flex;
    align-items: end;
    gap: 18px;
    flex-wrap: wrap;
}

.traceability-search-form label {
    min-width: 220px;
}

.traceability-summary-grid {
    margin-top: 20px;
}

.traceability-stat {
    border-top: 4px solid #d88a52;
}

.traceability-stat small {
    margin-top: 8px;
    color: var(--muted);
}

.traceability-chart-grid {
    margin-top: 0;
}

.trace-lot-hero {
    padding: 22px 24px;
    margin-bottom: 20px;
}

.trace-lot-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
}

.trace-summary-grid {
    margin-bottom: 18px;
}

.trace-chart-card {
    padding: 22px 24px 24px;
    background:
        radial-gradient(circle at top right, rgba(216, 138, 82, 0.12), transparent 34%),
        linear-gradient(180deg, #fffdf9 0%, #fff9f2 100%);
}

.trace-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.trace-bar-list {
    display: grid;
    gap: 16px;
}

.trace-bar-row {
    display: grid;
    gap: 8px;
}

.trace-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
}

.trace-bar-meta strong {
    font-size: 1rem;
    color: #2f3c4d;
}

.trace-bar-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: #f3e9dc;
    overflow: hidden;
}

.trace-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.trace-bar-fill.is-entry {
    background: linear-gradient(90deg, #38a56b 0%, #7fd0a0 100%);
}

.trace-bar-fill.is-exit {
    background: linear-gradient(90deg, #cf5151 0%, #f08a8a 100%);
}

.trace-bar-fill.is-stock {
    background: linear-gradient(90deg, #356ca7 0%, #7eb0df 100%);
}

.trace-bar-fill.is-lot {
    background: linear-gradient(90deg, #a06d2a 0%, #ddb06a 100%);
}

.trace-line-chart {
    padding: 8px 0 0;
}

.trace-line-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.trace-axis {
    stroke: #d8c8b5;
    stroke-width: 1.2;
    pointer-events: none;
}

.trace-line {
    fill: none;
    stroke: #d88a52;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.trace-point {
    fill: #206b9a;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    pointer-events: all;
    transition: fill 0.18s ease, stroke 0.18s ease;
}

.trace-point.is-entry {
    fill: #2f9f6b;
}

.trace-point.is-exit {
    fill: #d45c5c;
}

.trace-point:hover,
.trace-point:focus {
    fill: #d88a52;
    stroke: #f6dfca;
    outline: none;
}

.trace-tooltip {
    position: fixed;
    z-index: 120;
    max-width: 320px;
    min-width: 190px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(34, 39, 44, 0.96);
    color: #fff;
    font-size: 0.84rem;
    line-height: 1.35;
    box-shadow: 0 14px 28px rgba(14, 18, 22, 0.24);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    white-space: normal;
}

.trace-tooltip div + div {
    margin-top: 4px;
}

.trace-tooltip strong {
    color: #f8d0aa;
}

.trace-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.trace-axis-label {
    fill: #8a7660;
    font-size: 10px;
    font-weight: 700;
}

.trace-control-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
}

.trace-control-chip.is-ok {
    background: #e4f5eb;
    color: #246846;
    border-color: #8dd1a7;
}

.trace-control-chip.is-bad {
    background: #fde9e7;
    color: #9c3f32;
    border-color: #e3a49c;
}

.traceability-detail-card {
    overflow: hidden;
    margin-top: 20px;
    padding: 22px 24px 24px;
}

.traceability-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    margin-bottom: 18px;
}

.traceability-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.traceability-table-wrap {
    max-height: 560px;
}

.traceability-table tbody tr.trace-row-entry td {
    background: #fffaf4;
}

.traceability-table tbody tr.trace-row-exit td {
    background: #fff5f5;
}

.traceability-table tbody tr.trace-row-location td {
    background: #f4f8ff;
}

.traceability-list-filter {
    margin-top: 20px;
    margin-bottom: 20px;
}

.advanced-filter-details summary {
    cursor: pointer;
    font-weight: 800;
    color: #9a4f16;
    list-style: none;
}

.advanced-filter-details summary::-webkit-details-marker {
    display: none;
}

.advanced-filter-details summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 999px;
    background: #fff0de;
    color: #9a4f16;
}

.advanced-filter-details[open] summary {
    margin-bottom: 16px;
}

.advanced-filter-details[open] summary::before {
    content: "-";
}

.traceability-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.traceability-list-table-wrap {
    max-height: 68vh;
}

.traceability-list-table {
    min-width: 1660px;
    table-layout: fixed;
}

.trace-col-action {
    width: 105px;
}

.trace-col-id {
    width: 80px;
}

.trace-col-product {
    width: 180px;
}

.trace-col-location-area {
    width: 118px;
}

.trace-col-location-number {
    width: 98px;
}

.trace-col-date {
    width: 112px;
}

.trace-col-days {
    width: 82px;
}

.trace-col-units {
    width: 86px;
}

.trace-col-stock {
    width: 90px;
}

.trace-product-name,
.trace-product-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trace-product-name {
    max-width: 100%;
    font-weight: 800;
    color: #273449;
    line-height: 1.2;
}

.trace-product-meta {
    margin-top: 3px;
    font-size: 0.78rem;
    line-height: 1.15;
    color: #6f7785;
}

.trace-product-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traceability-table th,
.traceability-list-table th {
    background: #d78a50;
    color: #fff;
}

.js-sortable.traceability-list-table th,
.traceability-list-table th .sort-label {
    white-space: normal;
}

.traceability-list-table th {
    padding: 9px 10px;
    font-size: 0.72rem;
    line-height: 1.1;
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
    height: 42px;
}

.traceability-list-table th .sort-label {
    align-items: center;
    gap: 5px;
    min-height: 0;
}

.traceability-table th .th-title,
.traceability-table th .th-subtitle {
    display: block;
    line-height: 1.15;
}

.traceability-table th .th-subtitle {
    margin-top: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.92;
}

.trace-entry-pill,
.trace-exit-pill,
.trace-stock-pill,
.trace-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.trace-entry-pill {
    background: #e8f7ef;
    color: #1d7f4e;
}

.trace-exit-pill {
    background: #fde7e7;
    color: #c23a3a;
}

.trace-stock-pill {
    background: #edf3fb;
    color: #355d8c;
}

.trace-stock-pill.is-zero {
    background: #ececec;
    color: #666;
}

.trace-stock-pill.is-positive {
    background: #e1f3ea;
    color: #1f7f55;
}

.trace-action-pill {
    min-width: 0;
    padding: 5px 8px;
    border-radius: 6px;
    background: #f3eadf;
    color: #7a4b1f;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
}

.trace-action-entrada,
.trace-action-entrada-sin-salida,
.trace-action-entrada-y-salida {
    background: #edf3fb;
    color: #24518b;
}

.trace-action-salida {
    background: #fde7e7;
    color: #b83232;
}

.trace-action-modificacion,
.trace-action-cambio-de-ubicacion {
    background: #fff3dc;
    color: #9a5b12;
}

.trace-action-eliminacion {
    background: #f3eadf;
    color: #7a4b1f;
}

.trace-negative {
    color: #c23a3a;
}

.trace-muted {
    color: #a8a19a;
    font-weight: 700;
}

.trace-variant-table tbody tr.selected-row td {
    background: #fff3e4;
}

.tmp-inventory-print-snapshot {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body {
        background: #fff;
        color: #111;
    }

    .topbar,
    .workspace-tabs,
    .no-print,
    .searchable-select-panel,
    .modal-backdrop {
        display: none !important;
    }

    .main {
        padding: 0;
    }

    .main-topbar,
    .card,
    .section {
        max-width: none;
        box-shadow: none;
    }

    .card,
    .section {
        border: 0;
        border-radius: 0;
        background: #fff;
    }

    .tmp-inventory-print-section .table-wrap {
        overflow: visible;
    }

    .tmp-inventory-review-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10px;
    }

    .tmp-inventory-review-table th,
    .tmp-inventory-review-table td {
        border: 1px solid #cfcfcf;
        padding: 4px 5px;
        background: #fff !important;
        color: #111 !important;
        vertical-align: top;
    }

    .tmp-inventory-review-table input,
    .tmp-inventory-review-table textarea,
    .tmp-inventory-review-table .searchable-select-trigger,
    .tmp-inventory-review-table .tmp-detail-text-input {
        min-height: 0;
        width: 100%;
        border: 0;
        border-radius: 0;
        padding: 0;
        background: transparent;
        color: #111;
        font: inherit;
        box-shadow: none;
    }

    .tmp-inventory-review-table .searchable-select-trigger-icon {
        display: none;
    }

    .tmp-detail-print-cell {
        padding-left: 8px !important;
    }

    .tmp-inventory-print-snapshot {
        display: none;
    }

    .is-temp-inventory-printing .module-hero-card,
    .is-temp-inventory-printing .tmp-inventory-print-section {
        display: none !important;
    }

    .is-temp-inventory-printing .tmp-inventory-print-snapshot {
        display: block !important;
        padding: 0;
        background: #fff;
        color: #111;
    }

    .tmp-inventory-print-snapshot h1 {
        margin: 0 0 5mm;
        font-size: 16px;
        line-height: 1.2;
    }

    .tmp-inventory-print-meta {
        margin: 0 0 5mm;
        font-size: 10px;
        color: #333;
    }

    .tmp-inventory-print-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 8.5px;
        line-height: 1.2;
    }

    .tmp-inventory-print-table th,
    .tmp-inventory-print-table td {
        border: 1px solid #bfbfbf;
        padding: 3px 4px;
        text-align: left;
        vertical-align: top;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .tmp-inventory-print-table th {
        background: #e0e0e0 !important;
        color: #111 !important;
        font-weight: 700;
    }

    .tmp-inventory-print-table th:nth-child(1),
    .tmp-inventory-print-table td:nth-child(1) {
        width: 10%;
    }

    .tmp-inventory-print-table th:nth-child(2),
    .tmp-inventory-print-table td:nth-child(2) {
        width: 20%;
    }

    .tmp-inventory-print-table th:nth-child(3),
    .tmp-inventory-print-table td:nth-child(3) {
        width: 10%;
    }

    .tmp-inventory-print-table th:nth-child(4),
    .tmp-inventory-print-table td:nth-child(4) {
        width: 5%;
        text-align: right;
    }

    .tmp-inventory-print-table th:nth-child(5),
    .tmp-inventory-print-table td:nth-child(5),
    .tmp-inventory-print-table th:nth-child(6),
    .tmp-inventory-print-table td:nth-child(6),
    .tmp-inventory-print-table th:nth-child(7),
    .tmp-inventory-print-table td:nth-child(7) {
        width: 7%;
    }

    .tmp-inventory-print-table th:nth-child(8),
    .tmp-inventory-print-table td:nth-child(8) {
        width: 11%;
    }

    .tmp-inventory-print-table th:nth-child(9),
    .tmp-inventory-print-table td:nth-child(9) {
        width: 23%;
    }
}

@media (max-width: 960px) {
    .pdf-ingest-grid,
    .pdf-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-head,
    .dashboard-donut-wrap {
        align-items: start;
        flex-direction: column;
    }

    .dashboard-inventory-control-grid {
        grid-template-columns: 1fr;
    }

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

    .trace-chart-header {
        align-items: start;
        flex-direction: column;
    }
}

.shipment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    min-height: 28px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(29, 33, 41, 0.08);
}

.shipment-status-finalizado {
    color: #1b7a47;
    background: #eaf7ef;
    border-color: #b9dcc6;
}

.shipment-status-pendiente {
    color: #8a5a14;
    background: #fff3d9;
    border-color: #edcb89;
}

.shipment-status-no-enviado {
    color: #ad1f82;
    background: #fff0f8;
    border-color: #efb7dc;
}

.shipment-status-borrador {
    color: #685744;
    background: #f8f5f1;
    border-color: #d8d1c7;
}

.shipment-status-locked {
    margin-left: auto;
    color: #8b2c22;
    background: #fff0ee;
    border-color: #e6b2aa;
}

.shipment-hero {
    position: relative;
    overflow: visible;
}

.shipment-hero.is-shipment-readonly {
    padding-right: 180px;
}

.shipment-readonly-stamp {
    position: absolute;
    top: 26px;
    right: -58px;
    width: 250px;
    padding: 9px 14px;
    transform: rotate(35deg);
    transform-origin: center;
    border: 2px solid #b44335;
    background: rgba(255, 240, 238, 0.95);
    color: #8b2c22;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(139, 44, 34, 0.18);
    z-index: 5;
    pointer-events: none;
}

.shipment-number-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 7px;
    background: #d78a50;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(215, 138, 80, 0.22);
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.shipment-number-button:visited,
.shipment-number-button:active,
.shipment-number-button *,
.inventory-reference-button:visited,
.inventory-reference-button:active,
.inventory-reference-button * {
    color: #fff;
}

.shipment-number-button:hover,
.shipment-number-button:focus-visible {
    background: #bf7138;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(191, 113, 56, 0.28);
}

.inventory-reference-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 7px;
    background: #d78a50;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(215, 138, 80, 0.22);
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.inventory-reference-button:hover,
.inventory-reference-button:focus-visible {
    background: #bf7138;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(191, 113, 56, 0.28);
}

.inventory-movement-link,
.inventory-movement-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
}

.inventory-movement-link {
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.inventory-movement-link.is-entry,
.inventory-movement-pill.is-entry {
    background: #e8f7ef;
    border-color: #b7dfc8;
    color: #1d7f4e;
}

.inventory-movement-link.is-exit,
.inventory-movement-pill.is-exit {
    background: #fde7e7;
    border-color: #f3b8b8;
    color: #b83232;
}

.inventory-movement-link:hover,
.inventory-movement-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(29, 33, 41, 0.1);
}

.shipment-user-line {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.shipment-modal-row td {
    border: 0;
}

.shipment-lines-modal-card {
    width: min(1280px, calc(100vw - 48px));
}

.shipment-lines-modal-wrap {
    max-height: 70vh;
}

.shipment-lines-table {
    min-width: 720px;
}

.shipment-lines-table th,
.shipment-lines-table td {
    padding: 12px 14px;
}

.tmp-inventory-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: 14px;
}

.tmp-inventory-action-row-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    margin: 18px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.tmp-inventory-action-left,
.tmp-inventory-action-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tmp-inventory-action-left {
    justify-content: flex-start;
    min-width: 0;
}

.tmp-inventory-action-right {
    justify-content: flex-end;
    margin-left: auto;
    min-width: max-content;
}

.tmp-inventory-pagination {
    justify-content: flex-start;
    margin-left: 0;
}

.inline-modal {
    z-index: 65;
}

.inventory-editor-header {
    display: none;
}

.inventory-editor-header .muted {
    margin: 0;
    line-height: 1.6;
}

.inline-editor-stack {
    display: grid;
    gap: 14px;
}

.inline-editor-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.inline-attribute-row {
    grid-template-columns: 1fr 1fr auto;
}

.tmp-bulk-category-bar {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tmp-bulk-category-bar label {
    min-width: 280px;
}

.tmp-product-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.tmp-product-status.is-new {
    background: #fff0de;
    border: 1px solid #e8bd8d;
    color: #9a4b0d;
}

.tmp-product-name-input {
    margin-top: 0;
    font-size: 0.84rem;
}

.tmp-category-updated td {
    background: #f4fbf7;
}

.tmp-reference-input {
    min-width: 180px;
    width: 100%;
}

.tmp-inventory-table-wrap {
    width: 100%;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto;
}

.tmp-inventory-table-wrap .tmp-inventory-review-table {
    width: 100%;
    table-layout: fixed;
}

.tmp-inventory-review-table th,
.tmp-inventory-review-table td {
    overflow-wrap: anywhere;
}

.tmp-inventory-review-table .tmp-inventory-subhead th {
    background: #c9783d;
    font-size: 0.76rem;
}

.tmp-inventory-review-table .tmp-col-ref {
    width: 12%;
}

.tmp-inventory-review-table .tmp-col-product {
    width: 26%;
}

.tmp-inventory-review-table .tmp-col-category {
    width: 11%;
}

.tmp-inventory-review-table .tmp-col-units {
    width: 6%;
}

.tmp-inventory-review-table .tmp-col-area {
    width: 12%;
}

.tmp-inventory-review-table .tmp-col-location {
    width: 14%;
}

.tmp-inventory-review-table .tmp-col-box {
    width: 8%;
}

.tmp-inventory-review-table .tmp-inventory-second-line td {
    background: #fffaf4;
    border-top: 0;
    padding-top: 4px;
}

.tmp-inventory-review-table .tmp-line-actions-cell {
    vertical-align: middle;
    text-align: center;
}

.tmp-inventory-review-table .tmp-line-actions-cell .tmp-duplicate-line-button,
.tmp-inventory-review-table .tmp-line-actions-cell .tmp-remove-line-control {
    display: flex;
    margin: 4px auto;
}

.tmp-inventory-review-table input,
.tmp-inventory-review-table textarea,
.tmp-inventory-review-table .searchable-select-box,
.tmp-inventory-review-table .searchable-select-trigger {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tmp-inventory-review-table .tmp-reference-input,
.tmp-inventory-review-table .tmp-units-input,
.tmp-inventory-review-table .searchable-select-box:has(.js-temp-area-select) .searchable-select-trigger,
.tmp-inventory-review-table .searchable-select-box:has(.js-temp-location-select) .searchable-select-trigger {
    min-width: 0;
    width: 100%;
}

.tmp-inventory-review-table th.no-print,
.tmp-inventory-review-table td.no-print {
    width: 76px;
    white-space: nowrap;
}

.tmp-inventory-review-table .tmp-inventory-detail-row.is-empty-detail td {
    padding-top: 8px;
    padding-bottom: 4px;
}

.tmp-inventory-review-table .tmp-inventory-detail-row.is-empty-detail .tmp-observations-field {
    display: none;
}

.tmp-observations-input {
    min-width: 210px;
    width: 100%;
    resize: vertical;
    min-height: 74px;
}

.tmp-observations-field {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.tmp-observations-field .tmp-observations-input {
    margin-top: 5px;
    font-weight: 400;
}

.tmp-inventory-review-table th:nth-child(5),
.tmp-inventory-review-table td:nth-child(5) {
    width: 86px;
}

.tmp-inventory-review-row.is-duplicated-line > td {
    background: #fff7e8;
}

.tmp-inventory-review-table .tmp-units-input {
    min-width: 0;
    width: 78px;
    max-width: 100%;
    text-align: right;
}

.tmp-inventory-review-table .searchable-select-box:has(.js-temp-area-select) .searchable-select-trigger,
.tmp-inventory-review-table .searchable-select-box:has(.js-temp-location-select) .searchable-select-trigger {
    min-width: 0;
    width: 100%;
}

.tmp-detail-text-input {
    width: 100%;
    margin-bottom: 8px;
}

.tmp-inventory-review-table .tmp-inventory-detail-row.is-empty-detail .tmp-detail-text-input {
    margin-bottom: 0;
}

.access-denied-page {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f8f4ee;
    padding: 32px;
    color: #2c241c;
}

.access-denied-card {
    max-width: 680px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #e4d8ca;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(93, 67, 37, 0.08);
}

.access-denied-title {
    margin: 0 0 12px;
    font-size: 28px;
}

.access-denied-message {
    margin: 0 0 16px;
    line-height: 1.6;
}

.access-denied-login {
    margin: 0;
}

.access-denied-link {
    display: inline-block;
    background: #d98a4c;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 12px;
}

@media (max-width: 1100px) {
    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .company-switch-form {
        width: 100%;
        align-items: end;
    }

    .company-switch-form label {
        flex: 1 1 260px;
    }

    .company-switch-form select {
        width: 100%;
    }

    .inventory-filter-grid,
    .inventory-editor-grid {
        grid-template-columns: 1fr;
    }

    .area-list-filter-form {
        grid-template-columns: 1fr;
    }

    .area-list-filter-form .inventory-filter-grid {
        grid-template-columns: 1fr;
    }

    .area-list-filter-actions {
        justify-content: flex-start;
    }

    .category-list-filter-form {
        grid-template-columns: 1fr;
    }

    .category-list-filter-actions {
        justify-content: flex-start;
    }

    .inline-editor-fields,
    .inline-attribute-row {
        grid-template-columns: 1fr;
    }

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

    .inventory-toolbar-search {
        max-width: none;
    }

    .inventory-toolbar-right {
        justify-content: space-between;
    }

    .nav {
        justify-content: flex-start;
    }

    .workspace-tabs {
        padding: 0 16px;
    }

    .inventory-entry-top {
        grid-template-columns: 1fr;
    }

    .inventory-entry-media-grid {
        grid-template-columns: 1fr;
    }

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

    .shipment-status-picker,
    .shipment-filter-grid {
        grid-template-columns: 1fr;
    }

    .shipment-hero.is-shipment-readonly {
        padding-right: 28px;
        padding-top: 58px;
    }

    .shipment-readonly-stamp {
        top: 16px;
        right: -62px;
        width: 240px;
        font-size: 11px;
    }

    .app-help-layout {
        grid-template-columns: 1fr;
    }

    .app-help-index {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .app-help-index a {
        white-space: nowrap;
    }

    .security-context-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .security-context-grid {
        grid-template-columns: 1fr;
    }

    .grid.cols-4,
    .grid.cols-3,
    .grid.cols-2,
    .form-grid,
    .form-grid.triple {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 18px;
    }
}

@media (max-width: 720px) {
    .workspace-tabs {
        padding: 0 10px;
    }

    .workspace-tab {
        min-width: 128px;
        max-width: 190px;
    }

    .workspace-tab-link {
        padding-left: 10px;
        font-size: 0.78rem;
    }
}

.inventory-filter-card .searchable-select-trigger-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
}

.inventory-filter-card .searchable-select-option {
    white-space: normal;
    word-break: break-word;
}