:root {
    --bg: #f3f6fb;
    --bg-deep: #e8eef8;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text: #11203a;
    --muted: #64748b;
    --primary: #0f4c81;
    --primary-2: #1d74b8;
    --accent: #16a085;
    --accent-2: #f59e0b;
    --border: rgba(15, 76, 129, 0.12);
    --shadow: 0 18px 45px rgba(17, 32, 58, 0.10);
    --shadow-soft: 0 10px 26px rgba(17, 32, 58, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text);
    padding-bottom: 24px;
    background:
        radial-gradient(circle at top left, rgba(29, 116, 184, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(22, 160, 133, 0.12), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 76, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 76, 129, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 72%);
    z-index: -1;
}

.navbar {
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.navbar.navbar-dark.bg-primary {
    background: linear-gradient(90deg, #0d3864 0%, #0f4c81 45%, #1362a2 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.86) !important;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.container {
    position: relative;
}

.page-hero {
    position: relative;
    margin: 1.25rem 0 1.5rem;
    padding: 1.5rem 1.6rem;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 56, 100, 0.96), rgba(15, 76, 129, 0.92) 46%, rgba(22, 160, 133, 0.88)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.20);
    color: #fff;
}

.page-hero::before,
.page-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(2px);
}

.page-hero::before {
    width: 180px;
    height: 180px;
    right: -40px;
    top: -60px;
    background: rgba(255, 255, 255, 0.12);
}

.page-hero::after {
    width: 120px;
    height: 120px;
    right: 120px;
    bottom: -40px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-title {
    margin-top: 0.9rem;
    margin-bottom: 0.55rem;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
}

.hero-copy {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.02rem;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.88rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.draft-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.48rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.draft-status-pill i {
    color: #d8f8e9;
}

.hero-actions .btn {
    min-width: 140px;
}

.section-card {
    margin-top: 1.35rem;
}

.section-card .card-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.missing-info-highlight {
    border-color: #f0b429 !important;
    box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.25), 0 14px 38px rgba(240, 180, 41, 0.18);
    animation: missingPulse 1.8s ease-in-out infinite;
}

.missing-info-modal {
    border: 2px solid rgba(240, 180, 41, 0.7);
    box-shadow: 0 18px 60px rgba(15, 76, 129, 0.18);
}

.section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.section-subtitle {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: var(--surface);
    backdrop-filter: blur(12px);
}

.card-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 247, 252, 0.96));
    border-bottom: 1px solid rgba(15, 76, 129, 0.08);
}

.card-header.bg-primary {
    color: #fff;
    background: linear-gradient(90deg, #0f4c81 0%, #1362a2 100%) !important;
}

.card-body {
    padding: 1.35rem;
}

.card-footer {
    background: rgba(255, 255, 255, 0.82);
    border-top: 1px solid rgba(15, 76, 129, 0.08);
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.btn-primary {
    background: linear-gradient(180deg, #1d74b8, #0f4c81);
    border-color: transparent;
}

.btn-success {
    background: linear-gradient(180deg, #18b394, #12937a);
    border-color: transparent;
}

.btn-info {
    background: linear-gradient(180deg, #3bb8d4, #1a8fb0);
    border-color: transparent;
    color: #fff;
}

.btn-warning {
    background: linear-gradient(180deg, #ffbe55, #f59e0b);
    border-color: transparent;
    color: #1f2937;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-info,
.btn-outline-success,
.btn-outline-danger {
    border-width: 1.5px;
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: rgba(15, 76, 129, 0.16);
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(29, 116, 184, 0.45);
    box-shadow: 0 0 0 0.24rem rgba(29, 116, 184, 0.14) !important;
}

.form-text,
.text-muted {
    color: var(--muted) !important;
}

.table {
    margin-bottom: 0;
    color: var(--text);
}

.table thead th {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, rgba(240, 244, 250, 0.95), rgba(232, 239, 247, 0.95));
    border-bottom: 1px solid rgba(15, 76, 129, 0.10);
}

.table-hover tbody tr:hover {
    background: rgba(29, 116, 184, 0.045);
}

.table-responsive {
    border-radius: 18px;
    overflow: hidden;
}

.product-row,
.search-suggestion {
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.product-row:hover {
    transform: translateY(-1px);
}

.product-thumb {
    position: relative;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #f4f7fb;
    color: #8a99aa;
    padding: 0;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb i {
    position: absolute;
    font-size: 1.1rem;
    opacity: 0;
}

.product-thumb:hover {
    border-color: #0f4c81;
    box-shadow: 0 8px 20px rgba(15, 76, 129, 0.14);
    transform: translateY(-1px);
}

.product-thumb-empty,
.product-thumb-missing {
    cursor: default;
}

.product-thumb-empty i,
.product-thumb-missing i {
    position: static;
    opacity: 1;
}

.product-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 32, 51, 0.58);
    backdrop-filter: blur(8px);
    animation: fadeIn 140ms ease both;
}

.product-image-lightbox-panel {
    position: relative;
    display: grid;
    gap: 12px;
    max-width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 32, 51, 0.26);
}

.product-image-lightbox-panel img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 6px;
    background: #f4f7fb;
}

.product-image-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #102033;
}

.product-image-lightbox-caption {
    display: grid;
    gap: 2px;
    color: #42556d;
}

.product-image-lightbox-caption strong {
    color: #102033;
}

.detail-product-image {
    display: grid;
    width: 132px;
    height: 132px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #f4f7fb;
}

.detail-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-product-image-empty {
    color: #8a99aa;
    gap: 6px;
}

.product-detail-hero {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e4ebf3;
}

.product-detail-hero h5 {
    margin: 0 0 6px;
    color: #102033;
    font-weight: 800;
}

.product-detail-hero p {
    margin: 0;
    color: #52647b;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.invalid-item {
    background: rgba(220, 53, 69, 0.05);
}

.search-suggestion {
    border-radius: 12px !important;
    border: 1px solid rgba(15, 76, 129, 0.08);
    margin-bottom: 0.35rem;
}

#searchSuggestions {
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--shadow-soft);
    border-radius: 14px;
}

.stat-card {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 252, 0.92));
    border: 1px solid rgba(15, 76, 129, 0.08);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.stat-value {
    font-size: 1.7rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    margin-top: 0.35rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(29, 116, 184, 0.12), rgba(22, 160, 133, 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.10);
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.quick-link:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
}

.glass-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
}

.stack-gap > * + * {
    margin-top: 1.15rem;
}

.soft-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 76, 129, 0.16), transparent);
    margin: 1rem 0;
}

.alert {
    border-radius: 18px;
    border: 1px solid rgba(15, 76, 129, 0.10);
}

.modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.20);
}

.modal-header {
    background: linear-gradient(90deg, rgba(15, 76, 129, 0.08), rgba(22, 160, 133, 0.06));
    border-bottom: 1px solid rgba(15, 76, 129, 0.08);
}

.modal-footer {
    background: rgba(247, 250, 253, 0.95);
}

.global-alert {
    border-radius: 18px;
}

.spinner-container,
.empty-state {
    padding: 2rem 1rem;
    text-align: center;
}

.spinner-container .spinner,
.spinner-container .spinner-border {
    margin: 0 auto;
}

.loading {
    opacity: 0.85;
}

.page-link {
    border-radius: 12px !important;
    margin: 0 0.18rem;
    border-color: rgba(15, 76, 129, 0.12);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

code {
    color: #0f4c81;
}

.detail-panel,
#detailPanel {
    border: 1px solid rgba(15, 76, 129, 0.12);
    box-shadow: var(--shadow);
}

.progress {
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.10);
}

.progress-bar {
    border-radius: inherit;
}

@keyframes missingPulse {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.25), 0 14px 38px rgba(240, 180, 41, 0.18);
    }

    50% {
        box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.35), 0 18px 48px rgba(240, 180, 41, 0.28);
    }
}

@media (max-width: 991.98px) {
    .card-body {
        padding: 1rem;
    }

    .navbar .nav-link {
        margin-top: 0.35rem;
    }
}

@media (max-width: 767.98px) {
    .stat-value {
        font-size: 1.45rem;
    }

    .table thead th {
        white-space: nowrap;
    }
}

/* Workflow workspace */
.workflow-body {
    background: #f6f8fb;
    padding-bottom: 0;
}

.workflow-shell {
    width: min(1800px, 100%);
    margin: 0 auto;
    padding: 28px 28px 36px;
}

.workflow-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 24px;
    padding: 18px 0 24px;
    animation: workflowEnter 420ms ease both;
}

.workflow-draft-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    color: #52647b;
    font-size: 0.84rem;
    white-space: nowrap;
}

.workflow-draft-status i {
    color: #137a5b;
}

.workflow-kicker {
    margin: 0 0 8px;
    color: #49627d;
    font-size: 0.82rem;
    font-weight: 700;
}

.workflow-header h1 {
    max-width: 920px;
    margin: 0;
    color: #102033;
    font-size: clamp(2rem, 3vw, 3.45rem);
    line-height: 1.08;
    font-weight: 800;
}

.workflow-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid #d8e1ec;
    border-radius: 10px;
    background: #d8e1ec;
}

.workflow-status-strip div {
    min-height: 76px;
    padding: 12px 18px;
    background: #fff;
}

.workflow-status-strip span {
    display: block;
    color: #102033;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
}

.workflow-status-strip small {
    display: block;
    margin-top: 8px;
    color: #607086;
}

.workflow-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(520px, 1.55fr) minmax(260px, 0.72fr);
    gap: 18px;
    align-items: stretch;
}

.workflow-input,
.workflow-main,
.workflow-output {
    min-width: 0;
    min-height: calc(100svh - 178px);
    padding: 22px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 40px rgba(16, 32, 51, 0.08);
    animation: workflowRise 520ms ease both;
}

.workflow-main {
    animation-delay: 70ms;
}

.workflow-output {
    animation-delay: 120ms;
}

.workflow-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid #e4ebf3;
}

.workflow-section-head > span {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: #102033;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.workflow-section-head h2 {
    margin: 0;
    color: #102033;
    font-size: 1.12rem;
    font-weight: 800;
}

.workflow-section-head p {
    margin: 4px 0 0;
    color: #65758b;
    font-size: 0.9rem;
}

.workflow-upload {
    display: grid;
    place-items: center;
    min-height: 156px;
    margin-top: 22px;
    padding: 22px;
    border: 1px dashed #9fb3ca;
    border-radius: 8px;
    background: #f8fafc;
    color: #42556d;
    text-align: center;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.workflow-upload:hover {
    border-color: #0f4c81;
    background: #f2f7fb;
    transform: translateY(-1px);
}

.workflow-upload.is-parsing {
    border-color: #0f4c81;
    background: #eef7ff;
    cursor: progress;
    transform: none;
}

.workflow-upload.is-parsing i {
    animation: workflowSpin 900ms linear infinite;
}

.workflow-upload input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.workflow-upload i {
    color: #0f4c81;
    font-size: 2rem;
}

.workflow-upload strong {
    display: block;
    margin-top: 10px;
    color: #102033;
}

.workflow-upload span,
.workflow-or,
.workflow-label {
    color: #65758b;
    font-size: 0.88rem;
}

.workflow-file-status {
    display: none;
    margin-top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.1);
    color: #0f4c81;
    font-size: 0.82rem;
    font-weight: 800;
}

.workflow-file-status.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.workflow-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
}

.workflow-or::before,
.workflow-or::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #e4ebf3;
}

.workflow-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.workflow-textarea,
.workflow-input-control,
.workflow-row input {
    width: 100%;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #fff;
    color: #102033;
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.workflow-textarea {
    min-height: 180px;
    padding: 13px 14px;
    resize: vertical;
}

.workflow-input-control,
.workflow-row input {
    height: 40px;
    padding: 0 11px;
}

.workflow-metadata-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.workflow-metadata-grid span {
    display: block;
    margin-bottom: 6px;
    color: #42556d;
    font-size: 0.84rem;
    font-weight: 800;
}

.workflow-note {
    min-height: 76px;
}

.workflow-textarea:focus,
.workflow-input-control:focus,
.workflow-row input:focus {
    outline: none;
    border-color: #0f4c81;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.workflow-actions,
.workflow-review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.workflow-primary,
.workflow-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.workflow-primary {
    background: #0f4c81;
    color: #fff;
}

.workflow-primary:hover {
    background: #0d3f6c;
    transform: translateY(-1px);
}

.workflow-secondary {
    background: #fff;
    color: #102033;
    border-color: #d8e1ec;
}

.workflow-secondary:hover {
    border-color: #0f4c81;
    transform: translateY(-1px);
}

.workflow-clear-draft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    margin-top: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #718197;
    font-weight: 700;
    transition: background-color 160ms ease, color 160ms ease;
}

.workflow-clear-draft:hover {
    background: #f4f7fb;
    color: #a32929;
}

.generation-mode-hint {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #efd8a4;
    border-radius: 8px;
    background: #fff8ea;
    color: #66502a;
    font-size: 0.86rem;
}

.generation-mode-hint:empty {
    display: none;
}

.generation-mode-hint i {
    color: #8a5a00;
}

.workflow-empty,
.output-pending {
    display: grid;
    min-height: 360px;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #718197;
    text-align: center;
}

.workflow-empty i,
.output-pending i {
    color: #9fb3ca;
    font-size: 2.8rem;
}

.issue-rail {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0 14px;
}

.issue-ok,
.issue-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #42556d;
    font-size: 0.84rem;
}

.issue-item {
    border: 1px solid #efd8a4;
    background: #fff8ea;
}

.issue-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.extraction-banner {
    display: grid;
    grid-template-columns: 20px auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #f4f7fb;
    color: #42556d;
    font-size: 0.88rem;
}

.extraction-banner i {
    color: #0f4c81;
}

.extraction-banner span {
    font-weight: 800;
}

.extraction-banner small {
    overflow-wrap: anywhere;
    color: #718197;
}

.extraction-banner.ai {
    border-color: #bfd9ee;
    background: #eef7ff;
}

.extraction-banner.fallback {
    border-color: #efd8a4;
    background: #fff8ea;
}

.workflow-table-wrap {
    max-height: calc(100svh - 360px);
    overflow: auto;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
}

.workflow-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.workflow-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px;
    background: #f4f7fb;
    color: #42556d;
    font-size: 0.82rem;
    text-align: left;
}

.workflow-table td {
    padding: 10px 12px;
    border-top: 1px solid #edf2f7;
    vertical-align: middle;
}

.workflow-row {
    animation: workflowRowIn 260ms ease both;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pill.matched {
    background: #e8f7f1;
    color: #137a5b;
}

.status-pill.review {
    background: #fff3d7;
    color: #8a5a00;
}

.status-pill.blocked {
    background: #ffe8e8;
    color: #a32929;
}

.product-cell small {
    display: block;
    margin-top: 4px;
    color: #718197;
}

.issue-cell span {
    display: inline-flex;
    margin: 2px 4px 2px 0;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #52647b;
    font-size: 0.78rem;
}

.muted-text {
    color: #8a99aa;
}

.output-ready {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.download-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    color: #102033;
    text-decoration: none;
    background: #fff;
    transition: transform 160ms ease, border-color 160ms ease;
}

.download-line:hover {
    border-color: #0f4c81;
    color: #102033;
    transform: translateY(-1px);
}

.download-line i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #eef5fb;
    color: #0f4c81;
}

.download-line span {
    overflow-wrap: anywhere;
    font-weight: 800;
}

.output-summary {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    color: #52647b;
    font-size: 0.9rem;
}

.output-summary span {
    padding-bottom: 8px;
    border-bottom: 1px solid #e4ebf3;
}

.notification-summary {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    color: #52647b;
    font-size: 0.86rem;
}

.notification-summary > span {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #e4ebf3;
}

.notification-summary small {
    grid-column: 2;
    color: #718197;
    overflow-wrap: anywhere;
}

.notification-ok i {
    color: #137a5b;
}

.notification-error i {
    color: #a32929;
}

.notification-muted i {
    color: #8a99aa;
}

.workflow-busy .workflow-primary,
.workflow-busy .workflow-secondary {
    opacity: 0.72;
}

@keyframes workflowEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes workflowRise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes workflowRowIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes workflowSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {
    .workflow-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .workflow-status-strip,
    .workflow-draft-status {
        width: 100%;
    }

    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .workflow-input,
    .workflow-main,
    .workflow-output {
        min-height: auto;
    }

    .workflow-table-wrap {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .workflow-shell {
        padding: 18px 12px 28px;
    }

    .workflow-header {
        grid-template-columns: 1fr;
    }

    .workflow-status-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .workflow-status-strip div {
        min-height: 64px;
        padding: 10px;
    }

    .workflow-status-strip span {
        font-size: 1.32rem;
    }

    .workflow-input,
    .workflow-main,
    .workflow-output {
        padding: 16px;
    }

    .workflow-actions,
    .workflow-review-actions,
    .workflow-metadata-grid {
        grid-template-columns: 1fr;
    }

    .workflow-table th,
    .workflow-table td {
        min-width: 110px;
    }
}
