body {
    background-color: #f4f6f8;
    color: #172033;
}

.auth-page {
    align-items: center;
    background: #eef2f7;
    display: flex;
    min-height: 100vh;
}

.auth-shell {
    margin: 0 auto;
    max-width: 440px;
    padding: 24px;
    width: 100%;
}

.auth-card {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    padding: 28px;
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-kicker {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.guide-page {
    background: #f5f7fb;
    color: #172033;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.guide-toc {
    background: #102033;
    color: #fff;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 18px;
    position: sticky;
    top: 0;
}

.guide-toc-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.guide-toc-subtitle {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.guide-toc-link {
    border-left: 2px solid transparent;
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 0.88rem;
    line-height: 1.25;
    padding: 7px 8px;
    text-decoration: none;
}

.guide-toc-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #70d6ff;
    color: #fff;
}

.guide-toc-level-1 {
    color: #fff;
    font-weight: 800;
}

.guide-toc-level-2 {
    font-weight: 700;
}

.guide-toc-level-3 {
    font-size: 0.82rem;
    padding-left: 22px;
}

.guide-content {
    background: #fff;
    border-left: 1px solid #dbe4ef;
    line-height: 1.65;
    margin: 0 auto;
    min-height: 100vh;
    padding: 42px 54px 80px;
    width: min(100%, 1120px);
}

.guide-content h1,
.guide-content h2,
.guide-content h3 {
    color: #102033;
    letter-spacing: 0;
    scroll-margin-top: 24px;
}

.guide-content h1 {
    border-bottom: 1px solid #dbe4ef;
    font-size: 2rem;
    margin-bottom: 24px;
    padding-bottom: 14px;
}

.guide-content h2 {
    border-top: 1px solid #e5eaf1;
    font-size: 1.45rem;
    margin-top: 36px;
    padding-top: 24px;
}

.guide-content h3 {
    font-size: 1.12rem;
    margin-top: 28px;
}

.guide-content code {
    background: #eef2f7;
    border-radius: 4px;
    color: #0f172a;
    padding: 2px 5px;
}

.guide-content pre {
    background: #0f172a;
    border-radius: 8px;
    color: #e5e7eb;
    overflow-x: auto;
    padding: 14px 16px;
}

.guide-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

@media (max-width: 900px) {
    .guide-page {
        display: block;
    }

    .guide-toc {
        height: auto;
        max-height: 45vh;
        position: relative;
    }

    .guide-content {
        padding: 28px 20px 56px;
    }
}

table {
    width: 100%;
    table-layout: fixed;
}

table td, 
table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
/*
.sidebar {
    background: #1f2937;
    color: white;
    padding: 20px;

    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 10px;

    transition: all 0.3s ease;

    flex: 0 0 250px;
}
.sidebar.collapsed {
    flex: 0 0 60px;
}

.sidebar a {
    color: white;
    text-decoration: none;
}

.sidebar a:hover{
    color: #9ca3af;
}

.sidebar.collapsed a {
    display: none;
}

.sidebar.collapsed h4 {
    display: none;
}

#toggleSidebar{
    font-size: 1rem;
}*/

.sidebar {
    background: #1f2937;
    color: white;
    padding: 20px;

    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 10px;

    transition: all 0.3s ease;

    /* larghezza aperta */
    flex: 0 0 250px;
}

/* =========================
LINKS
========================= */

.sidebar a {
    color: white;
    text-decoration: none;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 12px;
    border-radius: 10px;

    transition: all 0.2s ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.sidebar-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
}

.sidebar-section-main {
    padding-bottom: 4px;
}

.sidebar-section-title {
    align-items: center;
    color: rgba(255, 255, 255, 0.58);
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 12px;
    letter-spacing: 0;
    padding: 4px 12px 2px;
    text-transform: uppercase;
}

.sidebar-section-title i {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

.sidebar .sidebar-sub-link {
    font-size: 0.92rem;
    padding-left: 24px;
}

.sidebar-footer {
    display: grid;
    gap: 12px;
    padding-top: 10px;
}

.sidebar-topbar {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
    min-width: 0;
}

.sidebar-topbar-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    margin-bottom: 12px;
    min-width: 0;
}

.sidebar-language-segment {
    align-items: stretch;
    display: inline-flex;
}

.sidebar-user {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 6px;
    padding-top: 12px;
}

.sidebar-user-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 0;
    margin-bottom: 4px;
    padding-bottom: 12px;
    padding-top: 0;
}

.notification-unread {
    background: #eff6ff;
}

.notification-list-row {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.notification-list-content {
    min-width: 0;
}

.notification-list-actions {
    align-items: center;
    flex: 0 0 auto;
}

.notification-list-actions form {
    margin: 0;
}

.notification-action-btn {
    align-items: center;
    display: inline-flex;
    min-height: 31px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .notification-list-row {
        display: grid;
    }

    .notification-list-actions {
        justify-content: flex-start !important;
    }
}

.sidebar-user-header {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.sidebar-user-name {
    align-items: center;
    color: #fff;
    display: flex;
    flex: 1 1 auto;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-profile-link {
    text-decoration: none;
}

.sidebar-user-profile-link:hover,
.sidebar-user-profile-link:focus {
    color: #fff;
    text-decoration: underline;
}

.user-avatar {
    align-items: center;
    background: var(--user-avatar-bg, linear-gradient(135deg, #2563eb, #0f766e));
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    color: var(--user-avatar-fg, #fff);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    overflow: hidden;
    text-transform: uppercase;
}

.user-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.user-avatar > span[style*="--user-avatar-bg"] {
    align-items: center;
    background: var(--user-avatar-bg);
    color: var(--user-avatar-fg, #fff);
    display: inline-flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.user-avatar-sm {
    font-size: 0.76rem;
    height: 34px;
    width: 34px;
}

.user-avatar-xs {
    border-width: 1px;
    font-size: 0.58rem;
    height: 22px;
    width: 22px;
}

.user-avatar-md {
    font-size: 0.9rem;
    height: 42px;
    width: 42px;
}

.user-avatar-lg {
    font-size: 1.15rem;
    height: 54px;
    width: 54px;
}

.sidebar-user-avatar {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.page-presence-bar {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    margin-right: 4px;
}

.page-presence-avatar {
    box-shadow: 0 0 0 2px #fff;
    margin-left: -6px;
    text-decoration: none;
}

.page-presence-avatar:first-child {
    margin-left: 0;
}

.page-presence-avatar:hover,
.page-presence-avatar:focus {
    text-decoration: none;
}

.page-presence-item {
    display: inline-flex;
    margin-bottom: -10px;
    padding-bottom: 10px;
    position: relative;
}

.page-presence-card {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    color: #0f172a;
    display: none;
    flex-direction: column;
    font-size: 0.78rem;
    gap: 3px;
    min-width: 210px;
    padding: 10px 12px;
    pointer-events: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 1200;
}

.page-presence-card::before {
    content: "";
    height: 14px;
    left: 0;
    position: absolute;
    right: 0;
    top: -14px;
}

.page-presence-card span {
    color: #475569;
    line-height: 1.25;
}

.page-presence-card a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.page-presence-card a:hover {
    text-decoration: underline;
}

.page-presence-item:hover .page-presence-card,
.page-presence-item:focus-within .page-presence-card {
    display: flex;
}

.editing-indicator {
    align-items: center;
    background: rgba(219, 234, 254, 0.9);
    border: 0;
    border-radius: 6px;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 700;
    gap: 6px;
    margin-top: 6px;
    padding: 5px 9px;
    white-space: nowrap;
}

.editing-indicator-inline {
    margin: 0 0 6px 0;
}

.order-product-panel-header .editing-indicator-inline {
    margin-left: auto;
    margin-right: 8px;
}

tr .editing-indicator-inline {
    display: flex;
    width: max-content;
}

tr.editing-locked {
    position: relative;
}

tr.editing-locked > td {
    background: rgba(219, 234, 254, 0.72) !important;
    pointer-events: none;
}

.app-grid-row.editing-locked {
    position: relative;
}

.app-grid-row.editing-locked .app-grid-cell {
    background: rgba(219, 234, 254, 0.26) !important;
    pointer-events: none;
}

[data-component-row].editing-locked .product-components-grid-cell {
    background: rgba(219, 234, 254, 0.72) !important;
    pointer-events: none;
}

.production-task-card.editing-locked {
    box-shadow: inset 3px 0 0 #2563eb, 0 10px 24px rgba(15, 23, 42, 0.08);
}

.production-task-card.editing-locked .production-task-card-header {
    background: rgba(219, 234, 254, 0.72);
    border-radius: 6px;
    padding: 8px;
}

.editing-row-overlay {
    align-items: center;
    background: linear-gradient(
        90deg,
        rgba(219, 234, 254, 0.98) 0%,
        rgba(219, 234, 254, 0.92) 42%,
        rgba(219, 234, 254, 0.36) 78%,
        rgba(219, 234, 254, 0) 100%
    );
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #1d4ed8;
    display: flex;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 7px;
    margin: 0;
    overflow: hidden;
    pointer-events: auto;
    position: fixed;
    padding-left: 8px;
    text-overflow: ellipsis;
    transform: none;
    white-space: nowrap;
    z-index: 1040;
}

.editing-row-overlay-muted {
    background: rgba(226, 232, 240, 0.58);
    color: transparent;
    justify-content: flex-start;
}

.editing-row-overlay-muted > * {
    display: none;
}

.editing-row-overlay-modal {
    z-index: 1075;
}

.editing-proxy-indicator {
    align-items: center;
    background: linear-gradient(
        90deg,
        rgba(219, 234, 254, 0.98) 0%,
        rgba(219, 234, 254, 0.9) 44%,
        rgba(219, 234, 254, 0.34) 78%,
        rgba(219, 234, 254, 0) 100%
    );
    border-radius: 0;
    bottom: 0;
    box-shadow: none;
    display: flex;
    left: 0;
    margin: 0;
    overflow: hidden;
    padding-left: 12px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 20;
}

.purchase-card-header .editing-proxy-indicator,
.purchase-supplier-header .editing-proxy-indicator {
    background: linear-gradient(
        90deg,
        rgba(219, 234, 254, 0.95) 0%,
        rgba(219, 234, 254, 0.88) 56%,
        rgba(219, 234, 254, 0.72) 100%
    );
    border-left: 3px solid #2563eb;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 8px;
    justify-content: flex-start;
    padding: 0 12px;
    pointer-events: none;
    z-index: 20;
}

.purchase-card-header .editing-proxy-indicator > span:not(.user-avatar),
.purchase-supplier-header .editing-proxy-indicator > span:not(.user-avatar) {
    color: #1d4ed8;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-card-header.editing-proxy-target-locked,
.purchase-supplier-header.editing-proxy-target-locked {
    box-shadow: inset 3px 0 0 #2563eb;
    position: relative;
}

.editing-proxy-target-locked {
    position: relative;
}

.editing-proxy-locked {
    box-shadow: inset 3px 0 0 #2563eb;
}

.editing-user-avatar {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
    border-width: 1px;
    font-size: 0.82rem;
    height: 32px;
    min-width: 32px;
    width: 32px;
}

.editing-user-avatar > span {
    align-items: center;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.order-row-presence-overlay {
    align-items: center;
    background: linear-gradient(
        90deg,
        rgba(219, 234, 254, 0.95) 0%,
        rgba(219, 234, 254, 0.88) 56%,
        rgba(219, 234, 254, 0.72) 100%
    );
    border-left: 3px solid #2563eb;
    color: #1d4ed8;
    display: flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 12px;
    justify-content: space-between;
    overflow: hidden;
    padding: 0 12px;
    pointer-events: none;
    position: fixed;
    z-index: 1035;
}

.order-row-presence-message {
    align-items: center;
    display: inline-flex;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
}

.order-row-presence-avatars {
    align-items: center;
    display: inline-flex;
    gap: 4px;
}

.order-row-presence-overlay .user-avatar {
    box-shadow: 0 0 0 1px #fff;
}

.order-row-presence-name {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-row-presence-extra {
    align-items: center;
    background: #dbeafe;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.68rem;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
}

.order-row-presence-open {
    flex: 0 0 86px;
    min-width: 76px;
    padding-left: 14px;
    padding-right: 14px;
    pointer-events: auto;
    text-align: center;
}

.contextual-help-root {
    inset: 0;
    position: fixed;
    z-index: 2050;
}

.contextual-help-root[hidden],
.contextual-help-launcher[hidden],
.contextual-help-focus[hidden] {
    display: none !important;
}

.contextual-help-launcher:not(.contextual-help-launcher-ready) {
    visibility: hidden;
}

.contextual-help-backdrop {
    background: rgba(15, 23, 42, 0.36);
    inset: 0;
    position: absolute;
}

.contextual-help-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
    color: #111827;
    max-width: 390px;
    padding: 18px;
    position: absolute;
    right: 28px;
    top: 72px;
    width: min(390px, calc(100vw - 36px));
}

.contextual-help-header,
.contextual-help-secondary-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.contextual-help-kicker {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.contextual-help-header h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 2px 0 0;
}

.contextual-help-body {
    margin: 14px 0 16px;
}

.contextual-help-body p {
    color: #475569;
    margin-bottom: 12px;
}

.contextual-help-points {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.contextual-help-points li {
    align-items: flex-start;
    display: flex;
    gap: 9px;
    list-style: none;
}

.contextual-help-points li > span {
    background: #2563eb;
    border-radius: 999px;
    flex: 0 0 auto;
    height: 7px;
    margin-top: 7px;
    width: 7px;
}

.contextual-help-points li p {
    margin: 0;
}

.contextual-help-command {
    color: #1d4ed8;
    font-weight: 700;
    white-space: nowrap;
}

.contextual-help-footer {
    display: grid;
    gap: 12px;
}

.contextual-help-progress-wrap {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.contextual-help-progress-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 38px;
    white-space: nowrap;
}

.contextual-help-progress {
    --contextual-help-progress: 0%;
    background: #dbe3ef;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.contextual-help-progress::before {
    background: #2563eb;
    border-radius: inherit;
    content: "";
    display: block;
    height: 100%;
    transition: width 160ms ease;
    width: var(--contextual-help-progress);
}

.contextual-help-actions {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}

.contextual-help-actions .btn {
    min-width: 72px;
    white-space: nowrap;
}

.contextual-help-secondary-actions {
    border-top: 1px solid #e2e8f0;
    margin-top: 14px;
    padding-top: 10px;
}

.contextual-help-secondary-actions .btn-link {
    padding-left: 0;
    padding-right: 0;
    text-decoration: none;
}

.contextual-help-focus {
    border: 2px solid #2563eb;
    border-radius: 14px;
    box-shadow: none;
    pointer-events: none;
    position: fixed;
    z-index: 2049;
}

.contextual-help-launcher {
    align-items: center;
    background: #2563eb;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
    color: #fff;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    position: fixed;
    right: 24px;
    top: 18px;
    width: 46px;
    z-index: 1040;
}

.contextual-help-launcher:hover,
.contextual-help-launcher:focus {
    background: #1d4ed8;
}

.contextual-help-launcher-inline {
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    flex: 0 0 auto;
    height: 38px;
    position: static;
    width: 38px;
}

@media (max-width: 768px) {
    .contextual-help-panel {
        bottom: 16px;
        left: 16px;
        max-width: none;
        right: 16px;
        top: auto;
        width: auto;
    }
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.sidebar-icon-link,
.sidebar-notification-link {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    background: transparent;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: relative;
    text-decoration: none;
    width: 32px;
}

.sidebar-icon-button {
    appearance: none;
}

.sidebar-language-link.active {
    background: #fff;
    color: #1f2937;
}

.sidebar-language-segment .sidebar-language-link {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    min-width: 34px;
    text-decoration: none;
}

.sidebar-language-segment .sidebar-language-link:first-child {
    border-radius: 7px 0 0 7px;
}

.sidebar-language-segment .sidebar-language-link + .sidebar-language-link {
    border-left: 0;
}

.sidebar-language-segment .sidebar-language-link:last-child {
    border-radius: 0 7px 7px 0;
}

.sidebar-language-segment .sidebar-language-link.active {
    background: #fff;
    color: #1f2937;
}

.sidebar-icon-link:hover,
.sidebar-icon-link:focus,
.sidebar-notification-link:hover,
.sidebar-notification-link:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-language-link.active:hover,
.sidebar-language-link.active:focus {
    background: #fff;
    color: #1f2937;
}

.sidebar-icon-link .badge,
.sidebar-notification-link .badge {
    font-size: 0.62rem;
    line-height: 1;
    min-width: 16px;
    padding: 0.18rem 0.28rem;
    position: absolute;
    right: -6px;
    top: -6px;
}

/* icone */
.sidebar a i,
.sidebar button i {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.sidebar-icon-link i {
    font-size: 1.1rem;
    line-height: 1;
}

/* =========================
COLLAPSED
========================= */

.sidebar.collapsed {
    flex: 0 0 87px;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
}

/* nasconde SOLO testo */
.sidebar.collapsed .sidebar-label {
    display: none;
}

.sidebar.collapsed .sidebar-section {
    align-items: center;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.sidebar.collapsed .sidebar-section-title {
    justify-content: center;
    padding: 6px 0 0;
}

.sidebar.collapsed .sidebar-user {
    justify-items: center;
}

.sidebar.collapsed .sidebar-user-header {
    justify-content: center;
}

.sidebar.collapsed .sidebar-user-name {
    justify-content: center;
}

.sidebar.collapsed .sidebar-topbar {
    display: grid;
    gap: 6px;
    justify-items: center;
    width: 36px;
}

.sidebar.collapsed .sidebar-topbar-actions {
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 36px;
}

.sidebar.collapsed .sidebar-language-segment {
    justify-content: center;
    width: 36px;
}

.sidebar.collapsed #toggleSidebar,
.sidebar.collapsed .sidebar-language-segment .sidebar-language-link.active {
    height: 36px;
    width: 36px;
}

.sidebar.collapsed .sidebar-language-segment .sidebar-language-link.active {
    align-items: center;
    display: inline-flex;
    font-size: 0.64rem;
    font-weight: 700;
    justify-content: center;
    min-width: 36px;
    padding: 0;
}

.sidebar.collapsed #toggleSidebar {
    order: -1;
    margin: 0;
}

.sidebar.collapsed .sidebar-language-segment .sidebar-language-link:not(.active) {
    display: none;
}

.sidebar.collapsed .sidebar-language-segment .sidebar-language-link.active {
    border-radius: 7px;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.sidebar.collapsed .sidebar-user .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    padding: 8px;
}

.sidebar.collapsed .sidebar-icon-link,
.sidebar.collapsed .sidebar-notification-link {
    height: 36px;
    width: 36px;
}

.sidebar.collapsed .sidebar-user-top {
    padding-bottom: 10px;
    width: 100%;
}

/* centra icone */
.sidebar.collapsed a {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .sidebar-sub-link {
    padding-left: 12px;
}

/* header compatto */
.sidebar.collapsed h4 .sidebar-label {
    display: none;
}

.sidebar.collapsed h4 {
    justify-content: center;
}

/* toggle */
#toggleSidebar {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logout-button {
    align-items: center;
    display: inline-flex;
    height: 31px;
    justify-content: center;
    padding: 0;
    width: 31px;
}

#toggleSidebar:hover{
    background-color: rgba(255, 255, 255, 0.08)!important;
    color: #ffffff!important;
}



/* CONTENT si espande */
.content {
    flex: 1;
    min-width: 0;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.card {
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    box-shadow: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.header-actions {
    display: flex;
    gap: 10px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.page-kicker {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-title {
    margin: 2px 0 0;
    font-size: 1.65rem;
    font-weight: 650;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-card .card-body {
    padding: 14px;
}

.filter-card-header {
    background: #fff;
    padding: 10px 14px;
}

.filter-card .form-label {
    margin-bottom: 4px;
}

.card-toolbar {
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
}

.data-card {
    overflow: hidden;
}

.data-card .section-header {
    padding: 18px 20px;
}

.section-header-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.summary-inline-total {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    color: #172033;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 5px 10px;
}

.data-card .table-responsive {
    padding: 0px;
}

.data-card .section-header + .table-responsive {
    padding-top: 0;
}

.data-table {
    border-collapse: collapse;
    font-size: 0.86rem;
}

.data-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #d9e0ea;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:hover > td {
    background: #f8fbff;
}

.data-table td,
.data-table th {
    padding: 10px 12px;
    vertical-align: middle;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 16px;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 16px;
}

.badge,
.status-pill,
.purchase-source-pill,
.received-action-badge,
.readiness-suggested-badge,
.coverage-summary-label,
.allocation-label,
.unresolved-status-badge,
.order-purchasing-warning-badge {
    align-items: center;
    display: inline-flex;
    gap: 0.25rem;
    line-height: 1.15;
    min-height: 1.6rem;
    padding: 0.38rem 0.62rem;
}

.bom-modal-dialog {
    max-width: min(85vw, 1500px);
}

.bom-options-panel {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    padding: 12px;
}

.bom-type-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bom-type-grid .list-group-item {
    align-items: center;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    display: flex;
    min-height: 44px;
}

.bom-field-groups {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}

.bom-field-group {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    min-height: 100%;
    padding: 8px 10px;
}

.bom-field-group-title {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.bom-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem;
}

.bom-field-check {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    margin: 0;
    min-height: 26px;
}

.bom-action-bar {
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .bom-modal-dialog {
        max-width: calc(100vw - 1rem);
    }

    .bom-type-grid {
        grid-template-columns: 1fr;
    }
}

.compact-choice-list .list-group-item {
    padding: 0.55rem 0.75rem;
}

.search-combobox {
    position: relative;
}

.search-combobox-list {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    display: none;
    left: 0;
    margin-top: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1085;
}

.search-combobox.is-open .search-combobox-list {
    display: block;
}

.search-combobox-option,
.search-combobox-empty {
    border-radius: 5px;
    color: #172033;
    display: block;
    font-size: 0.9rem;
    line-height: 1.25;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.search-combobox-option {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.search-combobox-option:hover,
.search-combobox-option.is-selected {
    background: #eef5ff;
    color: #0f4f93;
}

.search-combobox-empty {
    color: #64748b;
}

.manual-purchase-modal-body .form-label {
    font-size: 0.86rem;
    font-weight: 650;
    margin-bottom: 0.38rem;
}

.manual-purchase-help {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.25;
    margin-top: 0.4rem;
}

.manual-purchase-modal-body .search-combobox,
.manual-purchase-modal-body .form-control {
    margin-bottom: 0;
}

.manual-purchase-modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 56px);
}

.manual-purchase-dialog {
    height: calc(100vh - 56px);
}

.modal-dialog-scrollable .manual-purchase-modal {
    height: calc(100vh - 56px);
}

.manual-purchase-modal > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.manual-purchase-modal .modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.manual-purchase-lines {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.manual-purchase-lines .table-responsive {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    flex: 1 1 auto;
    max-height: min(320px, 36vh);
    min-height: 140px;
    overflow-y: auto;
}

.manual-purchase-lines-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.manual-purchase-modal .modal-footer {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #e3e7ee;
}

.compact-section-header {
    margin-bottom: 0.85rem;
    padding: 0;
}

.compact-section-header h6 {
    font-size: 0.95rem;
    margin: 0;
}

.manual-purchase-lines-table {
    table-layout: fixed;
}

.manual-purchase-lines-table th:nth-child(1),
.manual-purchase-lines-table td:nth-child(1) {
    width: 34%;
}

.manual-purchase-lines-table th:nth-child(2),
.manual-purchase-lines-table td:nth-child(2) {
    width: 22%;
}

.manual-purchase-lines-table th:nth-child(3),
.manual-purchase-lines-table td:nth-child(3),
.manual-purchase-lines-table th:nth-child(4),
.manual-purchase-lines-table td:nth-child(4),
.manual-purchase-lines-table th:nth-child(5),
.manual-purchase-lines-table td:nth-child(5) {
    width: 11%;
}

.manual-purchase-lines-table th:nth-child(6),
.manual-purchase-lines-table td:nth-child(6) {
    width: 11%;
}

.manual-stock-dialog {
    height: calc(100vh - 56px);
}

.manual-stock-modal {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
}

.manual-stock-modal > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.manual-stock-modal .modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.manual-stock-lines {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.manual-stock-lines .table-responsive {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    flex: 1 1 auto;
    max-height: min(320px, 36vh);
    min-height: 140px;
    overflow-y: auto;
}

.manual-stock-lines-table {
    table-layout: fixed;
}

.manual-stock-lines-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.manual-stock-lines-table th:nth-child(1),
.manual-stock-lines-table td:nth-child(1) {
    width: 34%;
}

.manual-stock-lines-table th:nth-child(2),
.manual-stock-lines-table td:nth-child(2) {
    width: 14%;
}

.manual-stock-lines-table th:nth-child(3),
.manual-stock-lines-table td:nth-child(3) {
    width: 10%;
}

.manual-stock-lines-table th:nth-child(4),
.manual-stock-lines-table td:nth-child(4) {
    width: 30%;
}

.manual-stock-lines-table th:nth-child(5),
.manual-stock-lines-table td:nth-child(5) {
    width: 12%;
}

.manual-stock-modal .modal-footer {
    flex: 0 0 auto;
}

select[data-search-combobox-native] {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.bom-table-section h6 {
    font-size: 0.95rem;
}

.spec-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.spec-list span:not(.text-muted) {
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
    display: inline-block;
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 2px 6px;
}

.action-cell {
    width: 145px;
}

.product-action-cell {
    min-width: 310px;
    width: 310px;
}

.product-production-action-cell {
    width: 320px;
}

.component-action-cell {
    width: 245px;
}

.component-list-action-cell {
    width: 170px;
}

.subproduct-action-cell {
    width: 230px;
}

.money-cell {
    width: 130px;
}

.quantity-cell {
    text-align: center;
    width: 110px;
}

.purchase-request-lines-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.purchase-request-lines-table td,
.purchase-request-lines-table th {
    overflow-wrap: normal;
    vertical-align: middle;
    white-space: nowrap;
    word-break: normal;
}

.purchase-request-lines-table .cell-name {
    width: 20%;
}

.purchase-request-lines-table .purchase-request-supplier-cell {
    width: 15%;
}

.purchase-request-lines-table .purchase-request-source-cell {
    width: 14%;
}

.purchase-request-lines-table .quantity-cell {
    width: 7%;
}

.purchase-request-lines-table th:nth-child(7),
.purchase-request-lines-table td:nth-child(7) {
    width: 14%;
}

.purchase-request-lines-table .money-cell {
    width: 8%;
}

.purchase-request-lines-table th:last-child,
.purchase-request-lines-table td:last-child {
    width: 9%;
}

.purchase-request-lines-table .supplier-inline-combobox {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.purchase-request-lines-table .supplier-inline-combobox .input-group {
    flex-wrap: nowrap;
}

.purchase-request-lines-table .qty-order-input-group {
    align-items: center;
    margin-left: auto;
    min-width: 0;
    width: 100%;
}

.purchase-request-lines-table .qty-order-input {
    min-width: 0;
}

.purchase-request-lines-table .table-actions-nowrap {
    white-space: nowrap;
}

.purchase-request-lines-table .table-actions-nowrap .btn {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.index-cell {
    width: 56px;
}

.status-cell {
    width: 150px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.order-product-name-cell {
    min-width: 240px;
    width: 240px;
}

.order-product-expand-control {
    appearance: none;
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    flex: 0 0 auto;
    height: 22px;
    line-height: 1;
    margin: 0;
    width: 18px;
}

.order-product-expand-control::before {
    content: "\203A";
    display: inline-block;
    font-size: 1.2rem;
    transition: transform 0.15s ease;
}

.order-product-expand-control:checked::before {
    transform: rotate(90deg);
}

.order-product-toggle {
    align-items: center;
    background: transparent;
    color: #172033;
    display: inline-flex;
    font-weight: 650;
    gap: 8px;
    min-width: 0;
    text-align: left;
}

.order-product-toggle label {
    cursor: pointer;
    margin: 0;
    min-width: 0;
}

.order-product-bom-row .order-product-bom-collapse {
    display: none;
}

tr:has(.order-product-expand-control:checked) + .order-product-bom-row .order-product-bom-collapse {
    display: block;
}

.order-product-toggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-product-bom-row > td {
    background: #f8fafc;
    border-top: 0;
}

.order-product-bom-detail {
    border-top: 1px solid #e3e7ee;
    padding: 12px 16px 16px;
}

.order-product-bom-detail .table-responsive {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
}

.bom-shortage-row > td {
    background: #fff4f4;
}

.bom-reservable-row > td {
    background: #f1fbf5;
}

.bom-covered-row > td {
    background: #eefcf3;
}

.order-purchasing-missing-supplier-row > td {
    background: #fff1f1;
}

.order-purchasing-warning-badge {
    background: #fde2e2;
    border: 1px solid #f2b8b8;
    border-radius: 6px;
    color: #8f1d1d;
    padding: 0.4rem 0.62rem;
}

.order-cockpit-toolbar {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.order-cockpit-metrics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.order-cockpit-metrics span {
    color: #64748b;
    font-size: 0.9rem;
}

.order-cockpit-metrics strong {
    color: #172033;
}

.order-cockpit-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.table-actions-nowrap {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.table-actions-nowrap .btn {
    white-space: nowrap;
}

.table-actions-nowrap form {
    display: inline-flex;
    margin: 0;
}

table.products-table {
    min-width: 980px;
    width: 100%;
}

table.products-table th:nth-child(1),
table.products-table td:nth-child(1) {
    min-width: 220px;
}

table.products-table th:nth-child(2),
table.products-table td:nth-child(2) {
    min-width: 150px;
}

table.products-table th:nth-child(3),
table.products-table td:nth-child(3) {
    min-width: 110px;
}

table.products-table th:nth-child(4),
table.products-table td:nth-child(4),
table.products-table th:nth-child(5),
table.products-table td:nth-child(5) {
    min-width: 120px;
}

table.products-table th:nth-child(6),
table.products-table td:nth-child(6) {
    min-width: 280px;
}

table.products-table .product-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

table.products-table .product-action-cell {
    min-width: 0;
    width: auto;
}

table.products-table .product-action-cell .btn {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.app-grid-table {
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
}

.app-grid-header,
.app-grid-row {
    align-items: stretch;
    display: grid;
}

.app-grid-row {
    border-bottom: 1px solid #e2e8f0;
}

.app-grid-header {
    background: #f8fafc;
    border-bottom: 1px solid #d9e0ea;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.app-grid-header > div,
.app-grid-cell {
    align-items: center;
    display: flex;
    min-width: 0;
    padding: 10px 12px;
    width: auto;
}

.app-grid-header > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-grid-row:hover {
    background: #f8fbff;
}

.app-grid-row:hover .app-grid-cell {
    background: transparent;
}

.app-grid-row.missing-price .app-grid-cell {
    background-color: #fde8e8;
}

.app-grid-row.component-issue-row .app-grid-cell {
    background-color: #fde8e8;
    color: #7f1d1d;
}

.app-grid-row.component-issue-row .missing-price,
.app-grid-row.component-issue-row [data-field="purchase_price"] {
    font-weight: 700;
}

.app-grid-name-text {
    color: #334155;
    display: block;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-grid-truncate-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.app-grid-subtitle {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.app-grid-inline-edit {
    display: inline-block;
    max-width: 100%;
    min-width: 2rem;
}

.app-grid-cell.money-cell,
.app-grid-header .money-cell,
.app-grid-cell.text-end,
.app-grid-header .text-end {
    justify-content: flex-end;
    text-align: right;
    width: auto;
}

.app-grid-cell.text-center,
.app-grid-header .text-center {
    justify-content: center;
    text-align: center;
    width: auto;
}

.app-grid-icon-action {
    align-items: center;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.app-grid-empty {
    padding: 18px;
    text-align: center;
}

.products-grid-table {
    min-width: 900px;
}

.products-grid-table .app-grid-header,
.products-grid-table .app-grid-row {
    grid-template-columns:
        minmax(240px, 1.35fr)
        minmax(220px, 1.15fr)
        minmax(120px, 0.65fr)
        minmax(110px, 0.55fr)
        minmax(100px, 0.55fr)
        minmax(150px, 0.6fr);
}

.products-grid-table .cell-code {
    max-width: none;
    width: 100%;
}

.products-grid-table .product-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.components-grid-table {
    min-width: 1120px;
}

.components-grid-table .app-grid-header,
.components-grid-table .app-grid-row {
    grid-template-columns:
        minmax(240px, 1.4fr)
        minmax(155px, 0.85fr)
        minmax(105px, 0.62fr)
        minmax(105px, 0.62fr)
        minmax(150px, 0.9fr)
        minmax(180px, 1fr)
        minmax(92px, 0.45fr)
        minmax(86px, 0.38fr);
}

.components-grid-table .component-supplier {
    overflow: visible;
}

.components-grid-table .supplier-inline-combobox {
    max-width: none;
    min-width: 0;
    width: 100%;
}

.components-grid-table .supplier-inline-combobox .input-group {
    flex-wrap: nowrap;
}

.components-grid-table .component-list-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.product-subproducts-grid {
    min-width: 920px;
}

.product-subproducts-grid .app-grid-header,
.product-subproducts-grid .app-grid-row {
    grid-template-columns:
        minmax(240px, 1.45fr)
        minmax(115px, 0.65fr)
        minmax(70px, 0.35fr)
        minmax(115px, 0.55fr)
        minmax(115px, 0.55fr)
        minmax(115px, 0.55fr)
        minmax(124px, 0.5fr);
}

.product-subproducts-grid .subproduct-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.orders-grid-table {
    min-width: 980px;
}

.orders-grid-table .app-grid-header,
.orders-grid-table .app-grid-row {
    grid-template-columns:
        minmax(260px, 1.35fr)
        minmax(210px, 1.1fr)
        minmax(140px, 0.62fr)
        minmax(82px, 0.4fr)
        minmax(92px, 0.38fr);
}

.customers-grid-table,
.suppliers-grid-table {
    min-width: 920px;
}

.customers-grid-table .app-grid-header,
.customers-grid-table .app-grid-row {
    grid-template-columns:
        minmax(220px, 1.35fr)
        minmax(170px, 0.95fr)
        minmax(180px, 1fr)
        minmax(120px, 0.6fr)
        minmax(230px, 1.25fr)
        minmax(78px, 0.32fr);
}

.suppliers-grid-table .app-grid-header,
.suppliers-grid-table .app-grid-row {
    grid-template-columns:
        minmax(220px, 1.35fr)
        minmax(170px, 0.95fr)
        minmax(180px, 1fr)
        minmax(120px, 0.6fr)
        minmax(190px, 1fr)
        minmax(78px, 0.32fr);
}

.orders-grid-table .action-cell .row-actions,
.customers-grid-table .action-cell .row-actions,
.suppliers-grid-table .action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.orders-grid-table .action-cell form {
    display: inline-flex;
}

.orders-grid-table .app-grid-row .app-grid-cell:first-child .app-grid-name-text {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.orders-grid-table .app-grid-row .app-grid-cell:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    max-width: none;
    width: 100%;
}

.warehouse-components-grid {
    min-width: 1040px;
}

.warehouse-components-grid .app-grid-header,
.warehouse-components-grid .app-grid-row {
    grid-template-columns:
        minmax(250px, 1.5fr)
        minmax(160px, 0.82fr)
        minmax(180px, 0.95fr)
        minmax(82px, 0.36fr)
        minmax(92px, 0.4fr)
        minmax(92px, 0.4fr)
        minmax(92px, 0.4fr)
        minmax(92px, 0.38fr);
}

.warehouse-products-grid {
    min-width: 920px;
}

.warehouse-products-grid .app-grid-header,
.warehouse-products-grid .app-grid-row {
    grid-template-columns:
        minmax(260px, 1.55fr)
        minmax(150px, 0.85fr)
        minmax(130px, 0.68fr)
        minmax(90px, 0.4fr)
        minmax(95px, 0.42fr)
        minmax(95px, 0.42fr)
        minmax(92px, 0.38fr);
}

.warehouse-components-grid .action-cell .table-actions,
.warehouse-products-grid .action-cell .table-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.warehouse-product-bom-grid {
    min-width: 820px;
}

.warehouse-product-bom-grid .warehouse-product-bom-grid-row {
    grid-template-columns:
        minmax(280px, 1.7fr)
        minmax(160px, 0.8fr)
        minmax(155px, 0.72fr)
        minmax(100px, 0.42fr);
}

.warehouse-product-structured-bom-grid .warehouse-product-bom-grid-row {
    grid-template-columns:
        minmax(300px, 1.75fr)
        minmax(155px, 0.72fr)
        minmax(170px, 0.78fr)
        minmax(100px, 0.4fr);
}

.warehouse-product-bom-grid .cell-name {
    align-items: center;
}

.warehouse-product-bom-grid .app-grid-name-text {
    color: #334155;
    font-weight: 700;
}

.warehouse-product-bom-grid .warehouse-product-bom-product-cell {
    grid-column: 1 / -1;
    padding: 10px 14px;
}

.warehouse-product-bom-grid .structured-bom-product-row {
    border-top: 1px solid #dbe4ef;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-0 {
    background: #e9f2ff;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-1 {
    background: #edf8ee;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-2 {
    background: #fff7e6;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-3 {
    background: #f3edff;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-4 {
    background: #eaf7f7;
}

.warehouse-product-bom-grid .structured-bom-product-row.structured-bom-level-5 {
    background: #f5f5f5;
}

.warehouse-product-bom-grid .structured-bom-component-header-row {
    background: #fff;
    border-top: 1px solid #dbe4ef;
}

.warehouse-product-bom-grid .structured-bom-root-child-row {
    display: grid;
}

.users-grid-table,
.roles-grid-table {
    min-width: 860px;
}

.users-grid-table .app-grid-header,
.users-grid-table .app-grid-row {
    grid-template-columns:
        minmax(210px, 1.25fr)
        minmax(220px, 1.2fr)
        minmax(120px, 0.6fr)
        minmax(150px, 0.72fr)
        minmax(95px, 0.42fr)
        minmax(78px, 0.32fr);
}

.roles-grid-table .app-grid-header,
.roles-grid-table .app-grid-row {
    grid-template-columns:
        minmax(210px, 1.2fr)
        minmax(280px, 1.55fr)
        minmax(110px, 0.5fr)
        minmax(95px, 0.42fr)
        minmax(78px, 0.32fr);
}

.users-grid-table .action-cell .row-actions,
.roles-grid-table .action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

table.components-table {
    min-width: 1240px;
    width: 100%;
}

table.components-table th:nth-child(1),
table.components-table td:nth-child(1) {
    min-width: 160px;
}

table.components-table th:nth-child(2),
table.components-table td:nth-child(2) {
    min-width: 180px;
}

table.components-table th:nth-child(3),
table.components-table td:nth-child(3) {
    min-width: 105px;
}

table.components-table th:nth-child(4),
table.components-table td:nth-child(4) {
    min-width: 110px;
}

table.components-table th:nth-child(5),
table.components-table td:nth-child(5) {
    min-width: 170px;
}

table.components-table th:nth-child(6),
table.components-table td:nth-child(6) {
    min-width: 180px;
}

table.components-table th:nth-child(7),
table.components-table td:nth-child(7) {
    min-width: 110px;
}

table.components-table th:nth-child(8),
table.components-table td:nth-child(8) {
    min-width: 150px;
}

table.components-table .component-list-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

table.components-table .component-list-action-cell {
    min-width: 0;
    width: auto;
}

table.product-components-table {
    min-width: 1160px;
    width: 100%;
}

table.product-components-table th:nth-child(3),
table.product-components-table td:nth-child(3) {
    min-width: 190px;
}

table.product-components-table th:nth-child(4),
table.product-components-table td:nth-child(4) {
    min-width: 90px;
}

table.product-components-table th:nth-child(5),
table.product-components-table td:nth-child(5),
table.product-components-table th:nth-child(6),
table.product-components-table td:nth-child(6) {
    min-width: 120px;
}

table.product-components-table th:nth-child(8),
table.product-components-table td:nth-child(8) {
    min-width: 230px;
}

table.product-components-table .supplier-inline-combobox {
    max-width: none;
    min-width: 180px;
}

table.product-components-table .supplier-inline-combobox .input-group {
    flex-wrap: nowrap;
}

table.product-components-table .component-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

table.product-components-table .component-action-cell {
    min-width: 0;
    width: auto;
}

.product-components-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 2.2fr)
        minmax(118px, 0.9fr)
        minmax(170px, 1fr)
        minmax(58px, max-content)
        minmax(78px, max-content)
        minmax(82px, max-content)
        minmax(108px, max-content);
    max-width: 100%;
    min-width: 900px;
    overflow-x: auto;
    width: 100%;
}

.product-components-grid-header,
.product-components-grid-row {
    display: contents;
}

.product-components-grid > [role="rowgroup"] {
    display: contents;
}

.product-components-grid-header {
    background: #f8fafc;
    border-bottom: 1px solid #d9e0ea;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.product-components-grid-header > div,
.product-components-grid-cell {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    min-width: 0;
    padding: 10px 12px;
    width: auto;
}

.product-components-grid-header > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-components-grid .cell-name {
    max-width: none;
    min-width: 0;
}

.product-components-grid .cell-code {
    max-width: none;
    min-width: 0;
    width: auto;
}

.product-grid-inline-edit {
    display: inline-block;
    max-width: 100%;
    min-width: 2rem;
}

.product-components-grid-cell.cell-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    white-space: normal;
}

.product-component-name-main {
    align-items: center;
    display: flex;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}

.product-component-name-text,
.product-component-spec-text {
    color: #334155;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-component-name-text {
    font-weight: 700;
}

.product-component-spec-text {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.15;
    max-width: 100%;
}

.product-component-hover-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    color: #334155;
    display: grid;
    gap: 8px;
    max-width: min(360px, calc(100vw - 24px));
    min-width: min(280px, calc(100vw - 24px));
    opacity: 0;
    padding: 12px 14px;
    pointer-events: none;
    position: fixed;
    text-align: left;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
    z-index: 2055;
}

.product-component-hover-card-plain {
    max-width: min(320px, calc(100vw - 24px));
    min-width: 0;
    padding: 9px 11px;
}

.product-component-hover-plain-text {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
}

.product-component-hover-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.product-component-hover-title {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
}

.product-component-hover-description {
    color: #475569;
    font-size: 0.8rem;
    line-height: 1.35;
}

.product-component-hover-specs {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
    display: grid;
    font-size: 0.78rem;
    gap: 3px;
    line-height: 1.3;
    padding: 8px 9px;
}

.product-component-hover-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    padding: 8px 9px;
}

.product-component-hover-detail-row {
    display: grid;
    gap: 2px;
}

.product-component-hover-label {
    color: #64748b;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.product-component-hover-value {
    color: #334155;
    font-size: 0.76rem;
    line-height: 1.28;
}

.product-components-grid-cell.cell-name .badge {
    flex: 0 0 auto;
}

.product-components-grid-header > div:first-child,
.product-components-grid-cell:first-child {
    padding-left: 16px;
}

.product-components-grid-header > div:last-child,
.product-components-grid-cell:last-child {
    padding-right: 16px;
}

.product-components-grid-row:hover .product-components-grid-cell {
    background: #f8fbff;
}

.product-components-grid-row.component-issue-row .product-components-grid-cell {
    background-color: #fde8e8 !important;
    color: #7f1d1d !important;
}

.product-components-grid-row .component-supplier {
    overflow: visible;
}

.product-components-grid-row .supplier-inline-combobox {
    max-width: none;
    min-width: 0;
    width: 100%;
}

.product-components-grid-row .spec-list {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-components-grid-row .supplier-inline-combobox .input-group {
    flex-wrap: nowrap;
}

.product-components-grid-row .quantity-cell,
.product-components-grid-row .money-cell,
.product-components-grid-header .quantity-cell,
.product-components-grid-header .text-end {
    justify-content: flex-end;
    text-align: right;
    width: auto;
}

.product-components-grid-row .component-action-cell,
.product-components-grid-header .component-action-cell {
    justify-content: flex-end;
    width: auto;
}

.product-components-grid-row .component-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.product-grid-icon-action {
    align-items: center;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.product-grid-similar-action {
    align-items: center;
    display: inline-flex;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    min-width: 34px;
    padding: 0 8px;
}

.product-components-grid-empty {
    padding: 18px;
    text-align: center;
}

.product-subproducts-table {
    min-width: 1060px;
}

.product-production-card {
    margin-top: 0.35rem;
}

.product-production-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.product-subproducts-table th:nth-child(1),
.product-subproducts-table td:nth-child(1) {
    width: auto;
}

.product-subproducts-table th:nth-child(2),
.product-subproducts-table td:nth-child(2) {
    width: 115px;
}

.product-subproducts-table th:nth-child(3),
.product-subproducts-table td:nth-child(3) {
    width: 85px;
}

.product-subproducts-table th:nth-child(4),
.product-subproducts-table td:nth-child(4),
.product-subproducts-table th:nth-child(5),
.product-subproducts-table td:nth-child(5),
.product-subproducts-table th:nth-child(6),
.product-subproducts-table td:nth-child(6) {
    width: 120px;
}

.product-subproducts-table .subproduct-action-cell .row-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.product-subproducts-table .subproduct-action-cell .btn {
    white-space: nowrap;
}

.warehouse-components-table,
.warehouse-finished-products-table {
    table-layout: fixed;
    width: 100%;
}

.warehouse-components-table th,
.warehouse-components-table td,
.warehouse-finished-products-table th,
.warehouse-finished-products-table td {
    padding-left: 10px;
    padding-right: 10px;
}

.warehouse-components-table th:nth-child(1),
.warehouse-components-table td:nth-child(1) {
    width: 19%;
}

.warehouse-components-table th:nth-child(2),
.warehouse-components-table td:nth-child(2) {
    width: 27%;
}

.warehouse-components-table th:nth-child(3),
.warehouse-components-table td:nth-child(3) {
    width: 18%;
}

.warehouse-components-table th:nth-child(4),
.warehouse-components-table td:nth-child(4),
.warehouse-components-table th:nth-child(5),
.warehouse-components-table td:nth-child(5),
.warehouse-components-table th:nth-child(6),
.warehouse-components-table td:nth-child(6),
.warehouse-components-table th:nth-child(7),
.warehouse-components-table td:nth-child(7) {
    width: 7%;
}

.warehouse-components-table th:nth-child(8),
.warehouse-components-table td:nth-child(8) {
    width: 16%;
}

.warehouse-finished-products-table th:nth-child(1),
.warehouse-finished-products-table td:nth-child(1) {
    width: 30%;
}

.warehouse-finished-products-table th:nth-child(2),
.warehouse-finished-products-table td:nth-child(2) {
    width: 17%;
}

.warehouse-finished-products-table th:nth-child(3),
.warehouse-finished-products-table td:nth-child(3) {
    width: 10%;
}

.warehouse-finished-products-table th:nth-child(4),
.warehouse-finished-products-table td:nth-child(4),
.warehouse-finished-products-table th:nth-child(5),
.warehouse-finished-products-table td:nth-child(5),
.warehouse-finished-products-table th:nth-child(6),
.warehouse-finished-products-table td:nth-child(6) {
    width: 8%;
}

.warehouse-finished-products-table th:nth-child(7),
.warehouse-finished-products-table td:nth-child(7) {
    width: 19%;
}

.warehouse-components-table .cell-code,
.warehouse-components-table .cell-name,
.warehouse-components-table td:nth-child(3),
.warehouse-product-name-cell,
.warehouse-product-code-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-product-name-cell a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.warehouse-components-table .table-actions,
.warehouse-finished-products-table .table-actions {
    gap: 6px;
}

.warehouse-components-table .btn-sm,
.warehouse-finished-products-table .btn-sm {
    padding-left: 8px;
    padding-right: 8px;
}

.warehouse-reserved-link {
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.warehouse-reserved-link:hover,
.warehouse-reserved-link:focus {
    text-decoration: underline;
}

.supplier-orders-grid-table {
    min-width: 1180px;
}

.supplier-orders-grid-row {
    grid-template-columns:
        44px
        minmax(320px, 2.2fr)
        minmax(150px, 0.7fr)
        minmax(190px, 0.9fr)
        minmax(84px, 0.38fr)
        minmax(84px, 0.42fr)
        minmax(84px, 0.42fr)
        minmax(88px, 0.44fr)
        minmax(128px, 0.62fr)
        minmax(132px, 0.56fr);
}

.supplier-orders-grid-table .app-grid-header {
    align-items: center;
}

.supplier-order-main-cell {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.supplier-order-main-cell .app-grid-name-text {
    color: #1f2937;
    font-weight: 700;
}

.supplier-order-main-cell .app-grid-subtitle {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-order-main-dates {
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.7rem;
    gap: 4px 10px;
    line-height: 1.2;
    max-width: 100%;
}

.supplier-order-main-dates span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.production-page-header {
    margin-bottom: 26px;
}

.production-filter-card {
    margin-top: 0.25rem;
}

.production-tasks-table {
    min-width: 1360px;
}

.production-tasks-table .production-task-action-cell {
    min-width: 380px;
    width: 380px;
}

.production-tasks-table td.production-task-action-cell {
    min-width: 380px;
    width: 380px;
}

.production-tasks-table .production-task-action-cell .row-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-end;
    white-space: nowrap;
}

.production-tasks-table .production-task-action-cell .btn,
.production-tasks-table .production-task-action-cell form {
    flex: 0 0 auto;
}

.production-tasks-grid {
    min-width: 1060px;
}

.production-tasks-grid .production-tasks-grid-row {
    grid-template-columns:
        minmax(240px, 1.45fr)
        minmax(150px, 0.72fr)
        minmax(135px, 0.58fr)
        minmax(130px, 0.58fr)
        minmax(115px, 0.5fr)
        minmax(85px, 0.36fr)
        minmax(170px, 0.78fr)
        minmax(128px, 0.48fr);
}

.production-tasks-grid .production-task-action-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.production-tasks-grid .production-task-action-cell form {
    display: inline-flex;
}

.production-tasks-grid .production-task-order-cell {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.task-comment-count {
    display: inline-flex;
    justify-content: center;
    min-width: 1.6rem;
}

.production-kanban {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
}

.production-kanban-column {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    min-width: 0;
}

.production-kanban-header {
    align-items: center;
    border-bottom: 1px solid #e3e7ee;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.production-kanban-header strong {
    color: #172033;
}

.production-kanban-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.production-task-card {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.production-task-card-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.production-task-qty {
    background: #eef2f7;
    border-radius: 999px;
    color: #172033;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 9px;
}

.production-task-order {
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
}

.production-task-order:hover {
    text-decoration: underline;
}

.production-task-meta {
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 0.82rem;
    gap: 2px;
}

.production-task-product {
    font-size: 0.92rem;
    font-weight: 700;
}

.production-task-progress {
    background: #e9eef5;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.production-task-progress-bar {
    background: #0d6efd;
    height: 100%;
}

.production-task-notes {
    color: #475569;
    font-size: 0.85rem;
    margin: 0;
}

.production-task-comment-list {
    display: grid;
    gap: 10px;
}

.production-task-comment {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    padding: 12px;
}

.production-task-comment-meta {
    align-items: center;
    color: #64748b;
    display: grid;
    font-size: 0.82rem;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 6px;
}

.production-task-comment-meta strong {
    color: #172033;
}

.production-task-comment-body {
    color: #243042;
    line-height: 1.45;
    white-space: pre-wrap;
}

@media (max-width: 576px) {
    .production-task-comment-meta {
        align-items: flex-start;
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.modal-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.production-kanban-empty {
    background: #fff;
    border: 1px dashed #d9e0ea;
    border-radius: 8px;
    padding: 18px 12px !important;
}

.supplier-order-select-cell {
    justify-content: center;
    width: 44px;
}

.supplier-order-select-checkbox {
    height: 1.05rem;
    margin: 0;
    width: 1.05rem;
}

.supplier-order-filter-control {
    min-width: 150px;
}

.supplier-order-control-panel {
    display: grid;
    gap: 12px;
}

.supplier-order-filter-panel {
    min-width: 0;
}

.supplier-order-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.supplier-order-filter-actions {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.supplier-order-filter-wide {
    min-width: 230px;
}

.supplier-order-filter-wide .search-combobox {
    width: 100%;
}

.supplier-order-bulk-panel {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 10px 12px;
}

.supplier-order-bulk-copy {
    align-items: center;
    color: #475569;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.supplier-order-bulk-copy i {
    align-items: center;
    background: #eaf2ff;
    border: 1px solid #cfe0ff;
    border-radius: 6px;
    color: #27569b;
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.supplier-order-bulk-copy strong {
    color: #1f2937;
    display: block;
    font-size: 0.82rem;
    line-height: 1.2;
}

.supplier-order-bulk-copy span {
    color: #64748b;
    display: block;
    font-size: 0.75rem;
    line-height: 1.25;
}

.supplier-order-bulk-form {
    align-items: end;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.supplier-order-bulk-action-control {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 180px;
}

.supplier-order-bulk-action-control .form-label {
    flex: 0 0 auto;
}

.supplier-order-bulk-action-control .form-select {
    min-width: 150px;
}

@media (max-width: 900px) {
    .supplier-order-bulk-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .supplier-order-bulk-form {
        flex-wrap: wrap;
    }
}

.order-components-modal-dialog {
    max-width: min(85vw, 1500px);
}

.wide-operation-modal-dialog {
    max-width: min(85vw, 1500px);
}

@media (max-width: 768px) {
    .order-components-modal-dialog,
    .wide-operation-modal-dialog {
        max-width: calc(100vw - 1rem);
    }
}

.supplier-order-updated-cell {
    min-width: 178px;
    padding-right: 26px !important;
    white-space: nowrap;
    width: 178px;
}

.supplier-order-delivery-cell {
    min-width: 164px;
    width: 164px;
}

.supplier-order-delivery-inline {
    margin: 0 auto;
    position: relative;
    width: 152px;
}

.supplier-orders-table .status-cell {
    max-width: 118px;
    width: 118px;
}

.supplier-orders-table .status-pill {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-orders-grid-table .supplier-order-status-pill {
    border: 1px solid #dbe4f0;
    box-shadow: none;
    font-size: 0.72rem;
    font-weight: 600;
    max-width: none;
    min-height: 24px;
    min-width: max-content;
    overflow: visible;
    padding: 5px 14px;
    text-overflow: clip;
    white-space: nowrap;
}

.supplier-orders-grid-table .status-cell {
    justify-content: center;
    max-width: none;
    min-width: 0;
    width: auto;
}

.supplier-orders-grid-table .supplier-order-delivery-cell {
    min-width: 0;
    width: auto;
}

.supplier-orders-grid-table .supplier-order-delivery-inline {
    max-width: 100%;
    width: 152px;
}

.supplier-orders-grid-table .supplier-order-status-pill.text-bg-primary,
.supplier-orders-grid-table .supplier-order-status-pill.bg-primary {
    background: #eaf2ff !important;
    border-color: #cfe0ff;
    color: #27569b !important;
}

.supplier-orders-grid-table .supplier-order-status-pill.text-bg-success,
.supplier-orders-grid-table .supplier-order-status-pill.bg-success {
    background: #e9f7ef !important;
    border-color: #cfebdc;
    color: #176b45 !important;
}

.supplier-orders-grid-table .supplier-order-status-pill.text-bg-warning,
.supplier-orders-grid-table .supplier-order-status-pill.bg-warning {
    background: #fff4dc !important;
    border-color: #f8dfab;
    color: #9a5b11 !important;
}

.supplier-orders-grid-table .supplier-order-status-pill.text-bg-danger,
.supplier-orders-grid-table .supplier-order-status-pill.bg-danger {
    background: #fdeaea !important;
    border-color: #f4cccc;
    color: #9b2c2c !important;
}

.supplier-orders-grid-table .supplier-order-status-pill.text-bg-secondary,
.supplier-orders-grid-table .supplier-order-status-pill.bg-secondary {
    background: #f1f5f9 !important;
    border-color: #dbe4f0;
    color: #475569 !important;
}

.supplier-orders-export-preview {
    max-height: 420px;
    overflow: auto;
}

.supplier-orders-export-preview-table th,
.supplier-orders-export-preview-table td {
    white-space: nowrap;
}

.supplier-orders-export-supplier-row td {
    background: #bfd7ff !important;
    color: #1f2937;
}

.supplier-orders-export-order-row td {
    background: #eaf7e8 !important;
    color: #334155;
}

.supplier-orders-export-preview-header th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.supplier-order-delivery-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 116px;
}

.supplier-order-delivery-native {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.supplier-order-delivery-input::-webkit-calendar-picker-indicator {
    display: none;
    opacity: 0;
}

.supplier-order-delivery-picker {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    width: 36px;
}

.supplier-order-actions-cell {
    min-width: 190px;
    padding-left: 18px !important;
    width: 190px;
}

.supplier-order-actions-cell .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.supplier-order-actions-cell .btn,
.supplier-order-actions-cell .received-action-badge {
    min-width: 92px;
}

.supplier-orders-grid-table .supplier-order-actions-cell {
    min-width: 0;
    padding-left: 12px !important;
    width: auto;
}

.supplier-orders-grid-table .supplier-order-actions-cell .row-actions {
    display: inline-flex;
    gap: 0.35rem;
}

.supplier-orders-grid-table .supplier-order-actions-cell form,
.supplier-orders-grid-table .supplier-order-actions-cell .btn,
.supplier-orders-grid-table .supplier-order-actions-cell .received-action-badge {
    flex: 0 0 auto;
    min-width: 0;
}

.supplier-order-received-icon {
    height: 30px;
    justify-content: center;
    min-height: 30px;
    min-width: 32px;
    padding: 0;
    width: 32px;
}

.received-action-badge {
    align-items: center;
    background: #eaf7ef;
    border: 1px solid #bfe5cc;
    border-radius: 6px;
    color: #1d6b3a;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    justify-content: center;
    line-height: 1.5;
    min-height: 31px;
    min-width: 118px;
    padding: 4px 10px;
}

.status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    min-height: 28px;
    padding: 6px 10px;
    white-space: nowrap;
}

.customer-preview-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 4px 0;
}

.customer-preview-row span:last-child,
.customer-preview-row strong {
    color: #172033;
    min-width: 0;
    overflow-wrap: anywhere;
}

.readiness-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.readiness-item {
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    padding: 12px;
}

.readiness-item span {
    color: #64748b;
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.readiness-item strong {
    color: #172033;
    font-size: 1rem;
}

.readiness-item-action {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.readiness-tile-action {
    flex: 0 0 auto;
    white-space: nowrap;
}

.readiness-item-danger {
    background: #fdecec;
    border-color: #f4b8b8;
}

.readiness-item-danger span,
.readiness-item-danger strong {
    color: #7f1d1d !important;
}

.readiness-item-success {
    background: #eaf7ef;
    border-color: #bfe5cc;
}

.readiness-item-success span,
.readiness-item-success strong {
    color: #14532d !important;
}

.readiness-suggested-badge {
    background: #eef6ff !important;
    border: 1px solid #bfdbfe;
    color: #1e3a8a !important;
    font-size: 0.84rem;
    padding: 7px 12px;
}

.readiness-value-ok {
    color: #198754 !important;
}

.readiness-value-danger {
    color: #dc3545 !important;
}

.readiness-next-action {
    grid-column: span 2;
}

.activity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-detail-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-tile-danger {
    background: #fdecec;
    border-color: #f4c7c7;
}

.summary-tile-success {
    background: #e9f8ef;
    border-color: #bfe8cf;
}

.summary-button-link {
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
}

.order-detail-action-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-detail-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-detail-rollback-action {
    margin-left: auto;
}

.order-workflow-card {
    background: #ffffff;
}

.order-workflow-steps {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 14px 16px;
}

.order-workflow-step {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    color: #64748b;
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 38px;
    padding: 7px 10px;
    text-align: center;
    white-space: nowrap;
}

.order-workflow-step-done {
    background: #e9f8ef;
    border-color: #bfe8cf;
    color: #166534;
}

.order-workflow-step-active {
    background: #eaf2ff;
    border-color: #9fc3ff;
    color: #174ea6;
    font-weight: 700;
}

.order-workflow-step-blocked {
    background: #fff1f1;
    border-color: #f4c7c7;
    color: #991b1b;
}

.order-workflow-step-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.order-workflow-panel {
    border-top: 1px solid #e3e7ee;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.9fr);
    padding: 16px;
}

.order-workflow-panel-main h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 2px 0 6px;
}

.order-workflow-panel-main p {
    color: #475569;
    margin: 0;
}

.order-workflow-production-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.order-workflow-production-stage {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.order-workflow-production-stage-done {
    background: #e9f8ef;
    border-color: #bfe8cf;
    color: #166534;
}

.order-workflow-production-stage-active {
    background: #eaf2ff;
    border-color: #9fc3ff;
    color: #174ea6;
}

.order-workflow-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
}

.order-workflow-metric {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    padding: 7px 9px;
}

.order-workflow-metric span,
.order-workflow-check-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.order-workflow-metric span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-workflow-metric strong {
    color: #172033;
    display: block;
    font-size: 1rem;
}

.order-workflow-checks {
    align-content: start;
    align-self: start;
    display: grid;
    gap: 7px;
    grid-auto-rows: max-content;
}

.order-workflow-check {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(120px, 1fr) auto;
    min-height: 36px;
    padding: 7px 10px;
}

.order-workflow-check-done {
    background: #eefaf2;
    border-color: #c6ecd3;
}

.order-workflow-check-partial {
    background: #fff8e7;
    border-color: #f5dea3;
}

.order-workflow-check-icon {
    color: #64748b;
}

.order-workflow-check-done .order-workflow-check-icon {
    color: #198754;
}

.order-workflow-check-partial .order-workflow-check-icon {
    color: #b7791f;
}

.order-workflow-check-value {
    color: #172033;
    font-weight: 700;
    white-space: nowrap;
}

.order-workflow-actions {
    align-content: start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 12px;
}

.order-workflow-task-list {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 8px;
}

.order-workflow-task-item {
    align-items: center;
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(130px, auto) minmax(220px, 1fr) auto;
    padding: 6px 8px;
}

.order-workflow-task-main {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-workflow-task-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .order-workflow-panel {
        grid-template-columns: 1fr;
    }

    .order-workflow-metrics {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 760px) {
    .order-workflow-steps {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .order-workflow-step {
        white-space: normal;
    }

    .order-detail-rollback-action {
        margin-left: 0;
    }

    .order-workflow-task-item {
        grid-template-columns: 1fr;
    }

    .order-workflow-task-meta {
        white-space: normal;
    }
}

.order-product-list {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.order-product-panel {
    background: #fff;
    border: 1px solid #b8c6d8;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    position: relative;
}

.order-product-panel:first-child {
    border-top: 1px solid #b8c6d8;
}

.order-product-panel > .order-product-expand-control {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.order-product-panel-header {
    align-items: stretch;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    display: grid;
    gap: 0;
    grid-template-columns: 44px minmax(220px, 1fr) minmax(420px, 2.4fr) auto;
    padding: 0;
    position: relative;
}

.order-product-panel-title {
    align-items: center;
    background: linear-gradient(90deg, #eef4fb 0 44px, transparent 44px);
    color: #172033;
    cursor: pointer;
    display: grid;
    grid-column: 1 / 3;
    grid-template-columns: 44px minmax(0, 1fr);
    margin: 0;
    min-width: 0;
    padding: 0;
    position: relative;
}

.order-product-panel-title::after {
    background: #cbd5e1;
    bottom: 0;
    content: "";
    left: 44px;
    position: absolute;
    top: 0;
    width: 1px;
}

.order-product-panel-title a {
    align-items: center;
    color: #172033;
    display: flex;
    font-weight: 700;
    min-height: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 12px 14px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-product-panel-title a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.order-product-panel-arrow {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    justify-self: center;
    margin: auto;
    position: relative;
    transition: color 0.18s ease, border-color 0.18s ease;
    width: 28px;
    z-index: 1;
}

.order-product-panel-arrow::before {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    height: 8px;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    width: 8px;
}

.order-product-panel:has(.order-product-expand-control:checked) .order-product-panel-arrow {
    color: #2563eb;
}

.order-product-panel:not(:has(.order-product-expand-control:checked)) .order-product-panel-arrow::before {
    transform: rotate(-45deg);
}

.order-product-panel-metrics {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    padding: 10px 12px;
}

.order-product-panel-metric {
    background: #f8fafc;
    border: 1px solid #e5edf7;
    border-radius: 8px;
    min-height: 48px;
    padding: 7px 9px;
    text-align: left;
}

.order-product-panel-metric span {
    color: #64748b;
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
}

.order-product-panel-metric strong {
    color: #334155;
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
}

.order-product-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    padding: 12px 16px 12px 8px;
}

.order-product-header-actions > form {
    align-self: center;
}

.order-product-header-actions .btn {
    align-items: center;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.order-product-panel-body {
    border-top: 1px solid #e2e8f0;
    display: none;
}

.order-product-panel:has(.order-product-expand-control:checked) .order-product-panel-body {
    display: block;
}

.order-product-coverage-summary {
    background: #f8fafc;
    border-bottom: 1px solid #e3e7ee;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    padding: 10px;
}

.coverage-summary-item {
    background: #fff;
    border: 1px solid #e3e7ee;
    min-height: 74px;
    padding: 8px 10px;
    text-align: left;
}

.coverage-summary-item strong {
    color: #172033;
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
}

.coverage-summary-item small,
.coverage-summary-label {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.coverage-summary-value-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: #174ea6;
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.coverage-summary-value-link:hover {
    color: #0f3a85;
}

.coverage-summary-label {
    min-height: 0;
    padding: 0;
    text-align: left;
    text-transform: uppercase;
}

.coverage-summary-warning {
    border-color: #f0c36d;
    background: #fff9eb;
}

.coverage-summary-detail {
    color: #334155;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.76rem;
    gap: 4px 8px;
    margin-top: 6px;
}

.coverage-summary-detail span {
    background: #eef2ff;
    max-width: 100%;
    overflow: hidden;
    padding: 2px 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-product-actions-table {
    table-layout: auto;
}

.order-product-actions-table th:first-child,
.order-product-actions-table td:first-child {
    width: 180px;
}

.order-product-actions-table th:nth-child(2),
.order-product-actions-table td:nth-child(2) {
    width: 120px;
}

.order-product-warning-row > td {
    background: #fff5f5;
    border-bottom: 1px solid #f1c5c5;
}

.order-product-warning {
    align-items: center;
    color: #842029;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
}

.order-product-warning span {
    flex: 1 1 320px;
}

.order-product-actions-cell {
    width: 100%;
}

.order-product-actions-cell > button,
.order-product-actions-cell > a,
.order-product-actions-cell > form {
    display: inline-flex;
    margin: 2px 0 2px 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.order-product-task-offcanvas {
    --bs-offcanvas-width: min(50vw, 760px);
    width: min(50vw, 760px);
}

@media (max-width: 991.98px) {
    .order-product-task-offcanvas {
        --bs-offcanvas-width: 100vw;
        width: 100vw;
    }
}

.task-sidebar-list {
    display: grid;
    gap: 10px;
}

.task-sidebar-item {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 12px;
}

.task-sidebar-item-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.task-sidebar-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}

.task-sidebar-metrics span {
    background: #f8fafc;
    border: 1px solid #e5eaf1;
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 8px;
    text-transform: uppercase;
}

.task-sidebar-metrics strong {
    color: #172033;
    display: block;
    font-size: 1rem;
    margin-top: 2px;
    text-transform: none;
}

.task-sidebar-notes {
    color: #475569;
    margin: 10px 0 0;
}

.task-sidebar-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.structured-bom-product-row td {
    background: #f4f7fb !important;
    border-top: 1px solid #dbe4ef;
}

.structured-bom-product-row.structured-bom-level-0 td {
    background: #e9f2ff !important;
}

.structured-bom-product-row.structured-bom-level-1 td {
    background: #edf8ee !important;
}

.structured-bom-product-row.structured-bom-level-2 td {
    background: #fff7e6 !important;
}

.structured-bom-product-row.structured-bom-level-3 td {
    background: #f3edff !important;
}

.structured-bom-product-row.structured-bom-level-4 td {
    background: #eaf7f7 !important;
}

.structured-bom-product-row.structured-bom-level-5 td {
    background: #f5f5f5 !important;
}

.structured-bom-component-header-row th {
    background: #ffffff !important;
    border-top: 1px solid #dbe4ef;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.structured-bom-child-row {
    display: none;
}

.structured-bom-root-child-row {
    display: table-row;
}

.structured-bom-product-title {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.structured-bom-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.structured-bom-toggle-label,
.structured-bom-toggle-spacer {
    display: inline-flex;
    flex: 0 0 24px;
    height: 24px;
    width: 24px;
}

.structured-bom-toggle-label {
    align-items: center;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    justify-content: center;
}

.structured-bom-toggle-label::before {
    border-bottom: 2px solid #0d6efd;
    border-right: 2px solid #0d6efd;
    content: "";
    display: block;
    height: 8px;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    width: 8px;
}

.structured-bom-toggle:checked + .structured-bom-toggle-label::before {
    transform: rotate(45deg);
}

.flash-stack .alert {
    margin-bottom: 10px;
}

.purchasing-accordion {
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.purchasing-view-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.purchasing-view-panel-supplier {
    display: none;
}

#purchasingViewBySupplier:checked ~ .purchasing-request-workspace .purchasing-view-panel-order {
    display: none;
}

#purchasingViewBySupplier:checked ~ .purchasing-request-workspace .purchasing-view-panel-supplier {
    display: block;
}

.purchasing-view-switch {
    background: #eef2f7;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    display: inline-grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    padding: 3px;
}

.purchasing-view-option {
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
}

#purchasingViewByOrder:checked ~ .purchasing-request-workspace .purchasing-view-order-option,
#purchasingViewBySupplier:checked ~ .purchasing-request-workspace .purchasing-view-supplier-option {
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    color: #2563eb;
}

.purchasing-request-workspace > .section-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.purchasing-accordion {
    background: #f8fafc;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.purchase-order-card {
    background: #fff;
    border: 1px solid #b8c6d8;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.purchasing-accordion .purchase-order-card,
.purchasing-accordion .purchase-order-card:not(:first-of-type),
.purchasing-accordion .purchase-order-card:first-child {
    border-top: 1px solid #b8c6d8;
}

.contract-accordion-header {
    align-items: stretch;
    display: block;
    position: relative;
}

.purchase-order-header {
    align-items: stretch;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    position: relative;
}

.contract-header-actions {
    align-items: center;
    background: #fff;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 520px;
    padding: 12px 16px 12px 10px;
    z-index: 5;
}

.purchase-component-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.purchase-component-main strong {
    color: #475569;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-component-main span {
    color: #64748b;
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchasing-supplier-view-toolbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.purchasing-supplier-cards {
    background: #f8fafc;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.purchase-supplier-card {
    background: #fff;
    border: 1px solid #b8c6d8;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.purchase-supplier-header {
    align-items: stretch;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    position: relative;
}

.purchase-card-expander {
    align-items: center;
    background: #eef4fb;
    border-right: 1px solid #cbd5e1;
    display: flex;
    justify-content: center;
}

.purchase-card-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.purchase-card-toggle.accordion-button {
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px !important;
    display: inline-flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.purchase-card-toggle.accordion-button::after {
    display: none;
}

.purchase-card-toggle.accordion-button:not(.collapsed),
.purchase-card-toggle.accordion-button:focus {
    background: #fff;
    box-shadow: none;
    color: #2563eb;
}

.purchase-card-toggle.collapsed .bi-chevron-down {
    transform: rotate(-90deg);
}

.purchase-card-toggle .bi-chevron-down {
    transition: transform 0.18s ease;
}

.purchase-card-heading {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px 16px;
}

.purchase-card-title-row,
.purchase-card-meta-row {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.purchase-card-title-row strong {
    color: #475569;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-card-meta-row {
    flex-wrap: wrap;
}

.purchase-status-dot {
    border-radius: 999px;
    flex: 0 0 auto;
    height: 8px;
    width: 8px;
}

.purchase-status-dot.ok {
    background: #0f766e;
}

.purchase-status-dot.danger {
    background: #b91c1c;
}

.purchase-metric-pill,
.purchase-source-pill {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5edf7;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1;
    padding: 6px 9px;
    white-space: nowrap;
}

.purchase-metric-pill.is-ok {
    background: #e8f7f1;
    border-color: #cfeede;
    color: #0f766e;
}

.purchase-metric-pill.is-warning {
    background: #fff4df;
    border-color: #ffe0ad;
    color: #b45309;
}

.purchase-metric-pill.is-danger {
    background: #fdecec;
    border-color: #ffd5d5;
    color: #b91c1c;
}

.purchase-source-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.purchasing-supplier-lines-table .table-actions-nowrap,
.purchase-request-lines-table .table-actions-nowrap {
    text-align: right;
}

.purchase-allocation-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.line-draft-allocation-preview {
    background: #f8fafc;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 12px;
}

.line-draft-preview-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.line-draft-preview-status {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    gap: 6px;
    white-space: nowrap;
}

.line-draft-preview-status.is-updating {
    color: #2563eb;
}

.line-draft-allocation-table {
    table-layout: fixed;
}

.line-draft-allocation-table th,
.line-draft-allocation-table td {
    vertical-align: middle;
}

.line-draft-extra-stock-row td {
    background: #eef6ff;
}

.line-draft-covered-source-row td {
    background: #dcfce7;
}

.line-draft-uncovered-source-row td {
    background: #fee2e2;
}

.purchase-draft-confirm {
    display: grid;
    gap: 16px;
}

.purchase-draft-confirm-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.purchase-draft-confirm-card {
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    display: grid;
    gap: 6px;
    min-height: 74px;
    padding: 12px;
}

.purchase-draft-confirm-card span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.purchase-draft-confirm-card strong {
    color: #334155;
    font-size: 1.25rem;
    line-height: 1;
}

.purchase-draft-confirm-card.ok {
    background: #dcfce7;
    border-color: #9ce6b9;
}

.purchase-draft-confirm-card.warning {
    background: #fff4df;
    border-color: #f8d397;
}

.purchase-draft-confirm-notice {
    background: #e8f1ff;
    border: 1px solid #c7dbff;
    border-radius: 10px;
    color: #1e3a8a;
    display: grid;
    gap: 5px;
    padding: 12px 14px;
}

.purchase-draft-confirm-notice strong {
    color: #1d4ed8;
    font-size: 0.9rem;
}

.purchase-draft-confirm-notice p {
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
}

.purchase-draft-confirm-section {
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    overflow: hidden;
}

.purchase-draft-confirm-section-head {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ef;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.purchase-draft-confirm-section-head h6 {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
}

.purchase-draft-confirm-section-head p {
    color: #64748b;
    font-size: 0.8rem;
    margin: 3px 0 0;
}

.purchase-draft-confirm-table-wrap {
    max-height: 48vh;
    overflow: auto;
}

.purchase-draft-confirm-table {
    table-layout: fixed;
}

.purchase-draft-confirm-table th,
.purchase-draft-confirm-table td {
    vertical-align: middle;
}

.purchase-draft-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    padding: 6px 9px;
    white-space: nowrap;
}

.purchase-draft-status.to-draft {
    background: #e8f1ff;
    color: #2563eb;
}

.purchase-draft-status.covered {
    background: #dcfce7;
    color: #0f766e;
}

.purchase-draft-status.warning {
    background: #fff4df;
    color: #b45309;
}

.purchasing-export-modal-dialog {
    --bs-modal-width: 85vw;
    max-width: calc(100vw - 32px);
    width: 85vw;
}

.purchasing-export-modal-dialog .modal-content,
.purchasing-export-modal-dialog form[data-purchasing-export-form] {
    max-height: calc(100vh - 32px);
}

.purchasing-export-modal-dialog form[data-purchasing-export-form] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.purchasing-export-modal-dialog .modal-body {
    overflow-y: auto;
}

.purchasing-export-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.purchasing-export-options,
.purchasing-export-preview {
    min-width: 0;
}

.purchasing-export-options .bom-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchasing-export-options .compact-choice-list .list-group-item {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    padding: 0.6rem 0.7rem;
    white-space: nowrap;
}

.purchasing-export-options .compact-choice-list .list-group-item.active {
    border: 1px solid #bcd3ff;
}

.purchasing-export-options .compact-choice-list .form-check-input {
    flex: 0 0 auto;
}

.purchasing-export-field-groups .bom-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchasing-export-preview .purchase-draft-confirm-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.purchasing-export-preview .purchase-draft-confirm-table-wrap {
    max-height: 48vh;
    overflow: auto;
}

.purchasing-export-preview .purchase-draft-confirm-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.purchasing-export-preview-filters {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-left: auto;
    min-width: min(420px, 100%);
}

.purchasing-export-filter-set {
    display: flex;
    gap: 10px;
}

.purchasing-export-filter-set label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    margin: 0;
    min-width: 150px;
    text-transform: uppercase;
}

.purchasing-export-filter-set label span {
    display: block;
    margin-bottom: 3px;
}

.purchasing-export-filter-set .form-control {
    min-height: 32px;
}

.purchasing-export-modal-dialog .modal-footer {
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.purchasing-export-modal-dialog .modal-footer .btn {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .purchase-draft-confirm-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .purchasing-export-layout {
        grid-template-columns: 1fr;
    }

    .purchasing-export-preview .purchase-draft-confirm-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .purchase-draft-confirm-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contract-header-actions .btn {
    min-width: 86px;
    white-space: nowrap;
}

.contract-header-actions form {
    margin: 0;
}

.download-choice-group {
    display: grid;
    gap: 6px;
}

.download-contract-option {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    margin-top: 14px;
    padding: 10px 12px 10px 36px;
}

.detail-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid > div {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.detail-grid-full {
    grid-column: 1 / -1;
}

.detail-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.detail-grid strong {
    color: #172033;
    font-size: 0.9rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.purchase-order-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.purchase-order-title span,
.purchase-order-title strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.purchase-order-title span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
}

.purchase-order-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
    padding-right: 16px;
}

.purchase-order-metrics span {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    color: #172033;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    white-space: nowrap;
}

.purchase-order-metrics .purchase-source-pill {
    border-color: transparent;
    color: #fff;
    letter-spacing: 0;
}

.purchase-order-metrics .purchase-source-pill.text-bg-secondary {
    background: #64748b;
}

.purchase-order-metrics .purchase-source-pill.text-bg-info {
    background: #0f766e;
}

.issue-badge-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.issue-badge-list .badge {
    padding: 6px 9px;
    white-space: nowrap;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.component-issues-cell {
    padding-right: 18px;
    white-space: normal;
    width: 132px;
}

.component-issues-table-wrap {
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
}

.component-issues-dialog {
    max-width: 85vw;
    width: 85vw;
}

@media (max-width: 992px) {
    .component-issues-dialog {
        max-width: 96vw;
        width: 96vw;
    }
}

.component-issues-table {
    table-layout: fixed;
    width: 100%;
}

.component-issues-table th,
.component-issues-table td {
    vertical-align: middle;
}

.component-issue-code-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 150px;
}

.component-issues-table .editable {
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
    cursor: text;
}

.component-issues-table .editable:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.42);
    outline: none;
}

.component-issues-table .editable-placeholder {
    align-items: center;
    border: 1px dashed rgba(37, 99, 235, 0.35);
    border-radius: 6px;
    color: #2563eb;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    max-width: 100%;
    padding: 5px 7px;
}

.component-issue-supplier-cell {
    width: 190px;
}

.component-issues-table .cell-name {
    min-width: 0;
    width: auto;
}

.component-issue-price-cell {
    white-space: nowrap;
    width: 124px;
}

.component-issues-table .form-control {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

.component-issues-table .input-group-sm > .btn {
    padding-left: 8px;
    padding-right: 8px;
}

.issue-supplier-combobox {
    min-width: 0;
    position: relative;
    width: 100%;
}

.issue-supplier-combobox .input-group .btn {
    background: #eef6ff;
    border-color: #b8d7ff;
    color: #0f4c81;
    font-weight: 800;
    min-width: 36px;
}

.issue-supplier-combobox .search-combobox-list {
    display: none;
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1085;
}

.issue-supplier-combobox.is-open .search-combobox-list {
    display: block;
}

.allocation-list {
    display: grid;
    gap: 8px;
    min-width: 360px;
}

.allocation-list.compact {
    min-width: 320px;
}

.allocation-card {
    background: #f8fafc;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(105px, 0.8fr) minmax(130px, 1fr) auto;
    padding: 10px;
}

.allocation-card a,
.allocation-card strong,
.allocation-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.allocation-label {
    color: #64748b;
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.allocation-qty {
    min-width: 78px;
    text-align: right;
}

.purchasing-table th:nth-child(7),
.purchasing-table td:nth-child(7) {
    min-width: 120px;
}

.contract-allocation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 180px;
}

.contract-allocation-pill {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #d8dee9;
    border-radius: 999px;
    color: #172033;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 8px;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.contract-actions {
    background: #fff;
    border-bottom: 1px solid #e3e7ee;
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px;
}

.supplier-highlight-row > td {
    background: #eef7ff;
}

.qty-order-form {
    min-width: 150px;
}

.qty-order-input-group {
    margin-left: auto;
    margin-right: auto;
    width: max-content;
}

.qty-order-input {
    max-width: 92px;
}

.qty-order-feedback {
    min-height: 18px;
    padding-top: 3px;
    text-align: center;
}

.quantity-submetric {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 2px;
    text-transform: uppercase;
}


.summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid.supplier-order-detail-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-tile {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 92px;
    padding: 18px 20px;
    position: relative;
}

.summary-value-with-action {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.summary-tile-icon-button {
    flex: 0 0 auto;
    height: 30px;
    width: 30px;
}

.summary-editing-marker {
    align-items: center;
    background: #2563eb;
    border-radius: 999px;
    color: #fff !important;
    display: none;
    font-size: 0.78rem;
    height: 24px;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 24px;
}

.summary-tile-editing-active {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.summary-tile-editing-active .summary-editing-marker {
    display: inline-flex;
}

.summary-tile-soft-danger {
    background: #fff1f2;
    border-color: #fecdd3;
}

.summary-tile-soft-danger span,
.summary-tile-soft-danger strong,
.summary-tile-soft-danger .summary-link {
    color: #7f1d1d;
}

.summary-tile-soft-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.summary-tile-soft-success span,
.summary-tile-soft-success strong,
.summary-tile-soft-success .summary-link,
.summary-tile-soft-success small {
    color: #14532d;
}

.summary-tile-soft-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.summary-tile-soft-warning span,
.summary-tile-soft-warning strong,
.summary-tile-soft-warning .summary-link,
.summary-tile-soft-warning small {
    color: #713f12;
}

.summary-tile span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.summary-tile strong {
    color: #172033;
    font-size: 1.35rem;
    font-weight: 700;
}

.summary-grid.product-production-summary-grid {
    align-items: stretch;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 14px 16px 16px;
}

.summary-grid.product-production-summary-grid .summary-tile {
    height: 100%;
    min-height: 76px;
    padding: 14px 16px;
}

.summary-grid.product-detail-summary-grid {
    align-items: stretch;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-grid.product-detail-summary-grid .summary-tile {
    height: 100%;
}

.summary-grid.components-summary-grid {
    align-items: stretch;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.summary-grid.components-summary-grid .summary-tile {
    height: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .summary-grid.product-production-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .summary-grid.product-detail-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .summary-grid.components-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .summary-grid.supplier-order-detail-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.summary-tile .status-pill {
    font-size: 0.78rem;
    text-transform: none;
}

.summary-tile .status-pill.text-bg-primary,
.summary-tile .status-pill.text-bg-secondary,
.summary-tile .status-pill.text-bg-success,
.summary-tile .status-pill.text-bg-danger {
    color: #fff;
}

.summary-link {
    color: #172033;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.summary-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.summary-metric-list {
    display: grid;
    gap: 6px;
}

.summary-metric-link {
    align-items: baseline;
    color: #172033;
    display: flex;
    gap: 8px;
    line-height: 1.1;
    text-decoration: none;
}

.summary-metric-link strong {
    font-size: 1.18rem;
}

.summary-metric-link span {
    color: #64748b;
    font-size: 0.72rem;
}

.summary-metric-link:hover {
    color: #0d6efd;
    text-decoration: none;
}

.summary-metric-link:hover span {
    color: #0d6efd;
    text-decoration: underline;
}

.summary-action {
    align-items: flex-start;
}

.section-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e3e7ee;
    display: flex;
    justify-content: space-between;
}

.section-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.table-footer {
    display: flex;
    justify-content: flex-end;
}

.empty-state {
    color: #64748b;
    padding: 32px 16px !important;
    text-align: center;
}

@media (max-width: 768px) {
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .table-footer {
        justify-content: flex-start;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid.supplier-order-detail-summary-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-summary-grid {
        grid-template-columns: 1fr;
    }

    .readiness-grid {
        grid-template-columns: 1fr;
    }

    .readiness-next-action {
        grid-column: span 1;
    }

    .readiness-item-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-cockpit-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .order-cockpit-actions {
        justify-content: flex-start;
    }

    .order-product-panel-header {
        grid-template-columns: 1fr;
    }

    .order-product-panel-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-kanban {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1199.98px) {
    .production-kanban {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}
.missing-price {
    background-color: #fde8e8 !important;
    color: #7f1d1d !important;
}

.editable-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editable {
    flex: 1;
    outline: none;
    border-bottom: 1px dashed #ccc;
    padding: 2px 4px;
    white-space: nowrap;
}

.editable.saving {
    cursor: progress;
    opacity: 0.65;
}

.save-toast-stack {
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(520px, calc(100vw - 32px));
    width: max-content;
}

.save-toast {
    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-left: 4px solid #198754;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    color: #172033;
    font-size: 0.9rem;
    padding: 12px 14px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.save-toast-error {
    border-left-color: #dc3545;
}

.save-toast-info {
    border-left-color: #0d6efd;
}

.save-toast-warning {
    border-left-color: #f0ad4e;
}

.save-toast.hide {
    opacity: 0;
    transform: translateY(-6px);
}

.app-modal {
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.app-modal .modal-header {
    background: #f8fafc;
    border-bottom-color: #e3e7ee;
}

.modal-header-actions {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.modal-heading {
    min-width: 0;
}

.modal-section-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
}

.modal-section-card-action {
    background: #f8fafc;
}

.modal-section-title {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.app-modal .modal-title {
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
}

.app-confirm-dialog {
    max-width: min(980px, calc(100vw - 32px));
}

#appConfirmModal.has-reserve-components-confirm .app-confirm-dialog {
    --bs-modal-width: 85vw;
    max-width: min(85vw, calc(100vw - 32px)) !important;
    width: min(85vw, calc(100vw - 32px)) !important;
}

.app-confirm-dialog.app-confirm-dialog-wide {
    --bs-modal-width: 85vw;
    max-width: min(85vw, calc(100vw - 32px)) !important;
    width: min(85vw, calc(100vw - 32px)) !important;
}

.app-confirm-modal {
    display: flex;
    flex-direction: column;
    max-height: min(780px, calc(100vh - 48px));
    min-height: 0;
}

.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
    flex: 0 0 auto;
}

.app-confirm-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.app-confirm-modal .modal-footer {
    background: #ffffff;
    border-top-color: #e3e7ee;
}

.reserve-components-confirm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(560px, calc(100vh - 260px));
    min-height: 0;
}

.reserve-components-confirm > p {
    flex: 0 0 auto;
}

.reserve-components-confirm-list {
    border: 1px solid #e3e7ee;
    border-radius: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.reserve-components-confirm-list thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

#appConfirmModal.has-reserve-components-confirm .modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#appConfirmModal.has-reserve-components-confirm #appConfirmBody {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#appConfirmModal.has-reserve-components-confirm .reserve-components-confirm {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

#appConfirmModal.has-reserve-components-confirm .reserve-components-confirm-list {
    max-height: none;
}

.modal-scroll-form {
    display: flex;
    flex-direction: column;
    max-height: min(860px, calc(100vh - 56px));
    min-height: 0;
}

.modal-scroll-form .modal-header,
.modal-scroll-form .modal-footer {
    flex: 0 0 auto;
}

.modal-scroll-form .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.modal-scroll-form .modal-footer {
    background: #ffffff;
    border-top-color: #e3e7ee;
}

.modal-xxl {
    max-width: min(1480px, calc(100vw - 48px));
}

.add-item-dialog {
    max-width: min(1120px, calc(100vw - 48px));
}

.component-new-form hr {
    margin: 1rem 0;
}

.component-new-form h6 {
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.component-form-combobox {
    position: relative;
}

.component-form-combobox .search-combobox-list {
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1085;
}

.component-form-combobox.is-open .search-combobox-list {
    display: block;
}

.add-item-quantity-block {
    border-top: 1px solid #e3e7ee;
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.add-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 1100px) {
    .contract-accordion-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .contract-accordion-header .accordion-button {
        padding-right: 20px;
    }

    .contract-accordion-header .accordion-button::after {
        position: static;
    }

    .contract-header-actions {
        background: #f8fafc;
        border-top: 1px solid #e3e7ee;
        justify-content: flex-end;
        padding: 10px 12px;
        position: static;
        transform: none;
    }
}

@media (max-width: 640px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .contract-header-actions {
        flex-wrap: wrap;
    }
}

.cell-wrap,
.editable.cell-wrap {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
}

.cell-truncate,
.editable.cell-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.component-supplier.cell-truncate {
    overflow: visible;
}

.cell-name {
    min-width: 180px;
    max-width: 320px;
}

.cell-code {
    min-width: 130px;
    max-width: 220px;
}

.cell-description {
    min-width: 360px;
    max-width: 760px;
}

.data-table .cell-description {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
}

.unit-label {
    white-space: nowrap;
    color: #666;
    font-size: 0.9em;
}

tr.missing-price > td {
    background-color: #fde8e8 !important;
    color: #7f1d1d !important;
}

tr.component-issue-row > td {
    background-color: #fde8e8 !important;
    color: #7f1d1d !important;
}

.component-issue-row .product-components-grid-cell {
    background-color: #fde8e8 !important;
    color: #7f1d1d !important;
}

.supplier-inline-combobox {
    min-width: 12rem;
    max-width: 16rem;
}

.supplier-inline-combobox .search-combobox-list {
    min-width: 15rem;
}

tr.component-issue-row .price-field,
tr.component-issue-row .missing-price,
.component-issue-row .product-components-grid-cell .price-field,
.component-issue-row .product-components-grid-cell .missing-price {
    font-weight: 700;
}

.container-fluid .row {
    display: flex;
}

.editor-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* nascosta */
    width: 400px;
    height: 100%;
    background: #fff;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.editor-sidebar.open {
    right: 0;
}

.supplier-order-quantity-cell {
    min-width: 110px;
}

.supplier-order-detail-lines-grid {
    min-width: 1160px;
}

.supplier-order-detail-lines-row {
    grid-template-columns:
        minmax(260px, 1.6fr)
        minmax(150px, 0.8fr)
        minmax(104px, 0.48fr)
        minmax(92px, 0.42fr)
        minmax(98px, 0.44fr)
        minmax(120px, 0.54fr)
        minmax(64px, 0.28fr)
        minmax(110px, 0.5fr)
        minmax(124px, 0.58fr)
        minmax(76px, 0.34fr);
}

.supplier-order-detail-lines-grid .app-grid-header {
    align-items: center;
}

.supplier-order-detail-lines-grid .supplier-order-quantity-cell {
    min-width: 0;
    width: auto;
}

.supplier-order-receive-now-input {
    display: inline-block;
    max-width: 96px;
}

.supplier-order-receive-grid {
    min-width: 720px;
}

.supplier-order-receive-row {
    grid-template-columns:
        minmax(240px, 1.6fr)
        minmax(90px, 0.5fr)
        minmax(90px, 0.5fr)
        minmax(90px, 0.5fr)
        minmax(128px, 0.65fr);
}

.supplier-order-receive-grid .app-grid-header {
    align-items: center;
}

.supplier-order-receive-grid .supplier-order-receive-now-input {
    display: inline-block;
    max-width: 112px;
}

.supplier-order-line-quantity-form .input-group {
    flex-wrap: nowrap;
    margin-left: auto;
    max-width: 170px;
}

.supplier-order-line-quantity-input {
    min-width: 74px;
}

.supplier-order-allocation-preview-row > td {
    background: #f8fafc;
    border-top: 0;
    padding: 0 12px 14px;
}

.supplier-order-allocation-preview {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    overflow: hidden;
}

.supplier-order-allocation-preview .compact-section-header {
    background: #fff;
    border-bottom: 1px solid #e5edf6;
    padding: 10px 12px;
}

.supplier-order-allocation-preview .compact-section-header h5 {
    font-size: 0.9rem;
    margin: 0;
}

.supplier-order-preview-status {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.supplier-order-allocation-table th,
.supplier-order-allocation-table td {
    font-size: 0.82rem;
    padding: 8px 10px;
}

.supplier-order-contract-pills {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.supplier-order-contract-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 500;
    min-height: 22px;
    padding: 3px 7px;
}

.supplier-order-line-detail-dialog {
    max-width: 85%;
}

.supplier-order-line-detail-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-order-line-detail-quantity {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 12px;
}

.supplier-order-line-detail-quantity .input-group {
    min-width: 220px;
}

.supplier-order-readonly-quantity {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    color: #334155;
    display: inline-flex;
    justify-content: flex-end;
    min-width: 120px;
    padding: 6px 10px;
}

@media (max-width: 1100px) {
    .supplier-order-line-detail-dialog {
        max-width: 96%;
    }

    .supplier-order-line-detail-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .supplier-order-line-detail-quantity {
        align-items: stretch;
        flex-direction: column;
    }
}

.editor-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-body {
    padding: 15px;
    overflow-y: auto;
}

.cost-item-toggle-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    padding: 14px 14px 14px 16px;
}

.cost-item-switch {
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-left: 0;
}

.cost-item-switch .form-check-input {
    width: 3rem;
    height: 1.55rem;
    margin-left: 0;
    margin-top: 2px;
    flex: 0 0 auto;
}

.cost-item-switch .form-check-label {
    color: #7c2d12;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.25;
}

.cost-item-switch .form-check-label strong {
    font-size: 0.98rem;
}

.cost-item-switch .form-check-label span {
    color: #9a3412;
    font-size: 0.82rem;
}

.content.shifted {
    margin-right: 0;
}

.similar-import-block {
    background: #fff9ed;
    border: 1px solid #ecd7a7;
    border-left: 4px solid #d99b20;
    padding: 12px;
}

.similar-import-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.unresolved-import-row > td {
    border-top: 12px solid #f4f6f8;
    background: #fff;
}

.unresolved-table-wrapper {
    overflow-x: visible;
}

.unresolved-table {
    table-layout: fixed;
    width: 100%;
}

.unresolved-table .cell-code,
.unresolved-table .cell-description {
    min-width: 0;
    max-width: none;
}

.unresolved-col-part {
    width: 15%;
}

.unresolved-col-description {
    width: 25%;
}

.unresolved-col-type {
    width: 10%;
}

.unresolved-col-spec {
    width: 20%;
}

.unresolved-col-source {
    width: 10%;
}

.unresolved-col-status {
    width: 20%;
}

.unresolved-table td,
.unresolved-table th {
    overflow-wrap: anywhere;
    word-break: normal;
}

.unresolved-table .badge {
    max-width: 100%;
    white-space: normal;
}

.unresolved-action-select {
    width: 120px;
}

.status-cell {
    min-width: 230px;
}

.unresolved-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    white-space: nowrap;
}

.unresolved-row-actions .btn {
    flex: 0 0 auto;
}

.unresolved-table .status-cell {
    min-width: 0;
}

.unresolved-table .unresolved-row-actions {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    white-space: nowrap;
}

.unresolved-table .unresolved-row-actions .btn,
.unresolved-table .unresolved-action-select {
    min-width: 0;
    width: auto;
}

.unresolved-table .unresolved-row-actions .btn {
    font-size: 0.84rem;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
}

.unresolved-status-badge {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-width: 92px;
    padding: 0.42rem 0.68rem;
}

.unresolved-status-associated {
    background: #dff3e8;
    border: 1px solid #a8d9bd;
    color: #14532d;
}

.unresolved-status-imported {
    background: #e4efff;
    border: 1px solid #b8cff5;
    color: #174078;
}

.similar-import-row > td {
    background: #fff;
    border-bottom: 12px solid #f4f6f8;
    padding-top: 0;
}

.select-cell {
    width: 64px;
    text-align: center;
}

.unresolved-compare-section {
    border: 1px solid #e1e6eb;
    background: #fff;
    padding: 12px;
}

/* =========================
DASHBOARD
========================= */
.dashboard-shell {
    display: grid;
    gap: 16px;
}

.dashboard-header {
    align-items: flex-start;
}

.dashboard-subtitle {
    color: #64748b;
    margin: 4px 0 0;
}

.dashboard-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi {
    align-items: center;
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    color: #172033;
    display: flex;
    gap: 10px;
    min-height: 112px;
    padding: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-kpi:hover {
    border-color: #b8c6d8;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #172033;
    transform: translateY(-1px);
}

.dashboard-kpi-icon {
    align-items: center;
    border-radius: 8px;
    display: flex;
    flex: 0 0 38px;
    font-size: 1.15rem;
    height: 38px;
    justify-content: center;
}

.dashboard-kpi span,
.dashboard-quality-item span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-kpi strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.05;
}

.dashboard-kpi small {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
}

.dashboard-kpi-primary .dashboard-kpi-icon {
    background: #e8f1ff;
    color: #0d6efd;
}

.dashboard-kpi-warning .dashboard-kpi-icon {
    background: #fff6dc;
    color: #9a6700;
}

.dashboard-kpi-success .dashboard-kpi-icon {
    background: #e7f8ef;
    color: #177245;
}

.dashboard-kpi-info .dashboard-kpi-icon {
    background: #e6f7fb;
    color: #087990;
}

.dashboard-kpi-secondary .dashboard-kpi-icon {
    background: #eef2f7;
    color: #475569;
}

.dashboard-kpi-danger .dashboard-kpi-icon {
    background: #fff1f2;
    color: #be123c;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 16px;
}

.dashboard-two-col {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
    overflow: hidden;
}

.dashboard-card-header {
    padding: 16px 18px;
}

.dashboard-card-header h4 {
    margin: 0;
}

.dashboard-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-chart-toggle .btn {
    min-width: 48px;
}

.dashboard-card-body {
    padding: 18px;
}

.dashboard-bar-stack {
    display: grid;
    gap: 12px;
}

.dashboard-bar-row {
    color: #172033;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 0.7fr) minmax(160px, 1fr) 56px;
    text-decoration: none;
}

.dashboard-bar-row:hover {
    color: #0d6efd;
}

.dashboard-bar-label {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.dashboard-bar-label .badge {
    border-radius: 6px;
    padding: 6px 8px;
}

.dashboard-bar-label strong,
.dashboard-bar-percent {
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
}

.dashboard-bar-track,
.dashboard-quality-meter {
    background: #eef2f7;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.dashboard-bar-track {
    align-self: center;
}

.dashboard-bar-track span,
.dashboard-quality-meter span {
    background: linear-gradient(90deg, #2563eb, #14b8a6);
    display: block;
    height: 100%;
}

.dashboard-pie-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(240px, 280px) minmax(180px, 1fr);
    justify-content: stretch;
}

.dashboard-pie-chart {
    align-items: center;
    aspect-ratio: 1;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: center;
    margin: 0 auto;
    max-width: 280px;
    position: relative;
    width: 100%;
}

.dashboard-pie-chart span {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    color: #172033;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 8px 14px;
    position: relative;
    z-index: 1;
}

.dashboard-pie-legend {
    align-self: start;
    display: grid;
    gap: 6px;
    max-width: 360px;
    min-width: 0;
    justify-self: end;
    width: 100%;
}

.dashboard-pie-legend-row {
    align-items: center;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    color: #172033;
    display: grid;
    gap: 8px;
    grid-template-columns: 10px minmax(0, 1fr) auto 42px;
    min-height: 34px;
    padding: 6px 8px;
    text-decoration: none;
}

.dashboard-pie-legend-row:hover {
    border-color: #b8c6d8;
    color: #0d6efd;
}

.dashboard-pie-legend-row.is-muted {
    background: #f8fafc;
    color: #64748b;
}

.dashboard-pie-legend-row.is-muted i {
    opacity: 0.45;
}

.dashboard-pie-legend-row i {
    border-radius: 999px;
    display: block;
    height: 10px;
    width: 10px;
}

.dashboard-pie-legend-row span {
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-pie-legend-row strong,
.dashboard-pie-legend-row small {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 800;
    text-align: right;
}

.dashboard-two-col .dashboard-pie-layout {
    gap: 14px;
    grid-template-columns: minmax(190px, 220px) minmax(150px, 1fr);
}

.dashboard-two-col .dashboard-pie-chart {
    max-width: 220px;
}

.dashboard-quality-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 18px;
}

.dashboard-quality-item {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    color: #172033;
    display: grid;
    gap: 12px;
    min-height: 112px;
    padding: 16px;
    text-decoration: none;
}

.dashboard-quality-item strong {
    display: block;
    font-size: 1.5rem;
}

.dashboard-quality-danger {
    background: #fff7f7;
    border-color: #fecdd3;
}

.create-mode-selector {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-mode-selector .btn {
    align-items: flex-start;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    gap: 4px;
    justify-content: flex-start;
    min-height: 74px;
    padding: 12px 14px;
    text-align: left;
}

.create-mode-selector .btn span {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
}

.create-mode-selector .btn-check:checked + .btn span {
    color: rgba(255, 255, 255, 0.84);
}

.dashboard-quality-warning {
    background: #fffaf0;
    border-color: #fde68a;
}

.dashboard-quality-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-action-list,
.dashboard-list {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.dashboard-action-item,
.dashboard-list-row {
    align-items: center;
    border: 1px solid #e3e7ee;
    border-radius: 8px;
    color: #172033;
    display: grid;
    gap: 10px;
    text-decoration: none;
}

.dashboard-action-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 12px;
}

.dashboard-action-item i {
    align-items: center;
    background: #eef2f7;
    border-radius: 8px;
    display: flex;
    height: 34px;
    justify-content: center;
}

.dashboard-action-item strong {
    font-size: 1.1rem;
}

.dashboard-action-danger i {
    background: #fff1f2;
    color: #be123c;
}

.dashboard-action-warning i {
    background: #fff6dc;
    color: #9a6700;
}

.dashboard-action-primary i,
.dashboard-action-info i {
    background: #e8f1ff;
    color: #0d6efd;
}

.dashboard-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.dashboard-action-item:hover,
.dashboard-list-row:hover,
.dashboard-quality-item:hover {
    border-color: #b8c6d8;
    color: #0d6efd;
}

.dashboard-list-row strong,
.dashboard-list-row span {
    display: block;
}

.dashboard-list-row > div span {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
}

.dashboard-dot {
    background: #dc3545;
    border-radius: 999px;
    height: 10px;
    width: 10px;
}

@media (max-width: 1100px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }

    .dashboard-quality-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-pie-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-kpi-grid,
    .dashboard-quality-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-bar-row {
        grid-template-columns: 1fr;
    }
}
