:root {
    --cs4-sidebar: #123a63;
    --cs4-sidebar-2: #0e2f52;
    --cs4-blue: #1d6fd8;
    --cs4-blue-dark: #1557ad;
    --cs4-bg: #f3f7fb;
    --cs4-line: #d9e4ef;
    --cs4-text: #1e293b;
    --cs4-muted: #5b6b7c;
    --cs4-sidebar-w: 250px;
    --cs4-sidebar-collapsed: 76px;
}

html, body {
    height: 100%;
}
body.cs4-body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--cs4-bg);
    color: var(--cs4-text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.cs4-app {
    display: flex;
    height: 100%;
    min-height: 0;
}

.cs4-sidebar {
    width: var(--cs4-sidebar-w);
    flex-shrink: 0;
    height: 100%;
    background: linear-gradient(180deg, var(--cs4-sidebar) 0%, var(--cs4-sidebar-2) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: hidden;
}
.cs4-sidebar-collapsed .cs4-sidebar {
    width: var(--cs4-sidebar-collapsed);
}
.cs4-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.05rem 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.cs4-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
}
.cs4-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.12rem;
}
.cs4-brand-tag {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    color: rgba(255,255,255,0.68);
    white-space: normal;
}
.cs4-sidebar-collapsed .cs4-brand {
    justify-content: center;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}
.cs4-sidebar-collapsed .cs4-brand-copy {
    display: none;
}
.cs4-side-nav {
    padding: 0.8rem 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.28) transparent;
}
.cs4-side-nav::-webkit-scrollbar {
    width: 8px;
}
.cs4-side-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.28);
    border-radius: 999px;
}
.cs4-nav-group-label {
    margin: 0.85rem 0.5rem 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}
.cs4-nav-empty {
    padding: 0.2rem 0.8rem 0.45rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}
.cs4-sidebar-collapsed .cs4-nav-group-label,
.cs4-sidebar-collapsed .cs4-nav-empty {
    display: none;
}
.cs4-side-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}
.cs4-side-nav a i {
    width: 1.15rem;
    text-align: center;
    flex-shrink: 0;
}
.cs4-side-nav a:hover,
.cs4-side-nav a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.cs4-side-nav a.active {
    background: var(--cs4-blue);
}
.cs4-sidebar-collapsed .cs4-side-nav a {
    justify-content: center;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    position: relative;
}
.cs4-sidebar-collapsed .cs4-side-nav a .cs4-nav-text {
    display: none;
}
.cs4-nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    white-space: normal;
    line-height: 1.25;
    align-items: flex-start;
}
.cs4-nav-toggle:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.cs4-nav-toggle > .fas:first-child {
    flex-shrink: 0;
    margin-top: 0.18rem;
}
.cs4-nav-branch.has-active > .cs4-nav-toggle {
    color: #fff;
}
.cs4-nav-caret {
    margin-left: auto;
    margin-top: 0.2rem;
    flex-shrink: 0;
    font-size: 0.68rem;
    opacity: 0.7;
    transition: transform 0.15s ease;
}
.cs4-nav-branch:not(.is-open) > .cs4-nav-toggle .cs4-nav-caret {
    transform: rotate(-90deg);
}
.cs4-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.1rem 0 0.25rem 0.55rem;
}
.cs4-nav-sub[hidden] {
    display: none;
}
.cs4-nav-sub a {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,0.72);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.cs4-nav-sub .cs4-nav-toggle {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.cs4-nav-sub .cs4-nav-sub {
    padding-left: 0.75rem;
}
.cs4-sidebar-collapsed .cs4-nav-toggle {
    justify-content: center;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}
.cs4-sidebar-collapsed .cs4-nav-toggle .cs4-nav-text,
.cs4-sidebar-collapsed .cs4-nav-caret,
.cs4-sidebar-collapsed .cs4-nav-sub {
    display: none;
}
.cs4-nav-count {
    margin-left: auto;
    min-width: 1.35rem;
    height: 1.25rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cs4-nav-count.is-alert {
    background: #dc2626;
}
.cs4-sidebar-collapsed .cs4-nav-count {
    position: absolute;
    top: 0.18rem;
    right: 0.18rem;
    margin: 0;
    min-width: 0.95rem;
    height: 0.95rem;
    font-size: 0.58rem;
    padding: 0 0.2rem;
}

.cs4-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cs4-topbar {
    background: #fff;
    border-bottom: 1px solid var(--cs4-line);
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cs4-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}
.cs4-topbar h1 {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs4-sidebar-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--cs4-line);
    background: #fff;
    border-radius: 10px;
    color: var(--cs4-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cs4-sidebar-toggle:hover {
    background: #f0f6fc;
    color: var(--cs4-blue);
}

.cs4-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}
.cs4-bell {
    position: relative;
}
.cs4-bell-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--cs4-line);
    background: #fff;
    border-radius: 10px;
    color: var(--cs4-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cs4-bell-btn:hover,
.cs4-bell.is-open .cs4-bell-btn {
    background: #f0f6fc;
    color: var(--cs4-blue);
    border-color: #b9d3ee;
}
.cs4-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.cs4-bell-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    width: 22rem;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 47, 86, 0.12);
    z-index: 30;
    overflow: hidden;
}
.cs4-bell-head {
    padding: 0.7rem 0.85rem 0.55rem;
    font-weight: 600;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--cs4-line);
}
.cs4-bell-list {
    max-height: 20rem;
    overflow-y: auto;
}
.cs4-bell-empty {
    padding: 1.2rem 0.85rem;
    color: var(--cs4-muted);
    text-align: center;
    font-size: 0.88rem;
}
.cs4-bell-list a,
.cs4-notif-list a {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    text-decoration: none;
    color: var(--cs4-text);
    border-bottom: 1px solid #f0f3f6;
}
.cs4-bell-list a:hover,
.cs4-notif-list a:hover {
    background: #f7fbff;
}
.cs4-bell-list a.is-unread,
.cs4-notif-list li.is-unread a {
    background: #eef6ff;
}
.cs4-bell-all {
    display: block;
    text-align: center;
    padding: 0.65rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--cs4-blue);
    text-decoration: none;
    border-top: 1px solid var(--cs4-line);
}
.cs4-bell-all:hover {
    background: #f7fbff;
}
.cs4-notif-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 8px;
    background: #e8f1fb;
    color: var(--cs4-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.78rem;
}
.cs4-notif-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.15rem;
}
.cs4-notif-title {
    font-weight: 600;
    font-size: 0.88rem;
}
.cs4-notif-text {
    font-size: 0.82rem;
    color: var(--cs4-muted);
}
.cs4-notif-meta {
    font-size: 0.72rem;
    color: var(--cs4-muted);
}
.cs4-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cs4-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cs4-ticket-msg {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 47, 86, 0.04);
}
.cs4-ticket-msg.is-soporte {
    border-color: #b9d3ee;
    background: #f7fbff;
}
.cs4-ticket-msg.is-interno {
    border-style: dashed;
    background: #fffbeb;
    border-color: #f3d19c;
}
.cs4-ticket-msg header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
}
.cs4-ticket-msg time {
    margin-left: auto;
    color: var(--cs4-muted);
    font-size: 0.78rem;
}
.cs4-ticket-interno,
.cs4-ticket-rol {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}
.cs4-ticket-interno {
    background: #fde68a;
    color: #92400e;
}
.cs4-ticket-rol {
    background: #dbeafe;
    color: #1d4ed8;
}
.cs4-ticket-cuerpo {
    white-space: pre-wrap;
    word-break: break-word;
}
.cs4-ticket-files {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cs4-ticket-files a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: #f0f4f8;
    color: var(--cs4-text);
    text-decoration: none;
    font-size: 0.82rem;
}
.cs4-ticket-files a:hover {
    background: #e4edf6;
}

.cs4-faq {
    margin: 0 0 1.25rem;
    padding: 1.15rem 1.2rem 1.25rem;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 47, 86, 0.04);
    scroll-margin-top: 1rem;
}
.cs4-faq-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.cs4-faq-head p {
    margin: 0;
    color: var(--cs4-muted);
    font-size: 0.92rem;
}
.cs4-faq-head-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.cs4-faq-search {
    max-width: 22rem;
    min-width: 14rem;
}
.cs4-faq-group {
    margin-top: 0.85rem;
}
.cs4-faq-group-title {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs4-muted);
}
.cs4-faq-item {
    border: 1px solid var(--cs4-line);
    border-radius: 10px;
    background: #f8fbfe;
    margin-bottom: 0.45rem;
}
.cs4-faq-item[open] {
    background: #fff;
    border-color: #b9d3ee;
}
.cs4-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 0.7rem 1rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.cs4-faq-item summary::-webkit-details-marker {
    display: none;
}
.cs4-glosario-sigla {
    display: inline-block;
    min-width: 3.4rem;
    margin-right: 0.45rem;
    padding: 0.08rem 0.4rem;
    border-radius: 6px;
    background: #e8f0f8;
    color: #1a4a7a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}
.cs4-faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e7f1fb;
    color: var(--cs4-blue);
    font-weight: 700;
    line-height: 1;
}
.cs4-faq-item[open] summary::after {
    content: "–";
}
.cs4-faq-body {
    padding: 0 1rem 0.95rem;
}
.cs4-faq-ruta {
    margin: 0 0 0.65rem;
    color: var(--cs4-blue);
    font-size: 0.88rem;
    font-weight: 600;
}
.cs4-faq-ruta i {
    margin-right: 0.3rem;
}
.cs4-faq-body ol {
    margin: 0;
    padding-left: 1.15rem;
}
.cs4-faq-body li + li {
    margin-top: 0.35rem;
}
.cs4-faq-nota {
    margin: 0.7rem 0 0;
    padding: 0.55rem 0.7rem;
    background: #fffbeb;
    border: 1px solid #f3d19c;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.86rem;
}
.cs4-faq-empty {
    margin: 0.4rem 0 0;
    color: var(--cs4-muted);
    font-size: 0.9rem;
}
@media (max-width: 700px) {
    .cs4-faq-search {
        max-width: none;
    }
}

.cs4-manual {
    display: grid;
    grid-template-columns: minmax(16rem, 20rem) 1fr;
    gap: 1.25rem;
    align-items: start;
}
.cs4-manual-nav {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    padding: 1rem 0.85rem 1.1rem;
    position: sticky;
    top: 0.75rem;
}
.cs4-manual-nav-title {
    margin: 0 0.4rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs4-muted);
}
.cs4-manual-nav ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cs4-manual-nav a {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--cs4-text);
}
.cs4-manual-nav a strong {
    display: block;
    font-size: 0.9rem;
}
.cs4-manual-nav a span {
    display: block;
    font-size: 0.75rem;
    color: var(--cs4-muted);
    margin-top: 0.15rem;
}
.cs4-manual-nav a:hover {
    background: #f4f9ff;
}
.cs4-manual-nav a.is-on {
    background: #e7f1fb;
    color: var(--cs4-blue-dark);
}
.cs4-manual-body {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    padding: 1.35rem 1.5rem 2rem;
    min-width: 0;
}
.cs4-manual-body h1 {
    font-size: 1.45rem;
    margin: 0 0 0.85rem;
}
.cs4-manual-body h2 {
    font-size: 1.12rem;
    margin: 1.6rem 0 0.55rem;
}
.cs4-manual-body h3 {
    font-size: 1rem;
    margin: 1.2rem 0 0.4rem;
}
.cs4-manual-body p,
.cs4-manual-body li {
    color: var(--cs4-text);
    line-height: 1.55;
}
.cs4-manual-body ul,
.cs4-manual-body ol {
    padding-left: 1.2rem;
}
.cs4-manual-body code {
    font-size: 0.86em;
    background: #f0f4f8;
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
}
.cs4-manual-body pre {
    background: #0f2744;
    color: #e8f1fb;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    font-size: 0.82rem;
}
.cs4-manual-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.cs4-manual-figure {
    margin: 1rem 0 1.25rem;
}
.cs4-manual-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    background: #f4f8fc;
}
@media (max-width: 900px) {
    .cs4-manual {
        grid-template-columns: 1fr;
    }
    .cs4-manual-nav {
        position: static;
    }
}

.cs4-user-menu {
    position: relative;
}
.cs4-user-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--cs4-line);
    background: #fff;
    border-radius: 12px;
    padding: 0.28rem 0.7rem 0.28rem 0.32rem;
    text-align: left;
}
.cs4-user-btn:hover,
.cs4-user-menu.is-open .cs4-user-btn {
    border-color: #b9d3ee;
    background: #f7fbff;
}
.cs4-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--cs4-blue);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}
.cs4-user-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
    border-radius: 8px;
}
.cs4-user-avatar-xs {
    width: 26px;
    height: 26px;
    font-size: 0.62rem;
    border-radius: 7px;
}
.cs4-user-avatar img,
.cs4-user-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.cs4-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.cs4-user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cs4-text);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-user-role {
    font-size: 0.72rem;
    color: var(--cs4-muted);
}
.cs4-user-caret {
    font-size: 0.68rem;
    color: var(--cs4-muted);
}
.cs4-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 47, 86, 0.12);
    padding: 0.35rem;
    z-index: 30;
}
.cs4-user-dropdown-head {
    padding: 0.55rem 0.7rem 0.65rem;
    border-bottom: 1px solid var(--cs4-line);
    margin-bottom: 0.25rem;
}
.cs4-user-email {
    font-size: 0.75rem;
    color: var(--cs4-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs4-user-dropdown a,
.cs4-user-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--cs4-text);
    text-decoration: none;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: left;
}
.cs4-user-dropdown a:hover,
.cs4-user-dropdown button:hover {
    background: #f0f6fc;
}
.cs4-user-dropdown i {
    width: 1rem;
    color: var(--cs4-muted);
}
.cs4-user-dropdown .cs4-nav-count {
    background: #e8eef6;
    color: var(--cs4-text);
}

.cs4-content {
    padding: 1.25rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.cs4-page-head {
    margin-bottom: 1.15rem;
}
.cs4-area-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.85rem;
    padding: 0.28rem 0.85rem 0.28rem 0.32rem;
    border-radius: 999px;
    background: var(--cs4-area-cab);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.2;
    box-shadow: 0 8px 18px var(--cs4-area-cab-shadow);
}
.cs4-area-ribbon i {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
}
.cs4-area-ribbon-grupo {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}
.cs4-area-ribbon-sep {
    opacity: 0.45;
}
.cs4-area-ribbon-pantalla {
    font-weight: 700;
}
.cs4-area-ribbon + .cs4-doc-cabecera {
    margin-top: 0;
}
.cs4-area-venta-pedido {
    --cs4-area-accent: #1d6fd8;
    --cs4-area-tint: #eaf3fc;
    --cs4-area-ink: #1557ad;
    --cs4-area-cab: #1d6fd8;
    --cs4-area-cab-shadow: rgba(29, 111, 216, 0.26);
}
.cs4-area-venta-asig {
    --cs4-area-accent: #0891b2;
    --cs4-area-tint: #e0f7fb;
    --cs4-area-ink: #0e7490;
    --cs4-area-cab: #0891b2;
    --cs4-area-cab-shadow: rgba(8, 145, 178, 0.26);
}
.cs4-area-venta-albaran {
    --cs4-area-accent: #4338ca;
    --cs4-area-tint: #eef0ff;
    --cs4-area-ink: #3730a3;
    --cs4-area-cab: #4338ca;
    --cs4-area-cab-shadow: rgba(67, 56, 202, 0.26);
}
.cs4-area-venta-factura {
    --cs4-area-accent: #6d28d9;
    --cs4-area-tint: #f3e8ff;
    --cs4-area-ink: #5b21b6;
    --cs4-area-cab: #6d28d9;
    --cs4-area-cab-shadow: rgba(109, 40, 217, 0.28);
}
.cs4-area-compra-pedido {
    --cs4-area-accent: #0f766e;
    --cs4-area-tint: #e6f7f4;
    --cs4-area-ink: #115e59;
    --cs4-area-cab: #0f766e;
    --cs4-area-cab-shadow: rgba(15, 118, 110, 0.26);
}
.cs4-area-compra-recepcion {
    --cs4-area-accent: #155e75;
    --cs4-area-tint: #e4f4f8;
    --cs4-area-ink: #164e63;
    --cs4-area-cab: #155e75;
    --cs4-area-cab-shadow: rgba(21, 94, 117, 0.26);
}
.cs4-area-compra-factura {
    --cs4-area-accent: #5b3d9e;
    --cs4-area-tint: #f0e9fb;
    --cs4-area-ink: #4c1d95;
    --cs4-area-cab: #5b3d9e;
    --cs4-area-cab-shadow: rgba(91, 61, 158, 0.28);
}
.cs4-area-produccion-sug {
    --cs4-area-accent: #3d8b6e;
    --cs4-area-tint: #e8f6f0;
    --cs4-area-ink: #1b4332;
    --cs4-area-cab: #3d8b6e;
    --cs4-area-cab-shadow: rgba(61, 139, 110, 0.26);
}
.cs4-area-produccion-of {
    --cs4-area-accent: #1a5f4a;
    --cs4-area-tint: #e4f3ed;
    --cs4-area-ink: #14532d;
    --cs4-area-cab: #1a5f4a;
    --cs4-area-cab-shadow: rgba(18, 70, 55, 0.28);
}
.cs4-page-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 2.75rem;
}
.cs4-ficha-head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.cs4-page-head h2 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
}
.cs4-page-head p {
    margin: 0;
    color: var(--cs4-muted);
}
.cs4-filter-card {
    background: #e8eef3;
    border: 1px solid #d3dde6;
    border-radius: 12px;
    box-shadow: none;
}
.cs4-filter-card .card-header {
    background: transparent;
    border: 0;
    padding: 0.85rem 1.15rem 0;
}
.cs4-filter-card .card-header h3 {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7a89;
}
.cs4-filter-card .card-header h3 i {
    color: #8a97a5;
}
.cs4-filter-card .card-body {
    padding: 0.85rem 1.15rem 1.15rem;
}
.cs4-doc-cabecera {
    background: #3c434d;
    color: #fff;
    border-radius: 14px;
    padding: 1.2rem 1.35rem 1.35rem;
    box-shadow: 0 12px 28px rgba(28, 33, 40, 0.22);
    margin-bottom: 1.15rem;
}
.cs4-doc-cabecera.is-venta {
    background: #1557ad;
    box-shadow: 0 12px 28px rgba(18, 58, 99, 0.28);
}
.cs4-doc-cabecera.is-produccion {
    background: #1a5f4a;
    box-shadow: 0 12px 28px rgba(18, 70, 55, 0.28);
}
.cs4-doc-cabecera-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.cs4-doc-cabecera-kicker {
    display: block;
    margin: 0 0 0.28rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.cs4-doc-cabecera-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: #fff;
}
.cs4-doc-cabecera-note {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.62);
}
.cs4-doc-cabecera-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.cs4-doc-cabecera .form-label {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}
.cs4-doc-cabecera .form-text {
    color: rgba(255, 255, 255, 0.72);
}
.cs4-doc-cabecera .form-control,
.cs4-doc-cabecera .form-select {
    background: #fff;
    border-color: transparent;
    color: var(--cs4-text);
}
.cs4-doc-cabecera .form-control:focus,
.cs4-doc-cabecera .form-select:focus {
    border-color: #9bb8d9;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.18);
}
.cs4-doc-cabecera .form-control:disabled,
.cs4-doc-cabecera .form-control[readonly] {
    background: #eef1f4;
    opacity: 1;
}
.cs4-doc-cabecera .btn-outline-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.38);
    background: transparent;
}
.cs4-doc-cabecera .btn-outline-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
}
.cs4-doc-cabecera .btn-outline-danger {
    color: #fecaca;
    border-color: rgba(252, 165, 165, 0.55);
    background: transparent;
}
.cs4-doc-cabecera .btn-outline-danger:hover {
    color: #fff;
    background: rgba(185, 28, 28, 0.85);
    border-color: transparent;
}
.cs4-doc-cabecera .btn-outline-success {
    color: #bbf7d0;
    border-color: rgba(134, 239, 172, 0.5);
    background: transparent;
}
.cs4-doc-cabecera .btn-outline-success:hover {
    color: #fff;
    background: rgba(21, 128, 61, 0.9);
    border-color: transparent;
}
.cs4-doc-cabecera-read {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.85rem 1.25rem;
}
.cs4-doc-cabecera-read dt {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
.cs4-doc-cabecera-read dd {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}
.cs4-dash-tasks {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    padding: 1.1rem 1.2rem 1.2rem;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    margin-bottom: 1.25rem;
}
.cs4-dash {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.cs4-dash-feed {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    padding: 1.1rem 1.15rem 1.2rem;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
}
.cs4-dash-feed-head h3 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
}
.cs4-dash-feed-head p {
    margin: 0 0 0.85rem;
    color: var(--cs4-muted);
    font-size: 0.85rem;
}
.cs4-dash-feed-empty {
    margin: 0;
    color: var(--cs4-muted);
    font-size: 0.9rem;
}
.cs4-dash-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cs4-dash-feed-item {
    position: relative;
    display: flex;
    gap: 0.75rem;
    padding: 0 0 0.95rem;
    font-size: 0.88rem;
    line-height: 1.4;
}
.cs4-dash-feed-item:last-child {
    padding-bottom: 0;
}
.cs4-dash-feed-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 0.28rem;
    top: 0.85rem;
    bottom: 0;
    width: 1px;
    background: var(--cs4-line);
}
.cs4-dash-feed-dot {
    flex: 0 0 0.65rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    margin-top: 0.28rem;
    position: relative;
    z-index: 1;
    background: #94a3b8;
}
.cs4-dash-feed-item.is-productos .cs4-dash-feed-dot {
    background: #0f766e;
}
.cs4-dash-feed-item.is-compras .cs4-dash-feed-dot {
    background: #c2410c;
}
.cs4-dash-feed-item.is-comercial .cs4-dash-feed-dot {
    background: #6d28d9;
}
.cs4-dash-feed-item.is-produccion .cs4-dash-feed-dot {
    background: #1a5f4a;
}
.cs4-dash-feed-item.is-sesion .cs4-dash-feed-dot {
    background: #0369a1;
}
.cs4-dash-feed-body {
    min-width: 0;
    flex: 1;
}
.cs4-dash-feed-meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.12rem;
}
.cs4-dash-feed-item time {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--cs4-muted);
}
.cs4-dash-feed-user {
    font-size: 0.72rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-dash-feed-item a {
    color: #123a63;
    text-decoration: none;
}
.cs4-dash-feed-item a:hover {
    text-decoration: underline;
}
@media (max-width: 1100px) {
    .cs4-dash {
        grid-template-columns: 1fr;
    }
    .cs4-dash-feed {
        position: static;
        max-height: none;
    }
}
.cs4-dash-tasks-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.cs4-dash-tasks-head h3 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
}
.cs4-dash-tasks-head p {
    margin: 0;
    color: var(--cs4-muted);
    font-size: 0.85rem;
}
.cs4-dash-tasks-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cs4-blue);
    text-decoration: none;
    white-space: nowrap;
}
.cs4-dash-tasks-all:hover {
    text-decoration: underline;
}
.cs4-dash-task-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.cs4-dash-task {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    background: #f8fbff;
    min-height: 7.2rem;
}
.cs4-dash-task:hover {
    border-color: #b9d0e8;
    background: #f1f7ff;
}
.cs4-dash-task.is-alert {
    background: #fff7f7;
    border-color: #fecaca;
}
.cs4-dash-task.is-alert .cs4-dash-task-n {
    color: #b91c1c;
}
.cs4-dash-task-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1fb;
    color: var(--cs4-blue);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.cs4-dash-task-icon.is-course {
    background: #eefbf3;
    color: #15803d;
}
.cs4-dash-task-icon.is-due {
    background: #fee2e2;
    color: #b91c1c;
}
.cs4-dash-task-n {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.cs4-dash-task-l {
    font-size: 0.85rem;
    color: var(--cs4-muted);
    font-weight: 600;
}
@media (max-width: 700px) {
    .cs4-dash-task-grid {
        grid-template-columns: 1fr;
    }
}
.cs4-dash-kpi {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    padding: 1.1rem 1.2rem 1.2rem;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    height: 100%;
}
.cs4-dash-kpi:hover {
    border-color: #b9d0e8;
    background: #f8fbff;
    color: inherit;
}
.cs4-dash-kpi-kicker {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cs4-muted);
    margin-bottom: 0.25rem;
}
.cs4-dash-kpi-n {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--cs4-text);
    line-height: 1.15;
}
.cs4-dash-kpi-meta {
    margin-top: 0.3rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--cs4-muted);
}
.cs4-profile-card {
    max-width: 640px;
}
.cs4-avatar-editor {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.cs4-avatar-preview .cs4-user-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.15rem;
    border-radius: 16px;
}
.cs4-avatar-dialog[hidden] {
    display: none;
}
.cs4-avatar-dialog:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#cs4MatStockDialog:not([hidden]) {
    z-index: 1100;
}
.cs4-avatar-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 47, 82, 0.42);
}
.cs4-avatar-dialog-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    width: min(560px, 100%);
    max-height: min(80vh, 640px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 48px rgba(15, 47, 86, 0.22);
    outline: none;
}
.cs4-avatar-dialog-panel.is-xxl {
    width: min(1180px, calc(100vw - 1.5rem));
    height: min(92vh, 880px);
    max-height: min(92vh, 880px);
}
.cs4-ficha-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem 1.05rem;
    border-bottom: 1px solid var(--cs4-line);
    flex-shrink: 0;
}
.cs4-ficha-view-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cs4-muted);
}
.cs4-ficha-view-code {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cs4-text);
}
.cs4-ficha-view-sub {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    color: var(--cs4-text);
}
.cs4-ficha-view-meta {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--cs4-muted);
}
.cs4-ficha-view-head-end {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cs4-ficha-view-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1.25rem 1.4rem 1.5rem;
}
.cs4-ficha-view-body .cs4-tab-panel:not([hidden]) {
    min-height: 100%;
}
.cs4-ficha-view-body .cs4-tab-empty {
    min-height: 100%;
}
.cs4-ficha-view-body .cs4-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.cs4-ficha-view-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.85rem 1.4rem;
    border-top: 1px solid var(--cs4-line);
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}
.cs4-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem 1.15rem;
}
.cs4-kv-wide {
    grid-column: 1 / -1;
}
.cs4-kv-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs4-muted);
    margin-bottom: 0.25rem;
}
.cs4-kv-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cs4-text);
    word-break: break-word;
}
.cs4-kv-obs {
    font-weight: 400;
    white-space: pre-wrap;
}
.cs4-avatar-dialog-panel.is-xxl .cs4-tabs {
    flex-shrink: 0;
}
.cs4-avatar-dialog-panel.is-xxl .cs4-art-file-preview:not(.is-empty) {
    border-style: solid;
    background: #fff;
}
@media (max-width: 767.98px) {
    .cs4-ficha-view-head {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.05rem;
    }
    .cs4-ficha-view-head-end {
        justify-content: space-between;
    }
    .cs4-ficha-view-code {
        font-size: 1.15rem;
    }
    .cs4-ficha-view-body,
    .cs4-ficha-view-foot {
        padding-left: 1.05rem;
        padding-right: 1.05rem;
    }
}
.cs4-avatar-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--cs4-line);
}
.cs4-avatar-dialog-panel.is-doc {
    width: min(980px, calc(100vw - 1.5rem));
    height: min(90vh, 860px);
    max-height: min(90vh, 860px);
}
.cs4-avatar-dialog-panel.is-mat-stock {
    width: min(1440px, calc(100vw - 1.25rem));
    height: min(92vh, 920px);
    max-height: min(92vh, 920px);
    overflow: hidden;
}
.cs4-avatar-dialog-panel.is-mat-stock .cs4-avatar-dialog-body {
    overflow: auto;
    min-height: 0;
    flex: 1 1 auto;
}
.cs4-mat-stock-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(22rem, 0.95fr);
    min-height: 0;
    flex: 1 1 auto;
    border-top: 1px solid var(--cs4-line);
}
.cs4-mat-stock-table td:first-child {
    white-space: normal;
    min-width: 16rem;
}
.cs4-mat-stock-table th.cs4-mat-stock-cubre,
.cs4-mat-stock-table td.cs4-mat-stock-cubre {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}
.cs4-sug-qty-col {
    width: 1%;
    white-space: nowrap;
}
.cs4-sug-qty {
    width: 4.5rem;
    max-width: 4.5rem;
    display: inline-block;
}
.cs4-mat-stock-tree,
.cs4-mat-stock-side {
    overflow: auto;
    min-height: 0;
    padding: 0.75rem 1rem 1rem;
}
.cs4-mat-stock-side {
    background: #f8fafc;
    border-left: 1px solid var(--cs4-line);
}
.cs4-mat-stock-table tbody tr.cs4-mat-stock-falta {
    background: #fffbeb;
}
.cs4-mat-stock-table tbody tr.is-selected {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: -2px;
}
.cs4-mat-stock-sec {
    margin-bottom: 1.1rem;
}
.cs4-mat-stock-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem 0.55rem;
    align-items: end;
    margin-bottom: 0.55rem;
}
@media (max-width: 900px) {
    .cs4-mat-stock-layout {
        grid-template-columns: 1fr;
    }
    .cs4-mat-stock-side {
        border-left: 0;
        border-top: 1px solid var(--cs4-line);
    }
}
button.cs4-mat-stock-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}
button.cs4-mat-stock-btn:disabled {
    cursor: default;
}
button.cs4-mat-stock-btn:not(:disabled):hover {
    filter: brightness(0.97);
    box-shadow: 0 0 0 1px rgba(15, 47, 86, 0.12);
}
.cs4-doc-preview-frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #f6f8fb;
}
body.cs4-embeber .cs4-sidebar,
body.cs4-embeber .cs4-sidebar-backdrop,
body.cs4-embeber .cs4-topbar,
body.cs4-embeber .cs4-page-head,
body.cs4-embeber .cs4-area-ribbon,
body.cs4-embeber .cs4-footer {
    display: none !important;
}
body.cs4-embeber .cs4-main {
    overflow: auto;
}
.cs4-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.55rem;
    overflow: auto;
    padding: 1rem;
}
.cs4-avatar-option {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f7fb;
    line-height: 0;
}
.cs4-avatar-option img,
.cs4-avatar-option svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.cs4-avatar-option.is-selected,
.cs4-avatar-option:hover {
    border-color: var(--cs4-blue);
}
.cs4-pw-meter {
    margin-top: 0.65rem;
}
.cs4-pw-bar {
    height: 6px;
    background: #e2eaf3;
    border-radius: 999px;
    overflow: hidden;
}
.cs4-pw-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #dc3545;
    transition: width 0.15s ease, background 0.15s ease;
}
.cs4-pw-meter.is-medium .cs4-pw-bar span {
    background: #d97706;
}
.cs4-pw-meter.is-strong .cs4-pw-bar span {
    background: #15803d;
}
.cs4-pw-label {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.cs4-pw-meter.is-weak .cs4-pw-label { color: #dc3545; }
.cs4-pw-meter.is-medium .cs4-pw-label { color: #d97706; }
.cs4-pw-meter.is-strong .cs4-pw-label { color: #15803d; }
.cs4-pw-checks {
    list-style: none;
    padding: 0;
    margin: 0.45rem 0 0;
    font-size: 0.8rem;
    color: var(--cs4-muted);
}
.cs4-pw-checks li.is-ok {
    color: #15803d;
}

.cs4-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cs4-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 58, 99, 0.28);
    z-index: 1090;
    align-items: center;
    justify-content: center;
}
.cs4-loading.visible {
    display: flex;
}
.cs4-loading-box {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 12px 40px rgba(15, 47, 86, 0.18);
}

.cs4-notes-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cs4-notes-menu {
    position: relative;
}
.cs4-notes-chip {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.cs4-notes-chip:hover {
    background: #e2e8f0;
    color: #334155;
}
.cs4-notes-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    padding: 0.4rem;
}
.cs4-notes-menu-panel a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.85rem;
}
.cs4-notes-menu-panel a:hover,
.cs4-notes-menu-panel a.is-active {
    background: #eef2ff;
    color: #4338ca;
}
.cs4-notes-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}
.cs4-notes-dot-lg {
    width: 30px;
    height: 30px;
    border: 2px solid #ddd;
}
.cs4-notes-create {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cs4-notes-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    outline: none;
}
.cs4-notes-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}
.cs4-color-picker {
    position: relative;
    flex-shrink: 0;
}
.cs4-color-preview {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0;
}
.cs4-color-preview:hover {
    transform: scale(1.05);
    border-color: #667eea;
}
.cs4-color-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
}
.cs4-color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}
.cs4-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 0.45rem 0.3rem;
    cursor: pointer;
    font-size: 0.6rem;
    color: #64748b;
}
.cs4-color-item:hover {
    background: #f1f5f9;
}
.cs4-color-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}
.cs4-color-item:hover .cs4-color-circle {
    transform: scale(1.08);
    border-color: #667eea;
}
.cs4-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}
.cs4-notes-grid.is-empty {
    display: none;
}
.cs4-note-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cs4-note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.cs4-note-card.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}
.cs4-note-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 0.75rem;
}
.cs4-note-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
}
.cs4-note-date {
    font-size: 0.65rem;
    color: #94a3b8;
    white-space: nowrap;
}
.cs4-note-body {
    padding: 1rem;
    min-height: 120px;
}
.cs4-note-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #334155;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
}
.cs4-note-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
}
.cs4-note-action {
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.cs4-note-action:hover {
    color: #475569;
}
.cs4-note-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
}
.cs4-note-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}
.cs4-note-empty {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 24px;
    margin-top: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}
.cs4-note-empty-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #f1f5f9 0%, #eef2ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.cs4-note-empty-icon i {
    font-size: 2rem;
    color: #94a3b8;
}
.cs4-note-empty h3 {
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 0.5rem;
}
.cs4-note-empty p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 auto 1.5rem;
    max-width: 280px;
}
.cs4-note-empty-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 40px;
    font-size: 0.75rem;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.cs4-note-tag-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.cs4-note-color-panel {
    width: min(360px, 100%);
}
.cs4-note-color-choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.cs4-note-color-choice {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    position: relative;
    padding: 0;
}
.cs4-note-color-choice span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #475569;
    text-align: center;
    padding: 0.25rem;
    line-height: 1.15;
}
.cs4-copy-tooltip {
    position: fixed;
    background: #1e293b;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 10000;
    pointer-events: none;
}
.cs4-copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-width: 0;
    max-width: 100%;
}
.cs4-copy {
    appearance: none;
    border: 0;
    background: transparent;
    color: #b7c4d1;
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    flex: 0 0 auto;
    opacity: 0.42;
    line-height: 1;
    vertical-align: middle;
}
.cs4-copy i {
    font-size: 0.68rem;
}
.cs4-copy:hover,
.cs4-copy:focus-visible,
.cs4-copy-wrap:hover .cs4-copy,
.cs4-bom-row:hover .cs4-copy,
tr:hover .cs4-copy {
    opacity: 0.85;
    color: #8fa0b2;
}
.cs4-copy:focus-visible {
    outline: 2px solid rgba(29, 111, 216, 0.28);
    outline-offset: 1px;
}
.cs4-task-page {
    padding-bottom: 4.5rem;
}
.cs4-task-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.85rem;
}
.cs4-task-toolbar-end {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.cs4-task-search {
    position: relative;
    min-width: 12rem;
}
.cs4-task-search i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cs4-muted);
    font-size: 0.8rem;
}
.cs4-task-search input {
    width: 100%;
    border: 1px solid var(--cs4-line);
    border-radius: 999px;
    padding: 0.38rem 0.8rem 0.38rem 2rem;
    font-size: 0.875rem;
    background: #fff;
}
.cs4-task-search input:focus {
    outline: 2px solid rgba(29, 111, 216, 0.28);
    border-color: var(--cs4-blue);
}
.cs4-task-view {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 999px;
    padding: 0.15rem;
}
.cs4-task-view-btn {
    border: 0;
    background: transparent;
    color: var(--cs4-muted);
    border-radius: 999px;
    padding: 0.32rem 0.8rem;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}
.cs4-task-view-btn.is-active {
    background: var(--cs4-blue);
    color: #fff;
}
.cs4-task-count {
    margin: 0 0 0.7rem;
    font-size: 0.8rem;
    color: var(--cs4-muted);
}
.cs4-task-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
}
.cs4-task-col {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    padding: 0.8rem;
    min-height: 280px;
}
.cs4-task-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}
.cs4-task-col h3 {
    font-size: 0.95rem;
    margin: 0;
}
.cs4-task-col-n {
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--cs4-muted);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.4rem;
}
.cs4-task-list {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.cs4-task-col-empty {
    border: 1px dashed var(--cs4-line);
    border-radius: 10px;
    color: var(--cs4-muted);
    font-size: 0.8rem;
    padding: 1.1rem 0.6rem;
    text-align: center;
}
.cs4-task-card {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    padding: 0.72rem 0.78rem 0.68rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.cs4-task-card:hover {
    border-color: #b9d0e8;
    box-shadow: 0 6px 16px rgba(18, 58, 99, 0.08);
}
.cs4-task-card.is-dragging {
    opacity: 0.5;
}
.cs4-task-card.is-overdue,
.cs4-task-list-card tr.is-overdue {
    background: #fff7f7;
}
.cs4-task-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
}
.cs4-task-card-head .cs4-prio {
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.cs4-task-title {
    font-weight: 650;
    font-size: 0.92rem;
    line-height: 1.35;
    min-width: 0;
}
.cs4-task-detail,
.cs4-task-sub {
    margin-top: 0.28rem;
    font-size: 0.78rem;
    color: var(--cs4-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cs4-task-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eef2f6;
}
.cs4-task-asig {
    min-width: 0;
    font-size: 0.78rem;
    color: var(--cs4-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-task-list-card .cs4-task-asig {
    margin-top: 0;
    color: var(--cs4-text);
}
.cs4-task-due {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--cs4-muted);
}
.cs4-task-due.is-overdue {
    color: #b42318;
}
.cs4-prio {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
}
.cs4-prio-alta { color: #b42318; background: #fef3f2; }
.cs4-prio-media { color: #b54708; background: #fff6ed; }
.cs4-prio-baja { color: #175cd3; background: #eff8ff; }
.cs4-task-title-btn {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.cs4-task-title-btn:hover {
    color: var(--cs4-blue);
}
.cs4-task-estado {
    min-width: 7.5rem;
}
.cs4-task-list-card td:nth-child(2) {
    white-space: normal;
    min-width: 14rem;
    max-width: 28rem;
}
.cs4-task-group td {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs4-muted);
    padding-top: 0.7rem;
    padding-bottom: 0.45rem;
    white-space: nowrap;
}
.cs4-task-drop {
    color: var(--cs4-muted);
    font-size: 0.8rem;
    text-align: center;
    white-space: normal !important;
}
.cs4-task-row.is-dragging {
    opacity: 0.45;
}
.cs4-action-grip {
    cursor: grab;
}
.cs4-action-grip:hover {
    color: #64748b;
    background: #f1f5f9;
}
.cs4-task-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cs4-muted);
}
.cs4-task-empty h3 {
    margin: 0.8rem 0 0.35rem;
    color: var(--cs4-text);
}
.cs4-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--cs4-blue);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 12px 28px rgba(29, 111, 216, 0.38);
    z-index: 1045;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.cs4-fab:hover {
    background: var(--cs4-blue-dark);
}
.cs4-task-dialog-panel {
    width: min(520px, 100%);
}
.cs4-task-dialog-body {
    overflow: auto;
    padding: 1rem 1.1rem;
}
.cs4-task-dialog-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--cs4-line);
}

.cs4-sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .cs4-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--cs4-sidebar-w) !important;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    html.cs4-sidebar-open .cs4-sidebar {
        transform: translateX(0);
    }
    .cs4-sidebar-collapsed .cs4-brand,
    .cs4-sidebar-collapsed .cs4-side-nav a,
    .cs4-sidebar-collapsed .cs4-nav-toggle {
        justify-content: flex-start;
    }
    .cs4-sidebar-collapsed .cs4-brand-copy,
    .cs4-sidebar-collapsed .cs4-side-nav a .cs4-nav-text,
    .cs4-sidebar-collapsed .cs4-nav-toggle .cs4-nav-text,
    .cs4-sidebar-collapsed .cs4-nav-caret {
        display: flex;
    }
    .cs4-sidebar-collapsed .cs4-side-nav a .cs4-nav-text,
    .cs4-sidebar-collapsed .cs4-nav-toggle .cs4-nav-text {
        display: inline;
    }
    .cs4-sidebar-collapsed .cs4-nav-sub {
        display: flex;
    }
    .cs4-sidebar-collapsed .cs4-nav-sub[hidden] {
        display: none;
    }
    .cs4-sidebar-collapsed .cs4-nav-count {
        position: static;
        margin-left: auto;
        min-width: 1.35rem;
        height: 1.25rem;
        font-size: 0.68rem;
        padding: 0 0.38rem;
    }
    html.cs4-sidebar-open .cs4-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(14, 47, 82, 0.42);
        z-index: 1035;
    }
    .cs4-user-meta {
        display: none;
    }
    .cs4-avatar-editor {
        flex-direction: column;
    }
    .cs4-task-board {
        grid-template-columns: 1fr;
    }
    .cs4-notes-grid {
        grid-template-columns: 1fr;
    }
    .cs4-notes-create {
        flex-direction: column;
        align-items: stretch;
    }
}

.cs4-form-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--cs4-line);
}
.cs4-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.cs4-form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cs4-muted);
    margin-bottom: 1rem;
}
.cs4-action-buttons {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-start;
}
.cs4-action-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.75rem;
}
.cs4-action-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}
.cs4-action-btn.cs4-action-view:hover {
    background: #e6f7e6;
    color: #16a34a;
}
.cs4-action-btn.cs4-action-del:hover {
    background: #fef2f2;
    color: #ef4444;
}
.cs4-action-btn.cs4-action-facturar {
    color: #6d28d9;
}
.cs4-action-btn.cs4-action-facturar:hover {
    background: #f3e8ff;
    color: #5b21b6;
}
.cs4-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 0 0.2rem;
}
.cs4-pager-info {
    color: var(--cs4-muted);
    font-size: 0.85rem;
}
.cs4-pager-pages,
.cs4-pager-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.cs4-pager-pages button,
.cs4-pager-nav button {
    min-width: 2rem;
    height: 2rem;
    border: 1px solid var(--cs4-line);
    background: #fff;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--cs4-text);
}
.cs4-pager-pages button:hover:not(:disabled),
.cs4-pager-nav button:hover:not(:disabled) {
    border-color: #b9d0e8;
    background: #f1f7ff;
}
.cs4-pager-pages button.is-current,
.cs4-pager-nav button.is-current {
    background: var(--cs4-blue);
    border-color: var(--cs4-blue);
    color: #fff;
}
.cs4-pager-pages button:disabled,
.cs4-pager-nav button:disabled {
    opacity: 0.45;
}
.cs4-card-fold > .card-header {
    cursor: pointer;
    user-select: none;
    appearance: none;
    border: 0;
    background: #fff;
    color: inherit;
}
.cs4-card-fold > .card-header:hover {
    background: #f8fafc;
}
.cs4-card-fold.is-collapsed > .card-body {
    display: none;
}
.cs4-card-fold-caret {
    display: inline-block;
    transition: transform 0.15s ease;
}
.cs4-card-fold.is-collapsed .cs4-card-fold-caret {
    transform: rotate(-90deg);
}
.cs4-stock-recuento {
    width: 6.5rem;
    max-width: 100%;
    text-align: right;
    margin-left: auto;
}
.cs4-badge-estado {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 30px;
}
.cs4-badge-estado.is-on {
    background: #e6f7e6;
    color: #166534;
}
.cs4-badge-estado.is-ok {
    background: #e0f2fe;
    color: #0369a1;
}
.cs4-badge-estado.is-warn {
    background: #fef3c7;
    color: #b45309;
}
.cs4-badge-estado.is-off {
    background: #fee2e2;
    color: #b91c1c;
}
.cs4-tree-child td {
    background: #f8fafc;
}
.cs4-tree-code {
    padding-left: 1.75rem !important;
}
.cs4-tree-code::before {
    content: "↳ ";
    color: #94a3b8;
    font-weight: 400;
}
.cs4-tipo-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 30px;
    background: #e0edff;
    color: #1d4ed8;
}
.cs4-tipo-pill.is-sub {
    background: #e2e8f0;
    color: #475569;
}
.cs4-empresa-table th,
.cs4-empresa-table td {
    white-space: nowrap;
    vertical-align: middle;
}
.cs4-empresa-table thead th:first-child,
.cs4-empresa-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 #e8eef3;
}
.cs4-table-sticky-wrap {
    max-height: min(70vh, calc(100vh - 16rem));
    overflow: auto;
}
.cs4-table-sticky-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 0 1px 0 #e8eef3;
}
.cs4-table-sticky-wrap thead th:first-child {
    z-index: 4;
}
.cs4-table-busy,
.cs4-table-empty {
    text-align: center;
    color: var(--cs4-muted);
    padding: 2rem 1rem !important;
    white-space: normal !important;
}
.cs4-table-busy {
    display: table-cell;
}
.cs4-table-busy .spinner-border {
    margin-right: 0.5rem;
    vertical-align: middle;
}
.cs4-table-empty p {
    margin: 0 0 0.75rem;
}
.cs4-th-help {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.cs4-col-help {
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0;
    line-height: 1;
    cursor: help;
}
.cs4-col-help:hover,
.cs4-col-help:focus-visible {
    color: #1d6fd8;
}
.cs4-empresa-toolbar {
    gap: 0.5rem !important;
}
.cs4-tool-dd {
    position: relative;
}
.cs4-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 0.32rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.cs4-tool-btn:hover,
.cs4-tool-dd.is-open .cs4-tool-btn {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}
.cs4-tool-btn.is-filtered {
    background: #475569;
    border-color: #334155;
    color: #fff;
}
.cs4-tool-btn.is-filtered:hover,
.cs4-tool-dd.is-open .cs4-tool-btn.is-filtered {
    background: #334155;
    border-color: #1e293b;
    color: #fff;
}
.cs4-tool-caret {
    font-size: 0.62rem;
    opacity: 0.7;
}
.cs4-tool-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    min-width: 10.5rem;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 47, 86, 0.12);
    padding: 0.35rem;
    z-index: 20;
}
.cs4-tool-menu a,
.cs4-tool-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--cs4-text);
    text-decoration: none;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}
.cs4-tool-menu a:hover,
.cs4-tool-menu button:hover,
.cs4-tool-menu a.is-active,
.cs4-tool-menu button.is-active {
    background: #f1f5f9;
}
.cs4-tool-menu-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs4-muted);
    padding: 0.5rem 0.7rem 0.15rem;
}
.cs4-tool-menu-label:first-child {
    padding-top: 0.15rem;
}
.cs4-task-filter-menu {
    min-width: 13.5rem;
    max-height: min(70vh, 28rem);
    overflow: auto;
}
.cs4-th-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-weight: inherit;
    color: inherit;
    cursor: pointer;
}
.cs4-th-sort:hover {
    color: #2563eb;
}
.cs4-th-sort i {
    font-size: 0.7rem;
    opacity: 0.55;
}
.cs4-empresa-dbname {
    display: inline-block;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: 0.75rem;
    color: #475569;
    background: #f8fafc;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.cs4-empresa-ficha {
    width: min(720px, 100%);
    max-height: min(90vh, 820px);
}
.cs4-empresa-ficha .p-3 {
    overflow: auto;
}
.cs4-empresa-logo-preview {
    width: 180px;
    height: 80px;
    border: 1px solid var(--cs4-line);
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.cs4-empresa-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cs4-empresa-logo-ficha {
    display: block;
    max-height: 64px;
    max-width: 220px;
    margin-bottom: 0.75rem;
    object-fit: contain;
}
.cs4-empresa-logo-thumb {
    width: 36px;
    height: 28px;
    max-width: 36px;
    max-height: 28px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    flex-shrink: 0;
}

@media print {
    html, body.cs4-body {
        height: auto;
        overflow: visible;
    }
    .cs4-sidebar,
    .cs4-topbar,
    .cs4-footer,
    .cs4-sidebar-backdrop,
    .cs4-toast-host,
    .cs4-loading,
    .no-print {
        display: none !important;
    }
    body.cs4-print-ficha * {
        visibility: hidden;
    }
    body.cs4-print-ficha #cs4EmpresaFicha,
    body.cs4-print-ficha #cs4EmpresaFicha * {
        visibility: visible;
    }
    body.cs4-print-ficha #cs4EmpresaFicha {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 1.25rem;
        background: #fff;
    }
    .cs4-app,
    .cs4-main,
    .cs4-content {
        display: block;
        width: 100%;
        padding: 0;
        margin: 0;
        background: #fff;
    }
    .cs4-note-card {
        break-inside: avoid;
        box-shadow: none;
        transform: none;
    }
}

.cs4-auth-body {
    min-height: 100vh;
    background: #f3f7fb;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.cs4-auth-wrap {
    max-width: 440px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}
.cs4-auth-wrap.is-wide {
    max-width: 1040px;
}
.cs4-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.cs4-auth-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}
.cs4-auth-brand-tag {
    letter-spacing: 0;
    font-weight: 600;
    font-size: 0.78rem;
    color: #5b6b7c;
}
.cs4-auth-brand img {
    border-radius: 10px;
}
.cs4-auth-card {
    border-radius: 16px;
}
.cs4-force-switch {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #475569;
    margin: 0;
}
.cs4-force-switch .form-check-input {
    cursor: pointer;
}
.cs4-force-col .form-check {
    min-height: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.cs4-select-head {
    text-align: center;
    margin-bottom: 1.25rem;
}
.cs4-select-tools {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 1.1rem;
}
.cs4-select-tools .form-control {
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    padding: 0.7rem 0.95rem;
}
.cs4-select-count {
    margin: 0;
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--cs4-muted);
}
.cs4-empresa-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.9rem;
}
.cs4-empresa-picker form {
    margin: 0;
}
.cs4-empresa-picker-empty {
    margin: 0.4rem 0 0;
    text-align: center;
    color: var(--cs4-muted);
}
.cs4-empresa-pick {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    background: #fff;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 47, 86, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cs4-empresa-pick:hover,
.cs4-empresa-pick:focus-visible {
    border-color: #b9d4f3;
    box-shadow: 0 12px 28px rgba(29, 111, 216, 0.12);
    transform: translateY(-1px);
    outline: none;
}
.cs4-empresa-pick-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e7f1fb;
    color: var(--cs4-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}
.cs4-empresa-pick-mark.has-logo {
    background: #fff;
    border: 1px solid var(--cs4-line);
}
.cs4-empresa-pick-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cs4-empresa-pick-name {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    color: var(--cs4-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-empresa-pick-go {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cs4-blue);
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .cs4-select-tools {
        flex-direction: column;
        align-items: stretch;
    }
}

.cs4-ficha-card {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    overflow: hidden;
    min-height: calc(100vh - 11.5rem);
    display: flex;
    flex-direction: column;
}
.cs4-ficha-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.cs4-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0 1.1rem;
    background: #f6f9fc;
    border-bottom: 1px solid var(--cs4-line);
    overflow-x: auto;
}
.cs4-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--cs4-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.95rem 1.05rem 0.85rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}
.cs4-tab i {
    font-size: 0.78rem;
    opacity: 0.85;
}
.cs4-tab:hover {
    color: var(--cs4-text);
}
.cs4-tab:focus-visible {
    outline: 2px solid var(--cs4-blue);
    outline-offset: -2px;
}
.cs4-tab.is-active {
    color: var(--cs4-blue);
    border-bottom-color: var(--cs4-blue);
    background: #fff;
    border-radius: 10px 10px 0 0;
}
.cs4-tab-panels {
    flex: 1;
    padding: 1.4rem 1.5rem 1.6rem;
}
.cs4-tab-panel[hidden] {
    display: none;
}
.cs4-tab-panel .cs4-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.cs4-form-section-files {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.cs4-art-files {
    display: grid;
    gap: 1.15rem;
}
.cs4-art-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 168px;
    margin-bottom: 0.65rem;
    border: 1px dashed var(--cs4-line);
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
    color: var(--cs4-muted);
    font-size: 0.85rem;
}
.cs4-art-file-preview img {
    width: 100%;
    height: 168px;
    object-fit: contain;
    background: #fff;
}
.cs4-art-file-preview.is-doc a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--cs4-blue);
    text-decoration: none;
}
.cs4-art-file-preview.is-doc .fa-file-pdf {
    color: #dc2626;
}
.cs4-tab-empty {
    min-height: 22rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cs4-muted);
    gap: 0.35rem;
}
.cs4-tab-empty i {
    font-size: 1.6rem;
    margin-bottom: 0.55rem;
    color: #93a4b5;
}
.cs4-tab-empty h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--cs4-text);
}
.cs4-tab-empty p {
    margin: 0;
    max-width: 28rem;
}
.cs4-prov-list {
    display: grid;
    gap: 0.9rem;
}
.cs4-prov-card {
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    padding: 1rem 1.1rem 1.1rem;
    background: #f8fafc;
}
.cs4-prov-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.cs4-prov-default {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cs4-text);
    margin: 0;
}
.cs4-price-table {
    background: #fff;
}
.cs4-price-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cs4-muted);
    font-weight: 600;
    border-bottom-color: var(--cs4-line);
}
@media (max-width: 640px) {
    .cs4-ficha-head-actions {
        width: 100%;
    }
    .cs4-ficha-head-actions .btn {
        flex: 1;
    }
    .cs4-ficha-card {
        min-height: 0;
    }
}
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc2626;
}
.cs4-field-error {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}
.cs4-prov-list.is-invalid {
    box-shadow: inset 0 0 0 1px #dc2626;
    border-radius: 12px;
}
.cs4-stock-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cs4-mov-ent {
    color: #15803d;
    font-weight: 600;
}
.cs4-mov-sal {
    color: #b91c1c;
    font-weight: 600;
}
.cs4-est-add {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.cs4-est-add .form-control {
    flex: 1 1 8rem;
    min-width: 6rem;
}
.cs4-est-add .cs4-suggest {
    flex: 1 1 10rem;
    min-width: 8rem;
}
.cs4-est-add .cs4-est-qty {
    flex: 0 0 5.5rem;
    min-width: 5.5rem;
}
.cs4-est-add-ops .form-select {
    flex: 0 1 8.5rem;
}
.cs4-est-add-ops .form-control:nth-child(3) {
    flex: 1 1 12rem;
}
.cs4-est-move {
    width: 4.2rem;
    white-space: nowrap;
}
#cs4MatTable .cs4-est-move {
    width: 2.4rem;
}
#cs4MatTable .cs4-est-move .cs4-action-grip {
    vertical-align: middle;
}
#cs4MatTable tr.is-dragging {
    opacity: 0.45;
}
.cs4-bom-node.is-dragging {
    opacity: 0.45;
}
.cs4-bom-grip {
    flex: 0 0 1.6rem;
    margin-top: 0.1rem;
}
.cs4-bom {
    font-size: 0.95rem;
}
.cs4-bom-node.is-root > .cs4-bom-row {
    padding-left: 0;
}
.cs4-bom-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.35rem 0.4rem;
    border-radius: 10px;
}
.cs4-bom-row:hover {
    background: #f8fafc;
}
.cs4-bom-toggle {
    appearance: none;
    border: 0;
    background: #eef3f8;
    color: #475569;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.6rem;
    margin-top: 0.1rem;
    cursor: pointer;
}
.cs4-bom-toggle:disabled {
    opacity: 0.35;
    cursor: default;
}
.cs4-bom-toggle i {
    font-size: 0.7rem;
}
.cs4-bom-body {
    min-width: 0;
    flex: 1;
}
.cs4-bom-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.55rem;
}
.cs4-bom-qty {
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.cs4-bom-desc {
    color: var(--cs4-muted);
}
.cs4-bom-acum {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}
.cs4-bom-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}
.cs4-bom-op {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
}
.cs4-bom-cycle {
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.cs4-bom-children {
    margin-left: 1.15rem;
    padding-left: 0.85rem;
    border-left: 1px solid #dbe4ee;
}
.cs4-suggest {
    position: relative;
}
.cs4-suggest-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0.3rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 47, 86, 0.12);
    max-height: 16rem;
    overflow: auto;
}
.cs4-suggest-item {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    cursor: pointer;
    color: var(--cs4-text);
}
.cs4-suggest-item strong {
    font-size: 0.9rem;
}
.cs4-suggest-item span {
    font-size: 0.8rem;
    color: var(--cs4-muted);
}
.cs4-suggest-item:hover,
.cs4-suggest-item.is-active {
    background: #eef5ff;
}
.cs4-suggest-stop {
    font-style: normal;
    font-size: 0.72rem;
    color: #b42318;
    font-weight: 600;
}
.cs4-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.45rem 0.85rem 0.55rem;
    background: #eef2f6;
    border-top: 1px solid var(--cs4-line);
}
.cs4-footer-spacer { flex: 1; }
.cs4-cmd {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: min(420px, 100%);
    background: #f7f8fa;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.28rem 0.7rem 0.28rem 0.85rem;
}
.cs4-cmd-suggest {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.4rem);
    max-height: 16rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    z-index: 40;
    padding: 0.25rem;
}
.cs4-cmd-suggest-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    color: var(--cs4-text);
}
.cs4-cmd-suggest-item:hover,
.cs4-cmd-suggest-item.is-active {
    background: #eef4fb;
}
.cs4-cmd-suggest-item strong {
    font-size: 0.82rem;
}
.cs4-cmd-suggest-item span {
    font-size: 0.78rem;
    color: var(--cs4-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-cmd-suggest-item em {
    font-style: normal;
    font-size: 0.68rem;
    color: #64748b;
}
.cs4-cmd-prompt {
    color: #94a3b8;
    font-weight: 600;
    line-height: 1;
}
.cs4-cmd-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.86rem;
    color: var(--cs4-text);
}
.cs4-cmd-input::placeholder { color: #94a3b8; }
.cs4-cmd-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.cs4-cmd-arrow { font-size: 0.8rem; }
.cs4-cmd-info {
    appearance: none;
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 999px;
    line-height: 1;
}
.cs4-cmd-info:hover,
.cs4-cmd-info:focus-visible {
    color: var(--cs4-blue);
    background: #eef5ff;
    outline: none;
}
.cs4-cmd-hint kbd {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border: 1px solid #dbe3ec;
    border-radius: 6px;
    background: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}
.cs4-cmd-help-panel {
    width: min(520px, 100%);
    max-height: min(80vh, 640px);
    overflow: hidden;
}
.cs4-cmd-help-browse {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.cs4-cmd-help-filter { padding: 0.75rem 1rem 0.35rem; flex-shrink: 0; }
.cs4-cmd-help-list {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.35rem 0.5rem 0.75rem;
    min-height: 0;
    flex: 1;
}
.cs4-cmd-help-item {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 5.5rem 1fr auto;
    gap: 0.6rem;
    align-items: center;
    color: inherit;
}
.cs4-cmd-help-item:hover,
.cs4-cmd-help-item:focus-visible {
    background: #eef5ff;
    outline: none;
}
.cs4-cmd-help-item strong {
    font-variant-numeric: tabular-nums;
}
.cs4-cmd-help-item span {
    color: var(--cs4-muted);
    font-size: 0.86rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs4-cmd-help-item em {
    font-style: normal;
    font-size: 0.72rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}
.cs4-cmd-help-doc {
    padding: 1rem 1.15rem 1.2rem;
}

.cs4-arbol-filter {
    --bs-card-bg: #334155;
    background: #334155;
    color: #e2e8f0;
    border-radius: 16px;
}
.cs4-arbol-filter .form-label {
    display: block;
    color: #cbd5e1;
    margin-bottom: 0.35rem;
}
.cs4-arbol-filter .form-control,
.cs4-arbol-filter .form-select {
    border-color: #475569;
}
.cs4-arbol-filter-desc {
    min-height: 2.375rem;
    display: flex;
    align-items: center;
    color: #f8fafc;
    font-weight: 600;
}
.cs4-arbol-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.cs4-arbol-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    min-height: 7.2rem;
}
.cs4-arbol-kpi-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1fb;
    color: var(--cs4-blue);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.cs4-arbol-kpi-icon.is-time {
    background: #eefbf3;
    color: #15803d;
}
.cs4-arbol-kpi-n {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.cs4-arbol-kpi-sub {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cs4-text);
    font-variant-numeric: tabular-nums;
}
.cs4-arbol-kpi-l {
    font-size: 0.85rem;
    color: var(--cs4-muted);
    font-weight: 600;
    margin-top: 0.15rem;
}
@media (max-width: 1100px) {
    .cs4-arbol-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .cs4-arbol-kpis {
        grid-template-columns: 1fr;
    }
}
.cs4-listado-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.cs4-listado-search {
    max-width: 22rem;
    margin-bottom: 1rem;
}
.cs4-listado-card[hidden] {
    display: none !important;
}
.cs4-listado-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    padding: 1.15rem 1.2rem 1.25rem;
    box-shadow: 0 10px 28px rgba(15, 47, 86, 0.06);
    min-height: 8.5rem;
}
.cs4-listado-card:hover {
    border-color: #b9d0e8;
    background: #f8fbff;
}
.cs4-listado-card-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1fb;
    color: var(--cs4-blue);
    margin-bottom: 0.2rem;
}
.cs4-listado-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--cs4-text);
}
.cs4-listado-card-text {
    font-size: 0.88rem;
    color: var(--cs4-muted);
    font-weight: 500;
}
@media (max-width: 800px) {
    .cs4-listado-grid {
        grid-template-columns: 1fr;
    }
}
.cs4-doc-lines {
    table-layout: fixed;
    width: 100%;
}
.cs4-doc-lines th,
.cs4-doc-lines td {
    vertical-align: top;
}
.cs4-doc-lines .cs4-doc-col-art {
    width: auto;
}
.cs4-doc-lines .cs4-doc-col-num {
    width: 5.6rem;
}
.cs4-doc-lines .cs4-doc-col-date {
    width: 9.2rem;
}
.cs4-doc-lines .cs4-doc-col-imp {
    width: 6.2rem;
    padding-top: 0.7rem;
}
.cs4-doc-lines .cs4-doc-col-acc {
    width: 2.2rem;
    padding-top: 0.55rem;
}
.cs4-doc-line-art {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.cs4-doc-line-desc {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--cs4-text);
    padding: 0.1rem 0.2rem 0.15rem;
    word-break: break-word;
}
.cs4-doc-line-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs4-muted);
    padding: 0 0.2rem 0.1rem;
}
.cs4-doc-lines input.form-control,
.cs4-doc-lines select.form-select {
    min-width: 0;
    width: 100%;
}
.cs4-doc-lines .cs4-doc-col-num input.form-control {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}
.cs4-doc-lines-card .card-body {
    min-height: 26rem;
}
.cs4-doc-lines-card .table-responsive {
    overflow: visible;
    min-height: 22rem;
}
.cs4-est-head {
    align-items: flex-end;
}
.cs4-est-head-id {
    min-width: 0;
    flex: 1 1 16rem;
}
.cs4-est-head-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs4-muted);
}
.cs4-est-head-code {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    color: var(--cs4-text);
}
.cs4-est-head-desc {
    margin: 0.2rem 0 0;
    color: var(--cs4-muted);
    font-size: 1rem;
}
.cs4-est-head-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    max-width: 36rem;
}
.cs4-est-head-pick .form-label {
    margin-bottom: 0.3rem;
}
.cs4-est-head-side {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 1 1 18rem;
}
.cs4-est-head-obs {
    flex: 1 1 14rem;
    max-width: 22rem;
}
.cs4-est-head-obs .form-label {
    margin-bottom: 0.3rem;
    color: var(--cs4-muted);
}
.cs4-doc-date {
    min-width: 9.5rem;
}
.cs4-pedido-doc {
    background: #fff;
    border: 1px solid #d9e4ef;
    border-radius: 10px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.cs4-pedido-doc-top {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #123a63;
}
.cs4-pedido-doc-logo {
    max-height: 48px;
    max-width: 180px;
    display: block;
    margin-bottom: 0.5rem;
}
.cs4-pedido-doc-emp {
    font-weight: 700;
    color: #123a63;
    font-size: 1.05rem;
}
.cs4-pedido-doc-muted {
    color: #5b6b7c;
    font-size: 0.85rem;
    line-height: 1.45;
}
.cs4-pedido-doc-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5b6b7c;
}
.cs4-pedido-doc-id {
    text-align: right;
}
.cs4-pedido-doc-num {
    font-size: 1.45rem;
    font-weight: 800;
    color: #123a63;
    line-height: 1.2;
    margin: 0.15rem 0 0.35rem;
}
.cs4-pedido-doc-party {
    background: #f7fafc;
    border: 1px solid #d9e4ef;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.15rem;
}
.cs4-pedido-doc-party-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #123a63;
}
.cs4-pedido-doc-table {
    margin-bottom: 0;
}
.cs4-pedido-doc-table thead th {
    background: #123a63;
    color: #fff;
    font-size: 0.78rem;
    border: 0;
    white-space: nowrap;
}
.cs4-pedido-doc-table td {
    font-size: 0.88rem;
    vertical-align: middle;
}
.cs4-pedido-doc-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-top: 1.15rem;
}
.cs4-pedido-doc-totales {
    min-width: 14rem;
    border-collapse: collapse;
}
.cs4-pedido-doc-totales th {
    font-weight: 500;
    color: #5b6b7c;
    text-align: left;
    padding: 0.2rem 1.5rem 0.2rem 0;
    font-size: 0.85rem;
}
.cs4-pedido-doc-totales td {
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding: 0.2rem 0;
}
.cs4-pedido-doc-totales tr.is-total th,
.cs4-pedido-doc-totales tr.is-total td {
    font-weight: 800;
    color: #123a63;
    font-size: 1.15rem;
    padding-top: 0.45rem;
}
.cs4-pedido-doc.is-of {
    width: 100%;
    max-width: none;
    margin: 0 0 1.5rem;
    background: #fff;
    border: 1px solid #c5ddd4;
    border-radius: 10px;
    padding: 1.35rem 1.5rem 1.6rem;
    box-shadow: 0 8px 28px rgba(26, 95, 74, 0.06);
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-top {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 2px solid #1a5f4a;
    padding-bottom: 0.9rem;
    margin-bottom: 1rem;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-emp,
.cs4-pedido-doc.is-of .cs4-pedido-doc-num,
.cs4-pedido-doc.is-of .cs4-pedido-doc-party-name {
    color: #1a5f4a;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-num {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.15rem 0 0.45rem;
}
.cs4-of-meta {
    width: auto;
    margin-left: auto;
    font-size: 0.85rem;
}
.cs4-of-meta th,
.cs4-of-meta td {
    border: 0;
    padding: 0.12rem 0 0.12rem 1rem;
    font-weight: 500;
}
.cs4-of-meta th {
    color: #5b6b7c;
    font-weight: 500;
    text-align: left;
    padding-left: 0;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-party {
    border: 1px solid #c5ddd4;
    background: #f3f8f6;
    border-radius: 0;
    padding: 0.85rem 1rem;
    margin: 0 0 0.75rem;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-table {
    width: 100%;
    border-collapse: collapse;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-table thead th {
    background: #1a5f4a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.5rem 0.55rem;
    border: 0;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-table tbody td {
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid #d9e4ef;
    font-size: 0.88rem;
}
.cs4-pedido-doc.is-of .cs4-pedido-doc-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}
.cs4-of-sec {
    margin: 1.15rem 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a5f4a;
}
.cs4-of-check {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border: 1.5px solid #1e293b;
    border-radius: 2px;
    vertical-align: middle;
    background: #fff;
}
.cs4-of-check.is-on {
    background: #1a5f4a;
    border-color: #1a5f4a;
}
.cs4-of-sign {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 1.5rem;
}
.cs4-of-sign > div {
    border: 1px solid #d9e4ef;
    border-radius: 0;
    padding: 0.85rem 1rem 1.35rem;
}
.cs4-of-sign-line {
    margin: 1.15rem 0 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #94a3b8;
    font-size: 0.75rem;
    color: #5b6b7c;
}
.cs4-of-coste {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #c5ddd4;
    background: #f3f8f6;
}
.cs4-of-coste strong {
    color: #1a5f4a;
}
.cs4-of-actions {
    width: 100%;
    max-width: none;
    margin: 0 0 1rem;
}
.cs4-of-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1.25rem 2rem;
    margin: 0 0 1.15rem;
    padding: 1.25rem 1.4rem 1.35rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #123c32 0%, #1a5f4a 55%, #247a60 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(18, 60, 50, 0.22);
}
.cs4-of-hero.is-done {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}
.cs4-of-hero-copy {
    flex: 1 1 16rem;
    min-width: 0;
}
.cs4-of-hero-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.78;
}
.cs4-of-hero-plan {
    margin: 0 0 0.7rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}
.cs4-of-hero-bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    margin: 0 0 0.7rem;
}
.cs4-of-hero-bar span {
    display: block;
    height: 100%;
    background: #bbf7d0;
}
.cs4-of-hero-meta {
    margin: 0 0 0.25rem;
    font-size: 0.86rem;
    opacity: 0.88;
}
.cs4-of-hero-meta strong {
    color: #fff;
}
.cs4-of-hero-action {
    flex: 0 1 22rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cs4-of-hero-action .form-label {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}
.cs4-of-hero-qty {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
    margin-bottom: 0.45rem;
}
.cs4-of-hero .cs4-of-qty {
    max-width: none;
    flex: 1 1 7rem;
    font-size: 1.35rem;
    font-weight: 700;
    height: auto;
    padding: 0.55rem 0.75rem;
}
.cs4-of-hero-action .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}
.cs4-of-work .cs4-tabs {
    border-radius: 16px 16px 0 0;
}
.cs4-of-work .cs4-tab-panels {
    padding: 1.15rem 1.25rem 1.35rem;
}
.cs4-of-cierre-hint {
    margin: 0.85rem 0 0;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 0.9rem;
}
.cs4-of-mat-stock {
    margin: 0;
}
.cs4-of-mat-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}
.cs4-of-mat-adjust {
    margin-top: 1rem;
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    background: #f8fafc;
    max-height: 42vh;
    overflow: auto;
}
.cs4-of-mat-adjust[hidden] {
    display: none !important;
}
.cs4-of-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.05rem 0.4rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
}
.cs4-tab.is-active .cs4-of-tab-count {
    background: #dbeafe;
    color: #1d4ed8;
}
.cs4-of-mat-off td {
    color: #94a3b8;
}
.cs4-of-ops {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.cs4-of-op {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.cs4-of-op.is-on {
    border-color: #86efac;
    background: #f0fdf4;
}
.cs4-of-op.is-locked {
    cursor: default;
}
.cs4-of-op .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}
.cs4-of-op-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}
.cs4-of-op-code {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs4-muted);
}
.cs4-of-op-name {
    font-weight: 600;
}
.cs4-of-op-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}
.cs4-of-tiempo {
    max-width: 7rem;
    margin-left: auto;
}
.cs4-of-tiempo-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}
.cs4-of-qty {
    max-width: 8rem;
}
@media (max-width: 700px) {
    .cs4-of-hero-qty {
        flex-direction: column;
    }
    .cs4-of-op {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .cs4-of-op-time {
        grid-column: 2;
        align-items: flex-start;
    }
}
@media print {
    .cs4-of-actions,
    .cs4-of-work,
    .cs4-of-hero-action {
        display: none !important;
    }
}
.cs4-cell-stack-code { display: flex; align-items: center; gap: 0.25rem; }
.cs4-cell-stack-sub { font-size: 0.78rem; color: #64748b; line-height: 1.25; margin-top: 0.1rem; }
.cs4-stock-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.cs4-stock-widget {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
a.cs4-stock-widget:hover {
    border-color: #94a3b8;
    color: inherit;
}
.cs4-stock-widget-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.cs4-stock-widget-value { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cs4-content:has(.cs4-chat) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cs4-content:has(.cs4-chat) .cs4-page-head {
    flex-shrink: 0;
}
.cs4-chat-todos {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--cs4-muted);
    margin: 0;
}
.cs4-chat {
    flex: 1;
    min-height: 28rem;
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    border: 1px solid var(--cs4-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.cs4-chat-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--cs4-line);
    background: #f7fbff;
}
.cs4-chat-search {
    padding: 0.7rem 0.75rem 0.45rem;
}
.cs4-chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.25rem 0.45rem 0.6rem;
}
.cs4-chat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    color: var(--cs4-text);
}
.cs4-chat-item:hover,
.cs4-chat-item.is-active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 47, 86, 0.06);
}
.cs4-chat-item-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 0.1rem;
}
.cs4-chat-item-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs4-chat-item-sub {
    font-size: 0.75rem;
    color: var(--cs4-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs4-chat-item .cs4-nav-count {
    background: var(--cs4-blue);
    color: #fff;
}
.cs4-chat-empty,
.cs4-chat-peer-empty {
    color: var(--cs4-muted);
    font-size: 0.88rem;
    padding: 1rem 0.75rem;
}
.cs4-chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #eef3f8;
}
.cs4-chat-peer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--cs4-line);
    min-height: 3.4rem;
}
.cs4-chat-peer-name {
    font-weight: 700;
    font-size: 0.95rem;
}
.cs4-chat-peer-mail {
    font-size: 0.75rem;
    color: var(--cs4-muted);
}
.cs4-chat-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.cs4-chat-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: min(78%, 36rem);
}
.cs4-chat-msg.is-mine {
    align-self: flex-end;
    align-items: flex-end;
}
.cs4-chat-bubble {
    background: #fff;
    border-radius: 14px 14px 14px 4px;
    padding: 0.55rem 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 47, 86, 0.06);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}
.cs4-chat-msg.is-mine .cs4-chat-bubble {
    background: #d7ebff;
    border-radius: 14px 14px 4px 14px;
}
.cs4-chat-msg time {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.68rem;
    color: var(--cs4-muted);
    margin-top: 0.15rem;
    padding: 0 0.2rem;
}
.cs4-chat-ticks {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1;
}
.cs4-chat-ticks.is-read {
    color: #53bdeb;
}
.cs4-chat-form {
    display: flex;
    gap: 0.55rem;
    align-items: flex-end;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border-top: 1px solid var(--cs4-line);
}
.cs4-chat-form textarea {
    resize: none;
}
.cs4-chat-form .btn {
    flex-shrink: 0;
}
.cs4-chat-readonly {
    margin: 0;
    padding: 0.7rem 1rem;
    background: #fffbeb;
    border-top: 1px solid #f3d19c;
    color: #92400e;
    font-size: 0.85rem;
}
@media (max-width: 800px) {
    .cs4-chat {
        grid-template-columns: 1fr;
        min-height: 70vh;
    }
    .cs4-chat-side {
        max-height: 38vh;
        border-right: 0;
        border-bottom: 1px solid var(--cs4-line);
    }
}
.cs4-import-empresa {
    margin: 0 0 1rem;
}
.cs4-import-preview {
    margin-top: 0.5rem;
}
.cs4-import-errores {
    margin: 0.85rem 0 0;
    padding-left: 1.2rem;
    color: #9b2c2c;
    font-size: 0.88rem;
}
.cs4-import-orden {
    columns: 2;
    margin: 0 0 1rem;
    padding-left: 1.2rem;
}
.cs4-import-danger {
    border: 1px solid #f1c0c0;
}
.cs4-plan-dialog[hidden] {
    display: none;
}
.cs4-plan-dialog:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.cs4-plan-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.cs4-plan-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(22rem, 100%);
    padding: 2rem 1.75rem 1.5rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    text-align: center;
    outline: none;
}
.cs4-plan-dialog-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.cs4-plan-dialog-text {
    margin: 0 0 1.35rem;
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.45;
}
.cs4-plan-dialog-panel .btn {
    min-width: 8rem;
}
@media print {
    .cs4-pedido-doc {
        border: 0;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }
    .cs4-pedido-doc-table thead th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cs4-sidebar,
    .cs4-topbar,
    .cs4-sidebar-backdrop,
    .cs4-manual-nav,
    .cs4-manual-print,
    .cs4-plan-dialog {
        display: none !important;
    }
    .cs4-app,
    .cs4-main,
    .cs4-manual {
        display: block;
        width: 100%;
    }
    .cs4-manual-body {
        border: 0;
        padding: 0;
    }
}

.cs4-infografia {
    background: #fff;
    border: 1px solid var(--cs4-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 47, 86, 0.04);
    margin-bottom: 1.25rem;
}
.cs4-infografia-hero {
    background: linear-gradient(120deg, #123a63 0%, #1557ad 55%, #1d6fd8 100%);
    color: #fff;
    padding: 1.2rem 1.35rem 1.3rem;
}
.cs4-infografia-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.85;
}
.cs4-infografia-hero h3 {
    margin: 0 0 0.4rem;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}
.cs4-infografia-hero p {
    margin: 0;
    max-width: 58rem;
    font-size: 0.95rem;
    line-height: 1.45;
    opacity: 0.95;
}
.cs4-infografia-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.25rem;
    padding: 0.7rem 1.25rem;
    background: #f4f8fc;
    border-bottom: 1px solid var(--cs4-line);
    font-size: 0.84rem;
    color: var(--cs4-text);
}
.cs4-infografia-leyenda i {
    color: var(--cs4-blue);
    margin-right: 0.2rem;
}
.cs4-infografia-spine {
    display: grid;
    grid-template-columns: repeat(7, minmax(10.2rem, 1fr));
    gap: 0.55rem;
    padding: 1rem 1.1rem 0.35rem;
    overflow-x: auto;
}
.cs4-infografia-step {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 16.5rem;
    padding: 0.85rem 0.8rem 0.9rem;
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    background: #f8fbfe;
    color: var(--cs4-text);
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(15, 47, 86, 0.03);
}
.cs4-infografia-step:hover {
    border-color: #9ec0e6;
    background: #fff;
    color: var(--cs4-text);
}
.cs4-infografia-step:not(:last-child)::after {
    content: "›";
    position: absolute;
    top: 2.15rem;
    right: -0.48rem;
    z-index: 1;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #123a63;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    display: grid;
    place-items: center;
    pointer-events: none;
}
.cs4-infografia-num {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: var(--cs4-blue);
}
.cs4-infografia-step.is-decision .cs4-infografia-num,
.cs4-infografia-step.is-decision:not(:last-child)::after {
    background: #c2410c;
}
.cs4-infografia-step.is-stock .cs4-infografia-num {
    background: #0f766e;
}
.cs4-infografia-step.is-cobro .cs4-infografia-num,
.cs4-infografia-step.is-cobro:not(:last-child)::after {
    background: #15803d;
}
.cs4-infografia-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e7f1fb;
    color: var(--cs4-blue);
    margin-bottom: 0.45rem;
}
.cs4-infografia-step.is-decision .cs4-infografia-icon {
    background: #ffedd5;
    color: #c2410c;
}
.cs4-infografia-step.is-stock .cs4-infografia-icon {
    background: #ccfbf1;
    color: #0f766e;
}
.cs4-infografia-step.is-cobro .cs4-infografia-icon {
    background: #dcfce7;
    color: #15803d;
}
.cs4-infografia-step h4 {
    margin: 0 0 0.2rem;
    font-size: 0.98rem;
    font-weight: 750;
    padding-right: 1.6rem;
}
.cs4-infografia-menu {
    margin: 0 0 0.45rem;
    color: var(--cs4-blue);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}
.cs4-infografia-step p {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--cs4-text);
}
.cs4-infografia-step ul {
    margin: auto 0 0;
    padding-left: 1rem;
    font-size: 0.76rem;
    color: var(--cs4-muted);
}
.cs4-infografia-step li + li {
    margin-top: 0.2rem;
}
.cs4-infografia-fork-label {
    margin: 0.65rem 1.1rem 0.55rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
}
.cs4-infografia-fork-badge {
    display: inline-block;
    margin-bottom: 0.25rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: #c2410c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cs4-infografia-fork-label p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}
.cs4-infografia-fork {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0 1.1rem;
}
.cs4-infografia-lane {
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    padding: 0.85rem 0.95rem 0.95rem;
    background: #fff;
}
.cs4-infografia-lane.is-compra {
    border-top: 4px solid #0f766e;
}
.cs4-infografia-lane.is-fab {
    border-top: 4px solid #6d28d9;
}
.cs4-infografia-lane-kicker {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cs4-muted);
    margin-bottom: 0.15rem;
}
.cs4-infografia-lane h4 {
    margin: 0 0 0.65rem;
    font-size: 1.02rem;
    font-weight: 750;
}
.cs4-infografia-lane.is-compra h4 {
    color: #0f766e;
}
.cs4-infografia-lane.is-fab h4 {
    color: #6d28d9;
}
.cs4-infografia-lane ol {
    margin: 0;
    padding-left: 1.2rem;
}
.cs4-infografia-lane li + li {
    margin-top: 0.55rem;
}
.cs4-infografia-lane a {
    display: block;
    font-weight: 700;
    color: var(--cs4-blue);
    text-decoration: none;
    font-size: 0.9rem;
}
.cs4-infografia-lane a:hover {
    text-decoration: underline;
}
.cs4-infografia-lane li span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--cs4-text);
}
.cs4-infografia-return {
    margin: 0.75rem 1.1rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #14532d;
    font-size: 0.92rem;
    font-weight: 650;
    text-align: center;
}
.cs4-infografia-estados {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 1.1rem 0.35rem;
}
.cs4-infografia-estados > div {
    border: 1px solid var(--cs4-line);
    border-radius: 12px;
    padding: 0.75rem 0.85rem 0.85rem;
    background: #f8fbfe;
}
.cs4-infografia-estados h4 {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    font-weight: 750;
}
.cs4-infografia-estados table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}
.cs4-infografia-estados th,
.cs4-infografia-estados td {
    text-align: left;
    vertical-align: top;
    padding: 0.28rem 0.35rem 0.28rem 0;
    border-bottom: 1px solid #e4edf6;
}
.cs4-infografia-estados th {
    color: var(--cs4-muted);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cs4-infografia-estados p {
    margin: 0.5rem 0 0;
    font-size: 0.76rem;
    color: var(--cs4-muted);
    line-height: 1.35;
}
.cs4-infografia-notas {
    margin: 0.7rem 1.1rem 1.1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--cs4-line);
}
.cs4-infografia-notas p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--cs4-text);
}
@media (max-width: 1200px) {
    .cs4-infografia-spine {
        grid-template-columns: repeat(4, minmax(11rem, 1fr));
    }
    .cs4-infografia-step:nth-child(4)::after {
        display: none;
    }
    .cs4-infografia-estados {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .cs4-infografia-spine,
    .cs4-infografia-fork {
        grid-template-columns: 1fr;
    }
    .cs4-infografia-step:not(:last-child)::after {
        display: none;
    }
    .cs4-infografia-step {
        min-height: 0;
    }
}
@media print {
    @page {
        size: A3 landscape;
        margin: 7mm;
    }
    .cs4-content:has(.cs4-infografia) {
        overflow: visible;
        padding: 0;
    }
    .cs4-infografia {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cs4-infografia-hero,
    .cs4-infografia-num,
    .cs4-infografia-step:not(:last-child)::after,
    .cs4-infografia-fork-badge,
    .cs4-infografia-icon,
    .cs4-infografia-lane.is-compra,
    .cs4-infografia-lane.is-fab,
    .cs4-infografia-return {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cs4-infografia-spine {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        overflow: visible;
        padding: 0.55rem 0.7rem 0.2rem;
        gap: 0.4rem;
    }
    .cs4-infografia-step {
        min-height: 0;
        break-inside: avoid;
    }
    .cs4-infografia-fork,
    .cs4-infografia-estados {
        grid-template-columns: 1fr 1fr;
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
    .cs4-infografia-estados {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .cs4-infografia-hero h3 {
        font-size: 16pt;
    }
    .cs4-infografia a[href]::after {
        content: none;
    }
}

.cs4-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.cs4-pin-key {
    min-height: 3.2rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.cs4-planta-login {
    max-width: 26rem;
}
.cs4-planta-op {
    min-height: 3rem;
}
.cs4-planta-op-mia:not(.btn-success) {
    font-weight: 600;
}
.cs4-planta-op-otra:not(.btn-success) {
    opacity: 0.72;
}
.cs4-planta-who {
    font-size: 1.05rem;
}
.cs4-horario-dias th {
    font-size: 0.8rem;
    color: var(--cs4-muted);
    font-weight: 600;
}
.cs4-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.4rem;
}
.cs4-cal-head {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cs4-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0;
}
.cs4-cal-day {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-height: 5.6rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--cs4-line);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    color: inherit;
}
.cs4-cal-day:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}
.cs4-cal-day.is-out {
    opacity: 0.45;
}
.cs4-cal-day.is-today {
    box-shadow: inset 0 0 0 2px #2563eb;
}
.cs4-cal-day.is-ex {
    box-shadow: inset 0 0 0 2px #0f766e;
}
.cs4-cal-day.is-today.is-ex {
    box-shadow: inset 0 0 0 2px #2563eb, 0 0 0 2px #0f766e;
}
.cs4-cal-day.tipo-descanso,
.cs4-cal-day.tipo-sin_horario {
    background: #f8fafc;
}
.cs4-cal-day.tipo-festivo,
.cs4-cal-day.tipo-cierre {
    background: #fff7ed;
    border-color: #fdba74;
}
.cs4-cal-day.tipo-vacaciones {
    background: #eff6ff;
    border-color: #93c5fd;
}
.cs4-cal-day.tipo-baja {
    background: #fff1f2;
    border-color: #fda4af;
}
.cs4-cal-num {
    font-weight: 700;
    font-size: 0.95rem;
}
.cs4-cal-tipo,
.cs4-cal-horas,
.cs4-cal-fich {
    font-size: 0.7rem;
    color: var(--cs4-muted);
    line-height: 1.2;
}
.cs4-cal-fich {
    margin-top: auto;
}
.cs4-cal-dot {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 4px;
    margin-right: 0.25rem;
    vertical-align: -0.1rem;
    border: 1px solid var(--cs4-line);
    background: #fff;
}
.cs4-cal-dot.tipo-trabaja { background: #fff; }
.cs4-cal-dot.tipo-descanso { background: #f1f5f9; }
.cs4-cal-dot.tipo-festivo { background: #ffedd5; }
.cs4-cal-dot.tipo-vacaciones { background: #dbeafe; }
.cs4-cal-dot.tipo-baja { background: #ffe4e6; }
.cs4-cal-dot.is-ex { box-shadow: inset 0 0 0 2px #0f766e; }
@media (max-width: 768px) {
    .cs4-cal-day {
        min-height: 4.2rem;
        padding: 0.3rem;
    }
    .cs4-cal-horas,
    .cs4-cal-fich {
        display: none;
    }
}
