@supports (font-variation-settings: normal) {
    :root {
        font-synthesis: none;
    }
}

:root {
    --mint-50: #f3fbf7;
    --mint-100: #e1f5ed;
    --mint-200: #c5eadc;
    --mint-400: #62bea7;
    --mint-500: #3aa88f;
    --mint-700: #237562;
    --ink: #20332f;
    --muted: #6d807a;
    --line: #cfe0da;
    --panel: rgba(255, 255, 255, .92);
    --shadow-soft: 0 10px 28px rgba(33, 90, 77, .08);
}

body {
    background:
        radial-gradient(circle at 10% 0%, rgba(98, 190, 167, .16), transparent 32rem),
        linear-gradient(180deg, #f8fcfa 0%, var(--mint-50) 52%, #eef8f4 100%);
    color: var(--ink);
    font-family: "IBM Plex Sans Condensed", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
    min-height: 100vh;
}

.app-navbar {
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(32, 51, 47, .05);
    backdrop-filter: blur(14px);
}

.navbar-brand {
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--mint-700);
}

.navbar-text {
    color: var(--muted);
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0;
}

.btn-primary {
    --bs-btn-bg: var(--mint-500);
    --bs-btn-border-color: var(--mint-500);
    --bs-btn-hover-bg: #2f967f;
    --bs-btn-hover-border-color: #2f967f;
    --bs-btn-active-bg: var(--mint-700);
    --bs-btn-active-border-color: var(--mint-700);
}

.btn-outline-primary {
    --bs-btn-color: var(--mint-700);
    --bs-btn-border-color: #8bd2c1;
    --bs-btn-hover-bg: var(--mint-100);
    --bs-btn-hover-border-color: var(--mint-500);
    --bs-btn-hover-color: var(--mint-700);
    --bs-btn-active-bg: var(--mint-200);
    --bs-btn-active-border-color: var(--mint-500);
    --bs-btn-active-color: var(--ink);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-light {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--mint-100);
    --bs-btn-hover-border-color: var(--mint-400);
    --bs-btn-hover-color: var(--mint-700);
    --bs-btn-active-bg: var(--mint-200);
    --bs-btn-active-border-color: var(--mint-500);
    --bs-btn-active-color: var(--ink);
}

.btn-dark {
    --bs-btn-bg: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-bg: var(--mint-700);
    --bs-btn-hover-border-color: var(--mint-700);
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 999px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mint-400);
    box-shadow: 0 0 0 .2rem rgba(58, 168, 143, .16);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: .32em .62em;
}

.text-bg-success {
    background: #dff5ee !important;
    color: #17735d !important;
}

.text-bg-info {
    background: #dfeff3 !important;
    color: #346c78 !important;
}

.text-bg-warning {
    background: #fff1ce !important;
    color: #89640d !important;
}

.text-bg-danger {
    background: #fde2e8 !important;
    color: #a13d57 !important;
}

.text-bg-secondary {
    background: #edf3f1 !important;
    color: #607670 !important;
}

.login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 90px);
}

.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    max-width: 380px;
    padding: 20px;
    width: 100%;
}

.toolbar-band {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 14px;
}

.tool-panel {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 100%;
    padding: 14px;
}

.users-table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
    margin-bottom: 0;
}

.users-table thead th {
    color: #38584f;
    font-size: 13px;
    font-weight: 700;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.user-row-grid {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(110px, .55fr) minmax(110px, .55fr) minmax(180px, 1fr) auto;
}

@media (max-width: 991.98px) {
    .user-row-grid {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .user-row-grid .text-end {
        text-align: left !important;
    }
}

.stat-pill {
    background: var(--mint-100);
    border: 1px solid var(--mint-200);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    gap: 4px;
    padding: 6px 11px;
}

.import-progress {
    margin-top: 10px;
}

.import-progress .progress {
    background: #e0eee9;
    border-radius: 999px;
    height: 10px;
}

.import-progress .progress-bar {
    background: var(--mint-500);
    transition: width 160ms linear;
}

.import-progress.is-processing .progress-bar {
    animation: progress-bar-stripes 1s linear infinite;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .25) 50%, rgba(255, 255, 255, .25) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.import-progress.is-error .progress-bar {
    background: #c34d68;
}

.import-progress-feed {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    margin-top: 10px;
    max-height: 210px;
    overflow: auto;
}

.import-progress-item {
    align-items: center;
    background: #f9fcfb;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 7px;
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 58px;
    padding: 6px;
}

.import-progress-item img {
    background: #fff;
    border: 1px solid #dbeae5;
    border-radius: 9px;
    height: 44px;
    object-fit: contain;
    width: 44px;
}

.import-progress-item .title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-progress-item .detail {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-progress-item.is-unmatched {
    background: #fff8ed;
    border-color: #f4d8a8;
}

.empty-state {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    padding: 24px;
}

.production-grid-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: auto;
    max-height: calc(100vh - 260px);
}

.production-grid {
    --bs-table-bg: transparent;
    --bs-table-border-color: #dbeae5;
    --bs-table-color: var(--ink);
    margin-bottom: 0;
    min-width: 2200px;
}

.production-grid thead th {
    background: #e6f3ee;
    color: #2e5148;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 3;
}

.sticky-col {
    left: 0;
    position: sticky;
    z-index: 2;
}

.production-grid thead .sticky-col {
    z-index: 4;
}

.product-col {
    background: #f8fcfa;
    min-width: 250px;
    width: 250px;
}

.product-info {
    font-weight: 400;
    vertical-align: top;
}

.product-reference {
    color: var(--mint-700);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 4px;
}

.view-col {
    min-width: 205px;
    width: 205px;
}

.view-cell {
    background: #e8f7f1;
    height: 300px;
    min-width: 205px;
    padding: 6px;
    position: relative;
    vertical-align: top;
    width: 205px;
}

.view-cell.missing,
.view-cell.not-expected {
    background: #f6fcf9;
}

.view-cell.has-image {
    background: rgba(255, 255, 255, .9);
}

.view-cell[data-bulk-select-tile] {
    cursor: crosshair;
    user-select: none;
}

.view-cell.is-bulk-selected {
    box-shadow: inset 0 0 0 3px var(--mint-500);
}

.view-cell.status-done {
    border: 2px solid #78c8b6;
}

.view-cell.status-error {
    border: 2px solid #d9738a;
}

.thumb {
    background: #edf6f2;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: block;
    height: 145px;
    object-fit: contain;
    width: 100%;
}

.thumb.is-result-thumb {
    background-color: #f3f8f6;
    background-image:
        linear-gradient(45deg, #d6e6e1 25%, transparent 25%),
        linear-gradient(-45deg, #d6e6e1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d6e6e1 75%),
        linear-gradient(-45deg, transparent 75%, #d6e6e1 75%);
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-size: 12px 12px;
}

.filename {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a {
    color: var(--mint-700);
}

a:hover {
    color: #185f50;
}

code {
    color: #2d7565;
}

.alert {
    border-radius: 14px;
}

.meta,
.job,
.removit-state,
.removit-param {
    color: var(--muted);
    font-size: 11px;
}

.removit-param code {
    color: #355a51;
    display: inline-block;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.removit-config-result {
    color: #277563;
}

.removit-config-result code {
    color: #174f43;
    display: inline-block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.cell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.bulk-send-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.image-select-check {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: flex;
    height: 24px;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 24px;
    z-index: 1;
}

.image-select-check input {
    margin: 0;
}

.btn-xs {
    --bs-btn-font-size: 11px;
    --bs-btn-padding-x: 6px;
    --bs-btn-padding-y: 2px;
}

.thumb-button {
    background: none;
    border: 0;
    display: block;
    padding: 0;
    width: 100%;
}

.thumb-button:focus-visible {
    outline: 3px solid var(--mint-500);
    outline-offset: 2px;
}

.result-modal .modal-body {
    background-color: #f3f8f6;
    background-image:
        linear-gradient(45deg, #d6e6e1 25%, transparent 25%),
        linear-gradient(-45deg, #d6e6e1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d6e6e1 75%),
        linear-gradient(-45deg, transparent 75%, #d6e6e1 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    min-height: 55vh;
}

.result-modal-meta {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 8px;
}

.result-modal-stage {
    position: relative;
}

.result-modal-nav {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(33, 90, 77, .16);
    display: flex;
    font-size: 24px;
    height: 42px;
    justify-content: center;
    opacity: .94;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    z-index: 2;
}

.result-modal-nav:disabled {
    display: none;
}

.result-modal-nav-prev {
    left: 12px;
}

.result-modal-nav-next {
    right: 12px;
}

.result-modal-image {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: block;
    max-height: 72vh;
    object-fit: contain;
    width: 100%;
}

.error-details {
    font-size: 11px;
    margin-top: 5px;
}

.error-details pre {
    background: #fff1f4;
    border: 1px solid #f4bcc8;
    border-radius: 10px;
    max-height: 140px;
    overflow: auto;
    padding: 6px;
    white-space: pre-wrap;
}

.virtual-grid-spacer td {
    background: transparent;
    border: 0;
    padding: 0;
}

.virtual-grid-spacer-block {
    height: var(--virtual-spacer-height, 0px);
}

.placeholder-card {
    align-items: center;
    background: #dff3ec;
    border: 1px solid #bee4d6;
    border-radius: 14px;
    color: #5c8175;
    display: flex;
    font-size: 12px;
    height: 100%;
    justify-content: center;
    min-height: 280px;
    text-transform: uppercase;
}

.unmatched-card {
    background: #fff;
    border: 1px solid #d8dde4;
    padding: 12px;
}

.unmatched-thumb {
    background: #f0f2f4;
    border: 1px solid #d8dde4;
    display: block;
    height: 150px;
    margin-bottom: 8px;
    object-fit: contain;
    width: 100%;
}
